:root {
  --bleu: #1B4DB1; --bleu-clair: #2F6FD6; --nuit: #0B1F4A; --nuit-2: #10295E;
  --or: #E9B33A; --or-fonce: #A8781A;
  --fond: #F4F5F8; --surface: #FFFFFF; --surface-2: #EAEEF6;
  --encre: #16213B; --encre-2: #4B5670; --encre-3: #5F6982;
  --trait: rgba(22,33,59,.10);
  --verre: rgba(255,255,255,.74); --verre-trait: rgba(255,255,255,.55);
  --ombre: 0 18px 50px rgba(11,31,74,.10); --ombre-2: 0 30px 70px rgba(11,31,74,.16);
  --r-xl: 34px; --r-lg: 26px; --r-md: 18px; --r-pill: 980px;
  --ease: cubic-bezier(.16,1,.3,1);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0A1224; --surface: #121C33; --surface-2: #182543;
    --encre: #EEF2FA; --encre-2: #B7C1D6; --encre-3: #8A96B0;
    --trait: rgba(255,255,255,.09);
    --verre: rgba(14,22,42,.74); --verre-trait: rgba(255,255,255,.12);
    --ombre: 0 18px 50px rgba(0,0,0,.35); --ombre-2: 0 30px 70px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --fond: #0A1224; --surface: #121C33; --surface-2: #182543;
  --encre: #EEF2FA; --encre-2: #B7C1D6; --encre-3: #8A96B0;
  --trait: rgba(255,255,255,.09);
  --verre: rgba(14,22,42,.74); --verre-trait: rgba(255,255,255,.12);
  --ombre: 0 18px 50px rgba(0,0,0,.35); --ombre-2: 0 30px 70px rgba(0,0,0,.5);
}
html { scroll-behavior: smooth; scroll-padding-top: calc(110px + env(safe-area-inset-top, 0px)); }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: 'Manrope', 'SF Pro Text', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }
.saut { position: absolute; left: -9999px; }
.saut:focus { left: 16px; top: 16px; z-index: 200; background: var(--surface); padding: 12px 18px; border-radius: 12px; box-shadow: var(--ombre); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -.03em; line-height: 1.1; }
.display { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -.02em; line-height: 1.04; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
h3 { font-size: clamp(18px, 2.1vw, 22px); font-weight: 800; }
p { margin: 0; }
.lead { font-size: clamp(16px, 1.5vw, 18.5px); color: var(--encre-2); font-weight: 500; line-height: 1.62; max-width: 66ch; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(26px, 4vw, 44px); flex-wrap: wrap; }
.section-head p { max-width: 54ch; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--bleu); margin-bottom: 14px; }
.kicker::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--or); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: var(--r-pill); font-weight: 700; font-size: 15.5px; border: 1.5px solid transparent; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s, border-color .3s, color .3s; white-space: nowrap; min-height: 48px; }
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: scale(.98); }
.btn-or { background: var(--or); color: #1A1400; box-shadow: 0 10px 28px rgba(233,179,58,.32); }
.btn-bleu { background: var(--bleu); color: #fff; box-shadow: 0 10px 28px rgba(27,77,177,.28); }
.btn-verre { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.42); color: #fff; backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.btn-verre:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.7); }
.btn-ligne { border-color: var(--trait); color: var(--encre); background: var(--surface); }
.btn-ligne:hover { border-color: var(--bleu); color: var(--bleu); }

/* Navigation */
.nav { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50; padding: 12px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--verre); border: 1px solid var(--verre-trait); border-radius: var(--r-pill); padding: 8px 10px 8px 16px; backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 8px 30px rgba(11,31,74,.10); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-txt b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-txt span { font-size: 11px; color: var(--encre-3); font-weight: 600; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > * { position: relative; }
.nav-links a { display: block; padding: 10px 13px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600; color: var(--encre-2); transition: background-color .25s, color .25s; }
.nav-links a:hover, .nav-links a.on { background: var(--surface-2); color: var(--encre); }
/* Sous-menus : ils restent ouverts le temps d'y descendre la souris.
   - un « pont » invisible couvre l'espace de 10 px entre le lien et le panneau
     (sans lui, la souris quittait la zone survolée et le menu se refermait) ;
   - à la fermeture, un délai de 0,35 s laisse le temps de rattraper le menu ;
   - le panneau défile s'il est plus haut que l'écran (liste des formations). */
.sous { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px); min-width: 330px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre-2); padding: 10px; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease) .35s, transform .3s var(--ease) .35s, visibility 0s linear .65s; }
.nav-links > *:has(> .sous)::after { content: ""; position: absolute; left: -12px; right: -12px; top: 100%; height: 14px; }
.nav-links > *:hover .sous, .sous:hover, .nav-links > *:focus-within .sous { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s; }
.sous small { display: block; padding: 8px 12px 4px; font-size: 11.5px; font-weight: 800; color: var(--encre-3); }
.sous a { padding: 10px 12px; border-radius: 14px; font-size: 14px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface); align-items: center; justify-content: center; }
.burger svg { width: 20px; height: 20px; }
@media (max-width: 1100px) { .nav-links { display: none; } .burger { display: inline-flex; } .nav-cta .btn { display: none; } }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-mobile { position: fixed; inset: 0; z-index: 60; background: var(--verre); backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); padding: 24px; overflow-y: auto; }
.menu-mobile.open { opacity: 1; pointer-events: auto; }
.menu-mobile a { font-size: 23px; font-weight: 800; letter-spacing: -.03em; padding: 10px 20px; border-radius: var(--r-pill); transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease); }
.menu-mobile.open a { transform: none; opacity: 1; }
.menu-mobile a:nth-child(3) { transition-delay: .04s } .menu-mobile a:nth-child(4) { transition-delay: .08s } .menu-mobile a:nth-child(5) { transition-delay: .12s } .menu-mobile a:nth-child(6) { transition-delay: .16s } .menu-mobile a:nth-child(7) { transition-delay: .2s } .menu-mobile a:nth-child(8) { transition-delay: .24s }
.menu-close { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }

/* Héros accueil */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.06); animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,31,74,.28) 0%, rgba(11,31,74,.08) 32%, rgba(11,31,74,.76) 74%, rgba(11,31,74,.94) 100%), linear-gradient(90deg, rgba(11,31,74,.42) 0%, rgba(11,31,74,0) 55%); }
.hero-inner { position: relative; padding: 150px 0 40px; }
.hero-motto { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(16px, 1.8vw, 20px); color: var(--or); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 76px); max-width: 14ch; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.25); }
.hero-lead { margin-top: 20px; font-size: clamp(16px, 1.7vw, 19.5px); color: rgba(255,255,255,.87); max-width: 56ch; font-weight: 500; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-radius: 22px; padding: 18px 20px; }
.stat b { display: block; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #fff; }
.stat span { display: block; margin-top: 6px; font-size: 13.5px; color: rgba(255,255,255,.78); font-weight: 600; }
@media (max-width: 820px) { .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 34px; } .hero-inner { padding-top: 120px; } .stat { padding: 15px 16px; } }
.rise { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; }
.rise.d1 { animation-delay: .12s } .rise.d2 { animation-delay: .24s } .rise.d3 { animation-delay: .36s } .rise.d4 { animation-delay: .5s }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Bandeau de page intérieure */
/* La photo reste visible : voile dense côté texte, léger côté photo */
.page-hero { position: relative; isolation: isolate; min-height: clamp(360px, 46vh, 470px); display: flex; flex-direction: column; justify-content: flex-end; padding: calc(132px + env(safe-area-inset-top, 0px)) 0 clamp(44px, 6vw, 72px); color: #fff; overflow: hidden; background: var(--nuit); }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.page-hero::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(11,31,74,.88) 0%, rgba(11,31,74,.78) 42%, rgba(11,31,74,.38) 70%, rgba(11,31,74,.14) 100%),
  linear-gradient(180deg, rgba(11,31,74,.42) 0%, rgba(11,31,74,0) 30%, rgba(11,31,74,0) 66%, rgba(11,31,74,.5) 100%); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(32px, 5vw, 58px); font-weight: 800; max-width: 20ch; text-shadow: 0 2px 24px rgba(6,14,36,.35); }
