:root {
    /* Theme clair (fond blanc) */
    --bg0: #F7FAFC;
    --bg1: #FFFFFF;
    --card: rgba(255, 255, 255, 0.96);
    --card2: rgba(248, 250, 252, 0.78);
    --text: rgba(15, 23, 42, 0.95);
    --muted: rgba(15, 23, 42, 0.68);
    --stroke: rgba(15, 23, 42, 0.12);
    --brand: #37B7B2;
    --accent: #B24FA3;
    --accent2: #7C3AED;
    --danger: #EF4444;
    --success: #22C55E;
    --shadow: 0 18px 45px rgba(2, 6, 23, 0.12);
    --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:
        radial-gradient(800px 420px at 20% 0%, rgba(55, 183, 178, 0.18), transparent 60%),
        radial-gradient(700px 350px at 90% 10%, rgba(178, 79, 163, 0.12), transparent 55%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
    color: var(--text);
}

.container {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--stroke);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    height: 42px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.nav-link:hover {
    color: var(--text);
    border-color: rgba(15, 23, 42, 0.15);
    background: rgba(15, 23, 42, 0.04);
}

.nav-link.is-active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(55, 183, 178, 0.18), rgba(178, 79, 163, 0.18));
    border-color: rgba(15, 23, 42, 0.16);
}

