/* ============================================================================
   Observatoire des émeutes et mouvements populaires — feuille de style vitrine
   Direction : institutionnelle, sobre, « note de recherche ». Encre marine sur
   papier, système chromatique du zonier (rouge / orange / bleu), titres en
   serif de labeur, données en chiffres tabulaires.
   ========================================================================== */

:root {
  /* Palette */
  --encre:        #0e2a52;   /* marine primaire */
  --encre-fonce:  #0a1f3d;
  --texte:        #16233b;
  --texte-doux:   #4a5872;
  --papier:       #ffffff;
  --brume:        #f5f3ee;   /* sections chaudes */
  --brume-2:      #efece5;
  --trait:        #e2ddd3;   /* filets */
  --trait-fort:   #cfc8ba;

  /* Système du zonier / niveaux */
  --z-aggravee:   #d1382c;   /* Z1 — risque élevé  */
  --z-sensible:   #e5941c;   /* Z2 — risque modéré */
  --z-diffuse:    #6ba4d6;   /* Z3 — risque faible */
  --z-nd:         #d8d3ca;   /* données non disponibles */

  --niv-veille:    #6ba4d6;
  --niv-vigilance: #e5941c;
  --niv-alerte:    #dd6a1f;
  --niv-crise:     #d1382c;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Mesure */
  --contenu: 1160px;
  --r: 10px;      /* rayon */
  --ombre: 0 1px 2px rgba(14,42,82,.05), 0 8px 28px rgba(14,42,82,.06);
}

/* Reset léger ---------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--encre); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--encre); font-weight: 500; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--z-diffuse); outline-offset: 2px; border-radius: 3px; }

/* Utilitaires ---------------------------------------------------------------*/
.enveloppe { max-width: var(--contenu); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--texte-doux); margin: 0 0 .9rem;
}
.num { font-variant-numeric: tabular-nums; }
.section { padding: 68px 0; }
.section--brume { background: var(--brume); border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.mesure { max-width: 66ch; }

/* Boutons -------------------------------------------------------------------*/
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: .72em 1.25em; border-radius: 7px; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn--plein { background: var(--encre); color: #fff; }
.btn--plein:hover { background: var(--encre-fonce); }
.btn--ligne { background: transparent; color: var(--encre); border-color: var(--trait-fort); }
.btn--ligne:hover { border-color: var(--encre); background: #fff; }
.btn .fleche { transition: transform .15s; }
.btn:hover .fleche { transform: translateX(3px); }

/* ---------------------------------------------------------------------------
   En-tête / navigation
   ------------------------------------------------------------------------- */
.site-tete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--trait);
}
.tete-rang { display: flex; align-items: center; gap: 28px; height: 74px; }
.marque { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.marque:hover { text-decoration: none; }
.marque .sceau { width: 34px; height: 34px; flex-shrink: 0; color: var(--encre); }
.marque .mots { line-height: 1.05; }
.marque .m1 { font-family: var(--serif); font-size: 1.06rem; color: var(--encre); letter-spacing: .01em; }
.marque .m2 { font-family: var(--sans); font-size: .58rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--texte-doux); }
.nav-princ { display: flex; gap: 26px; margin-left: auto; }
.nav-princ a { font-size: .96rem; color: var(--texte); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-princ a:hover { text-decoration: none; color: var(--encre); }
.nav-princ a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--z-aggravee); }
.tete-cta { flex-shrink: 0; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--trait-fort); border-radius: 7px; padding: 9px 11px; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--encre); margin: 4px 0; }

/* ---------------------------------------------------------------------------
   Héros (accueil)
   ------------------------------------------------------------------------- */
.heros { padding: 56px 0 40px; }
.heros-grille { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
.heros h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); letter-spacing: -.02em; }
.heros .accroche { font-size: 1.12rem; color: var(--texte-doux); max-width: 46ch; }
.gage { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 600; color: var(--encre); margin: 22px 0 8px; }
.gage svg { width: 18px; height: 18px; }
.lien-fleche { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: .96rem; }
.lien-fleche .fleche { transition: transform .15s; }
.lien-fleche:hover .fleche { transform: translateX(3px); }

.carte-zonier-cta {
  margin-top: 30px; border: 1px solid var(--trait); border-radius: var(--r);
  padding: 22px 24px; background: var(--papier); box-shadow: var(--ombre);
}
.carte-zonier-cta h3 { font-size: 1.18rem; }
.carte-zonier-cta p { color: var(--texte-doux); font-size: .96rem; }
.carte-zonier-cta .maj { font-size: .82rem; color: var(--texte-doux); margin: 14px 0 0; }

/* Panneau carte / zonier ----------------------------------------------------*/
.panneau-carte {
  border: 1px solid var(--trait); border-radius: var(--r); overflow: hidden;
  background: var(--papier); box-shadow: var(--ombre);
}
.carte-barre { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--trait); background: var(--brume); }
.recherche { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--trait-fort); border-radius: 7px; padding: 8px 12px; }
.recherche input { border: 0; outline: 0; font-family: var(--sans); font-size: .92rem; width: 100%; background: transparent; }
.recherche svg { width: 16px; height: 16px; color: var(--texte-doux); flex-shrink: 0; }
.chip-legende { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--trait-fort); border-radius: 7px; padding: 8px 12px; font-size: .9rem; font-weight: 600; color: var(--encre); }

