/* =====================================================================
   COM1 — EN-TÊTE COMMUN (D-203)
   Le même menu sur le site (Le mouvement), la plateforme citoyenne et les pages publiques de l'Outil : bandeau, marque, entrées à pastille de couleur.
   Autonome : tout est préfixé « .entete » et les variables sont redéfinies ici, il ne dépend d'aucune autre feuille de style.
   ===================================================================== */
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("/assets/fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("/assets/fonts/manrope-latin-800-normal.woff2") format("woff2"); }

.entete {
  --bg: #F7F7F5; --surface: #FFFFFF; --surface-2: #EFEFEC; --line: #E2E2DE; --fg: #17161A; --muted: #5F5E66;
  --violet: #5A2582; --rose: #C2177E; --teal: #0B7285; --vert: #A5BE50;
  --violet-t: #5A2582; --rose-t: #C2177E; --teal-t: #0B7285; --vert-t: #5F7216; --rose-vif: #FF59BD;
  --ombre: 0 18px 40px rgba(23, 22, 26, .08);
  --f-titres: "Manrope", ui-rounded, "Segoe UI", system-ui, sans-serif; --ease: cubic-bezier(.2, .8, .2, 1);
  --c: var(--fg);
}
:root[data-theme="dark"] .entete {
  --bg: #121214; --surface: #1B1B1E; --surface-2: #26262A; --line: rgba(255,255,255,.1); --fg: #F5F5F3; --muted: #A8A7AE;
  --violet: #7B3DB3; --violet-t: #C9A7EB; --rose-t: #FF8ACF; --teal-t: #5CD3E6; --vert-t: #B6CF62; --ombre: 0 18px 40px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entete {
    --bg: #121214; --surface: #1B1B1E; --surface-2: #26262A; --line: rgba(255,255,255,.1); --fg: #F5F5F3; --muted: #A8A7AE;
    --violet: #7B3DB3; --violet-t: #C9A7EB; --rose-t: #FF8ACF; --teal-t: #5CD3E6; --vert-t: #B6CF62; --ombre: 0 18px 40px rgba(0, 0, 0, .35);
  }
}
.entete .t-violet { --c: var(--violet); } .entete .t-rose { --c: var(--rose); } .entete .t-teal { --c: var(--teal); } .entete .t-vert { --c: var(--vert); }

