/* components.css — composants communs du design nv2 (DESIGN.md § 4 et 5) :
   icônes trait, carreau du logo, boutons, sections et en-têtes de section,
   grilles, hero commun, alerte « page non traduite », cartes d'agence,
   formulaire de contact et cartes de contact. Mobile d'abord ; ruptures
   760 px et 1060 px. Couleurs : jetons de theme.css. */

/* Icône trait (renderLineIcon) : jamais écrasée par un parent flex. */
.line-icon {
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

/* Carreau blanc du logo, coin bas droit coupé (en-tête, menu mobile). */
.logo-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    clip-path: polygon(0 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
}

.logo-tile img {
    height: auto;
}

/* =================================================================
   Boutons
   - principal (.btn-primary) : plein, coin bas droit coupé ; bleu par
     défaut, variantes marine, couleur de catégorie, petite et grande
     taille, retour (découpe en haut à droite) ;
   - secondaire (.btn-outline) : contour 2 px, rayon 8 px ;
   - secondaire sur fond sombre (.btn-dark-outline).
   Cible tactile ≥ 44 px. Survol : fond assombri par une ombre interne
   (le texte garde sa couleur, contraste inchangé).
   ================================================================= */
.btn-primary {
    --btn-bg: var(--color-blue);
    --btn-text: var(--color-on-blue);
    --btn-cut: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 12px 22px 12px 18px;
    border: 0;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    font-family: var(--font-condensed);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% 70%, calc(100% - var(--btn-cut)) 100%, 0 100%);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: var(--btn-text);
    box-shadow: inset 0 0 0 999px var(--btn-hover-shade);
}

/* Le pan coupé rognerait le contour de focus : il passe à l'intérieur. */
.btn-primary:focus-visible {
    outline-offset: -4px;
    outline-color: currentColor;
}

.btn-primary--navy {
    --btn-bg: var(--color-navy);
    --btn-text: var(--color-white);
}

.btn-primary--category {
    --btn-bg: var(--cat-color, var(--color-navy));
    --btn-text: var(--cat-text, var(--color-white));
}

.btn-primary--small {
    --btn-cut: 10px;
    padding: 10px 20px;
    font-size: 16px;
}

.btn-primary--large {
    --btn-cut: 14px;
    gap: 12px;
    padding: 16px 30px 16px 24px;
    font-size: 19px;
    letter-spacing: 0.05em;
}

/* Bouton de retour (page 404, prompt 030) : flèche à gauche, découpe en
   haut à droite. */
.btn-primary--back {
    --btn-cut: 14px;
    min-height: 48px;
    padding: 13px 30px 13px 24px;
    font-size: 18px;
    letter-spacing: 0.06em;
    clip-path: polygon(0 0, calc(100% - var(--btn-cut)) 0, 100% var(--btn-cut), 100% 100%, 0 100%);
}

