/* Site Notre-Dame des Missions — base commune à tous les thèmes — v2.15.1-20261114 */
:root {
  /* Couleurs (redéfinies par chaque thème) */
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1f2733;
  --muted: #5b6676;
  --line: #d9dfe8;
  --mist: #eef2f7;
  --primary: #13315c;
  --primary-deep: #0c2242;
  --on-primary: #ffffff;
  --highlight: #d4a72c;
  --accent: var(--primary);
  --link: var(--primary);
  --mark: #f6e3a8;
  /* Typographie */
  --head-font: "Literata", Georgia, serif;
  --body-font: "Public Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --prose-font: var(--head-font);
  --head-weight: 600;
  --head-transform: none;
  --head-spacing: -.015em;
  --prose-size: 1.1rem;
  /* Formes */
  --radius: 6px;
  --btn-radius: 6px;
  /* Images */
  --img-radius: 4px;
  --img-border: 0;
  --img-pad: 0;
  --img-bg: transparent;
  --img-shadow: 0 14px 30px -18px rgba(12, 34, 66, .55);
  --img-rotate: 0deg;
  --gallery-gap: .8rem;
  --wrap: 1180px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: inherit; }

/* Une teinte par rubrique */
[data-section="accueil"]                 { --accent: var(--primary); }
[data-section="ecole"]                   { --accent: #2e7a55; }
[data-section="college"]                 { --accent: #b0532b; }
[data-section="lycee"]                   { --accent: #5846a0; }
[data-section="labomaths"]               { --accent: #1b7589; }
[data-section="ouverture-internationale"]{ --accent: #9a6b00; }
[data-section="nos-plus"]                { --accent: #a1365a; }
[data-section="pastorale"]               { --accent: #6d5f38; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--body-font); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; border-radius: 2px; }
.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--highlight); color: #000; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
h1, h2, h3, .brand-name, .level-title, .sidenav-title { font-family: var(--head-font); font-weight: var(--head-weight); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); }
.preview-bar { position: sticky; top: 0; z-index: 90; background: #111; color: #fff; font: 600 .85rem var(--body-font); text-align: center; padding: .45rem 1rem; }
.preview-bar a { color: #ffd166; }

/* ---------- En-tête ---------- */
.topbar { background: var(--primary-deep); color: var(--on-primary); font-size: .82rem; opacity: .97; }
.topbar-in { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar-links { display: flex; gap: 1.25rem; }
.tb-group { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.25rem; }
.tb-right { margin-left: auto; justify-content: flex-end; }
.tb-item { display: inline-flex; align-items: center; gap: .4rem; color: inherit; }
a.tb-item { text-decoration: none; }
a.tb-item:hover span { text-decoration: underline; }
.tb-ico { flex: none; width: 16px; height: 16px; }
.tb-icon-only { margin: 0 -.5rem; padding: .1rem .5rem; border-radius: 4px; }
.tb-icon-only .tb-ico { width: 18px; height: 18px; }
a.tb-icon-only:hover { background: rgba(255, 255, 255, .15); }
.masthead { border-bottom: 4px solid var(--highlight); background: var(--surface); position: relative; z-index: 20; }
.brand-row { display: flex; align-items: center; gap: 1.5rem; padding: 1.1rem 0; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--primary); margin-right: auto; }
.crest { width: 42px; height: 49px; flex: none; }
.crest-shield { fill: var(--primary); }
.crest-cross { stroke: var(--highlight); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.6rem; }
.brand-sub { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.search-mini { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--mist); }
.search-mini input { border: 0; background: transparent; color: var(--ink); padding: .55rem 1rem; font: inherit; font-size: .92rem; width: 15rem; }
.search-mini input:focus { outline: none; }
.search-mini:focus-within { outline: 3px solid var(--highlight); outline-offset: 1px; }
.search-mini button { border: 0; background: transparent; padding: 0 .9rem; color: var(--primary); cursor: pointer; }
.menu-toggle { display: none; font: 600 .95rem var(--body-font); background: var(--primary); color: var(--on-primary); border: 0; border-radius: var(--btn-radius); padding: .55rem 1rem; cursor: pointer; }
.mainnav { background: var(--surface); border-top: 1px solid var(--line); }
.mainnav > ul { list-style: none; display: flex; flex-wrap: wrap; margin-block: 0; padding: 0; }
.nav-search { display: none; }
.nav-link { display: block; padding: .8rem .95rem .7rem; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.nav-link:hover, .nav-item:focus-within .nav-link, .nav-link.is-current { color: var(--accent); border-bottom-color: var(--accent); }
.nav-item { position: relative; }
.nav-panel {
  display: none; position: absolute; left: 0; top: 100%; z-index: 40; min-width: 250px; max-width: 340px;
  list-style: none; margin: 0; padding: .35rem 0; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .35);
}
.nav-item:nth-last-child(-n+2) .nav-panel { left: auto; right: 0; }
.nav-item:hover .nav-panel, .nav-item:focus-within .nav-panel { display: block; }
.nav-panel li + li { border-top: 1px solid var(--line); }
.nav-panel a { display: block; padding: .55rem 1rem; font-size: .93rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.nav-panel a:hover, .nav-panel a:focus-visible { background: var(--mist); color: var(--accent); }
/* Menu complet : grand panneau avec toutes les pages, classées par sous-rubrique */
.menu-complet .nav-item { position: static; }
.nav-mega { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: var(--surface); color: var(--ink); border-top: 3px solid var(--accent); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .35); padding: 1.5rem max(1.25rem, calc((100% - var(--wrap)) / 2)) 1.75rem; columns: 4 220px; column-gap: 2rem; }
.nav-item:hover .nav-mega, .nav-item:focus-within .nav-mega { display: block; }
.nav-group { break-inside: avoid; margin-bottom: 1rem; }
.nav-group-title { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; color: var(--accent); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: block; padding: .2rem 0; font-size: .92rem; color: var(--ink); text-decoration: none; }
.nav-group a:hover { color: var(--accent); text-decoration: underline; }
.notice-hidden { border-left-color: #c2410c; background: #fff1e6; color: #5a2a0a; }

/* ---------- Boutons ---------- */
.btn { display: inline-block; font: 600 .98rem var(--body-font); padding: .75rem 1.3rem; border-radius: var(--btn-radius); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-deep); color: var(--on-primary); }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--mist); }

/* ---------- Accueil ---------- */
.hero { background: var(--mist); padding: 3.5rem 0; position: relative; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; position: relative; }
.hero-title { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; color: var(--primary); margin: 0 0 1.2rem; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 1.8rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 0; }
.hero-figure { margin: 0; border-left: 8px solid var(--highlight); background: var(--surface); box-shadow: var(--img-shadow); border-radius: var(--img-radius); overflow: hidden; }
.hero-figure img { display: block; width: 100%; }

.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2.5rem 2rem; padding: 3.5rem 0 3rem; }
.level { border-top: 5px solid var(--accent); padding-top: 1rem; }
.level-title { font-size: 1.55rem; margin: 0; line-height: 1.2; }
.level-title a { color: var(--accent); text-decoration: none; }
.level-title a:hover { text-decoration: underline; }
.level-count { margin: .15rem 0 .8rem; color: var(--muted); font-size: .88rem; }
.level-list { list-style: none; margin: 0 0 .9rem; padding: 0; }
.level-list li { border-bottom: 1px solid var(--line); }
.level-list a { display: block; padding: .45rem 0; color: var(--ink); text-decoration: none; font-size: .96rem; }
.level-list a:hover { color: var(--accent); }
.level-more { font-weight: 600; font-size: .92rem; color: var(--accent); }

.photos { padding: 1rem 0 3rem; }
.photos h2, .practical h2, .home-extra h2 { font-size: 1.6rem; color: var(--primary); margin: 0 0 1.2rem; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: var(--gallery-gap); }
.photo-grid a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photo-grid a:nth-child(6) { grid-column: span 2; }
.photo-card { position: relative; display: block; overflow: hidden; border-radius: var(--img-radius); background: var(--mist); text-decoration: none; box-shadow: var(--img-shadow); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.photo-card:hover img { transform: scale(1.05); }
.photo-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem .9rem .7rem; color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.3; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }

.practical { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.quick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.quick a { display: block; padding: .85rem 1rem; background: var(--mist); border-left: 4px solid var(--highlight); color: var(--primary); font-weight: 600; text-decoration: none; border-radius: var(--radius); }
.quick a:hover { filter: brightness(.96); }
.practical-info { background: var(--primary); color: var(--on-primary); padding: 1.5rem 1.6rem; border-radius: var(--radius); }
.practical-info h2 { color: var(--on-primary) !important; }
.practical-info p { margin: 0 0 .7rem; }
.practical-info a { color: var(--highlight); }
.home-extra { padding: 1rem 0 3.5rem; text-align: center; }

/* ---------- Pages ---------- */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 3.5rem; padding: 2.5rem 0 4rem; }
.crumbs { font-size: .86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.crumbs a { color: var(--muted); }
.article-title, .section-title { color: var(--primary); font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.12; margin: 0 0 1.6rem; }
.article-title { border-left: 6px solid var(--accent); padding-left: 1rem; }
.prose { font-family: var(--prose-font); font-size: var(--prose-size); line-height: 1.75; max-width: 46rem; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1rem; }
.prose h2, .prose h3, .prose h4 { font-family: var(--head-font); color: var(--primary); line-height: 1.3; margin: 2rem 0 .8rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose blockquote { margin: 1.5rem 0; padding: .8rem 1.2rem; border-left: 4px solid var(--highlight); background: var(--mist); border-radius: var(--radius); }
.prose .table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--body-font); font-size: .95rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: .6rem .75rem; vertical-align: top; }
.prose .embed { position: relative; margin: 1.4rem 0; border-radius: var(--img-radius); overflow: hidden; box-shadow: var(--img-shadow); }
.prose .embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--mist); }
.prose .embed iframe[src*="drive.google"] { aspect-ratio: 3 / 4; }
.prose .embed iframe[src*="maps"] { aspect-ratio: 4 / 3; }
.notice { font-family: var(--body-font); font-size: .98rem; background: var(--mist); border-left: 4px solid var(--highlight); padding: 1rem 1.2rem; margin: 1rem 0; border-radius: var(--radius); }

/* ---------- Images embellies (ajoutées par site.js) ---------- */
.prose img { transition: opacity .5s ease; }
.prose img.is-loading { opacity: 0; }
.prose img.is-broken, .prose .is-broken-wrap { display: none !important; }
.prose .photo {
  display: block; margin: 1.6rem auto; max-width: 100%;
  border-radius: var(--img-radius); border: var(--img-border); padding: var(--img-pad); background: var(--img-bg);
  box-shadow: var(--img-shadow); transform: rotate(var(--img-rotate)); cursor: zoom-in;
}
.prose .photo-solo { text-align: center; }
.prose img.icon { box-shadow: none; border: 0; padding: 0; background: none; transform: none; cursor: default; }
.prose .gallery { display: grid; gap: var(--gallery-gap); margin: 1.8rem 0; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.prose .gallery.n2 { grid-template-columns: repeat(2, 1fr); }
.prose .gallery.n3 { grid-template-columns: repeat(3, 1fr); }
.prose .gallery.n4 { grid-template-columns: repeat(2, 1fr); }
.prose .gallery-item { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--img-radius); border: var(--img-border); padding: var(--img-pad); background: var(--img-bg); box-shadow: var(--img-shadow); cursor: zoom-in; }
.prose .gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: calc(var(--img-radius) * .6); transition: transform .5s ease, opacity .5s ease; }
.prose .gallery-item:hover img { transform: scale(1.06); }
.prose .gallery-item:nth-child(odd) { transform: rotate(var(--img-rotate)); }
.prose .gallery-item:nth-child(even) { transform: rotate(calc(var(--img-rotate) * -1)); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: 46rem; }
.pager a { display: flex; flex-direction: column; text-decoration: none; font-weight: 600; max-width: 48%; }
.pager small { font-weight: 400; color: var(--muted); font-size: .82rem; }
.pager-next { text-align: right; margin-left: auto; }
.sidenav { font-size: .93rem; align-self: start; position: sticky; top: calc(1rem + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 2rem); overflow-y: auto; border-top: 5px solid var(--accent); padding-top: 1rem; }
.sidenav-title { margin: 0 0 .6rem; font-size: 1.3rem; }
.sidenav-title a { color: var(--accent); text-decoration: none; }
.sidenav-sub { margin: 1rem 0 .25rem; font-weight: 700; font-size: .8rem; color: var(--muted); }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li a { display: block; padding: .3rem 0 .3rem .7rem; color: var(--ink); text-decoration: none; border-left: 2px solid var(--line); }
.sidenav li a:hover { color: var(--accent); border-left-color: var(--accent); }
.sidenav li a[aria-current="page"] { color: var(--accent); font-weight: 700; border-left: 3px solid var(--accent); }

/* ---------- Rubrique ---------- */
.section-head { padding-top: 2.5rem; }
.section-head .section-title { border-bottom: 5px solid var(--accent); padding-bottom: .8rem; color: var(--accent); }
.section-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem 3rem; padding-bottom: 4rem; }
.group-title { font-size: 1.1rem; color: var(--ink); margin: 0 0 .6rem; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { border-bottom: 1px solid var(--line); }
.entries a { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 0; text-decoration: none; color: var(--ink); }
.entry-thumb { flex: none; width: 76px; height: 60px; object-fit: cover; border-radius: calc(var(--img-radius) * .8); background: var(--mist); }
.entry-title { display: block; font-weight: 600; color: var(--accent); }
.entry-excerpt { display: block; font-size: .9rem; color: var(--muted); margin-top: .15rem; }
.entries a:hover .entry-title { text-decoration: underline; }

/* ---------- Recherche / docs / plan ---------- */
.narrow { max-width: 780px; padding: 2.5rem 0 4rem; }
.search-big { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.search-big input { flex: 1; font: inherit; padding: .75rem 1rem; border: 2px solid var(--line); border-radius: var(--btn-radius); background: var(--surface); color: var(--ink); }
.search-big input:focus { border-color: var(--primary); outline: none; }
.result-count { color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 1rem 0 1rem 1rem; border-left: 4px solid var(--accent); margin-bottom: 1rem; background: linear-gradient(90deg, var(--mist), transparent 70%); }
.results a { font-weight: 700; font-size: 1.1rem; }
.result-where { display: block; font-size: .82rem; color: var(--muted); }
.results p { margin: .4rem 0 0; font-size: .95rem; }
mark { background: var(--mark); color: inherit; padding: 0 .1em; }
.docs { list-style: none; padding: 0; }
.docs a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: .6rem; background: var(--mist); border-left: 4px solid var(--highlight); text-decoration: none; border-radius: var(--radius); }
.doc-name { font-weight: 600; }
.doc-meta { color: var(--muted); font-size: .9rem; }
.plan { columns: 3 280px; column-gap: 3rem; padding-bottom: 4rem; }
.plan section { break-inside: avoid; margin-bottom: 2rem; }
.plan h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
.plan h2 a { color: var(--accent); }
.plan h3 { font-size: .85rem; color: var(--muted); margin: .8rem 0 .2rem; }
.plan ul { margin: 0; padding-left: 1.1rem; font-size: .93rem; }

/* ---------- Pied de page ---------- */
.footer { background: var(--primary-deep); color: var(--on-primary); font-size: .92rem; padding: 2.5rem 0 1.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 2rem; }
.footer p { margin: 0 0 .45rem; opacity: .9; }
.footer a { color: inherit; }
.footer-name { font-family: var(--head-font); font-size: 1.15rem; opacity: 1 !important; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-version { margin-top: 1.8rem; font-size: .78rem; opacity: .6; }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(6, 12, 24, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 200; padding: 3.5rem 4rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: calc(100vh - 9rem); max-width: 100%; min-width: min(640px, 92vw); object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); border-radius: 4px; }
.lightbox-caption { color: #e6e9ef; font: .95rem var(--body-font); margin-top: 1rem; text-align: center; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .95); color: #111; border: 0; width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lightbox-close { top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Mode iframe ---------- */
.in-frame .topbar { display: none; }
.in-frame .brand-row { padding: .6rem 0; }
.in-frame .crest { width: 32px; height: 37px; }
.in-frame .brand-name { font-size: 1.25rem; }
.is-embed .page-layout { padding-top: 1.5rem; grid-template-columns: 1fr; }
.is-embed .sidenav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .page-layout { grid-template-columns: 1fr; gap: 2rem; }
  .sidenav { position: static; max-height: none; }
  .hero-in, .practical { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .photo-grid a:nth-child(6) { grid-column: span 1; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .search-mini, .mainnav { display: none; }
  .mainnav.is-open { display: block; }
  .mainnav > ul { flex-direction: column; }
  .nav-link { border-bottom: 1px solid var(--line); border-left: 4px solid var(--accent); }
  .nav-panel, .nav-mega { display: none !important; }
  .brand-name { font-size: 1.3rem; }
  .quick { grid-template-columns: 1fr; }
  .search-big { flex-direction: column; }
  .nav-search { display: block; padding: .8rem 0; }
  .nav-search form { display: flex; gap: .5rem; }
  .nav-search input { flex: 1; font: inherit; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: 6px; }
  .topbar-addr, .tb-hide-m { display: none !important; }
  .prose .gallery.n3 { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 3.5rem .8rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .masthead, .footer, .sidenav, .pager, .preview-bar { display: none; } .page-layout { display: block; } }

/* ---------- Carrousel d'accueil ---------- */
.carousel { position: relative; margin: 2.5rem auto 0; }
.carousel-top { margin: 0; width: 100%; }
.car-viewport { position: relative; overflow: hidden; border-radius: var(--img-radius); box-shadow: var(--img-shadow); border: var(--img-border); background: var(--primary-deep); }
.carousel-top .car-viewport { border-radius: 0; border: 0; box-shadow: none; }
.car-track { display: flex; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.car-slide { flex: 0 0 100%; margin: 0; position: relative; aspect-ratio: 21 / 9; }
.carousel-top .car-slide { aspect-ratio: auto; height: min(72vh, 640px); }
.car-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.car-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4.5rem clamp(1.2rem, 4vw, 3rem) 1.6rem; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.car-title { font-family: var(--head-font); font-weight: var(--head-weight); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); font-size: clamp(1.3rem, 2.8vw, 2.2rem); line-height: 1.15; max-width: 32em; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.car-text { font-size: 1rem; opacity: .92; max-width: 40em; }
.car-link { margin-top: .5rem; display: inline-block; background: var(--highlight); color: #111; padding: .5rem 1.1rem; border-radius: var(--btn-radius); font-weight: 700; text-decoration: none; font-size: .92rem; }
.car-link:hover { filter: brightness(1.08); color: #111; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #111; font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); z-index: 2; }
.car-btn:hover { background: #fff; }
.car-prev { left: 1rem; } .car-next { right: 1rem; }
.car-controls { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: .9rem 0 0; }
.carousel-top .car-controls { position: absolute; left: 0; right: 0; bottom: .6rem; padding: 0; z-index: 2; }
.carousel-top .car-cap { padding-bottom: 3rem; }
.car-dots { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.car-dots button { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--primary); background: transparent; padding: 0; cursor: pointer; }
.carousel-top .car-dots button { border-color: #fff; }
.car-dots button[aria-selected="true"] { background: var(--primary); transform: scale(1.2); }
.carousel-top .car-dots button[aria-selected="true"] { background: #fff; }
.car-pause { font: 600 .8rem var(--body-font); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--btn-radius); padding: .25rem .7rem; cursor: pointer; }
.hero-compact { padding: 2.2rem 0; }
.hero-compact .hero-in { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .car-slide { aspect-ratio: 4 / 3; }
  .carousel-top .car-slide { height: 62vh; }
  .car-btn { width: 2.4rem; height: 2.4rem; font-size: 1.4rem; }
  .car-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { .car-track { transition: none; } }

/* ---------- Vidéos et lecteur ---------- */
.prose figure.video { margin: 1.8rem auto; }
.prose figure.video figcaption, .prose figure.video-embed figcaption { font-family: var(--body-font); font-size: .9rem; color: var(--muted); text-align: center; padding-top: .6rem; }
.prose figure.video-loop video { display: block; width: 100%; border-radius: var(--img-radius); box-shadow: var(--img-shadow); }
.vplayer { position: relative; overflow: hidden; background: #000; border-radius: var(--img-radius); box-shadow: var(--img-shadow); border: var(--img-border); line-height: 0; outline: none; user-select: none; -webkit-user-select: none; }
.vplayer:focus-visible { box-shadow: 0 0 0 3px var(--highlight), var(--img-shadow); }
.vplayer video { display: block; width: 100%; height: auto; max-height: 80vh; background: #000; cursor: pointer; }
.vplayer.is-full { border-radius: 0; border: 0; display: flex; align-items: center; }
.vplayer.is-full video { max-height: 100vh; height: 100%; }
.vp-big { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--highlight); color: #111; box-shadow: 0 8px 30px rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; transition: transform .2s, opacity .25s; z-index: 2; }
.vp-big svg { width: 34px; height: 34px; margin-left: 4px; }
.vp-big:hover { transform: scale(1.08); }
.vplayer:not(.is-paused) .vp-big { opacity: 0; pointer-events: none; transform: scale(.8); }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: .35rem; padding: 2.2rem .7rem .55rem; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; line-height: 1; transition: opacity .3s, transform .3s; font-family: var(--body-font); }
.vplayer.is-idle .vp-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.vplayer.is-idle { cursor: none; }
.vp-btn { flex: none; width: 2.3rem; height: 2.3rem; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.vp-btn svg { width: 22px; height: 22px; }
.vp-btn:hover, .vp-btn:focus-visible { background: rgba(255, 255, 255, .16); outline: none; }
.vp-speed { width: auto; min-width: 2.6rem; padding: 0 .4rem; font: 700 .82rem var(--body-font); }
.vp-time { flex: none; font-size: .8rem; font-variant-numeric: tabular-nums; padding: 0 .3rem; opacity: .95; white-space: nowrap; }
.vp-bar input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; cursor: pointer; margin: 0; background: linear-gradient(90deg, var(--highlight) var(--p, 0%), rgba(255, 255, 255, .55) var(--p, 0%), rgba(255, 255, 255, .55) var(--b, 0%), rgba(255, 255, 255, .25) var(--b, 0%)); }
.vp-vol { width: 70px; flex: none; background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255, 255, 255, .3) var(--p, 100%)) !important; }
.vp-seek { flex: 1; min-width: 60px; }
.vp-bar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.vp-bar input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.vp-bar input[type=range]:focus-visible { outline: 2px solid var(--highlight); outline-offset: 4px; }
.vp-spin { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; z-index: 2; pointer-events: none; }
.vplayer.is-loading:not(.is-paused) .vp-spin { opacity: 1; animation: vp-spin .8s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
.vplayer.is-error::after { content: "Vidéo indisponible"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 1rem var(--body-font); background: rgba(0, 0, 0, .7); line-height: 1.4; }
@media (max-width: 600px) { .vp-vol, .vp-pip { display: none !important; } .vp-big { width: 62px; height: 62px; margin: -31px 0 0 -31px; } .vp-time { font-size: .72rem; } }
@media (hover: none) { .vp-vol { display: none; } }

/* ---------- Sous-rubriques et pages d'accueil de rubrique ---------- */
.group-title a { color: inherit; text-decoration: none; }
.group-title a:hover { color: var(--accent); text-decoration: underline; }
.nav-group-title a { color: inherit; text-decoration: none; }
.nav-group-title a:hover { text-decoration: underline; }
.section-sub { margin: -1rem 0 2rem; color: var(--muted); font-size: .95rem; }
.sub-list { max-width: 820px; padding-bottom: 4rem; }
.sidenav-back { margin: 0 0 .5rem; font-size: .85rem; }
.sidenav-back a { color: var(--muted); text-decoration: none; border-left: 0 !important; padding: 0 !important; }
.sidenav-back a:hover { color: var(--accent); text-decoration: underline; }
.sidenav-sub a { display: block; color: var(--ink); text-decoration: none; padding: .35rem 0 .35rem .7rem !important; border-left: 2px solid var(--line); font-weight: 600; font-size: .9rem; }
.sidenav-sub a:hover { color: var(--accent); border-left-color: var(--accent); }
.sidenav p.sidenav-sub { margin: .1rem 0; }
.landing-list { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.landing-list .section-groups { padding-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem 2rem; }
.practical-single { grid-template-columns: 1fr; }
.practical-single .quick { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- Logo personnalisé ---------- */
.brand-logo { display: block; height: var(--logo-h, 56px); width: auto; max-width: min(360px, 60vw); object-fit: contain; flex: none; }
.brand-logo-bg { background: #fff; padding: 6px 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); box-sizing: content-box; }
.brand-mode-logo_only .brand-logo { max-width: min(480px, 70vw); }
.in-frame .brand-logo { height: calc(var(--logo-h, 56px) * .7); }
@media (max-width: 860px) { .brand-logo { height: min(var(--logo-h, 56px), 48px); } }

/* ---------- Bandeau vidéo sous le menu ---------- */
.hero-video { position: relative; height: var(--hv-h, 360px); overflow: hidden; background: var(--primary-deep); color: #fff; }
.hero-video.hv-full { height: calc(100vh - 10rem); min-height: 320px; }
.hv-poster, .hv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hv-pos, center); display: block; }
.hv-video { opacity: 0; transition: opacity .8s ease; }
.hv-video.is-playing { opacity: 1; }
.hv-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; background: linear-gradient(180deg, rgba(0, 0, 0, calc(var(--hv-dim) * .4)) 0%, rgba(0, 0, 0, var(--hv-dim)) 100%); }
.hv-content { padding: 0 0 clamp(1.2rem, 4vw, 3rem); }
.hv-title { margin: 0; color: #fff; font-size: clamp(1.7rem, 4.6vw, 3.4rem); line-height: 1.08; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); max-width: 18em; }
.hv-text { margin: .6rem 0 0; font-size: clamp(1rem, 1.8vw, 1.25rem); max-width: 36em; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.hv-btn { margin-top: 1rem; }
.hv-pause { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #111; font-size: .85rem; font-weight: 800; cursor: pointer; }
.hv-pause:hover { background: #fff; }
@media (max-width: 760px) { .hero-video { height: min(var(--hv-h, 360px), 60vh); } .hero-video.hv-full { height: 70vh; } }
@media (prefers-reduced-motion: reduce) { .hv-video { transition: none; } }

/* ---------- Zone libre de l'accueil ---------- */
.home-zone { padding: 2.2rem 0; }
.home-zone .prose { max-width: none; }
.home-zone .prose > *:first-child { margin-top: 0; }

/* ---------- Popup d'annonce ---------- */
.ndm-popup { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(10, 20, 36, .6); opacity: 0; transition: opacity .25s ease; }
.ndm-popup.is-open { opacity: 1; }
.ndm-popup-panel { position: relative; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); padding: 2.4rem 1.8rem 1.8rem; transform: translateY(14px) scale(.98); transition: transform .25s ease; }
.ndm-popup.is-open .ndm-popup-panel { transform: translateY(0) scale(1); }
.ndm-popup-close { position: absolute; top: .7rem; right: .7rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 0; background: var(--mist); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ndm-popup-close:hover { background: var(--line); }
.ndm-popup-body { max-width: none; }
.ndm-popup-body > *:first-child { margin-top: 0; }
.ndm-popup-body > *:last-child { margin-bottom: 0; }
.ndm-popup-body img, .ndm-popup-body video { border-radius: var(--img-radius); }
@media (max-width: 600px) { .ndm-popup-panel { padding: 2.2rem 1.2rem 1.3rem; } }
