/* DPEM — styles communs à toutes les pages du site.
   Jetons de couleur, effets de verre, boutons, liens, navigation et
   animations. Une page qui n'a besoin que de cela ne charge que ce
   fichier. */

:root {
  --ink: #121C18; --forest-900: #0E3B2C; --forest-700: #1B6A4C; --forest-500: #2E8B63;
  --cobalt-700: #1E4F8F; --rubis-600: #CE1021; --rubis-700: #A10A18; --slate-600: #4A5A53;
  --paper: #F7FAF7; --mist: #EAF1EC; --lichen: #D9E8DF; --sky: #DCE8F5;
  --glass-bg: rgba(255,255,255,.68);
  --glass-strong: rgba(255,255,255,.84);
  --glass-border: rgba(255,255,255,.75);
  --blur: 20px;
  --ease: cubic-bezier(.22,.8,.24,1);
}

body { background: var(--paper); color: var(--ink); font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

/* Fond « terrain » */
.terrain-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.terrain-bg span { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .28; }
.terrain-bg .b1 { width: 540px; height: 540px; background: #9CCBB2; top: -120px; left: -140px; }
.terrain-bg .b2 { width: 480px; height: 480px; background: #A9C3E6; top: 30%; right: -160px; }
.terrain-bg .b3 { width: 400px; height: 400px; background: #FCA5A5; bottom: -140px; left: 30%; opacity: .18; }

@media (prefers-reduced-motion: no-preference) {
  .terrain-bg span { animation: float 40s ease-in-out infinite alternate; }
  @keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 30px); } }
}

/* Verre & Effets */
.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 24px 48px -28px rgba(14,59,44,.28);
}
.glass-dark {
  background: rgba(7, 36, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 24px 48px -20px rgba(0,0,0,.5);
}
.glass-strong { background: var(--glass-strong); }
.glass-tint { background: rgba(217,232,223,.55); }
.glass-sky { background: rgba(220,232,245,.6); }

/* Boutons & Liens */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem 1.4rem; border-radius: 12px; font-weight: 600; transition: transform .25s var(--ease), background .25s, box-shadow .25s; }
.btn-rubis { background: var(--rubis-600); color: #fff; box-shadow: 0 10px 25px -8px rgba(206,16,33,0.5); }
.btn-rubis:hover { background: var(--rubis-700); box-shadow: 0 14px 30px -10px rgba(206,16,33,0.7); transform: translateY(-1px); }
.btn-primary { background: var(--forest-700); color: #fff; }
.btn-primary:hover { background: var(--forest-900); box-shadow: 0 14px 30px -16px rgba(14,59,44,.6); }
.btn-ghost { background: rgba(255,255,255,.55); color: var(--forest-900); border: 1px solid rgba(14,59,44,.18); }
.btn-ghost:hover { background: #fff; }
.btn-ghost-dark { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.22); color: #fff; }
.btn:active { transform: translateY(1px); }

.link { color: var(--cobalt-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.ref { font-weight: 600; color: var(--cobalt-700); font-variant-numeric: tabular-nums; }

/* Navbar */
.nav-link { padding: 0.5rem 0.75rem; border-radius: 12px; color: var(--ink); font-weight: 500; transition: background 0.2s, color 0.2s; }
.nav-link:hover { background: rgba(255,255,255,0.7); }
.nav-link[aria-current="page"] { color: var(--forest-900); font-weight: 700; box-shadow: inset 0 -3px 0 var(--rubis-600); }
.nav-link-m { display: block; padding: 0.75rem 1rem; border-radius: 12px; font-weight: 500; }
.nav-link-m[aria-current="page"] { background: rgba(255,255,255,0.8); color: var(--forest-900); font-weight: 700; }

/* Animation pulse lumineuse */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.08); }
}
.animate-glow { animation: pulseGlow 6s ease-in-out infinite; }

/* Utilitaires & Animations */
:focus-visible { outline: 3px solid var(--cobalt-700); outline-offset: 3px; border-radius: 6px; }
.is-scrolled { background: var(--glass-strong); box-shadow: 0 10px 30px -10px rgba(14,59,44,.12); backdrop-filter: blur(18px); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--lift); background-color: rgba(217,232,223,.6); }

.parcours-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 400ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Titres de colonne du pied de page : le rouge de la charte les soulignait en
   couleur de texte, sur le vert profond — deux teintes qui vibrent et se
   lisent mal quel que soit le rapport de contraste. Il signale désormais par
   un filet, et le texte reste clair. */
.footer-titre {
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--rubis-600);
  display: inline-block;
}