.btn-outline {
    --btn-color: var(--color-navy);
    --btn-border: var(--color-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid var(--btn-border);
    border-radius: var(--radius-small);
    background-color: var(--color-white);
    color: var(--btn-color);
    font-family: var(--font-condensed);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
    background-color: var(--color-section-alt);
    color: var(--btn-color);
}

.btn-outline--brand {
    --btn-color: var(--brand-text, var(--color-navy));
    --btn-border: var(--brand-color, var(--color-navy));
}

.btn-dark-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid var(--color-dark-outline);
    border-radius: var(--radius-small);
    color: var(--color-white);
    font-family: var(--font-condensed);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.btn-dark-outline:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

/* =================================================================
   Sections : fonds alternés blanc / gris clair, en-tête centré
   (sur-titre, titre Anton, barrette bleue à pans coupés).
   ================================================================= */
.section {
    padding: 64px 0 72px;
    background-color: var(--color-white);
}

.section--alt {
    background-color: var(--color-section-alt);
    border-top: 1px solid var(--color-border-section);
}

/* Ancres (#solutions, #contact…) : jamais sous l'en-tête collant. */
.section[id],
[id^="agence-"],
[id^="formation-"] {
    scroll-margin-top: 80px;
}

.section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-eyebrow {
    margin: 0;
    color: var(--color-link);
    font-family: var(--font-condensed);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-title {
    margin: 10px 0 0;
    font-family: var(--font-heading);
    font-size: clamp(36px, 4.6vw, 56px);
    font-weight: 400;
    line-height: 1.02;
    text-transform: uppercase;
    color: var(--color-navy);
    overflow-wrap: break-word;
}

/* Accueil : titres de section un cran plus grands. */
.page-hero--home ~ .section .section-title {
    font-size: clamp(38px, 5vw, 60px);
}

.section-bar {
    display: block;
    width: 72px;
    height: 6px;
    margin-top: 16px;
    background-color: var(--color-blue);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.section-body {
    margin-top: 36px;
}

/* Texte courant centré des sections (18 px / 1,65). */
.section-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 820px;
    margin: 30px auto 0;
    text-align: center;
}

.section-text p {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text-body);
}

.section-text--after {
    margin-top: 44px;
}

/* Grilles : 1 colonne, puis 2 dès 760 px, puis 4 dès 1060 px. */
.grid-4,
.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 760px) {
    .section {
        padding: 96px 0 104px;
    }

    .section-body {
        margin-top: 52px;
    }

    .section-text p {
        font-size: 18px;
    }

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

@media (min-width: 1060px) {
    .grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* =================================================================
   Hero commun (components/ui/page-hero.php) : reflet métallique, grille
   fine, logo, titre dynamique en Michroma, motif bleu / losange ; photos
   de chantier dispersées dès 760 px (une partie masquée sous 1060 px),
   bande de photos inclinées sous le titre en dessous.
   ================================================================= */
.page-hero {
    position: relative;
    background: var(--hero-gradient);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--hero-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
}

.page-hero-inner {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 56px;
}

.page-hero-logo {
    position: relative;
    width: 128px;
    height: auto;
    filter: drop-shadow(0 14px 22px var(--hero-logo-glow));
}

.page-hero--home .page-hero-logo {
    width: 160px;
}

.page-hero-title {
    position: relative;
    margin: 26px 0 0;
    font-family: var(--font-brand);
    font-size: clamp(22px, 3.4vw, 44px);
    font-weight: 400;
    font-synthesis: none;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-navy);
    overflow-wrap: break-word;
    max-width: 100%;
}

.page-hero--home .page-hero-title {
    font-size: clamp(22px, 3.6vw, 48px);
}

.page-hero-motif {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.page-hero-motif span:nth-child(odd) {
    width: 46px;
    height: 3px;
    background-color: var(--cat-color, var(--color-blue));
}

.page-hero-motif span:nth-child(2) {
    width: 8px;
    height: 8px;
    background-color: var(--color-navy);
    transform: rotate(45deg);
}

.page-hero-subtitle {
    position: relative;
    max-width: 760px;
    margin: 18px 0 0;
    font-family: var(--font-condensed);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-text-subtitle);
}

/* Photos dispersées : masquées sur mobile (bande ci-dessous). */
.hero-photo {
    display: none;
}

.hero-strip {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 6px 14px;
    width: 100%;
    max-width: 380px;
    margin-top: 30px;
}

.page-hero--home .hero-strip {
    max-width: 420px;
    margin-top: 34px;
}

/* Chaque photo est dans un <picture> (élément flex, de la taille de l'image
   qui est en display: block) : sa <source> vide empêche le téléchargement
   sur ordinateur (page-hero.php). Pas de display: contents : Chromium
   renvoie alors la 3e photo à la ligne. */
.hero-strip img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-photo-small);
}

.hero-strip picture:nth-child(1) img { width: 104px; height: 104px; transform: translateY(14px) rotate(-3deg); }
.hero-strip picture:nth-child(2) img { width: 84px; height: 84px; transform: translateY(-6px) rotate(2deg); }
.hero-strip picture:nth-child(3) img { width: 112px; height: 112px; transform: translateY(22px) rotate(4deg); }
.hero-strip picture:nth-child(4) img { width: 78px; height: 78px; transform: translate(-18px, 10px) rotate(3deg); }
.hero-strip picture:nth-child(5) img { width: 96px; height: 96px; transform: translate(22px, -4px) rotate(-2deg); }