.carte-scene { position: relative; padding: 20px; min-height: 380px; display: grid; place-items: center; }
#zonier-mosaique { width: 100%; height: auto; }
#zonier-mosaique rect { transition: opacity .2s; }
.legende {
  position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.96);
  border: 1px solid var(--trait); border-radius: 8px; padding: 12px 14px; font-size: .8rem; box-shadow: var(--ombre);
}
.legende .l { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.legende .pastille { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legende .t { font-weight: 600; color: var(--encre); }
.legende .st { color: var(--texte-doux); }

/* ---------------------------------------------------------------------------
   Bloc indice (jauge) + flux
   ------------------------------------------------------------------------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.bloc { border: 1px solid var(--trait); border-radius: var(--r); background: var(--papier); box-shadow: var(--ombre); }
.bloc-tete { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 0; }
.bloc-tete h2 { font-size: 1.5rem; margin: 0; }
.bloc-corps { padding: 20px 26px 26px; }
.maj-ligne { font-size: .84rem; color: var(--texte-doux); margin: 4px 26px 0; }

.indice-rang { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin: 8px 0 20px; }
.indice-valeur { font-family: var(--serif); font-size: 5rem; line-height: .9; color: var(--encre); }
.indice-valeur small { font-size: 1.4rem; color: var(--texte-doux); }
.indice-niveau { font-family: var(--sans); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 1.05rem; margin-top: 6px; }
.deltas { display: grid; gap: 10px; }
.delta { display: grid; grid-template-columns: 66px auto; align-items: baseline; gap: 12px; font-size: .95rem; }
.delta .lbl { color: var(--texte-doux); font-size: .82rem; }
.delta .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta .val.up { color: var(--z-aggravee); }
.delta .val.down { color: #2e7d54; }
.delta .val.flat { color: var(--texte-doux); }

/* Jauge à seuils */
.jauge { margin-top: 8px; }
.jauge-piste { position: relative; height: 12px; border-radius: 6px; overflow: visible;
  background: linear-gradient(to right,
    var(--z-diffuse) 0 30%, var(--niv-vigilance) 30% 60%, var(--niv-alerte) 60% 85%, var(--z-aggravee) 85% 100%); }
.jauge-aiguille { position: absolute; top: -5px; width: 3px; height: 22px; background: var(--encre); border-radius: 2px; transform: translateX(-50%);
  box-shadow: 0 0 0 3px #fff; }
.jauge-graduations { position: relative; display: flex; justify-content: space-between; margin-top: 8px; font-size: .74rem; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.jauge-legende { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--trait); }
.jauge-legende .item { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; }
.jauge-legende .pastille { width: 11px; height: 11px; border-radius: 3px; margin-top: 3px; flex-shrink: 0; }
.jauge-legende .item b { display: block; color: var(--encre); }
.jauge-legende .item span { color: var(--texte-doux); }

/* Flux d'épisodes */
.flux { list-style: none; margin: 0; padding: 0; }
.flux li { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--trait); }
.flux li:first-child { border-top: 0; }
.flux .vignette { position: relative; width: 92px; height: 68px; border-radius: 7px; background: var(--brume-2); border: 1px solid var(--trait); display: grid; place-items: center; color: var(--trait-fort); overflow: hidden; }
.flux .vignette svg { width: 26px; height: 26px; }
.flux .vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flux h4 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--encre); line-height: 1.3; margin: 0 0 4px; }
.flux .rez { font-size: .9rem; color: var(--texte-doux); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.flux .pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flux .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--brume-2); color: var(--texte-doux); }
.tag--fort { background: #fbe4e1; color: #a52b21; }
.tag--moyen { background: #fdefd8; color: #9a640d; }
.tag--faible { background: #e8f0f8; color: #2f6597; }
.tag--source { background: #eef1f6; color: var(--encre); border: 1px solid var(--trait); }
.flux .quand { font-size: .8rem; color: var(--texte-doux); white-space: nowrap; }

.bandeau-veille { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--texte-doux); background: var(--brume); border: 1px solid var(--trait); border-radius: 8px; padding: 11px 14px; margin: 0 26px 22px; }
.bandeau-veille svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--z-sensible); }

.etat-demo { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; color: #9a640d; background: #fdefd8; border: 1px solid #f2d79f; border-radius: 20px; padding: 3px 11px; }
.etat-demo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--z-sensible); }

/* ---------------------------------------------------------------------------
   Engagement (4 colonnes)
   ------------------------------------------------------------------------- */
.engagements { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; margin-top: 34px; }
.engagement .ic { width: 30px; height: 30px; color: var(--encre); margin-bottom: 14px; }
.engagement h4 { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--encre); margin-bottom: 6px; }
.engagement p { font-size: .9rem; color: var(--texte-doux); margin: 0; }