.entete, .entete *, .entete *::before, .entete *::after { box-sizing: border-box; }
.entete { position: sticky; top: 0; z-index: 60; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); font-family: var(--f-titres); line-height: 1.4; }
.entete a { color: inherit; }
.entete .visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.entete .conteneur { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: max(clamp(16px, 5vw, 48px), env(safe-area-inset-left)); }
.entete .bandeau { margin: 0; max-width: none; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 500; text-align: center; padding: .38rem 1rem; line-height: 1.35; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.entete .bandeau::before { content: ""; display: inline-block; vertical-align: .05em; width: .5rem; height: .5rem; margin-right: .5em; border-radius: 50%; background: var(--rose-vif); }
.entete .nav-interne { display: flex; align-items: center; gap: .75rem; min-height: 4.2rem; }
.entete .marque { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 800 1.3rem var(--f-titres); letter-spacing: -.03em; min-height: 44px; flex: none; line-height: 1.05; }
.entete .marque img { width: 42px; height: 42px; }
.entete .marque small { display: block; font: 700 .78rem var(--f-titres); letter-spacing: 0; color: var(--muted); }
.entete .logo-sombre { display: none; }
:root[data-theme="dark"] .entete .logo-clair { display: none; }
:root[data-theme="dark"] .entete .logo-sombre { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entete .logo-clair { display: none; }
  :root:not([data-theme="light"]) .entete .logo-sombre { display: block; }
}
.entete .nav-liens { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.entete .nav-lien { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .8rem; border-radius: 999px; font-weight: 600; font-size: .94rem; text-decoration: none; white-space: nowrap; color: var(--fg); }
.entete .nav-lien:hover { background: var(--surface-2); }
.entete .pastille { width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); flex: none; }
.entete .pastille-logo { width: 1.4rem; height: 1.4rem; flex: none; margin: -.15rem 0; }
.entete .nav-lien[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: underline; text-decoration-thickness: .12em; text-underline-offset: .35em; text-decoration-color: var(--c); }
.entete .nav-intranet { box-shadow: none; color: var(--muted); font-weight: 500; font-size: .82rem; padding: 0 .55rem; }
.entete .nav-intranet:hover { background: transparent; color: var(--fg); text-decoration: underline; }
.entete .nav-rejoindre { background: var(--fg); color: var(--bg); padding: 0 1.1rem; }
.entete .nav-rejoindre:hover { background: var(--fg); text-decoration: underline; }
.entete .nav-ilots { position: relative; }
.entete .nav-ilots summary { list-style: none; cursor: pointer; }
.entete .nav-ilots summary::-webkit-details-marker { display: none; }
.entete .nav-ilots > div { position: absolute; z-index: 80; top: 100%; min-width: 210px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--ombre); }
.entete .nav-ilots > div a { display: block; padding: 12px; text-decoration: none; border-radius: 10px; }
.entete .nav-ilots > div a:hover { background: var(--surface-2); }
.entete .outils-entete { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.entete .theme-bouton, .entete .nav-menu-bouton { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); cursor: pointer; font: 700 .95rem var(--f-titres); }
.entete .theme-bouton svg { width: 1.2rem; height: 1.2rem; }
.entete .theme-bouton .soleil { display: none; }
:root[data-theme="dark"] .entete .theme-bouton .soleil { display: block; }
:root[data-theme="dark"] .entete .theme-bouton .lune { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entete .theme-bouton .soleil { display: block; }
  :root:not([data-theme="light"]) .entete .theme-bouton .lune { display: none; }
}
.entete .nav-menu-bouton { display: none; padding: 0 1rem; gap: .5rem; grid-auto-flow: column; }
.entete a:focus-visible, .entete button:focus-visible, .entete summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
@media (min-width: 1140px) { .entete .nav-tiroir { margin-left: auto; } .entete .outils-entete { margin-left: .25rem; } }
@media (max-width: 1139px) {
  .entete .nav-ilots > div { position: static; margin: 6px 0 10px; box-shadow: none; }
  html:not(.js) .entete .nav-interne { flex-wrap: wrap; }
  html:not(.js) .entete .nav-tiroir { width: 100%; overflow-x: auto; padding-bottom: .5rem; }
  html.js .entete .nav-menu-bouton { display: inline-grid; }
  html.js .entete .nav-menu-bouton[aria-expanded="true"] { background: var(--fg); color: var(--bg); }
  html.js .entete .nav-tiroir { display: none; position: fixed; top: var(--entete-h, 6rem); left: 0; right: 0; bottom: 0; overflow-y: auto; background: var(--bg); padding: 1.25rem clamp(16px, 5vw, 48px) 2rem; }
  html.js .entete .nav-tiroir.est-ouvert { display: block; }
  html.js .entete .nav-liens { flex-direction: column; align-items: stretch; gap: .3rem; }
  html.js .entete .nav-lien { width: 100%; min-height: 56px; font: 700 1.2rem var(--f-titres); }
  html.js .entete .nav-lien .pastille { width: .8rem; height: .8rem; }
  html.js .entete .nav-rejoindre { justify-content: center; margin-top: .75rem; }
  html.js .entete .nav-lien.nav-intranet { min-height: 44px; font: 500 1rem var(--f-titres); }
}
@media (min-width: 640px) and (max-width: 1139px) {
  html.js .entete .nav-tiroir { left: auto; width: min(24rem, 100%); border-left: 1px solid var(--line); box-shadow: var(--ombre); }
}
html.menu-ouvert { overflow: hidden; }
@media (max-width: 480px) { .entete .bandeau { font-size: .74rem; padding: .3rem .75rem; } .entete .nav-interne { min-height: 3.7rem; } .entete .marque img { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: no-preference) {
  .entete .bandeau::before { animation: entete-clignote 1.6s ease-in-out infinite; }
  @keyframes entete-clignote { 50% { opacity: .3; } }
}
@media (forced-colors: active) { .entete .nav-lien[aria-current="page"] { outline: 2px solid CanvasText; } }

/* Changer de plateforme : un petit triangle contre la marque (D-217). Le même sur le site, la plateforme citoyenne et les pages publiques. */
.entete .marque-bloc { position: relative; display: flex; align-items: center; gap: .1rem; flex: none; min-width: 0; }
.entete .espaces summary { list-style: none; }
.entete .espaces summary::-webkit-details-marker { display: none; }
.entete .espaces-fleche { display: grid; place-items: center; width: 2.1rem; height: 44px; margin-top: .15rem; border-radius: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.entete .espaces-fleche svg { width: .8rem; height: .8rem; transition: transform .2s; }
.entete .espaces-fleche:hover, .entete .espaces[open] .espaces-fleche { color: var(--fg); background: var(--surface-2); }
.entete .espaces[open] .espaces-fleche svg { transform: rotate(180deg); }
.entete .espaces-liste { position: absolute; left: 0; top: calc(100% + .5rem); z-index: 90; width: min(19rem, calc(100vw - 2rem)); display: grid; gap: .15rem; padding: .5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--ombre); }
.entete .espaces-liste a { display: grid; gap: .1rem; padding: .7rem .9rem; border-radius: 14px; text-decoration: none; }
.entete .espaces-liste a:hover { background: var(--surface-2); }
.entete .espaces-liste b { font: 700 .98rem var(--f-titres); }
.entete .espaces-liste small { color: var(--muted); font: 500 .8rem system-ui, sans-serif; }
.entete .espaces-liste a[aria-current] b::after { content: " · ici"; color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .entete .espaces[open] .espaces-liste { animation: entete-ouvre .18s ease-out; } @keyframes entete-ouvre { from { opacity: 0; transform: translateY(-6px); } } }
@media (max-width: 359px) { .entete .marque small { display: none; } .entete .outils-entete { gap: .25rem; } .entete .nav-interne { gap: .4rem; } }

/* Le bouton d'adhésion garde son contraste, y compris sur sa propre page. */
.entete .nav-lien.nav-rejoindre,.entete .nav-lien.nav-rejoindre[aria-current="page"],.entete .nav-lien.nav-rejoindre:hover{background:var(--fg);color:var(--bg);text-decoration:none;box-shadow:none}
.entete .nav-lien.nav-rejoindre:focus-visible{outline:3px solid var(--teal-t);outline-offset:3px}