@media (min-width: 760px) {
    .page-hero-inner {
        min-height: 500px;
        padding: 60px 24px;
    }

    .page-hero--home .page-hero-inner {
        min-height: 640px;
        padding: 70px 24px;
    }

    .page-hero-logo {
        width: 160px;
    }

    .page-hero--home .page-hero-logo {
        width: 210px;
    }

    .page-hero-title {
        margin-top: 30px;
    }

    .page-hero--home .page-hero-title {
        margin-top: 34px;
    }

    .page-hero-subtitle {
        font-size: 21px;
    }

    .hero-strip {
        display: none;
    }

    .hero-photo {
        display: block;
        position: absolute;
        object-fit: cover;
        border: 5px solid var(--color-white);
        box-shadow: var(--shadow-photo);
    }

    /* Pages internes : 7 photos (3, 4 et 7 optionnelles). */
    .hero-photo--1 { left: 3%; top: 38px; width: 140px; height: 140px; }
    .hero-photo--2 { left: 16%; top: 196px; width: 104px; height: 104px; }
    .hero-photo--3 { left: 5%; top: 320px; width: 120px; height: 120px; }
    .hero-photo--4 { left: 27%; top: 52px; width: 82px; height: 82px; }
    .hero-photo--5 { right: 3%; top: 44px; width: 150px; height: 150px; }
    .hero-photo--6 { right: 17%; top: 210px; width: 100px; height: 100px; }
    .hero-photo--7 { right: 4%; top: 318px; width: 128px; height: 128px; }

    /* Accueil : 9 photos (3, 4, 5, 8 et 9 optionnelles). */
    .page-hero--home .hero-photo--1 { left: 2%; right: auto; top: 46px; width: 168px; height: 168px; }
    .page-hero--home .hero-photo--2 { left: 15%; right: auto; top: 238px; width: 118px; height: 118px; }
    .page-hero--home .hero-photo--3 { left: 3%; right: auto; top: 392px; width: 140px; height: 140px; }
    .page-hero--home .hero-photo--4 { left: 18%; right: auto; top: 488px; width: 96px; height: 96px; }
    .page-hero--home .hero-photo--5 { left: 25%; right: auto; top: 58px; width: 86px; height: 86px; }
    .page-hero--home .hero-photo--6 { left: auto; right: 3%; top: 40px; width: 156px; height: 156px; }
    .page-hero--home .hero-photo--7 { left: auto; right: 14%; top: 236px; width: 112px; height: 112px; }
    .page-hero--home .hero-photo--8 { left: auto; right: 2%; top: 384px; width: 160px; height: 160px; }
    .page-hero--home .hero-photo--9 { left: auto; right: 19%; top: 480px; width: 92px; height: 92px; }

    /* Entre 760 et 1060 px : photos optionnelles masquées. */
    .hero-photo--3,
    .hero-photo--4,
    .hero-photo--7,
    .page-hero--home .hero-photo--5,
    .page-hero--home .hero-photo--8,
    .page-hero--home .hero-photo--9 {
        display: none;
    }

    .page-hero--home .hero-photo--7 {
        display: block;
    }
}

@media (min-width: 1060px) {
    .hero-photo--3,
    .hero-photo--4,
    .hero-photo--7,
    .page-hero--home .hero-photo--5,
    .page-hero--home .hero-photo--8,
    .page-hero--home .hero-photo--9 {
        display: block;
    }
}

/* =================================================================
   Hero, variante catalogue (page-hero.php, isCatalogue, prompt 024) : pas
   de logo, fil d'Ariane au-dessus du titre, titre en --cat-text et motif en
   --cat-fill (posés par la page catégorie), 2 à 6 photos de la catégorie
   (rôles g1, g2, g3 à gauche, d1, d2, d3 à droite). Entre 760 et 1060 px :
   g1 et d1 seules, en 120 px, haut et bas ; le titre et le fil d'Ariane
   sont rétrécis pour ne jamais passer sous une photo.
   ================================================================= */
.breadcrumb--hero {
    position: relative;
    font-family: var(--font-condensed);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    max-width: 100%;
}

.breadcrumb--hero .breadcrumb-list {
    justify-content: center;
    font-size: inherit;
}

.breadcrumb--hero .breadcrumb-item a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.breadcrumb--hero .breadcrumb-item a:hover {
    color: var(--color-navy);
    text-decoration: underline;
}