.page-hero .lead { color: rgba(255,255,255,.9); margin-top: 16px; max-width: 54ch; text-shadow: 0 1px 16px rgba(6,14,36,.4); }
@media (max-width: 760px) {
  .page-hero { min-height: 0; }
  .page-hero::after { background: linear-gradient(180deg, rgba(11,31,74,.64) 0%, rgba(11,31,74,.58) 45%, rgba(11,31,74,.82) 100%); }
}
.fil { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,.8); margin-bottom: 18px; font-weight: 600; flex-wrap: wrap; }
.fil a:hover { color: var(--or); }
.fil span { opacity: .5; }
.etiq { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26); padding: 7px 15px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; margin-right: 8px; margin-bottom: 8px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Blocs génériques */
.grille-2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .grille-2 { grid-template-columns: 1fr; } }
.photo { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--ombre-2); position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo:hover img { transform: scale(1.03); }
.photo-legende { position: absolute; left: 16px; bottom: 16px; background: rgba(11,31,74,.55); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: var(--r-pill); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); padding: 28px; }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.liste-check { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.liste-check li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15.5px; color: var(--encre-2); font-weight: 500; }
.liste-check li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B4DB1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-size: 13px; background-repeat: no-repeat; background-position: center; margin-top: 1px; }
.frise { margin-top: 30px; display: grid; border-left: 2px solid var(--trait); }
.frise-item { position: relative; padding: 0 0 22px 26px; }
.frise-item:last-child { padding-bottom: 0; }
.frise-item::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--or); box-shadow: 0 0 0 4px var(--fond); }
.frise-item b { display: block; font-size: 13px; color: var(--bleu); font-weight: 800; }
.frise-item p { font-size: 15px; color: var(--encre-2); font-weight: 500; margin-top: 3px; }
.note { padding: 18px 20px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13.5px; color: var(--encre-2); line-height: 1.55; }
.note b { color: var(--encre); }

/* Écoles */
.ecoles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .ecoles { grid-template-columns: 1fr; } }
.ecole { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 440px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--ombre); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.ecole:hover { transform: translateY(-6px); box-shadow: var(--ombre-2); }
.ecole img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.ecole:hover img { transform: scale(1.05); }
.ecole::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,31,74,0) 30%, rgba(11,31,74,.9) 100%); }
.ecole-txt { position: relative; padding: 28px; width: 100%; }
.ecole-txt small { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); padding: 6px 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin-bottom: 12px; }
.ecole-txt h3 { color: #fff; font-size: clamp(21px, 2.5vw, 27px); }
.ecole-txt p { margin-top: 8px; color: rgba(255,255,255,.84); font-size: 15px; font-weight: 500; max-width: 46ch; }

/* Filières */
.tabs { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 5px; gap: 4px; }
.tab { padding: 11px 22px; border-radius: var(--r-pill); border: none; background: transparent; font-weight: 700; font-size: 15px; color: var(--encre-2); transition: background-color .3s, color .3s, box-shadow .3s; min-height: 44px; }
.tab.on { background: var(--surface); color: var(--encre); box-shadow: 0 4px 14px rgba(11,31,74,.10); }
.filieres { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.filiere { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--trait); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.filiere:hover { transform: translateY(-6px); box-shadow: var(--ombre); border-color: transparent; }
.filiere-img { height: 170px; overflow: hidden; }
.filiere-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.filiere:hover .filiere-img img { transform: scale(1.06); }
.filiere-txt { padding: 24px; display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 6px 13px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--bleu); }
.badge.master { background: rgba(233,179,58,.18); color: #80570B; }
.filiere h3 { font-size: 19px; }
.filiere p { color: var(--encre-2); font-size: 14.5px; font-weight: 500; }
.filiere .suite { margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 700; color: var(--bleu); display: inline-flex; align-items: center; gap: 7px; }
.filiere .suite svg { width: 15px; height: 15px; transition: transform .4s var(--ease); }
.filiere:hover .suite svg { transform: translateX(4px); }
.panel { display: none; } .panel.on { display: block; }

/* Programme (fiche filière) */
.prog { display: grid; gap: 14px; }
.annee { border: 1px solid var(--trait); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.annee-tete { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; background: none; border: none; text-align: left; }
.annee-tete h3 { font-size: 19px; }
.annee-tete .chev { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; transition: transform .4s var(--ease), background-color .3s; }
.annee-tete .chev svg { width: 17px; height: 17px; }
.annee.ouvert .annee-tete .chev { transform: rotate(180deg); background: var(--bleu); color: #fff; }
.annee-corps { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); }
.annee.ouvert .annee-corps { max-height: 900px; }
.annee-corps ul { margin: 0; padding: 0 26px 26px; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.annee-corps li { font-size: 15px; color: var(--encre-2); font-weight: 500; padding-left: 16px; position: relative; }
.annee-corps li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--or); }

.fiche-grille { display: grid; grid-template-columns: 1.4fr .85fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .fiche-grille { grid-template-columns: 1fr; } }
.fiche-aside { position: sticky; top: calc(104px + env(safe-area-inset-top, 0px)); display: grid; gap: 16px; }
.info-ligne { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--trait); font-size: 15px; }
.info-ligne:last-child { border-bottom: none; }
.info-ligne span { color: var(--encre-3); font-weight: 600; }
.info-ligne b { text-align: right; font-weight: 700; }

/* Galerie */
.filtres { display: flex; gap: 8px; flex-wrap: wrap; }
.filtre { padding: 10px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--trait); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--encre-2); transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease); min-height: 44px; }
.filtre:hover { transform: translateY(-2px); }
.filtre.on { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.galerie { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 12px; margin-top: 28px; }
@media (max-width: 1000px) { .galerie { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 190px; } }
@media (max-width: 640px) { .galerie { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 158px; gap: 8px; } }
.tuile { position: relative; border-radius: 22px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); transition: transform .6s var(--ease), box-shadow .6s var(--ease); padding: 0; border: none; }
.tuile.large { grid-column: span 2; grid-row: span 2; }
.tuile.haute { grid-row: span 2; }
.tuile.longue { grid-column: span 2; }
.tuile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tuile:hover { transform: translateY(-4px); box-shadow: var(--ombre); z-index: 1; }
.tuile:hover img { transform: scale(1.06); }
.tuile figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 14px; background: rgba(11,31,74,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); text-align: left; }
.tuile:hover figcaption { opacity: 1; transform: none; }
.tuile.cache { display: none; }
.tuile[hidden], .filtre[hidden], .filtres[hidden] { display: none !important; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,12,28,.93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); padding: 24px; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1200px, 92vw); max-height: 82vh; border-radius: 22px; box-shadow: 0 40px 100px rgba(0,0,0,.5); transform: scale(.94); transition: transform .45s var(--ease); }
.lightbox.open img { transform: none; }
.lb-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background-color .25s, transform .3s var(--ease); }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: calc(20px + env(safe-area-inset-top, 0px)); right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.12); padding: 10px 18px; border-radius: var(--r-pill); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }

/* Piliers */
.pilier .num { font-family: 'Fraunces', Georgia, serif; font-size: 42px; line-height: 1; color: var(--or-fonce); font-weight: 500; }
:root[data-theme="dark"] .pilier .num { color: var(--or); }
.pilier h3 { margin-top: 12px; font-size: 18.5px; }
.pilier p { margin-top: 8px; color: var(--encre-2); font-size: 14.5px; font-weight: 500; }

/* Directrice */
.dg { background: var(--nuit); color: #fff; border-radius: var(--r-xl); overflow: hidden; display: grid; grid-template-columns: .9fr 1.1fr; position: relative; }
@media (max-width: 900px) { .dg { grid-template-columns: 1fr; } }
.dg-photo { position: relative; min-height: 420px; }
.dg-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.dg-txt { padding: clamp(30px, 5vw, 60px); display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; }
.dg-halo { position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(233,179,58,.28) 0%, rgba(11,31,74,0) 68%); animation: glow 8s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity: .55 } 50% { opacity: .9 } }
.dg-txt .kicker { color: var(--or); }
.dg-txt .kicker::before { background: #fff; opacity: .4; }
.dg-txt blockquote { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.36; font-weight: 500; }
.dg-txt p { color: rgba(255,255,255,.84); font-size: 15.5px; font-weight: 500; max-width: 60ch; }
.dg-sign b { display: block; font-size: 16px; } .dg-sign span { font-size: 13.5px; color: rgba(255,255,255,.66); font-weight: 600; }

/* Admission */
.etapes { display: grid; gap: 12px; }
.etape { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); align-items: start; }
.etape .n { width: 56px; height: 56px; border-radius: 18px; background: var(--bleu); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.etape h3 { font-size: 18px; }
.etape p, .etape li { color: var(--encre-2); font-size: 15px; font-weight: 500; }
.etape ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.frais-ligne { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--trait); }
.frais-ligne:last-of-type { border-bottom: none; }
.frais-ligne span { font-weight: 600; color: var(--encre-2); }
.frais-ligne b { font-size: 22px; letter-spacing: -.03em; }
.frais-ligne b small { font-size: 13px; color: var(--encre-3); font-weight: 700; margin-left: 4px; }

