/* EST — sections de pages (accueil, gabarits) */

/* ---------- Ouverture pleine page ---------- */
.p-ouverture { min-height: calc(100vh - 110px); max-height: 860px; display: flex; flex-direction: column; justify-content: center; }
.p-ouverture .est-ouverture { max-width: 1264px; margin: 0 auto; width: 100%; padding: 64px 32px 150px; grid-template-columns: 1.15fr .85fr; }
.p-ouverture .est-titre-ouverture { font-size: 68px; line-height: 70px; }
.p-ouverture .est-pile { height: 330px; margin-right: 56px; }
.p-defiler { position: absolute; left: 50%; bottom: 28px; z-index: 2; width: 2px; height: 44px; background: rgba(255,255,255,.18); overflow: hidden; }
.p-defiler::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--mot-lumiere); animation: p-defiler 2.2s ease-in-out infinite; }
@keyframes p-defiler { to { top: 100%; } }

/* La carte de premier plan s’adapte aux intitulés, même sur écran étroit. */
.p-ouverture .g-dates-accueil { height: auto; min-width: 0; }
.g-dates-accueil .est-volume,
.g-dates-accueil .est-volume > .s1 { position: relative; }
.g-dates-accueil .s1 { min-height: 330px; padding-bottom: 30px; }
.g-dates-accueil .s1 .est-filet { color: var(--ink-muted); font-size: 11px; line-height: 16px; }
.g-dates-accueil .s1 h2 { margin: 0; color: var(--ink); font: 700 24px/28px var(--font-titre); }
.g-dates-accueil ol { list-style: none; padding: 0; margin: 0; }
.g-dates-accueil li + li { border-top: 1px solid var(--line); }
.g-dates-accueil li a { display: grid; grid-template-columns: minmax(4rem,max-content) minmax(0,1fr); align-items: baseline; column-gap: var(--space-4); padding: 10px 0; text-decoration: none; overflow-wrap: anywhere; }
.g-dates-accueil li a:hover strong, .g-dates-accueil li a:focus-visible strong { text-decoration: underline; }
.g-dates-accueil time { font: 600 16px/1.2 var(--font-signal); color: var(--ink-muted); white-space: nowrap; }
.g-dates-accueil .est-jeton { color: var(--ink-inverse); text-decoration: none; }
.g-dates-accueil .est-jeton:hover, .g-dates-accueil .est-jeton:focus-visible { text-decoration: underline; }
.g-dates-accueil .est-pouls { background: var(--aube); }

/* ---------- Solutions ---------- */
.p-solutions { grid-template-columns: 1.25fr 1fr 1fr; }
.p-solutions .est-cellule h3 { font-size: 24px; line-height: 28px; }
.p-solutions .est-cellule p { font-size: 16px; line-height: 25px; max-width: 360px; }
.p-solutions .p-grande { grid-row: span 2; min-height: 460px; justify-content: flex-end; }
.p-solutions .p-grande h3 { font-size: 34px; line-height: 38px; font-stretch: 112%; font-weight: 800; }
.p-solutions .p-large { grid-column: span 2; }
.p-solutions .est-cellule { min-height: 227px; padding: 28px; }