.breadcrumb--hero .breadcrumb-separator {
    color: var(--color-breadcrumb-separator);
}

/* Élément courant : petit texte sur le bas du dégradé du bandeau (#E6EBF1),
   donc 4,5:1 exigé (A-24) ; la teinte de la catégorie, assombrie de 12 %
   (résine 5,0:1, ancrages 4,8:1, matériel 5,3:1, TITAN selon le distributeur).
   Couleur FIXE --cat-crumb calculée par categoryColorStyle() (prompt 030 :
   aucun mélange de couleurs calculé par le navigateur, ignoré avant
   iOS 16.2) ; repli : marine assombrie.
   Les titres (grand texte, 3:1 suffit) gardent --cat-text. */
.breadcrumb--hero [aria-current="page"] {
    color: var(--cat-crumb, var(--color-breadcrumb-current));
}

.page-hero--catalogue .page-hero-title {
    max-width: 820px;
    margin-top: 20px;
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.2;
    color: var(--cat-text, var(--color-navy));
}

.page-hero--catalogue .page-hero-motif {
    margin-top: 20px;
}

.page-hero--catalogue .page-hero-motif span:nth-child(odd) {
    background-color: var(--cat-fill, var(--color-blue));
}

.page-hero--catalogue .hero-strip picture:nth-child(1) img { width: 96px; height: 96px; transform: translateY(12px) rotate(-3deg); }
.page-hero--catalogue .hero-strip picture:nth-child(2) img { width: 80px; height: 80px; transform: translateY(-6px) rotate(2deg); }
.page-hero--catalogue .hero-strip picture:nth-child(3) img { width: 100px; height: 100px; transform: translateY(16px) rotate(4deg); }

@media (min-width: 760px) {
    .page-hero--catalogue .page-hero-inner {
        min-height: 420px;
        padding: 64px 24px;
    }

    .page-hero--catalogue .page-hero-title {
        margin-top: 20px;
    }

    /* Une photo de 120 px de chaque côté (marge 4 % comprise) : le titre et
       le fil d'Ariane gardent 160 px libres de part et d'autre. */
    .page-hero--catalogue:not(.page-hero--photos-0) .page-hero-title,
    .page-hero--catalogue:not(.page-hero--photos-0) .breadcrumb--hero {
        max-width: min(820px, calc(100% - 320px));
    }

    .page-hero--catalogue .hero-photo { display: none; }

    .page-hero--catalogue .hero-photo--g1 { display: block; left: 3%; top: 22px; width: 120px; height: 120px; }
    .page-hero--catalogue .hero-photo--d1 { display: block; right: 4%; bottom: 22px; width: 120px; height: 120px; }
}

@media (min-width: 1060px) {
    .page-hero--catalogue:not(.page-hero--photos-0) .page-hero-title,
    .page-hero--catalogue:not(.page-hero--photos-0) .breadcrumb--hero {
        max-width: min(820px, calc(100% - 400px));
    }

    .page-hero--catalogue .hero-photo { display: block; }

    .page-hero--catalogue .hero-photo--g1 { left: 3%; top: 30px; bottom: auto; width: 160px; height: 160px; }
    .page-hero--catalogue .hero-photo--g2 { left: 14%; bottom: 24px; width: 104px; height: 104px; }
    .page-hero--catalogue .hero-photo--g3 { left: 21%; top: 40px; width: 76px; height: 76px; }
    .page-hero--catalogue .hero-photo--d1 { right: 4%; top: 104px; bottom: auto; width: 140px; height: 140px; }
    .page-hero--catalogue .hero-photo--d2 { right: 18%; top: 24px; width: 84px; height: 84px; }
    .page-hero--catalogue .hero-photo--d3 { right: 13%; bottom: 28px; width: 96px; height: 96px; }

    .page-hero--photos-2 .hero-photo--g1 { left: 4%; top: 46px; width: 150px; height: 150px; }
    .page-hero--photos-2 .hero-photo--d1 { right: 5%; top: auto; bottom: 44px; width: 140px; height: 140px; }
}