/* ---------------------------------------------------------------------------
   Pages de contenu (méthodo, solutions, etc.)
   ------------------------------------------------------------------------- */
.page-tete { padding: 60px 0 20px; border-bottom: 1px solid var(--trait); }
.page-tete h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); }
.page-tete .accroche { font-size: 1.1rem; color: var(--texte-doux); max-width: 60ch; }
.contenu-riche h2 { font-size: 1.7rem; margin-top: 2.2em; }
.contenu-riche h3 { font-size: 1.22rem; margin-top: 1.6em; }
.contenu-riche ul { padding-left: 1.2em; }
.contenu-riche li { margin: .3em 0; }
.contenu-riche .encadre { background: var(--brume); border-left: 3px solid var(--encre); border-radius: 0 8px 8px 0; padding: 18px 22px; margin: 1.6em 0; }
.contenu-riche .encadre p:last-child { margin-bottom: 0; }
.ancres { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ancres a { font-size: .88rem; background: var(--brume); border: 1px solid var(--trait); border-radius: 20px; padding: 6px 13px; color: var(--texte); }
.ancres a:hover { text-decoration: none; border-color: var(--trait-fort); }

.grille-solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 8px; }
.sol { border: 1px solid var(--trait); border-radius: var(--r); padding: 26px; background: var(--papier); }
.sol h3 { font-size: 1.25rem; }
.sol ul { padding-left: 1.1em; color: var(--texte-doux); font-size: .95rem; }

.etapes { counter-reset: e; list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 2px; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--trait); align-items: baseline; }
.etapes li::before { content: counter(e, decimal-leading-zero); font-family: var(--serif); font-size: 1.1rem; color: var(--z-aggravee); }

/* Publications */
.pubs { display: grid; gap: 2px; margin-top: 10px; }
.pub { display: grid; grid-template-columns: 128px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--trait); }
.pub:first-child { border-top: 0; }
.pub .meta { font-size: .8rem; color: var(--texte-doux); }
.pub .cat { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--z-aggravee); margin-bottom: 8px; }
.pub h3 { font-size: 1.3rem; margin-bottom: 6px; }
.pub p { color: var(--texte-doux); font-size: .96rem; margin-bottom: 8px; }

/* Formulaire contact */
.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ.pleine { grid-column: 1 / -1; }
.champ label { font-size: .86rem; font-weight: 600; color: var(--encre); }
.champ input, .champ select, .champ textarea {
  font-family: var(--sans); font-size: .96rem; padding: 11px 13px; border: 1px solid var(--trait-fort);
  border-radius: 8px; background: #fff; color: var(--texte);
}
.champ textarea { resize: vertical; min-height: 130px; }
.champ.check { flex-direction: row; align-items: flex-start; gap: 10px; }
.champ.check label { font-weight: 400; font-size: .86rem; color: var(--texte-doux); }
.form-note { font-size: .84rem; color: var(--texte-doux); margin-top: 4px; }
.coords { border: 1px solid var(--trait); border-radius: var(--r); padding: 24px; background: var(--brume); height: fit-content; }
.coords h3 { font-size: 1.15rem; }
.coords p { font-size: .95rem; color: var(--texte-doux); margin-bottom: .6em; }

/* ---------------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------------- */
.site-pied { background: var(--encre); color: #c7d2e4; margin-top: 20px; }
.pied-haut { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.pied .marque .m1 { color: #fff; }
.pied .marque .m2 { color: #93a6c6; }
.pied .sceau { color: #fff; }
.pied-baseline { color: #93a6c6; font-size: .95rem; max-width: 40ch; margin-top: 16px; }
.pied h5 { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #7f92b4; margin: 0 0 14px; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied ul li { margin: 8px 0; }
.pied a { color: #c7d2e4; font-size: .95rem; }
.pied a:hover { color: #fff; }
.pied-liens-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pied-bas { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; font-size: .85rem; color: #7f92b4; }

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 940px) {
  .heros-grille { grid-template-columns: 1fr; gap: 34px; }
  .duo { grid-template-columns: 1fr; }
  .engagements { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .grille-solutions { grid-template-columns: 1fr; }
  .pied-haut { grid-template-columns: 1fr 1fr; }
  .form-grille { grid-template-columns: 1fr; }
  .nav-princ, .tete-cta { display: none; }
  .burger { display: block; }
  .site-tete.ouvert .nav-princ { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--trait); padding: 14px 24px; gap: 4px; }
  .site-tete.ouvert .nav-princ a { padding: 10px 0; border-bottom: 1px solid var(--trait); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .engagements { grid-template-columns: 1fr; }
  .pied-haut { grid-template-columns: 1fr; gap: 30px; }
  .indice-rang { grid-template-columns: 1fr; }
  .pub, .flux li { grid-template-columns: 1fr; }
  .flux .vignette { width: 100%; height: 120px; }
  .pub .vignette { display: none; }
  .form-grille { grid-template-columns: 1fr; }
}

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