/* Actualités */
.actus { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.actu { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.actu:hover { transform: translateY(-5px); box-shadow: var(--ombre); }
.actu-img { height: 190px; overflow: hidden; }
.actu-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.actu:hover .actu-img img { transform: scale(1.05); }
.actu-txt { padding: 24px; display: grid; gap: 10px; }
.actu-date { font-size: 13px; font-weight: 700; color: var(--bleu); }
.actu h3 { font-size: 19px; }
.actu p { font-size: 14.5px; color: var(--encre-2); font-weight: 500; }

/* Contact */
.coord { display: grid; gap: 18px; }
.coord-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; }
.coord-item .ico { width: 46px; height: 46px; border-radius: 15px; background: var(--surface-2); color: var(--bleu); display: grid; place-items: center; }
.coord-item .ico svg { width: 21px; height: 21px; }
.coord-item b { display: block; font-size: 13px; color: var(--encre-3); font-weight: 700; margin-bottom: 3px; }
.coord-item a, .coord-item span { font-size: 17px; font-weight: 700; }
.coord-item a:hover { color: var(--bleu); }
.champ { display: grid; gap: 7px; }
.champ label { font-size: 13.5px; font-weight: 700; color: var(--encre-2); }
.champ input, .champ select, .champ textarea { width: 100%; padding: 15px 18px; border: 1.5px solid var(--trait); border-radius: 16px; background: var(--fond); color: var(--encre); font: inherit; font-size: 15.5px; transition: border-color .3s, box-shadow .3s; }
.champ textarea { resize: vertical; min-height: 120px; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(27,77,177,.16); }
.carte-acces { border-radius: var(--r-xl); overflow: hidden; position: relative; min-height: 340px; box-shadow: var(--ombre); display: block; }
.carte-acces img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,31,74,.05) 0%, rgba(11,31,74,.86) 100%); }
.carte-txt { position: absolute; left: 24px; right: 24px; bottom: 24px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.carte-txt h3 { color: #fff; }
.carte-txt p { color: rgba(255,255,255,.82); font-size: 14.5px; font-weight: 500; margin-top: 4px; }

/* Appel final */
.cta-bloc { background: var(--nuit); color: #fff; border-radius: var(--r-xl); padding: clamp(34px, 5vw, 60px); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-bloc h2 { color: #fff; max-width: 18ch; }
.cta-bloc p { color: rgba(255,255,255,.78); margin-top: 10px; max-width: 46ch; font-weight: 500; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }

/* Pied */
footer { background: var(--nuit); color: #fff; padding: 62px 0 26px; margin-top: 48px; }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 900px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot { grid-template-columns: 1fr; } }
.foot h4 { margin: 0 0 14px; font-size: 13.5px; color: rgba(255,255,255,.55); font-weight: 700; }
.foot a, .foot p { display: block; color: rgba(255,255,255,.86); font-size: 14.5px; font-weight: 500; margin-bottom: 9px; }
.foot a:hover { color: var(--or); }
.foot-bas { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: rgba(255,255,255,.55); }
.foot-bas a { color: rgba(255,255,255,.55); font-size: 13.5px; display: inline; margin: 0; }
.foot-bas a:hover { color: #fff; }
.motto-foot { font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--or); font-size: 18px; margin-top: 10px; }

.wa { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px rgba(37,211,102,.4); transition: transform .35s var(--ease); }
.wa:hover { transform: scale(1.08) rotate(-4deg); }
.wa svg { width: 28px; height: 28px; }

.rev { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rev.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rev, .rise { opacity: 1; transform: none; }
}

/* ---------- Bascule clair / sombre ---------- */
.theme { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface); display: inline-grid; place-items: center; transition: transform .35s var(--ease), background-color .3s, border-color .3s; }
.theme:hover { transform: rotate(-18deg) scale(1.06); border-color: var(--bleu); }
.theme svg { width: 19px; height: 19px; }
.theme .t-nuit { display: none; }
:root[data-theme="dark"] .theme .t-jour { display: none; }
:root[data-theme="dark"] .theme .t-nuit { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .t-jour { display: none; }
  :root:not([data-theme="light"]) .theme .t-nuit { display: block; }
  :root[data-theme="light"] .theme .t-jour { display: block; }
  :root[data-theme="light"] .theme .t-nuit { display: none; }
}

/* ---------- Sous-navigation de rubrique ---------- */
.sous-nav { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 30; background: var(--verre); border-bottom: 1px solid var(--trait); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.sous-nav-piste { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.sous-nav-piste::-webkit-scrollbar { display: none; }
.sous-nav a { white-space: nowrap; padding: 9px 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--encre-2); transition: background-color .25s, color .25s; }
.sous-nav a:hover { background: var(--surface-2); color: var(--encre); }
.sous-nav a.on { background: var(--bleu); color: #fff; }

/* ---------- Menu mobile à deux niveaux ---------- */
.menu-liste { width: min(460px, 100%); display: grid; gap: 2px; padding: 60px 0 20px; }
.menu-mobile { align-items: flex-start; justify-content: flex-start; }
.menu-mobile a { font-size: 21px; text-align: left; }
.mob-sous { display: grid; gap: 0; padding: 2px 0 10px 20px; border-left: 2px solid var(--trait); margin: 0 0 6px 20px; }
.mob-sous a { font-size: 15.5px; font-weight: 600; color: var(--encre-2); padding: 8px 14px; }

/* ---------- Cartes-liens de rubrique ---------- */
.cartes-liens { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.carte-lien { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.carte-lien:hover { transform: translateY(-6px); box-shadow: var(--ombre); border-color: transparent; }
.cl-img { height: 150px; overflow: hidden; }
.cl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.carte-lien:hover .cl-img img { transform: scale(1.06); }
.cl-txt { padding: 22px; display: grid; gap: 8px; flex-grow: 1; }
.cl-txt p { font-size: 14.5px; color: var(--encre-2); font-weight: 500; }
.cl-txt .suite { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 700; color: var(--bleu); display: inline-flex; align-items: center; gap: 7px; }
.cl-txt .suite svg { width: 15px; height: 15px; transition: transform .4s var(--ease); }
.carte-lien:hover .suite svg { transform: translateX(4px); }

/* ---------- Frise détaillée ---------- */
.frise-grande { display: grid; gap: 0; }
.fg-item { display: grid; grid-template-columns: 120px 1fr; gap: 26px; padding: 0 0 30px; position: relative; }
.fg-item::before { content: ""; position: absolute; left: 132px; top: 12px; bottom: -6px; width: 2px; background: var(--trait); }
.fg-item:last-child::before { display: none; }
.fg-item:last-child { padding-bottom: 0; }
.fg-annee { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 600; color: var(--bleu); text-align: right; padding-top: 2px; }
.fg-corps { position: relative; padding-left: 28px; }
.fg-corps::before { content: ""; position: absolute; left: -8px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--or); box-shadow: 0 0 0 4px var(--fond); }
.fg-corps h3 { font-size: 19px; }
.fg-corps p { margin-top: 7px; color: var(--encre-2); font-size: 15.5px; font-weight: 500; }
@media (max-width: 640px) {
  .fg-item { grid-template-columns: 1fr; gap: 6px; }
  .fg-item::before { left: 6px; top: 40px; }
  .fg-annee { text-align: left; font-size: 22px; padding-left: 28px; }
}

/* ---------- Corps d'article ---------- */
.article-corps { font-size: 17.5px; line-height: 1.72; color: var(--encre-2); }
.article-corps .chapo { font-size: 20px; font-weight: 600; color: var(--encre); line-height: 1.55; margin-bottom: 26px; }
.article-corps h2 { font-size: clamp(22px, 2.6vw, 28px); color: var(--encre); margin: 38px 0 14px; }
.article-corps p { margin-bottom: 16px; }
.article-corps blockquote { margin: 30px 0; padding: 24px 28px; background: var(--surface-2); border-left: 4px solid var(--or); border-radius: 0 var(--r-md) var(--r-md) 0; font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.45; color: var(--encre); font-weight: 500; }
.article-corps blockquote cite { display: block; margin-top: 12px; font-family: 'Manrope', sans-serif; font-size: 14px; font-style: normal; font-weight: 700; color: var(--encre-3); }
.article-corps .signature { margin-top: 28px; font-weight: 700; color: var(--encre); }
.partage { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--trait); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.partage span { font-size: 14px; font-weight: 700; color: var(--encre-3); margin-right: 4px; }

/* ---------- Grilles particulières ---------- */
.grille-portrait { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: start; }
.grille-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grille-portrait, .grille-contact { grid-template-columns: 1fr; gap: 24px; } }
.galerie-simple { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.galerie-simple .photo { aspect-ratio: 4/3; }

/* ---------- Liens filières ---------- */
.liens-filieres { display: grid; gap: 8px; }
.lf { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-md); font-weight: 700; font-size: 15.5px; transition: transform .35s var(--ease), border-color .3s, background-color .3s; }
.lf:hover { transform: translateX(5px); border-color: var(--bleu); }
.lf span { font-size: 12.5px; font-weight: 700; color: var(--bleu); background: var(--surface-2); padding: 5px 12px; border-radius: var(--r-pill); flex-shrink: 0; }

/* ---------- Pièces du dossier ---------- */
.pieces { display: grid; gap: 12px; }
.piece { display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); align-items: start; }
.piece > b { width: 46px; height: 46px; border-radius: 15px; background: var(--surface-2); color: var(--bleu); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.piece h3 { font-size: 17px; }
.piece p { margin-top: 5px; font-size: 14.5px; color: var(--encre-2); font-weight: 500; }

/* ---------- Tarifs ---------- */
.tarifs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .tarifs { grid-template-columns: 1fr; } }
.tarif { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); padding: 30px; display: grid; gap: 10px; justify-items: start; }
.tarif b { font-size: 42px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.tarif b small { font-size: 15px; color: var(--encre-3); font-weight: 700; margin-left: 6px; }
.tarif p { font-size: 14.5px; color: var(--encre-2); font-weight: 500; }

/* ---------- Devise ---------- */
.devise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .devise { grid-template-columns: 1fr; } }
.devise > div { background: var(--nuit); color: #fff; border-radius: var(--r-xl); padding: 44px 32px; display: grid; gap: 12px; align-content: center; min-height: 230px; }
.devise > div:nth-child(2) { background: var(--bleu); }
.devise > div:nth-child(3) { background: var(--or); color: #1A1400; }
.devise span { font-family: 'Fraunces', Georgia, serif; font-size: clamp(28px, 3.4vw, 38px); font-weight: 500; letter-spacing: -.02em; }
.devise p { font-size: 15.5px; opacity: .84; font-weight: 500; }

/* Menu mobile : fond plus opaque pour la lisibilité */
.menu-mobile { background: var(--fond); }
@supports (backdrop-filter: blur(1px)) {
  .menu-mobile { background: color-mix(in srgb, var(--fond) 92%, transparent); }
}

/* ================================================================
   ANIMATIONS
   ================================================================ */

/* Barre de progression de lecture */
.progres { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 70; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--bleu), var(--or)); transition: transform .12s linear; pointer-events: none; }

/* En-tête qui se resserre au défilement */
.nav { transition: padding .45s var(--ease); }
.nav-inner { transition: padding .45s var(--ease), box-shadow .45s var(--ease), background-color .45s; }
.nav.compact { padding: 6px 0; }
.nav.compact .nav-inner { padding: 5px 8px 5px 12px; box-shadow: 0 10px 34px rgba(11,31,74,.16); }
.nav.compact .brand-mark { width: 34px; height: 34px; transition: width .45s var(--ease), height .45s var(--ease); }
.nav.compact .brand-txt span { opacity: 0; max-height: 0; transition: opacity .3s, max-height .45s var(--ease); }
.brand-mark { transition: width .45s var(--ease), height .45s var(--ease); }
.brand-txt span { transition: opacity .3s, max-height .45s var(--ease); max-height: 20px; }

/* Titre du héros : révélation ligne par ligne */
.hero h1 { --d: 0ms; }
.masque { display: block; overflow: hidden; }
.masque > span { display: block; transform: translateY(105%); animation: monte 1.05s var(--ease) forwards; animation-delay: var(--d); }
@keyframes monte { to { transform: none; } }

/* Révélations directionnelles */
.rev[data-rev="gauche"] { transform: translateX(-34px); }
.rev[data-rev="droite"] { transform: translateX(34px); }
.rev[data-rev="zoom"] { transform: scale(.94); }
.rev[data-rev="flou"] { filter: blur(10px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.rev.vu { transform: none; filter: none; }
.rev { transition-delay: var(--r, 0ms); }

/* Image qui se dévoile au balayage */
.photo img, .cl-img img, .filiere-img img, .actu-img img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease), transform 1.2s var(--ease); }
.vu .photo img, .photo.vu img, .rev.vu .cl-img img, .rev.vu .filiere-img img, .rev.vu .actu-img img, .filiere.vu .filiere-img img { clip-path: inset(0 0 0 0); }
.filieres.vu .filiere-img img, .actus.vu .actu-img img, .cartes-liens.vu .cl-img img { clip-path: inset(0 0 0 0); }
.galerie-simple .photo img { clip-path: inset(0 0 100% 0); }
.galerie-simple .photo.vu img { clip-path: inset(0 0 0 0); }

/* Entrée en cascade dans les grilles */
.filieres > *, .cartes > *, .cartes-liens > *, .actus > *, .etapes > *, .pieces > *, .liens-filieres > *, .galerie-simple > *, .devise > *, .tarifs > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 85ms); }
.grille-vue > * { opacity: 1; transform: none; }

/* Tuiles de galerie */
.galerie > * { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.galerie.grille-vue > * { opacity: 1; transform: none; }
.tuile:hover { transform: translateY(-6px) scale(1.012); }

/* Soulignement animé des titres de section */
.kicker::before { width: 0; transition: width .8s var(--ease) .15s; }
.rev.vu .kicker::before, .section-head.vu .kicker::before, .vu > .kicker::before { width: 26px; }

/* Balayage lumineux sur les boutons pleins */
.btn-or, .btn-bleu { position: relative; overflow: hidden; }
.btn-or::after, .btn-bleu::after { content: ""; position: absolute; top: 0; left: -140%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent); transform: skewX(-18deg); transition: left .75s var(--ease); }
.btn-or:hover::after, .btn-bleu:hover::after { left: 150%; }

/* Chiffres du héros */
.stat { transition: transform .5s var(--ease), background-color .3s, border-color .3s; }
.stat:hover { transform: translateY(-5px); background: rgba(255,255,255,.17); }

/* Parallaxe douce des bandeaux */
.page-hero img, .hero-img { will-change: transform; }

/* Apparition de la page */
main { animation: entree .6s var(--ease) both; }
@keyframes entree { from { opacity: 0; } to { opacity: 1; } }

/* Lien de sous-navigation : trait qui glisse */
.sous-nav a { position: relative; }
.sous-nav a:not(.on)::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px; background: var(--or); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.sous-nav a:not(.on):hover::after { transform: scaleX(1); }

/* Menu principal : sous-menu qui se déplie */
/* Les liens restent affichés pendant le délai de fermeture du panneau (0,35 s). */
.sous a { opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease) .35s, transform .3s var(--ease) .35s, background-color .25s; }
.nav-links > *:hover .sous a, .sous:hover a, .nav-links > *:focus-within .sous a { opacity: 1; transform: none; transition-delay: 0s, 0s, 0s; }
:is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(2) { transition-delay: .03s, .03s, 0s } :is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(3) { transition-delay: .06s, .06s, 0s } :is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(4) { transition-delay: .09s, .09s, 0s }
:is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(5) { transition-delay: .12s, .12s, 0s } :is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(6) { transition-delay: .15s, .15s, 0s } :is(.nav-links > *:hover, .nav-links > *:focus-within) .sous a:nth-child(7) { transition-delay: .18s, .18s, 0s }