/* =================================================================
   Lignes numérotées (components/ui/numbered-rows.php) : filets haut et
   bas, pointillés entre les lignes, numéro à pan coupé, bouton à contour.
   Une colonne en mobile ; numéro + texte dès 760 px (bouton sous le
   texte) ; numéro, texte et bouton sur une ligne dès 1060 px. Couleurs :
   --row-fill, --row-on, --row-text, --row-rule (page catégorie :
   catalogue.css).
   ================================================================= */
.numbered-rows {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    border-top: 2px solid var(--row-rule, var(--color-navy));
    border-bottom: 2px solid var(--row-rule, var(--color-navy));
}

.numbered-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 26px 0;
}

.numbered-row + .numbered-row {
    border-top: 1px dashed var(--color-border-dashed);
}

.numbered-row-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: var(--row-fill, var(--color-blue));
    color: var(--row-on, var(--color-on-blue));
    font-family: var(--font-heading);
    font-size: 30px;
    clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 0 100%);
}

.numbered-row-title {
    margin: 0;
    color: var(--row-text, var(--color-navy));
    font-family: var(--font-condensed);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.numbered-row-body p {
    margin: 10px 0 0;
    color: var(--color-text-body);
    font-size: 17px;
    line-height: 1.6;
}

.numbered-row-btn {
    --btn-color: var(--row-text, var(--color-navy));
    --btn-border: var(--row-text, var(--color-navy));
    justify-self: start;
    gap: 10px;
    white-space: nowrap;
}

@media (min-width: 760px) {
    .numbered-row {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 26px;
        padding: 30px 0;
    }

    .numbered-row-number {
        width: 64px;
        height: 64px;
        font-size: 34px;
    }

    .numbered-row-title {
        font-size: 28px;
    }

    .numbered-row-btn {
        grid-column: 2;
    }
}

@media (min-width: 1060px) {
    .numbered-row {
        grid-template-columns: 76px minmax(0, 1fr) auto;
    }

    .numbered-row-btn {
        grid-column: auto;
    }
}

/* =================================================================
   Alerte « page non traduite » (components/ui/lang-banner.php) : bandeau
   jaune au-dessus de l'en-tête, bandes de signalisation aux extrémités.
   ================================================================= */
.lang-banner {
    display: flex;
    align-items: stretch;
    background-color: var(--color-alert);
    color: var(--color-black);
}

.lang-banner::before,
.lang-banner::after {
    content: "";
    flex: none;
    width: 16px;
    background-image: repeating-linear-gradient(-45deg, var(--color-black) 0 12px, var(--color-alert) 12px 24px);
}

.lang-banner-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
}

.lang-banner-inner p {
    margin: 0;
    color: inherit;
}

.lang-banner-inner a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.lang-banner-icon {
    display: flex;
    flex: none;
}

.lang-banner-close {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: none;
    color: inherit;
}

.lang-banner-close:hover {
    background-color: var(--color-black);
    color: var(--color-alert);
}

@media (min-width: 760px) {
    .lang-banner::before,
    .lang-banner::after {
        width: 64px;
    }

    .lang-banner-inner {
        padding: 11px 20px;
        font-size: 16px;
    }
}

/* =================================================================
   Agences : zone visuelle commune (components/contact/agence-map.php :
   photo, sinon carte stylisée sans aperçu Google Maps, repère, bouton
   « Voir sur la carte »), carte de l'accueil (agence-card : nom en
   pastille marine ; adresse, contact, horaires), agence en pleine largeur
   de la page Agences (agence-detail, prompt 022).
   ================================================================= */
.agences-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.agence-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-navy);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.agence-map {
    position: relative;
    overflow: hidden;
    background-color: var(--map-bg);
    background-image:
        linear-gradient(var(--map-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--map-grid-line) 1px, transparent 1px),
        linear-gradient(28deg, transparent 46%, var(--color-white) 46%, var(--color-white) 50%, transparent 50%),
        linear-gradient(-62deg, transparent 58%, var(--color-white) 58%, var(--color-white) 61%, transparent 61%);
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
}

.agence-map--alt {
    background-image:
        linear-gradient(var(--map-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--map-grid-line) 1px, transparent 1px),
        linear-gradient(-24deg, transparent 40%, var(--color-white) 40%, var(--color-white) 44%, transparent 44%),
        linear-gradient(70deg, transparent 62%, var(--color-white) 62%, var(--color-white) 65%, transparent 65%);
}