/* ---------- Menu mobile (hamburger + tiroir) ---------- */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-backdrop[hidden] {
    display: none !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-toggle:hover {
    border-color: rgba(55, 183, 178, 0.35);
    background: rgba(55, 183, 178, 0.08);
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: rgba(15, 23, 42, 0.82);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
    .header-inner {
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
        position: relative;
        z-index: 22;
    }

    .brand {
        position: relative;
        z-index: 22;
    }

    .nav.nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 76px 18px 28px;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        background: rgba(255, 255, 255, 0.97);
        border-left: 1px solid var(--stroke);
        box-shadow: -12px 0 40px rgba(2, 6, 23, 0.14);
        z-index: 20;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-header.is-nav-open .nav.nav-drawer {
        transform: translateX(0);
    }

    .nav-drawer .nav-link {
        justify-content: center;
        text-align: center;
        border-radius: 12px;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .nav.nav-drawer {
        transition: none;
    }

    .nav-toggle-bar {
        transition: none;
    }
}

@media (min-width: 901px) {
    .nav-backdrop {
        display: none !important;
    }

    .nav-toggle {
        display: none !important;
    }

    .nav.nav-drawer {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        background: transparent;
        border: none;
        box-shadow: none;
        transform: none;
        overflow: visible;
    }
}

.page-content {
    padding-bottom: 44px;
    animation: pageFadeUp 420ms ease both;
}

/* On laisse l'animation globale uniquement sur les autres pages.
   Pour la présentation, on fait une animation "cascade" spécifique. */
.page-presentation.page-content {
    animation: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
    .page-content { animation: none !important; }
}

/* Cascade reload : 2 cards hero + 3 cards "Pourquoi" */
.page-presentation .hero-right .hero-card,
.page-presentation .grid-3 .card {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUpCascadeItem 520ms ease both;
    will-change: opacity, transform;
}

.page-presentation .hero-right .hero-card:nth-child(1) { animation-delay: 0ms; }
.page-presentation .hero-right .hero-card:nth-child(2) { animation-delay: 160ms; }

.page-presentation .grid-3 .card:nth-child(1) { animation-delay: 280ms; }
.page-presentation .grid-3 .card:nth-child(2) { animation-delay: 410ms; }
.page-presentation .grid-3 .card:nth-child(3) { animation-delay: 540ms; }

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

/* Hover zoom léger sur les éléments encadrés */
.page-presentation .hero-right .hero-card:hover,
.page-presentation .grid-3 .card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 26px 70px rgba(55, 183, 178, 0.18);
    border-color: rgba(55, 183, 178, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
    .page-presentation .hero-right .hero-card,
    .page-presentation .grid-3 .card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Désactiver l'animation globale sur les pages suivantes.
   Puis appliquer une cascade spécifique (cartes + galerie) */
.page-formations.page-content,
.page-prestations.page-content,
.page-pourquoi-nous-choisir.page-content,
.page-galerie.page-content,
.page-contact.page-content {
    animation: none !important;
}

/* Animations cascade (fade + up successifs) */
.page-formations .formations-grid > .card,
.page-prestations .prestations-grid > .card,
.page-pourquoi-nous-choisir .grid-why > .why-block,
.page-galerie .gallery-grid > .gallery-thumb,
.page-contact .form-row {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUpCascadeItem 520ms ease both;
    will-change: opacity, transform;
}

/* Formations : 7 cards */
.page-formations .formations-grid > .card:nth-child(1) { animation-delay: 0ms; }
.page-formations .formations-grid > .card:nth-child(2) { animation-delay: 160ms; }
.page-formations .formations-grid > .card:nth-child(3) { animation-delay: 320ms; }
.page-formations .formations-grid > .card:nth-child(4) { animation-delay: 480ms; }
.page-formations .formations-grid > .card:nth-child(5) { animation-delay: 640ms; }
.page-formations .formations-grid > .card:nth-child(6) { animation-delay: 800ms; }
.page-formations .formations-grid > .card:nth-child(7) { animation-delay: 960ms; }

/* Prestations : 6 cards */
.page-prestations .prestations-grid > .card:nth-child(1) { animation-delay: 0ms; }
.page-prestations .prestations-grid > .card:nth-child(2) { animation-delay: 160ms; }
.page-prestations .prestations-grid > .card:nth-child(3) { animation-delay: 320ms; }
.page-prestations .prestations-grid > .card:nth-child(4) { animation-delay: 480ms; }
.page-prestations .prestations-grid > .card:nth-child(5) { animation-delay: 640ms; }
.page-prestations .prestations-grid > .card:nth-child(6) { animation-delay: 800ms; }

/* Pourquoi : 6 blocs */
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(1) { animation-delay: 0ms; }
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(2) { animation-delay: 160ms; }
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(3) { animation-delay: 320ms; }
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(4) { animation-delay: 480ms; }
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(5) { animation-delay: 640ms; }
.page-pourquoi-nous-choisir .grid-why > .why-block:nth-child(6) { animation-delay: 800ms; }

/* Galerie : 8 vignettes */
.page-galerie .gallery-grid > .gallery-thumb:nth-child(1) { animation-delay: 0ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(2) { animation-delay: 140ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(3) { animation-delay: 280ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(4) { animation-delay: 420ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(5) { animation-delay: 560ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(6) { animation-delay: 700ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(7) { animation-delay: 840ms; }
.page-galerie .gallery-grid > .gallery-thumb:nth-child(8) { animation-delay: 980ms; }

/* Contact : 3 champs + bouton (optionnel) */
.page-contact .form-row:nth-of-type(1) { animation-delay: 0ms; }
.page-contact .form-row:nth-of-type(2) { animation-delay: 160ms; }
.page-contact .form-row:nth-of-type(3) { animation-delay: 320ms; }
.page-contact .form-actions { opacity: 0; transform: translateY(14px); animation: fadeUpCascadeItem 520ms ease both; animation-delay: 480ms; }

/* Hover zoom léger aussi pour "Pourquoi" */
.page-pourquoi-nous-choisir .why-block {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.page-pourquoi-nous-choisir .why-block:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 26px 70px rgba(55, 183, 178, 0.14);
    border-color: rgba(55, 183, 178, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .page-formations .formations-grid > .card,
    .page-prestations .prestations-grid > .card,
    .page-pourquoi-nous-choisir .grid-why > .why-block,
    .page-galerie .gallery-grid > .gallery-thumb,
    .page-contact .form-row,
    .page-contact .form-actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.site-footer {
    border-top: 1px solid var(--stroke);
    padding: 28px 0;
    margin-top: 20px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px 36px;
}

@media (min-width: 900px) {
    .footer-inner {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
    }

    .footer-col-meta {
        text-align: right;
    }

    .site-footer .contact-channels {
        padding-top: 2px;
    }
}

.footer-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
}

.footer-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.footer-muted {
    color: rgba(15, 23, 42, 0.55);
    font-size: 13px;
}

.contact-channels-title {
    margin: 0 0 10px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.72);
}

.contact-channels-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.contact-channels-list li {
    display: grid;
    gap: 2px;
}

@media (min-width: 900px) {
    .footer-inner .contact-channels-list li {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: baseline;
        gap: 10px 14px;
    }
}

.contact-channels-key {
    font-weight: 700;
    font-size: 12px;
    color: var(--muted);
}

.contact-channels-list a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.contact-channels-list a:not(.social-icon-link):hover {
    text-decoration: underline;
}

/* Icônes réseaux : pas de soulignement ni couleur « lien » du navigateur */
.contact-channels-list a.social-icon-link,
.contact-channels-list a.social-icon-link:link,
.contact-channels-list a.social-icon-link:visited {
    text-decoration: none !important;
    color: rgba(55, 183, 178, 0.98);
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}

.contact-channels-list a.social-icon-link:hover,
.contact-channels-list a.social-icon-link:active {
    text-decoration: none !important;
}

.contact-channels-phone,
.contact-channels-social,
.contact-channels-address {
    color: var(--text);
}

.contact-channels-address {
    line-height: 1.5;
    font-weight: 600;
}

.contact-channels-phone {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15em 0.1em;
}

.contact-channels-social:not(.contact-channels-social--icons) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0;
    row-gap: 0.2em;
}

.contact-channels-sep {
    margin: 0 0.35em;
    color: rgba(15, 23, 42, 0.35);
    font-weight: 600;
}

.contact-channels-dial {
    font-weight: 700;
    font-size: 0.95em;
    color: rgba(15, 23, 42, 0.62);
    margin-right: 0.2em;
}

.contact-channels-phone .contact-channels-sep {
    margin: 0 0.45em;
}

.contact-channels-social--icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    max-width: 42px;
    max-height: 42px;
    line-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(55, 183, 178, 0.12);
    border: 1px solid rgba(55, 183, 178, 0.22);
    color: rgba(55, 183, 178, 0.98);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.social-icon-link:hover {
    background: rgba(55, 183, 178, 0.22);
    border-color: rgba(55, 183, 178, 0.35);
    transform: translateY(-2px);
    color: rgba(45, 155, 150, 1);
    text-decoration: none;
}

.social-icon-svg {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    display: block;
    flex-shrink: 0;
}

/* Filet de sécurité si une vieille CSS est servie en prod : tout SVG dans le bloc coordonnées */
.contact-channels svg {
    max-width: 24px;
    max-height: 24px;
    width: 22px;
    height: 22px;
    display: block;
}

.site-footer .contact-channels-list {
    font-size: 13px;
}

.contact-page-grid {
    display: grid;
    gap: 28px;
    align-items: start;
}

@media (min-width: 880px) {
    .contact-page-grid {
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
        gap: 32px;
    }
}

.contact-page-aside .contact-channels-title {
    margin-top: 0;
}

.section {
    padding: 58px 0;
}

.section-hero {
    padding: 44px 0 20px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-head {
    max-width: 840px;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(15, 23, 42, 0.03);
    color: rgba(15, 23, 42, 0.85);
    font-weight: 700;
    font-size: 13px;
}

.hero-title {
    margin: 0;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: -0.6px;
}

.hero-title-sm { font-size: 34px; }

.hero-lead {
    margin: 0;
    color: var(--muted);
    max-width: 780px;
    font-size: 16px;
    line-height: 1.65;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-why { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid-why .why-block { min-height: 170px; }

.hero {
    padding: 46px 0 24px;
}

.hero-inner {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-right {
    display: grid;
    gap: 14px;
}

.hero-card {
    background: linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.hero-card-accent {
    border-color: rgba(55, 183, 178, 0.25);
    background: linear-gradient(180deg, rgba(55, 183, 178, 0.18), rgba(248, 250, 252, 0.78));
}

.card {
    background: linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.card-hover {
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    border-color: rgba(55, 183, 178, 0.38);
    background: linear-gradient(180deg, rgba(55, 183, 178, 0.12), rgba(248, 250, 252, 0.92));
    box-shadow: 0 28px 80px rgba(55, 183, 178, 0.16);
}

.card-icon {
    font-weight: 900;
    letter-spacing: 0.5px;
    color: rgba(15, 23, 42, 0.86);
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.card-icon-brand {
    color: rgba(55, 183, 178, 0.95);
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.card-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14.5px;
}

.card-note {
    margin: 14px 0 0;
    color: rgba(15, 23, 42, 0.82);
    font-weight: 700;
    font-size: 14px;
}

.grid-3 .card { min-height: 160px; }

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    transition: all 0.15s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(55, 183, 178, 0.55), rgba(178, 79, 163, 0.55));
    border-color: rgba(15, 23, 42, 0.14);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-secondary {
    background: rgba(15, 23, 42, 0.03);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text);
}

.grid-why .why-block {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.72));
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.why-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(55, 183, 178, 0.14);
    border: 1px solid rgba(55, 183, 178, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 12px;
}

.why-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.why-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14.5px;
}

.formations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prestations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subgrid { margin-top: 10px; }
.subcard {
    padding: 0;
}

.subcard-title {
    font-weight: 900;
    margin-bottom: 8px;
    color: rgba(15, 23, 42, 0.88);
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 8px;
}

.checklist li {
    color: rgba(15, 23, 42, 0.86);
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    line-height: 1.5;
    font-size: 14.2px;
}

.checklist li::before {
    content: "✓";
    color: rgba(55, 183, 178, 0.95);
    font-weight: 900;
}

.check-spacing { margin-top: 8px; }

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    margin-bottom: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.25);
}

.alert-error {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.25);
}

.form-wrap {
    max-width: 720px;
    margin: 0 auto;
}

/* Page contact : pleine largeur (classe dédiée = fonctionne même si le sélecteur parent manque en prod) */
.contact-page-grid > .form-wrap,
.form-wrap--contact-full {
    max-width: none;
    width: 100%;
    margin: 0;
    min-width: 0;
}

.form {
    display: grid;
    gap: 14px;
}

.page-contact .form {
    gap: 22px;
    width: 100%;
}

.form-row {
    display: grid;
    gap: 8px;
}

.page-contact .form-row {
    gap: 12px;
}

label {
    font-weight: 800;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.86);
}

.page-contact label {
    font-size: 15px;
}

input, textarea {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
    outline: none;
    font-size: 14px;
}

.page-contact input,
.page-contact textarea {
    width: 100%;
    min-width: 0;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.45;
    border-radius: 14px;
    min-height: 0;
    box-sizing: border-box;
}

.page-contact textarea {
    min-height: 200px;
    resize: vertical;
}

input:focus, textarea:focus {
    border-color: rgba(55, 183, 178, 0.35);
    box-shadow: 0 0 0 4px rgba(55, 183, 178, 0.14);
}

.page-contact input:focus,
.page-contact textarea:focus {
    box-shadow: 0 0 0 5px rgba(55, 183, 178, 0.16);
}

.field-error {
    color: rgba(127, 29, 29, 0.98);
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 2px;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.72);
    z-index: 90;
    padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox-stage {
    width: min(980px, 100%);
    display: grid;
    place-items: center;
}

.lightbox-img {
    max-height: 76vh;
    width: auto;
    max-width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 25px 70px rgba(0,0,0,0.6);
    background: rgba(255,255,255,0.03);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.lightbox-nav {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lightbox-arrow {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.10);
}

#lightboxPrev { left: 18px; }
#lightboxNext { right: 18px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-thumb {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, rgba(55, 183, 178, 0.08), rgba(248, 250, 252, 0.85));
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    min-height: 120px;
    box-shadow: var(--shadow);
}

.gallery-thumb:hover {
    border-color: rgba(55, 183, 178, 0.28);
    transform: translateY(-4px);
    box-shadow: 0 28px 80px rgba(55, 183, 178, 0.16);
}

.gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.22s ease;
}

.gallery-thumb:hover .gallery-thumb-img {
    transform: scale(1.04);
}

/* Visible uniquement si l'image est masquée (onerror) — sinon le texte recouvrait la vignette */
.gallery-thumb-fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    padding: 10px;
    color: rgba(15, 23, 42, 0.66);
    font-weight: 800;
    font-size: 12px;
    text-align: center;
}

.gallery-thumb:has(.gallery-thumb-img[style*="display: none"]) .gallery-thumb-fallback,
.gallery-thumb:has(.gallery-thumb-img[style*="display:none"]) .gallery-thumb-fallback {
    display: grid;
}

@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-why { grid-template-columns: 1fr; }
    .formations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prestations-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-title { font-size: 34px; }
    .hero-title-sm { font-size: 28px; }
}

@media (max-width: 520px) {
    .container { width: calc(100% - 24px); }
    .brand-logo { height: 36px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .nav-link { padding: 8px 10px; font-size: 13px; }
}