/* ================================================================
   VIDÉO
   ================================================================ */
.film { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--ombre-2); aspect-ratio: 16/9; background: var(--nuit); display: block; width: 100%; padding: 0; border: none; cursor: pointer; }
.film img, .film video { width: 100%; height: 100%; object-fit: cover; }
.film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,31,74,.12) 0%, rgba(11,31,74,.72) 100%); transition: background-color .4s; }
.film-txt { position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 2; color: #fff; text-align: left; }
.film-txt h3 { color: #fff; font-size: clamp(20px, 2.4vw, 28px); }
.film-txt p { color: rgba(255,255,255,.82); font-size: 15px; font-weight: 500; margin-top: 6px; }
.lecture { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; transition: transform .45s var(--ease), background-color .35s; }
.lecture svg { width: 30px; height: 30px; margin-left: 4px; fill: #fff; }
.lecture::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); animation: onde 2.6s ease-out infinite; }
@keyframes onde { 0% { transform: scale(.85); opacity: .9 } 100% { transform: scale(1.35); opacity: 0 } }
.film:hover .lecture { transform: translate(-50%, -50%) scale(1.1); background: rgba(255,255,255,.3); }
.film.joue { cursor: default; background: #000; }
.lightbox video { width: min(1200px, 92vw); aspect-ratio: 16/9; }
.film.joue::after { display: none; }
.film.joue video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; z-index: 1; }
.film-absent { display: grid; place-items: center; gap: 8px; position: absolute; inset: 0; z-index: 3; background: var(--nuit); color: #8FB4DE; font-size: 14px; font-weight: 600; text-align: center; padding: 24px; }
.tuile[data-video] .lecture { width: 58px; height: 58px; }
.tuile[data-video] .lecture svg { width: 20px; height: 20px; }
.tuile[data-video] figcaption { opacity: 1; transform: none; }
.lightbox video { max-width: min(1200px, 92vw); max-height: 82vh; border-radius: 22px; box-shadow: 0 40px 100px rgba(0,0,0,.5); background: #000; display: none; }
.lightbox.video video { display: block; }
.lightbox.video img { display: none; }

@media (prefers-reduced-motion: reduce) {
  .masque > span { transform: none; animation: none; }
  .photo img, .cl-img img, .filiere-img img, .actu-img img, .galerie-simple .photo img { clip-path: none; }
  .filieres > *, .cartes > *, .cartes-liens > *, .actus > *, .etapes > *, .pieces > *, .liens-filieres > *, .galerie-simple > *, .devise > *, .tarifs > *, .galerie > * { opacity: 1; transform: none; }
  .kicker::before { width: 26px; }
  .lecture::before { animation: none; }
  .progres { display: none; }
}

/* Titre du héros : masques au mot */
.hero h1 .masque { display: inline-block; vertical-align: bottom; padding-bottom: .06em; }

/* Tuile vidéo : légende compacte toujours visible */
.tuile[data-video] figcaption { right: auto; display: inline-flex; align-items: center; gap: 7px; background: rgba(11,31,74,.62); }
.tuile[data-video] figcaption::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--or); }

/* ---------- Logo officiel ---------- */
.brand-mark { object-fit: contain; }
.pastille { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; padding: 5px; }
.pastille img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Correction : taille des icônes dans les boutons et liens ---------- */
.btn svg, .suite svg, .fil svg, .sous-nav svg, .etiq svg, .partage svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-verre svg, .btn-or svg, .btn-bleu svg, .btn-ligne svg { width: 16px; height: 16px; }
.lecture svg { width: 30px; height: 30px; }
.tuile[data-video] .lecture svg { width: 20px; height: 20px; }
.theme svg, .burger svg, .menu-close svg, .lb-btn svg, .wa svg { flex-shrink: 0; }
.coord-item .ico svg, .filiere-ico svg { width: 21px; height: 21px; }
.annee-tete .chev svg { width: 17px; height: 17px; }
svg:not([width]):not([height]):not(.brand-mark) { max-width: 100%; }

/* Correction : les images des grilles se dévoilent avec la cascade */
.grille-vue .filiere-img img, .grille-vue .actu-img img, .grille-vue .cl-img img,
.grille-vue .photo img, .tout-visible img { clip-path: inset(0 0 0 0) !important; }

/* FAQ : réponses sans puce et bien alignées */
.faq .annee-corps ul { grid-template-columns: 1fr; }
.faq .annee-corps li { padding-left: 0; font-size: 15.5px; line-height: 1.65; }
.faq .annee-corps li::before { display: none; }

/* ---------- Bouton « revenir en haut » ---------- */
.haut {
  position: fixed; right: 18px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 41;
  width: 56px; height: 56px; border-radius: 50%; padding: 0;
  background: var(--verre); border: 1px solid var(--verre-trait);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 12px 30px rgba(11,31,74,.18);
  color: var(--bleu); display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.85);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s, box-shadow .35s, color .3s;
}
.haut.visible { opacity: 1; visibility: visible; transform: none; }
.haut:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 18px 42px rgba(27,77,177,.3); color: var(--nuit); }
.haut:active { transform: scale(.95); }
.haut-anneau { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.haut-anneau circle { fill: none; stroke-width: 2.5; }
.haut-anneau .piste { stroke: var(--trait); }
.haut-anneau .jauge {
  stroke: var(--or); stroke-linecap: round;
  stroke-dasharray: 132; stroke-dashoffset: 132;
  transition: stroke-dashoffset .15s linear;
}
.haut-fleche { position: relative; width: 21px; height: 21px; transition: transform .4s var(--ease); }
.haut:hover .haut-fleche { transform: translateY(-2px); }
@media (max-width: 640px) {
  .haut { width: 50px; height: 50px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  .haut-fleche { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .haut { transition: opacity .2s; }
  .haut-anneau .jauge { transition: none; }
}

/* ================================================================
   ASSISTANT
   ================================================================ */
.ia-ouvrir {
  position: fixed; right: 18px; bottom: calc(158px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  width: 58px; height: 58px; border-radius: 50%; padding: 0; border: none;
  background: var(--bleu); color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 34px rgba(27,77,177,.42);
  transition: transform .4s var(--ease), box-shadow .35s, background-color .3s;
}
.ia-ouvrir::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid rgba(27,77,177,.35); animation: onde 3s ease-out infinite;
}
.ia-ouvrir:hover { transform: scale(1.08); box-shadow: 0 20px 44px rgba(27,77,177,.5); }
.ia-ouvrir svg { width: 26px; height: 26px; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.ia-fermer-ico { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
.ia-ouvrir.actif .ia-ico { opacity: 0; transform: rotate(90deg) scale(.6); }
.ia-ouvrir.actif .ia-fermer-ico { opacity: 1; transform: none; }
.ia-ouvrir.actif::before { display: none; }

.ia {
  position: fixed; right: 18px; bottom: calc(226px + env(safe-area-inset-bottom, 0px)); z-index: 46;
  width: min(390px, calc(100vw - 36px)); max-height: min(560px, calc(100vh - 280px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 26px;
  box-shadow: 0 30px 80px rgba(11,31,74,.28);
  opacity: 0; transform: translateY(18px) scale(.96); transform-origin: bottom right;
  transition: opacity .38s var(--ease), transform .38s var(--ease);
}
.ia.ouvert { opacity: 1; transform: none; }
.ia-tete { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--nuit); color: #fff; }
.ia-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 4px; flex-shrink: 0; }
.ia-logo { width: 100%; height: 100%; object-fit: contain; }
.ia-tete div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex-grow: 1; }
.ia-tete b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.ia-tete span { font-size: 11.5px; color: rgba(255,255,255,.62); font-weight: 600; }
.ia-fermer { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: background-color .25s; }
.ia-fermer:hover { background: rgba(255,255,255,.22); }
.ia-fermer svg { width: 15px; height: 15px; }

.ia-fil { flex-grow: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.ia-msg { max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; font-weight: 500; animation: iaEntree .45s var(--ease) both; }
@keyframes iaEntree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ia-msg.bot { align-self: flex-start; background: var(--surface-2); color: var(--encre); border-bottom-left-radius: 6px; }
.ia-msg.moi { align-self: flex-end; background: var(--bleu); color: #fff; border-bottom-right-radius: 6px; }
.ia-liens { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ia-liens a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 980px; background: var(--surface); border: 1px solid var(--trait); font-size: 12.5px; font-weight: 700; color: var(--bleu); transition: background-color .25s, transform .3s var(--ease), border-color .25s; }
.ia-liens a:hover { background: var(--bleu); border-color: var(--bleu); color: #fff; transform: translateY(-2px); }
.ia-points { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--surface-2); border-radius: 18px; border-bottom-left-radius: 6px; }
.ia-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--encre-3); animation: iaSaut 1.25s ease-in-out infinite; }
.ia-points i:nth-child(2) { animation-delay: .16s } .ia-points i:nth-child(3) { animation-delay: .32s }
@keyframes iaSaut { 0%, 60%, 100% { transform: none; opacity: .45 } 30% { transform: translateY(-5px); opacity: 1 } }

.ia-puces { display: flex; gap: 7px; overflow-x: auto; padding: 0 18px 12px; scrollbar-width: none; }
.ia-puces::-webkit-scrollbar { display: none; }
.ia-puce { white-space: nowrap; padding: 9px 15px; border-radius: 980px; border: 1px solid var(--trait); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--encre-2); transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease); }
.ia-puce:hover { background: var(--bleu); border-color: var(--bleu); color: #fff; transform: translateY(-2px); }

.ia-saisie { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--trait); background: var(--surface); }
.ia-saisie input { flex-grow: 1; min-width: 0; padding: 12px 16px; border: 1.5px solid var(--trait); border-radius: 980px; background: var(--fond); color: var(--encre); font: inherit; font-size: 14.5px; transition: border-color .3s, box-shadow .3s; }
.ia-saisie input:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(27,77,177,.15); }
.ia-saisie button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--bleu); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: transform .3s var(--ease), background-color .3s; }
.ia-saisie button:hover { transform: scale(1.07); }
.ia-saisie button svg { width: 19px; height: 19px; }