.agence-map--carte {
    height: 210px;
}

.agence-map--page {
    min-height: 320px;
}

.agence-map-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agence-map-name {
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 12px 22px 12px 16px;
    background-color: var(--color-navy);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

.agence-map-pin {
    position: absolute;
    left: 50%;
    top: 52%;
    display: flex;
    transform: translate(-50%, -50%);
}

.agence-map--page .agence-map-pin {
    top: 46%;
}

.map-pin-body {
    fill: var(--color-blue);
    stroke: var(--color-navy);
}

.map-pin-dot {
    fill: var(--color-white);
    stroke: none;
}

.agence-map-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 9px 16px;
    font-size: 15px;
}

.agence-map--page .agence-map-btn {
    right: auto;
    left: 50%;
    bottom: 22px;
    padding: 13px 24px 13px 20px;
    font-size: 17px;
    white-space: nowrap;
    transform: translateX(-50%);
}

.agence-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 24px;
}

.agence-address {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--color-text-body);
}

.agence-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 24px;
    color: var(--color-navy);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.agence-link .line-icon {
    color: var(--color-link);
}

.agence-link:hover {
    color: var(--color-link);
}

.agence-hours {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--color-border-dashed);
}

.agence-label {
    margin: 0;
    color: var(--color-link);
    font-family: var(--font-condensed);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.agence-hours-list {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 22px;
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--color-text-body);
}

.agence-hours-row {
    display: contents;
}

.agence-hours-row dt {
    font-weight: 600;
}

.agence-hours-row dd {
    margin: 0;
}

@media (min-width: 760px) {
    .agences-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agence-map-name {
        padding-left: 20px;
        font-size: 26px;
    }

    .agence-card-body {
        padding: 24px 26px 26px;
    }
}

/* Page Agences : une agence par section, visuel à gauche et
   informations à droite dès 760 px, informations sur 2 colonnes dès
   1060 px (horaires sur toute la largeur). */
.agence-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 40px;
    background-color: var(--color-white);
    border: 2px solid var(--color-navy);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.agence-detail-infos {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px 32px;
    align-content: start;
    padding: 28px 22px 30px;
}

.agence-detail-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.agence-detail .agence-address {
    font-size: 17px;
    line-height: 1.5;
}

.agence-detail .agence-link--phone {
    font-family: var(--font-condensed);
    font-size: 24px;
    font-weight: 700;
}

.agence-detail .agence-hours {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 20px;
}

.agence-detail .agence-hours-list {
    gap: 8px 26px;
    margin-top: 10px;
    font-size: 16px;
}

@media (min-width: 760px) {
    .agence-detail {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    }

    .agence-detail-infos {
        padding: 34px 36px;
    }
}

@media (min-width: 1060px) {
    .agence-detail-infos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Bloc contact condensé (components/contact/contact-cta.php) : phrase et
   bouton marine dans un encadré bleu clair (pages Agences et Formations). */
.contact-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    max-width: 900px;
    margin: 40px auto 0;
    padding: 26px 22px;
    background-color: var(--color-blue-light);
    border: 2px solid var(--color-blue);
    border-radius: var(--border-radius);
}

.contact-cta-text {
    flex: 1 1 260px;
    margin: 0;
    color: var(--color-navy);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.5;
}

@media (min-width: 760px) {
    .contact-cta {
        padding: 30px 36px;
    }
}

/* =================================================================
   Lecteur photo (components/media/gallery.php) : flèches de part et
   d'autre, photos défilantes (scroll-snap, gallery.js). Variante de
   l'accueil (à côté de la vidéo : home.css) et variante portrait de la
   page Formations (photos 3:4 ; 1, puis 2 dès 760 px, puis 3 dès
   1060 px). Lightbox et mécanique de défilement : layout.css.
   ================================================================= */
