.hero {
    position: relative;
    z-index: 0; /* stays under the sticky header so the curves overlap the image */
    margin-top: -64px; /* slide the image up beneath the header's curved strata */
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-dark) 100%);
    overflow: hidden;
}

/* Cadre qui porte l'image et les emplacements interactifs.
   L'image est affichée en entier (largeur 100%, hauteur auto) : aucune découpe,
   ce qui permet de positionner les cases en % de manière fiable. */
.hero-frame {
    position: relative;
    width: 100%;
    margin-top: 30px; /* léger décalage sous le header (déplacé ici pour que
                         l'image ET les icônes restent solidaires/alignées) */
    line-height: 0;
    container-type: inline-size; /* permet de dimensionner le nom en cqw
                                    (1cqw = 1% de la largeur du cadre) */
}

.hero-bg {
    display: block;
    width: 100%;
    height: auto;
}

/* Tuile carrée centrée sur (--cx, --cy). La largeur est un % de la largeur du
   cadre et aspect-ratio:1/1 force un carré -> l'icône SVG (carrée) n'est jamais
   déformée et reste alignée quelle que soit la taille de l'image. */
.hero-hotspot {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    width: var(--icon-size);
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
}

.hero-hotspot img {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

/* Affichage de l'icône :
   - desktop : au survol (:hover)
   - mobile  : au clic, via la classe .is-active ajoutée en JS
   Dans les deux cas l'icône grossit légèrement pour un effet "focus". */
.hero-hotspot:hover img,
.hero-hotspot.is-active img {
    opacity: 1;
    transform: scale(1.08);
}

/* Logo de marque placé dynamiquement (centré sur --cx/--cy, largeur --size). */
.hero-brand-logo {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    width: var(--size);
    transform: translate(-50%, -50%);
    z-index: 4; /* au-dessus du dégradé décoratif (.hero::after, z-index 3) */
    pointer-events: none;
}

.hero-brand-logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

/* Nom "LFC DECO" placé dynamiquement. Taille de police via --size (cqw). */
.hero-brand-name {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    transform: translate(-50%, -50%);
    z-index: 4;
    font-size: var(--size);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

/* Transition douce quand la couleur (température de lumière) défile. */
.hero-brand-name .kelvin-letter {
    display: inline-block;
    transition: color 0.3s ease;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--color-white), transparent);
    z-index: 3;
    pointer-events: none; /* dégradé décoratif : ne doit pas bloquer les clics
                             sur les cases (sinon la ligne du bas est inactive
                             sur mobile, où le hero est court) */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    margin-bottom: 2rem;
    animation: scaleIn 0.8s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-logo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.hero-logo img:hover {
    transform: scale(1.05) rotate(2deg);
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-slogan {
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.95;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.6s both;
}

@media screen and (max-width: 1200px) {
    .about-preview {
        color: var(--color-white);
    }
}

@media screen and (min-width: 1200px) {
    .about-preview {
        padding: 5rem 0;
        color: var(--color-white);
    }
}

.about-preview .section-title {
    color: var(--color-white);
}

.about-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-white);
    opacity: 0.95;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    /* Compteurs semi-transparents identiques à a-propos.php */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-white) 0%, rgba(255, 255, 255, 0.4) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.22);
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 1.1rem;
    color: var(--color-white);
    opacity: 0.9;
}

.about-cta {
    text-align: center;
}

/* Bouton lisible sur le fond orange : blanc avec texte orange */
.about-preview .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.about-preview .btn-primary:hover {
    background: var(--color-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.services-preview {
    padding: 5rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--color-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-info {
    padding: 1.5rem;
}

.service-info h3 {
    font-size: 1.3rem;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.service-info p {
    color: var(--color-gray);
    line-height: 1.6;
}

.services-cta {
    text-align: center;
}

.testimonials-section {
    padding: 5rem 0;
    background: var(--color-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.testimonial-centered {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-rating {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: var(--color-dark);
    font-size: 1.1rem;
}

.testimonial-author span {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #e55a2a 100%);
    color: var(--color-white);
    text-align: center;
    padding: 6rem 0;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 1.2rem;
}

.cta-section .btn-primary:hover {
    background: var(--color-dark);
    color: var(--color-white);
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Image affichée en pleine largeur (100% auto, pas de répétition) avec
       un léger zoom centré. La case et les icônes suivent le même cadre,
       l'alignement reste donc correct. */
    .hero-frame {
        /* transform: scale(1.12); */
        transform-origin: center center;
        margin-top: 20px;
    }

    .hero-bg {
        width: 140%;
        margin-left: -20%;
        magin-top: 10px;
    }

    /* Sur mobile, chaque élément du hero utilise son propre jeu de valeurs
       (--cx-m / --cy-m / --size-m) défini en PHP. Les valeurs PC ne sont pas
       perdues : on se contente de lire les variables "-m" à la place. */
    .hero-hotspot {
        left: var(--cx-m);
        top: var(--cy-m);
        width: var(--icon-size-m);
    }

    .hero-brand-logo {
        left: var(--cx-m);
        top: var(--cy-m);
        width: var(--size-m);
    }

    .hero-brand-name {
        left: var(--cx-m);
        top: var(--cy-m);
        font-size: var(--size-m);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-slogan {
        font-size: 1.2rem;
    }

    .hero-logo img {
        width: 100px;
        height: 100px;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-centered {
        grid-column: 1;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }
}