@media (max-width: 640px) {
  .ia-ouvrir { width: 52px; height: 52px; right: 16px; bottom: calc(146px + env(safe-area-inset-bottom, 0px)); }
  .ia { right: 12px; left: 12px; width: auto; bottom: calc(206px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 250px); }
}
@media (prefers-reduced-motion: reduce) {
  .ia-ouvrir::before, .ia-points i { animation: none; }
  .ia, .ia-msg { transition: opacity .2s; animation: none; }
}

/* Assistant sur mobile : feuille qui occupe l'écran sous l'en-tête */
@media (max-width: 640px) {
  .ia {
    left: 12px; right: 12px; width: auto;
    top: calc(78px + env(safe-area-inset-top, 0px));
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-height: none; border-radius: 22px;
  }
  .ia-ouvrir { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  body.ia-on .wa, body.ia-on .haut { opacity: 0; pointer-events: none; transform: translateY(12px) scale(.8); }
  body.ia-on { overflow: hidden; }
}

/* ================================================================
   ASSISTANT — position en bas a gauche, panneau plus large
   ================================================================ */
.ia-ouvrir {
  right: auto; left: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.ia {
  right: auto; left: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 36px));
  max-height: min(640px, calc(100vh - 150px));
  transform-origin: bottom left;
}
.ia-fil { padding: 20px; gap: 13px; }
.ia-msg { max-width: 88%; font-size: 15px; }