.gallery-section--inline {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.gallery-section--inline .gallery-scroll {
    flex: 1;
    min-width: 0;
    --gallery-gap: 12px;
    padding: 0;
    scroll-padding: 0;
}

.gallery-section--inline .gallery-item {
    width: 100%;
    max-height: none;
    aspect-ratio: 4 / 3;
    border-radius: var(--border-radius);
}

.gallery-section--inline .gallery-arrow {
    position: static;
    flex: none;
    width: 46px;
    height: 46px;
    transform: none;
}

.gallery-section--portrait {
    margin-top: 44px;
}

.gallery-section--portrait .gallery-scroll {
    --gallery-gap: 14px;
}

.gallery-section--portrait .gallery-item {
    aspect-ratio: 3 / 4;
}

@media (min-width: 760px) {
    .gallery-section--portrait .gallery-item {
        width: calc((100% - var(--gallery-gap)) / 2);
    }
}

@media (min-width: 1060px) {
    .gallery-section--portrait .gallery-item {
        width: calc((100% - 2 * var(--gallery-gap)) / 3);
    }
}

/* =================================================================
   Formulaire de contact (components/contact/contact-form.php) : fond bleu
   clair, en-tête bleu ; Informations, Localisation et Message en
   1 colonne, puis 2 (message dessous) dès 760 px, puis 3 dès 1060 px.
   Mécanique inchangée (assets/js/contact-form.js).
   ================================================================= */
.contact-form {
    border: 2px solid var(--color-blue);
    border-radius: var(--border-radius);
    background-color: var(--color-blue-light);
    overflow: hidden;
}

.contact-form-head {
    margin: 0;
    padding: 14px 20px;
    background-color: var(--color-blue);
    color: var(--color-on-blue);
    font-family: var(--font-condensed);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 20px;
}

.form-fieldset {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.form-legend {
    margin-bottom: 14px;
    padding: 0;
    color: var(--color-link);
    font-family: var(--font-condensed);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.form-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-body);
}

.form-field--message {
    flex: 1;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid var(--color-field-border);
    border-radius: var(--radius-small);
    background-color: var(--color-white);
    color: var(--color-text-body);
    font: inherit;
    font-weight: 400;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.form-control {
    flex: 1;
    height: auto;
    min-height: 140px;
    padding: 10px 12px;
    resize: vertical;
}

.form-control:focus {
    border-color: var(--color-navy);
    box-shadow: 0 0 0 3px var(--color-primary-halo);
}

/* Champ en erreur : bordure ET message texte (jamais la couleur seule). */
.form-control[aria-invalid="true"] {
    border-color: var(--color-danger-text);
}

.form-error {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-danger-text);
}

.contact-form-feedback {
    padding: 0 20px;
}

.contact-form-message {
    margin: 0 0 16px;
    font-weight: 600;
}

.contact-form-message:empty {
    display: none;
}

.contact-form-message--success {
    color: var(--color-success-text);
}

.contact-form-message--error,
.contact-form-message--error p {
    color: var(--color-danger-text);
}

/* Téléphone et e-mail cliquables sous les messages d'indisponibilité. */
.contact-form-fallback:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0 20px 16px;
}

/* Pot de miel : masqué pour un humain, présent dans le DOM. */
.contact-form-honeypot {
    display: none;
}

.contact-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px 20px;
}

.contact-form-privacy {
    flex: 1 1 320px;
    margin: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.contact-form-privacy a {
    color: var(--color-navy);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.contact-form-submit {
    --btn-cut: 14px;
    gap: 12px;
    padding: 16px 34px 16px 28px;
    font-size: 19px;
    letter-spacing: 0.06em;
    transition: background-color 0.4s ease, box-shadow 0.2s ease;
}

/* Bouton désactivé (envoi en cours, ou succès jusqu'au rechargement). */
.contact-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* État « envoi en cours » (classe posée par contact-form.js). */
button.contact-form-submit.is-loading,
button.contact-form-submit.is-loading:hover {
    --btn-bg: var(--color-muted-action);
    box-shadow: none;
    cursor: not-allowed;
}

@media (min-width: 760px) {
    .contact-form-head {
        padding: 14px 28px;
    }

    .contact-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 28px;
    }

    .form-fieldset--message {
        grid-column: 1 / -1;
    }

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

    .contact-form-feedback,
    .contact-form-fallback:not([hidden]) {
        padding-left: 28px;
        padding-right: 28px;
    }

    .contact-form-foot {
        padding: 0 28px 28px;
    }
}

@media (min-width: 1060px) {
    .contact-form-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
    }

    .form-fieldset--message {
        grid-column: auto;
    }
}