/* ---------- Proximité ---------- */
.p-proximite { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.p-proximite .w-photo { min-height: 520px; }
.p-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: var(--joint); }
.p-points li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 20px 22px; background: var(--surface-sunken); }
.p-points b { font: 600 34px/34px var(--font-signal); color: var(--accent); }
.p-points strong { display: block; font: 700 17px/24px var(--font-titre); margin-bottom: 4px; }
.p-points span { font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* ---------- Piliers ---------- */
.p-piliers { padding: 112px 0; }
.p-piliers .w-tete-section h2 { color: #fff; }
.p-piliers .w-tete-section p { color: var(--ink-inverse-muted); }
.p-piliers .est-filet { color: #fff; }
.p-piliers__grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--joint); }
.p-pilier { position: relative; isolation: isolate; overflow: hidden; padding: 40px 32px 36px; background: rgba(255,255,255,.035); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; transition: background .4s ease; }
.p-pilier:hover { background: rgba(255,255,255,.07); }
.p-pilier .est-fantome { color: #fff; right: 10px; top: 10px; bottom: auto; font-size: 130px; opacity: .14; }
.p-pilier .est-num { font: 600 12px/16px var(--font-signal); letter-spacing: .18em; text-transform: uppercase; color: var(--mot-lumiere); }
.p-pilier h3 { font: 800 32px/36px var(--font-titre); font-stretch: 110%; color: #fff; }
.p-pilier p { color: var(--ink-inverse-muted); font-size: 16px; line-height: 25px; }
.p-pilier::after { content: ""; position: absolute; left: 32px; top: 0; width: 48px; height: var(--trait); border-radius: 0 0 var(--radius-trait) var(--radius-trait); background: var(--mot-lumiere); }

/* ---------- Territoire ---------- */
.p-territoire { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.p-regions { display: flex; flex-direction: column; gap: 0; }
.p-region { font: 800 76px/78px var(--font-titre); font-stretch: 112%; letter-spacing: -.035em; color: var(--est-marine); }
.p-region--contour { -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.5px var(--est-bleu); }
.p-region-et { display: flex; align-items: center; gap: 16px; margin: 6px 0; font: 600 12px/16px var(--font-signal); letter-spacing: .2em; text-transform: uppercase; color: var(--signal); }
.p-region-et::before { content: ""; width: 48px; height: var(--trait); border-radius: var(--radius-trait); background: var(--est-rouge); }

/* ---------- Méthode ---------- */
.p-methode-lien { margin-top: 40px; }

/* ---------- Appel final ---------- */
.p-appel { min-height: 520px; }
.p-appel__grille { position: relative; display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; padding: 96px 32px 140px; max-width: 1264px; margin: 0 auto; }
.p-appel h2 { font: 800 52px/56px var(--font-titre); font-stretch: 110%; letter-spacing: -.025em; margin: 18px 0 18px; text-wrap: balance; }
.p-appel h2 em { font-style: normal; color: var(--mot-lumiere); }
.p-appel p.lead { color: var(--ink-inverse-muted); margin-bottom: 32px; max-width: 560px; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .p-ouverture { min-height: 0; max-height: none; }
  .p-ouverture .est-ouverture { grid-template-columns: 1fr; padding: 40px 20px 120px; gap: 48px; }
  .p-ouverture .est-titre-ouverture { font-size: 40px; line-height: 43px; }
  .p-ouverture .est-chapeau { font-size: 17px; line-height: 27px; }
  .p-ouverture .est-pile { height: 290px; margin: 30px 40px 0 0; }
  .p-ouverture .g-dates-accueil { height: auto; }
  .g-dates-accueil .s1 { min-height: 290px; }
  .p-ouverture .est-row { flex-direction: column; align-items: stretch; }
  .p-ouverture .est-btn { justify-content: center; }
  .p-defiler { display: none; }
  .p-solutions { grid-template-columns: 1fr; }
  .p-solutions .p-grande { grid-row: auto; min-height: 340px; }
  .p-solutions .p-large { grid-column: auto; }
  .p-solutions .p-grande h3 { font-size: 28px; line-height: 32px; }
  .p-proximite, .p-territoire, .p-appel__grille { grid-template-columns: 1fr; gap: 36px; }
  .p-proximite .w-photo { min-height: 300px; }
  .p-piliers { padding: 72px 0; }
  .p-piliers__grille { grid-template-columns: 1fr; }
  .p-pilier { min-height: 220px; }
  .p-region { font-size: 40px; line-height: 44px; }
  .est-rail { grid-auto-flow: row; grid-auto-columns: auto; gap: 28px; padding-left: 36px; }
  .est-rail::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: var(--trait); height: auto; transform-origin: top; animation-name: p-tracer-v; }
  .est-rail li { padding: 0; }
  .est-rail li::before { left: -36px; top: 2px; }
  .p-appel__grille { padding: 64px 20px 140px; }
  .p-appel h2 { font-size: 34px; line-height: 38px; }
}
@keyframes p-tracer-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 980px) {
  .p-ouverture .est-pile .est-volume > .est-jeton { left: 0; bottom: -20px; }
  .p-ouverture .est-minirail span { font-size: 9px; letter-spacing: .06em; }
  .p-ouverture .est-minirail span:not(.actif) { color: transparent; }
}

/* =====================================================================
   Pages intérieures (gabarits secteur, solution, orientation, contact)
   ===================================================================== */
.p-tete { padding-bottom: 0; }
.p-tete__grille { position: relative; max-width: 1264px; margin: 0 auto; padding: 40px 32px 120px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.p-tete .w-ariane { color: #fff; margin-bottom: 36px; }
.p-tete h1 { font-size: 54px; line-height: 58px; margin-top: 18px; }
.p-tete .est-chapeau { margin-bottom: 30px; }
.p-tete .w-photo { min-height: 380px; box-shadow: var(--shadow-relief); }

/* Chaîne de traitement (télésurveillance) */
.p-chaine { list-style: none; margin: 0; padding: 26px; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-relief); display: grid; position: relative; }
.p-chaine::before { content: ""; position: absolute; left: 43px; top: 46px; bottom: 46px; width: var(--trait); border-radius: var(--radius-trait); background: linear-gradient(var(--rail), var(--est-bleu)); transform-origin: top; animation: p-tracer-v 1.6s .3s var(--ease-est) both; }
.p-chaine li { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 18px; align-items: center; padding: 14px 0; }
.p-chaine li + li { border-top: 1px solid var(--line); }
.p-chaine b { position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-trait); background: var(--abysse); color: #fff; font: 600 14px/1 var(--font-signal); box-shadow: 0 0 0 5px var(--surface-raised); }
.p-chaine li:first-child b { background: var(--est-rouge); }
.p-chaine strong { display: block; font: 700 17px/22px var(--font-titre); }
.p-chaine span { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Section texte + visuel */
.p-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.p-duo--inverse > :first-child { order: 2; }
.p-duo .w-photo { min-height: 440px; }
.p-mots { display: flex; flex-wrap: wrap; gap: var(--joint); margin-top: 28px; list-style: none; padding: 0; }
.p-mots li { padding: 14px 18px; background: var(--surface-sunken); font: 600 13px/18px var(--font-signal); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.p-mots li::before { content: ""; width: 8px; height: 8px; background: var(--accent); box-shadow: 3px 3px 0 var(--est-rouge); flex: 0 0 8px; }

/* Cellules de moyens */
.p-moyens { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: var(--joint); }
.p-moyen { position: relative; isolation: isolate; overflow: hidden; padding: 30px 28px 28px; background: var(--surface-raised); min-height: 220px; display: flex; flex-direction: column; gap: 10px; transition: transform .35s var(--ease-est), box-shadow .35s var(--ease-est); }
.p-moyen:hover { transform: translateY(-5px); box-shadow: var(--shadow-strate); z-index: 2; }
.p-moyen .est-fantome { color: var(--est-marine); font-size: 120px; bottom: -28px; opacity: .14; }
.p-moyen .est-num { font: 600 12px/16px var(--font-signal); letter-spacing: .18em; text-transform: uppercase; color: var(--signal); }
.p-moyen h3 { font: 700 21px/26px var(--font-titre); }
.p-moyen p { font-size: 15px; line-height: 23px; color: var(--ink-muted); max-width: 340px; }
.p-moyens-intro { margin-top: 28px; max-width: 760px; }

/* Bande sombre de texte */
.p-sombre { padding: 104px 0; }
.p-sombre__grille { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.p-sombre h2 { color: #fff; margin: 16px 0 0; }
.p-sombre .est-filet { color: #fff; }
.p-sombre .w-texte { color: var(--ink-inverse-muted); font-size: 18px; line-height: 30px; }
.p-sombre__items { display: grid; gap: var(--joint); margin-top: 36px; grid-template-columns: repeat(var(--n, 2), 1fr); }
.p-sombre__item { padding: 28px; background: rgba(255,255,255,.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.p-sombre__item .est-num { font: 600 12px/16px var(--font-signal); letter-spacing: .18em; text-transform: uppercase; color: var(--mot-lumiere); }
.p-sombre__item h3 { margin: 10px 0 8px; font: 800 24px/28px var(--font-titre); font-stretch: 108%; color: #fff; }
.p-sombre__item p { color: var(--ink-inverse-muted); font-size: 16px; line-height: 25px; }

/* Note à documenter */
.p-note { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding: 28px 32px; outline: 1.5px dashed #b5781c; outline-offset: -1.5px; background: repeating-linear-gradient(-45deg, #ffffff 0 7px, #fdf3e2 7px 9px); }
.p-note .est-avalider { margin-top: 4px; }
.p-note h2 { font: 700 21px/26px var(--font-titre); margin-bottom: 6px; }
.p-note p { color: var(--ink-muted); font-size: 16px; line-height: 25px; }

/* Orientation (Nos secteurs) */
.p-orientation { display: grid; grid-template-columns: 1fr 1fr; gap: var(--joint); }
.p-orientation .est-cellule { min-height: 420px; justify-content: flex-end; padding: 36px; }
.p-orientation .est-cellule h2 { font: 800 40px/44px var(--font-titre); font-stretch: 110%; letter-spacing: -.02em; }
.p-orientation .est-cellule p { font-size: 17px; line-height: 27px; max-width: 460px; }
.p-orientation .est-cellule .est-btn { margin-top: 18px; align-self: flex-start; }
.p-autre { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 40px; background: var(--surface-sunken); margin-top: var(--joint); }

/* Liens croisés */
.p-croises { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--joint); }
.p-croise { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 26px; background: var(--surface-sunken); color: var(--ink); text-decoration: none; font: 700 18px/24px var(--font-titre); transition: background .25s ease, color .25s ease; }
.p-croise::after { content: ""; flex: 0 0 10px; height: 10px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--ease-est); }
.p-croise:hover { background: var(--abysse); color: #fff; }
.p-croise:hover::after { transform: translateX(4px) rotate(45deg); }
.p-croise small { display: block; font: 600 11px/16px var(--font-signal); letter-spacing: .16em; text-transform: uppercase; color: var(--signal); margin-bottom: 4px; }
.p-croise:hover small { color: var(--mot-lumiere); }

/* Contact */
.p-contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.p-contact__carte { background: var(--surface-raised); padding: 40px; box-shadow: var(--shadow-strate); margin-top: -96px; position: relative; z-index: 3; }
.p-contact__aside { display: grid; gap: var(--joint); }
.p-contact__aside section { padding: 28px; background: var(--surface-sunken); }
.p-contact__aside h2 { font: 700 19px/24px var(--font-titre); margin-bottom: 8px; }
.p-contact__aside p, .p-contact__aside address { font-size: 15px; line-height: 24px; color: var(--ink-muted); font-style: normal; }
.p-contact__aside .p-direct { background: var(--abysse); color: #fff; }
.p-contact__aside .p-direct h2 { color: #fff; }
.p-contact__aside .p-direct address { color: var(--ink-inverse-muted); }

@media (max-width: 980px) {
  .p-tete__grille { grid-template-columns: 1fr; padding: 28px 20px 100px; gap: 36px; }
  .p-tete .w-ariane { margin-bottom: 24px; }
  .p-tete h1 { font-size: 36px; line-height: 40px; }
  .p-tete .w-photo { min-height: 240px; }
  .p-tete .est-row { flex-direction: column; align-items: stretch; }
  .p-duo, .p-sombre__grille, .p-contact { grid-template-columns: 1fr; gap: 36px; }
  .p-duo--inverse > :first-child { order: 0; }
  .p-duo .w-photo { min-height: 280px; }
  .p-moyens, .p-sombre__items, .p-croises, .p-orientation { grid-template-columns: 1fr; }
  .p-sombre { padding: 72px 0; }
  .p-orientation .est-cellule { min-height: 320px; padding: 28px; }
  .p-orientation .est-cellule h2 { font-size: 30px; line-height: 34px; }
  .p-autre { grid-template-columns: 1fr; padding: 28px; }
  .p-contact__carte { margin-top: -72px; padding: 24px; }
  .p-note { grid-template-columns: 1fr; }
}

/* Mobile : les colonnes ne s'élargissent jamais à cause d'un bouton */
.p-tete__grille > *, .p-appel__grille > *, .est-ouverture > *, .p-duo > *, .p-contact > * { min-width: 0; }
@media (max-width: 980px) {
  .est-btn { white-space: normal; text-align: center; justify-content: center; }
  .est-cellule .est-btn { align-self: stretch; }
}

/* =====================================================================
   EST FORMATIONS — sections propres
   ===================================================================== */
.f-familles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--joint); }
.f-famille { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 30px 26px 26px; min-height: 340px; background: var(--surface-raised); color: var(--ink); text-decoration: none; transition: transform .35s var(--ease-est), box-shadow .35s var(--ease-est); }
.f-famille:hover { transform: translateY(-6px); box-shadow: var(--shadow-strate); z-index: 2; }
.f-famille::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--trait); background: var(--aube); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-est); }
.f-famille:hover::after { transform: scaleX(1); }
.f-famille .est-fantome { color: var(--est-bleu); font-size: 140px; bottom: -30px; opacity: .12; }
.f-famille h3 { font: 800 24px/28px var(--font-titre); font-stretch: 108%; letter-spacing: -.01em; margin-top: 6px; }
.f-famille p { font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.f-famille .w-voir { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--accent); }
.f-famille--une { background: var(--est-bleu); color: #fff; }
.f-famille--une p { color: rgba(255,255,255,.86); }
.f-famille--une .est-domaine { color: #fff; }
.f-famille--une .w-voir { color: #fff; }
.f-famille--une .est-fantome { color: #fff; opacity: .16; }

.f-pratique { display: grid; grid-template-columns: 6fr 6fr; gap: 72px; align-items: center; }
.f-pratique .w-photo { min-height: 500px; }
.f-trois { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; position: relative; }
.f-trois::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: var(--trait); border-radius: var(--radius-trait); background: linear-gradient(var(--aube), var(--rail)); }
.f-trois li { position: relative; padding: 14px 0 14px 40px; }
.f-trois li::before { content: ""; position: absolute; left: 0; top: 18px; width: 18px; height: 18px; border-radius: var(--radius-trait); background: var(--surface); border: var(--trait) solid var(--rail); box-sizing: border-box; }
.f-trois li:first-child::before { border-color: var(--aube); background: var(--aube); }
.f-trois strong { display: block; font: 700 18px/24px var(--font-titre); }
.f-trois span { font-size: 15px; line-height: 23px; color: var(--ink-muted); }

.f-publics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--joint); margin-top: 40px; }
.f-public { padding: 36px; background: rgba(255,255,255,.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 14px; }
.f-public .est-num { font: 600 12px/16px var(--font-signal); letter-spacing: .18em; text-transform: uppercase; color: var(--mot-lumiere); }
.f-public h3 { font: 800 30px/34px var(--font-titre); font-stretch: 110%; color: #fff; }
.f-public p { color: var(--ink-inverse-muted); font-size: 16px; line-height: 26px; }
.f-public ul { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.f-public li { display: flex; gap: 12px; align-items: baseline; color: #fff; font-size: 16px; line-height: 24px; }
.f-public li::before { content: ""; flex: 0 0 8px; height: 8px; background: var(--aube); box-shadow: 3px 3px 0 var(--est-bleu); transform: translateY(-2px); }
.f-public .est-btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 980px) {
  .f-familles, .f-publics { grid-template-columns: 1fr; }
  .f-famille { min-height: 260px; }
  .f-pratique { grid-template-columns: 1fr; gap: 36px; }
  .f-pratique .w-photo { min-height: 280px; }
  .f-public { padding: 26px; }
  .f-public h3 { font-size: 24px; line-height: 28px; }
}
@media (min-width: 981px) and (max-width: 1200px) { .f-familles { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   EST FORMATIONS — catalogue, catégories, fiche programme, contact
   ===================================================================== */

/* Barre de recherche du catalogue */
.f-barre { position: sticky; top: 104px; z-index: 20; display: grid; grid-template-columns: 1fr auto auto; gap: var(--joint); align-items: stretch; margin: -44px 0 48px; }
.f-barre .est-cal__filtres { margin: 0; background: var(--surface-raised); box-shadow: var(--shadow-strate); padding: 6px; }
.f-barre select { appearance: none; font: 600 12px/16px var(--font-signal); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background-color: var(--surface-raised); border: 0; padding: 0 44px 0 18px; box-shadow: var(--shadow-strate); background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; min-height: 56px; }
.f-domaine { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 180px; }
.f-domaine:first-of-type { border-top: 0; padding-top: 0; }
.f-domaine__tete { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 28px; }
.f-domaine__tete h2 { font: 800 32px/36px var(--font-titre); font-stretch: 108%; letter-spacing: -.015em; margin-top: 12px; }
.f-domaine__tete p { color: var(--ink-muted); font-size: 16px; line-height: 26px; }
.f-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--joint); }

/* Niveaux (SSIAP 1, 2, 3) */
.f-niveaux { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: var(--joint); }
.f-niveau { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 32px 28px 28px; min-height: 320px; color: #fff; text-decoration: none; background: var(--est-bleu); transition: transform .35s var(--ease-est), box-shadow .35s var(--ease-est); }
.f-niveau:nth-child(2) { background: var(--est-marine); }
.f-niveau:nth-child(3) { background: var(--abysse); }
.f-niveau:nth-child(4) { background: var(--surface-raised); color: var(--ink); }
.f-niveau:hover { transform: translateY(-6px); box-shadow: var(--shadow-strate); z-index: 2; }
.f-niveau::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--tex-niveaux-clair); background-size: 900px; background-position: 70% 30%; opacity: .12; }
.f-niveau:nth-child(4)::before { display: none; }
.f-niveau .est-fantome { color: #fff; font-size: 170px; right: -4px; bottom: -40px; opacity: .16; }
.f-niveau:nth-child(4) .est-fantome { color: var(--est-bleu); opacity: .12; }
.f-niveau .est-num { font: 600 12px/16px var(--font-signal); letter-spacing: .18em; text-transform: uppercase; color: var(--aube); }
.f-niveau h3 { font: 800 30px/34px var(--font-titre); font-stretch: 110%; letter-spacing: -.015em; }
.f-niveau p { font-size: 16px; line-height: 25px; opacity: .88; max-width: 340px; }
.f-niveau .w-voir { margin-top: auto; display: inline-flex; gap: 10px; align-items: center; font-weight: 600; }

/* Fiche programme */
.f-fiche { display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: start; }
.f-fiche__corps > section { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.f-fiche__corps > section:last-child { border-bottom: 0; margin-bottom: 0; }
.f-fiche__corps h2 { font: 800 30px/34px var(--font-titre); font-stretch: 108%; letter-spacing: -.015em; margin: 12px 0 18px; }
.f-objectifs { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--joint); counter-reset: obj; }
.f-objectifs li { counter-increment: obj; position: relative; padding: 22px 22px 22px 70px; background: var(--surface-raised); font-size: 16px; line-height: 25px; }
.f-objectifs li::before { content: counter(obj, decimal-leading-zero); position: absolute; left: 22px; top: 20px; font: 600 26px/26px var(--font-signal); color: var(--est-bleu); }
.f-objectifs b { display: block; font: 600 12px/16px var(--font-signal); letter-spacing: .16em; text-transform: uppercase; color: var(--signal); margin-bottom: 4px; }
.f-repartition { display: flex; height: 44px; margin: 24px 0 10px; gap: var(--joint); }
.f-repartition span { display: flex; align-items: center; padding: 0 16px; font: 600 12px/16px var(--font-signal); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.f-repartition .t { background: var(--est-bleu); }
.f-repartition .p { background: var(--abysse); }
.f-repartition .e { background: var(--aube); color: #0f1b3d; }
.f-infos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--joint); margin: 24px 0 0; }
.f-infos div { padding: 20px 22px; background: var(--surface-raised); }
.f-infos dt { font: 600 11px/16px var(--font-signal); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.f-infos dd { margin: 0; font-size: 16px; line-height: 24px; }
.f-doc { display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: center; padding: 20px 24px; background: var(--surface-raised); margin-top: 20px; }
.f-doc b { display: block; font: 700 16px/22px var(--font-titre); }
.f-doc small { font: 500 13px/18px var(--font-signal); letter-spacing: .04em; color: var(--ink-muted); }

/* Encart latéral de la fiche */
.f-encart { position: sticky; top: 128px; background: var(--abysse); color: #fff; isolation: isolate; overflow: hidden; box-shadow: var(--shadow-relief); }
.f-encart::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--tex-niveaux-clair); background-size: 900px; background-position: 80% 10%; opacity: .1; }
.f-encart__tete { padding: 24px 26px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.f-encart__tete .est-domaine { color: #fff; }
.f-encart__tete b { display: block; margin-top: 10px; font: 800 22px/26px var(--font-titre); font-stretch: 108%; }
.f-encart dl { margin: 0; padding: 8px 26px; }
.f-encart dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.f-encart dt { font: 600 11px/20px var(--font-signal); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-inverse-muted); }
.f-encart dd { margin: 0; text-align: right; font-size: 15px; line-height: 20px; }
.f-encart__actions { display: grid; gap: 10px; padding: 18px 26px 26px; }
.f-encart__actions .est-btn { justify-content: center; }

/* Bloc « une session ne vous convient pas » */
.f-autre-date { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 40px; margin-top: 48px; background: var(--abysse); color: #fff; isolation: isolate; position: relative; overflow: hidden; }
.f-autre-date::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--tex-niveaux-clair); background-size: cover; opacity: .1; }
.f-autre-date h2 { font: 800 28px/32px var(--font-titre); font-stretch: 108%; margin: 10px 0; }
.f-autre-date p { color: var(--ink-inverse-muted); }
.f-autre-date .est-filet { color: #fff; }

/* Choix segmenté (contact) */
.f-choix { display: grid; grid-template-columns: 1fr 1fr; gap: var(--joint); border: 0; padding: 0; margin: 0; }
.f-choix legend { font-weight: 600; font-size: 15px; line-height: 20px; margin-bottom: 6px; padding: 0; }
.f-choix label { position: relative; display: block; cursor: pointer; }
.f-choix input { position: absolute; opacity: 0; }
.f-choix span { display: block; padding: 14px 16px; background: var(--surface-sunken); font: 600 12px/16px var(--font-signal); letter-spacing: .14em; text-transform: uppercase; text-align: center; transition: background .2s ease, color .2s ease; }
.f-choix input:checked + span { background: var(--abysse); color: #fff; box-shadow: inset 0 -3px 0 var(--aube); }
.f-choix input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 980px) {
  .f-barre { position: static; grid-template-columns: 1fr; margin: -32px 0 32px; }
  .f-barre select { min-height: 48px; }
  .f-domaine__tete { grid-template-columns: 1fr; gap: 12px; }
  .f-domaine__tete h2 { font-size: 26px; line-height: 30px; }
  .f-cartes, .f-niveaux, .f-objectifs, .f-infos { grid-template-columns: 1fr; }
  .f-niveau { min-height: 240px; }
  .f-fiche { grid-template-columns: 1fr; gap: 32px; }
  .f-encart { position: static; order: -1; }
  .f-fiche__corps h2 { font-size: 26px; line-height: 30px; }
  .f-doc { grid-template-columns: 46px 1fr; }
  .f-doc .est-btn { grid-column: 1 / -1; }
  .f-autre-date { grid-template-columns: 1fr; padding: 28px; }
  .f-repartition span { padding: 0 10px; font-size: 10px; letter-spacing: .08em; }
}

/* Chapô des en-têtes intérieurs : respiration et couleur secondaire */
.p-tete .est-chapeau { margin: 22px 0 32px; font-size: 18px; line-height: 29px; color: var(--ink-inverse-muted); max-width: 620px; }
.w-section--sunken .p-mots li { background: var(--surface-raised); }

.p-orientation--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .p-orientation--3 { grid-template-columns: 1fr; } }

/* ---------- Et aussi (accueil) · chiffres clés sur mobile ---------- */
.p-aussi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-top: 28px; font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.p-aussi a { font-weight: 600; color: var(--accent); }
@media (max-width: 760px) {
  .est-chiffres { grid-template-columns: 1fr; }
  .est-chiffres--matiere .est-chiffre + .est-chiffre { box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
  .est-chiffres--matiere .est-chiffre b { font-size: 64px; line-height: 64px; }
}

/* Photographies de l’entreprise */
.est-photo {
  margin: 0;
  min-width: 0;
  color: var(--ink);
}
.est-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.est-photo figcaption {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  padding-top: .75rem;
  font: 600 .9375rem/1.45 var(--font-titre);
}
.est-photo figcaption::before {
  content: "";
  flex: 0 0 1.4rem;
  height: 3px;
  align-self: center;
  background: var(--accent);
}
.p-tete .est-photo { color: #fff; }
.p-tete .est-photo figcaption::before { background: var(--mot-lumiere); }
.f-visite { scroll-margin-top: 6rem; }
.f-visite__photos {
  display: grid;
  grid-template-columns: 1.9fr 1.5fr 1fr;
  gap: clamp(.875rem, 2vw, 1.75rem);
  align-items: start;
}
.f-visite__photos img {
  height: clamp(13rem, 25vw, 21rem);
  object-fit: cover;
}
.f-apercu { padding-bottom: 0; }
.p-tete__grille--texte { grid-template-columns: minmax(0, 52rem); }
.p-duo--texte { grid-template-columns: minmax(0, 48rem); }
@media (max-width: 700px) {
  .f-visite__photos { grid-template-columns: 1fr; gap: 1.75rem; }
  .f-visite__photos img { height: auto; }
  .f-visite__photos .est-photo--coursive img { max-height: 30rem; object-fit: contain; object-position: left; }
}