/* ── Le bloc-marque dans l'en-tête ────────────────────────────────────────
   Le logo officiel fait 3,87 de large pour 1 de haut : à la hauteur d'une
   icône il devenait illisible. On lui donne la hauteur qu'il demande, et la
   barre suit. Le libellé qui l'accompagnait a disparu : le bloc-marque porte
   déjà le nom de la direction, on ne le redit pas à côté. */
.marque-lien { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.marque-logo {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: opacity .2s var(--ease);
}
.marque-lien:hover .marque-logo { opacity: .82; }

@media (max-width: 1023px) {
  .marque-logo { height: 44px; }
}
@media (max-width: 420px) {
  .marque-logo { height: 38px; }
}

/* ── Barre d'ancres des pages intérieures ────────────────────────────────── */
.ancre {
  padding: 0.9rem 0.9rem;
  color: var(--slate-600);
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
}
.ancre:hover { color: var(--forest-900); }
.ancre[aria-current="true"] { color: var(--forest-900); border-bottom-color: var(--rubis-600); font-weight: 700; }

/* ── Pastille d'initiales ─────────────────────────────────────────────────
   Aucun portrait officiel n'ayant été fourni, on affiche les initiales plutôt
   qu'une silhouette générique : une direction de l'État ne se représente pas
   par une image d'emprunt. */
.portrait-initiales {
  width: 108px; height: 132px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: var(--lichen);
  color: var(--forest-900);
  font-size: 2.1rem; font-weight: 800; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.7);
  flex-shrink: 0;
}
.portrait-petit { width: 72px; height: 88px; font-size: 1.4rem; border-radius: 14px; }

/* ── Formulaires et recherche ─────────────────────────────────────────────
   Employés par Contact et par la recherche du Cadre légal. */
.etiquette {
  display: block; font-size: 0.875rem; font-weight: 700;
  color: var(--forest-900); margin-bottom: 0.4rem;
}
.champ, .champ-recherche {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1px solid rgba(14,59,44,.22); border-radius: 12px;
  background: rgba(255,255,255,.9); color: var(--ink);
  font-family: inherit; font-size: 0.9375rem;
  transition: border-color .2s, box-shadow .2s;
}
.champ-recherche { padding-left: 2.35rem; }
.champ:focus, .champ-recherche:focus {
  outline: none; border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(46,139,99,.2);
}

/* ── Badges de statut d'un texte ──────────────────────────────────────── */
.badge-statut {
  font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem;
  border-radius: 999px; background: #fff; white-space: nowrap;
}
.statut-vigueur { border: 1px solid var(--forest-500); color: var(--forest-900); }
.statut-modifie { border: 1px solid #A16207; color: #854D0E; }
.statut-modificatif { border: 1px solid var(--cobalt-700); color: var(--cobalt-700); }

/* ── Glossaire ────────────────────────────────────────────────────────── */
.glossaire { display: grid; gap: 0.15rem; max-width: 48rem; }
.sigle {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid rgba(14,59,44,.10);
  align-items: baseline;
}
.sigle dt { font-weight: 800; color: var(--forest-900); }
.sigle dd { color: rgba(18,28,24,.88); }
.sigle.trouve { background: rgba(217,232,223,.55); border-radius: 10px; padding-left: .6rem; }
@media (max-width: 520px) { .sigle { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ── Fil d'actualités ─────────────────────────────────────────────────── */
.fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

/* ── Pastilles de filtre et cartes repliables ───────────────────────────
   Employées par Démarches et par Cadre légal. */
.pastille {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(14,59,44,.18);
  background: rgba(255,255,255,.6);
  font-size: 0.875rem; font-weight: 600; color: var(--forest-900);
  transition: background .2s var(--ease), border-color .2s, color .2s;
}
.pastille:hover { background: #fff; }
.pastille[aria-pressed="true"] {
  background: var(--forest-700); border-color: var(--forest-700); color: #fff;
}
.pastille-sm { padding: 0.35rem 0.75rem; font-size: 0.8125rem; }
/* ── Questions fréquentes ────────────────────────────────────────────────
   `<details>` natif : la page répond au clavier et s'imprime dépliée sans
   qu'on ait à l'écrire. */
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 1.2rem; font-weight: 700; color: var(--forest-900);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--slate-600);
  transition: transform .2s var(--ease);
}
.faq[open] summary::after { content: "−"; }
.faq-corps { padding: 0 1.2rem 1.2rem; font-size: 0.9375rem; line-height: 1.7; color: rgba(18,28,24,.88); }