/* Variante de la page Contact (prop variante='page', prompt 022) :
   légendes en titres Anton, Informations de contact et Localisation
   côte à côte dès 760 px, message sur toute la largeur, bouton d'envoi
   sous le message, puis à sa droite dès 1060 px. */
.contact-form--page .form-legend {
    color: var(--color-navy);
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
}

.form-message-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.form-message-row .contact-form-submit {
    justify-self: end;
}

.contact-form--page textarea.form-control {
    min-height: 170px;
}

@media (min-width: 760px) {
    .contact-form--page .contact-form-grid {
        gap: 30px 28px;
        padding: 30px;
    }
}

@media (min-width: 1060px) {
    .contact-form--page .contact-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-form--page .form-fieldset--message {
        grid-column: 1 / -1;
    }

    .form-message-row {
        grid-template-columns: minmax(0, 1fr) 150px;
        align-items: stretch;
    }

    .form-message-row .contact-form-submit {
        flex-direction: column;
        clip-path: none;
        justify-content: center;
        justify-self: stretch;
        margin-top: 26px;
        padding: 16px 12px;
        border-radius: 10px;
        font-size: 20px;
    }

    .form-message-row .contact-form-submit .line-icon {
        width: 34px;
        height: 34px;
    }
}

/* Page Contact : phrase d'introduction au-dessus du formulaire. */
.contact-form-intro {
    max-width: 820px;
    margin: 0 auto 32px;
    color: var(--color-text-body);
    font-size: 17px;
    line-height: 1.65;
    text-align: center;
}

/* =================================================================
   Coordonnées des agences, page Contact
   (components/contact/contact-agences.php) : « Par téléphone » en cartes
   marine, « Par e-mail » en cartes blanches à bord marine.
   ================================================================= */
.contact-agences-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 44px 0 18px;
    color: var(--color-navy);
    font-family: var(--font-condensed);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-agences-title .line-icon {
    color: var(--color-link);
}

.contact-agence {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 22px 20px;
    border: 2px solid var(--color-navy);
    border-radius: var(--border-radius);
    background-color: var(--color-white);
    color: var(--color-navy);
}

.contact-agence--phone {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.contact-agence-name {
    margin: 0;
    color: inherit;
    font-family: var(--font-heading);
    font-size: 24px;
    line-height: 1.1;
    text-transform: uppercase;
}

.contact-agence-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
    font-family: var(--font-condensed);
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
}

.contact-agence-phone:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.contact-agence-phone-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-blue);
    color: var(--color-on-blue);
}

.contact-agence--phone .agence-hours {
    align-self: stretch;
    margin-top: 0;
    border-top-color: var(--color-on-dark-surface-border);
}

.contact-agence--phone .agence-label {
    color: var(--color-on-dark-title);
}

.contact-agence--phone .agence-hours-list {
    color: var(--color-on-dark);
}

.contact-agence-email {
    margin: 0;
    color: inherit;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-agence-address {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.45;
}

@media (min-width: 760px) {
    .contact-agences-title {
        font-size: 24px;
    }

    .contact-agence {
        padding: 26px 28px;
    }

    .contact-agence-phone {
        font-size: 30px;
    }
}

/* =================================================================
   Cartes marine « Par téléphone » / « Par e-mail » (accueil)
   ================================================================= */
.contact-cards {
    margin-top: 24px;
}

.contact-cards .contact-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
    border-radius: var(--border-radius);
    background-color: var(--color-navy);
    color: var(--color-white);
}

.contact-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-condensed);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-card-title .line-icon {
    color: var(--color-blue);
}

.contact-card-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 12px;
}

.contact-card-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-on-dark-surface-border);
    border-radius: 10px;
    background-color: var(--color-on-dark-surface);
    color: var(--color-white);
    transition: border-color 0.2s ease;
}

.contact-card-item:hover {
    border-color: var(--color-blue);
    color: var(--color-white);
}

.contact-card-label {
    font-size: 13px;
    color: var(--color-on-dark-label);
}

.contact-card-phone {
    font-family: var(--font-condensed);
    font-size: 23px;
    font-weight: 700;
}

.contact-card-email {
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

@media (min-width: 760px) {
    .contact-cards .contact-card {
        padding: 26px 28px;
    }
}