/* le bandeau de demonstration se decale a cote du bouton */
.bandeau-demo { left: 88px; }

@media (max-width: 640px) {
  .ia-ouvrir { left: 16px; right: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .ia {
    left: 12px; right: 12px; width: auto;
    top: calc(78px + env(safe-area-inset-top, 0px));
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-height: none;
  }
  .bandeau-demo { left: 78px; max-width: calc(100% - 156px); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .ia { width: min(400px, calc(100vw - 36px)); max-height: calc(100vh - 140px); }
}

/* Le panneau s'ouvre d'emblee a une taille confortable */
@media (min-width: 641px) {
  .ia { height: min(600px, calc(100vh - 150px)); }
  .ia-fil { min-height: 0; }
}

/* ---------- Mise à jour sept. 2026 ---------- */
html { overflow-x: clip; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }
[data-page] [id] { scroll-margin-top: 120px; }
.ecole-txt { z-index: 1; }
/* Héros d'accueil raccourci */
.hero { min-height: clamp(520px, 74svh, 700px); }
.hero-inner { padding: 128px 0 36px; }
.hero h1 { font-size: clamp(34px, 4.3vw, 60px); max-width: 17ch; }
.hero-lead { margin-top: 16px; }
.hero-actions { margin-top: 24px; }
.hero-stats { margin-top: 30px; }
.stat { padding: 14px 18px; }
@media (max-width: 820px) { .hero { min-height: 0; } .hero-inner { padding: 112px 0 30px; } .hero-stats { margin-top: 26px; } }
@media (max-width: 600px) { .hero h1 { font-size: 31px; } .hero-lead { font-size: 15.5px; } .hero-stats { display: none; } .hero-actions .btn { padding: 13px 20px; } }
.hero-diapos { animation: none; transform: scale(1.06); will-change: transform; }
.hero-diapos .diapo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero .diapo { opacity: 0; transition: opacity 1.6s ease; animation: none; transform: scale(1.06); }
.hero .diapo.on { opacity: 1; animation: heroZoom 7s linear forwards; }
@media (prefers-reduced-motion: reduce) { .hero .diapo { transition: none; } }
.hero-deuil { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 8px 16px 8px 12px; border-radius: var(--r-pill); background: rgba(10,10,12,.55); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 13.5px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-decoration: none; }
.hero-deuil:hover { background: rgba(10,10,12,.72); }
.ruban { width: 10px; height: 14px; background: #111; border: 1px solid rgba(255,255,255,.5); clip-path: polygon(0 0,100% 0,100% 100%,50% 72%,0 100%); }
.actu.deuil .actu-img img { filter: grayscale(1); }
.actu.deuil .actu-date { color: var(--texte-2, inherit); }
.page-hero.deuil { background: #111216; }
.page-hero.deuil img { filter: grayscale(1) brightness(.9); }
.page-hero.deuil::after { background: linear-gradient(90deg, rgba(14,15,18,.9) 0%, rgba(14,15,18,.74) 42%, rgba(14,15,18,.4) 72%, rgba(14,15,18,.22) 100%); }
@media (max-width: 760px) { .page-hero.deuil::after { background: linear-gradient(180deg, rgba(14,15,18,.58) 0%, rgba(14,15,18,.84) 100%); } }
.article-corps .signature-deuil { margin-top: 28px; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 20px; text-align: center; }
.tenue-bloc { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 40px; align-items: center; }
.tenue-bloc .photo { aspect-ratio: 2/3; }
.tenue-bloc .photo img { object-fit: cover; object-position: top; }
  .tenue-modeles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tenue-modeles span { padding: 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--trait); background: var(--surface); font-weight: 700; font-size: 14.5px; }
@media (max-width: 820px) { .tenue-bloc { grid-template-columns: 1fr; } .tenue-bloc .photo { max-width: 420px; } }

/* --- Refonte inscription (Campus Faso) --- */
.sans-film .bloc-film{display:none !important}
.carte-choix{display:block;text-decoration:none;color:inherit;transition:transform .25s ease,box-shadow .25s ease}
.carte-choix:hover{transform:translateY(-3px)}
.carte-choix:focus-visible{outline:3px solid var(--or,#E3A72F);outline-offset:3px}
.lien-fleche{display:inline-flex;align-items:center;gap:8px;margin-top:16px;font-weight:700;color:var(--bleu,#1f4fbf)}
.lien-fleche svg{width:18px;height:18px}
.note-cf{margin-top:22px;font-size:14px;opacity:.75}
.frais-mode{display:block;font-size:12.5px;font-weight:500;color:var(--encre-3);margin-top:2px}
.pieces{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.pieces li{position:relative;padding-left:26px;line-height:1.55}
.pieces li::before{content:"";position:absolute;left:4px;top:.6em;width:9px;height:9px;border-radius:50%;background:var(--or,#E3A72F)}
.carte-secretaire{display:grid;gap:20px;padding:34px}
.secretaire-actions{display:flex;flex-wrap:wrap;gap:12px}
.secretaire-actions .btn{min-height:48px}
.lien{color:var(--bleu,#1f4fbf);font-weight:700;text-decoration:underline;text-underline-offset:3px}
[id="licence"],[id="master"],[id="frais"]{scroll-margin-top:110px}

/* l'assistant fermé ne doit plus capter les clics de la page */
.ia[hidden]{display:none !important}
.ia:not(.ouvert){pointer-events:none}

/* liens bleus lisibles en mode sombre */
:root[data-theme="dark"] .kicker, :root[data-theme="dark"] .lien, :root[data-theme="dark"] .lien-fleche,
:root[data-theme="dark"] .filiere .suite, :root[data-theme="dark"] .frise-item b, :root[data-theme="dark"] .badge,
:root[data-theme="dark"] .actu-date, :root[data-theme="dark"] .cl-txt .suite, :root[data-theme="dark"] .fg-annee,
:root[data-theme="dark"] .lf span, :root[data-theme="dark"] .piece > b, :root[data-theme="dark"] .coord-item .ico,
:root[data-theme="dark"] .coord-item a:hover, :root[data-theme="dark"] .ia-liens a, :root[data-theme="dark"] .haut{color:#8DB4FF}
:root[data-theme="dark"] .badge.master{color:var(--or)}
/* bulles flottantes plus discrètes sur téléphone, et le bas de page jamais caché */
@media (max-width:640px){
  .wa, .ia-ouvrir{width:48px;height:48px}
  .wa svg{width:24px;height:24px}
  footer{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
}

/* largeur du contenu légèrement réduite (1180 -> 1080 px) */
.wrap{width:min(1080px, calc(100% - 48px))}
@media (max-width:640px){.wrap{width:calc(100% - 32px)}}

/* ---- Performance : apparitions plus rapides ---- */
.rev{transition-duration:.45s !important;transform:translateY(12px)}
.rev.vu{transform:none}
.rev[data-rev="flou"]{filter:none !important}
[style*="--i"]{transition-duration:.45s !important;transition-delay:min(calc(var(--i, 0) * 40ms), 240ms) !important}
.masque > span{animation-duration:.6s}
/* sur téléphone : pas de flou d'arrière-plan en dehors du menu (très coûteux pour les petits processeurs) */
@media (max-width:900px){
  *:not(.nav-inner):not(.ia){-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
  .diapo.on{animation:none}
  .menu-mobile{background:var(--fond)}
}
@media (prefers-reduced-motion:reduce){.rev,[style*="--i"]{transition:none !important;opacity:1 !important;transform:none !important}}

/* ================================================================
   FINITIONS — octobre 2026
   ================================================================ */
/* En-tête : logo, sept liens et bouton tiennent sans se chevaucher
   (la barre flottante est un peu plus large que le contenu) */
.brand { flex-shrink: 0; }
@media (min-width: 1101px) { .nav > .wrap { width: min(1200px, calc(100% - 32px)); } }
@media (min-width: 1101px) and (max-width: 1160px) {
  .nav .brand-txt span { display: none; }
  .nav-links a { padding: 10px 11px; }
}

/* Menu mobile fermé : invisible aussi pour le clavier et les lecteurs d'écran */
.menu-mobile { visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.menu-mobile.open { visibility: visible; transition: opacity .35s var(--ease), visibility 0s; }

/* Sous-navigation : fondu sur le bord quand d'autres onglets suivent */
.sous-nav-piste.suite-d { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.sous-nav-piste.suite-g { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.sous-nav-piste.suite-g.suite-d { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }

/* Cartes d'actualité : résumés de même hauteur */
.actu p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ================================================================
   CONTENUS MODIFIABLES (actualités, albums, annonce)
   ================================================================ */
/* Actualité à la une : toute la largeur, photo et texte côte à côte */
.actus .actu-une { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .actu-une { display: grid; grid-template-columns: 1.25fr 1fr; }
  .actu-une .actu-img { height: auto; min-height: 340px; }
  .actu-une .actu-txt { padding: clamp(26px, 3vw, 40px); align-content: center; }
  .actu-une h3 { font-size: clamp(22px, 2.3vw, 30px); }
  .actu-une p { -webkit-line-clamp: 4; font-size: 15.5px; }
  .actu-large { grid-column: span 2; }
  .actu-large .actu-img { height: 250px; }
}
.actu-sans-image .actu-txt { border-top: 4px solid var(--or); }
.badge-brouillon { justify-self: start; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: var(--r-pill); background: #FDE7C2; color: #7A4B00; }

/* Corps d'article : photos et listes */
.article-figure { margin: 30px 0; }
.article-figure img { width: 100%; height: auto; border-radius: var(--r-md); box-shadow: var(--ombre); }
.article-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--encre-3); }
.article-corps ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.article-corps .lien { text-underline-offset: 3px; }
.photos-titre { font-size: clamp(22px, 2.6vw, 28px); margin: 40px 0 16px; }

/* Grilles de photos (articles et albums) */
.photos-article, .album-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.album-photos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.photo-tuile { position: relative; padding: 0; border: none; border-radius: 16px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; cursor: zoom-in; }
.photo-tuile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.photo-tuile:hover img { transform: scale(1.05); }
.photo-legende { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(11,31,74,.62); color: #fff; font-size: 12.5px; font-weight: 600; text-align: left; opacity: 0; transition: opacity .3s; }
.photo-tuile:hover .photo-legende, .photo-tuile:focus-visible .photo-legende { opacity: 1; }
@media (hover: none) { .photo-legende { opacity: 1; } }

/* Albums de la galerie */
.albums-bloc { margin-bottom: 48px; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.album { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.album:hover { transform: translateY(-5px); box-shadow: var(--ombre); }
.album-img { position: relative; height: 190px; background: var(--surface-2); }
.album-img img { width: 100%; height: 100%; object-fit: cover; }
.album-nombre { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(11,31,74,.7); color: #fff; font-size: 12.5px; font-weight: 700; }
.album-txt { padding: 20px 22px 24px; display: grid; gap: 8px; }
.album-txt h3 { font-size: 18px; }
.album-txt p { font-size: 14.5px; color: var(--encre-2); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Annonce de l'accueil */
.annonce { max-width: 100%; line-height: 1.35; }
.annonce-point { width: 9px; height: 9px; border-radius: 50%; background: var(--or); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(233,179,58,.25); }
.annonce-info { background: rgba(11,31,74,.55); }
.annonce-urgent { background: rgba(150,24,24,.78); }
.annonce-urgent .annonce-point { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
a.annonce:hover { background: rgba(11,31,74,.75); }
a.annonce-urgent:hover { background: rgba(150,24,24,.92); }

/* Bandeau de l'aperçu (administration) */
.apercu-bandeau { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; max-width: calc(100% - 140px); padding: 10px 18px; border-radius: var(--r-pill); background: #7A4B00; color: #fff; font-size: 13.5px; font-weight: 700; box-shadow: var(--ombre-2); text-align: center; }
:root[data-theme="dark"] .badge-brouillon { background: #4A3410; color: #FBD38D; }
