@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #f9fafb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;
  --accent: #2563eb;

  /* repères A / B */
  --a: #fbbf24; /* jaune */
  --b: #3b82f6; /* bleu */
}

* { box-sizing: border-box; }

/* L'attribut hidden doit TOUJOURS l'emporter, meme si une classe definit un
   display (sinon un element en display:flex/grid reste visible malgre hidden). */
[hidden] { display: none !important; }

/* Accessibilite : focus clavier visible et coherent (ne s'affiche pas a la souris,
   uniquement quand on navigue au clavier, grace a :focus-visible). */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold, #b08428);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   NAV
========================= */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(249, 250, 251, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.topbar-inner {
  width: min(1100px, 92vw);
  margin: auto;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.topnav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  margin-left: 8px;
}

.topnav a.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* =========================
   LAYOUT
========================= */
.container {
  width: min(1100px, 92vw);
  margin: auto;
  padding: 32px 0;
}

.content { padding-top: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 18px 0;
  overflow: visible;
}

.card h2::before {
  content: "▍";
  color: var(--accent);
  margin-right: 6px;
}

.muted { color: var(--muted); }

/* =========================
   COMPARATEUR
========================= */
.compare-countries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.field label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

/* =========================
   INPUT / COMBO
========================= */

/* La carte "Comparer" doit passer au-dessus des cartes suivantes,
   sinon les listes déroulantes sont peintes derrière la carte du monde
   (chaque .card crée son propre contexte d'empilement via backdrop-filter). */
.compare-card {
  position: relative;
  z-index: 20;
}

.combo { position: relative; }

.country-input {
  width: 100%;
  padding: 12px 44px 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: var(--card);
  color: var(--text);
}

.country-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  outline: none;
}

.combo-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}

.combo-btn::before {
  content: "▾";
  display: block;
  text-align: center;
  line-height: 28px;
  color: var(--muted);
  font-size: 14px;
}

.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
}

.combo-list.open { display: block; }

.combo-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 9px;
}

.combo-item:hover {
  background: rgba(37, 99, 235, 0.1);
}

/* Drapeaux (menu de pays + en-tete du resultat) */
.combo-flag {
  width: 22px; height: 16px; flex: 0 0 auto; border-radius: 2px;
  object-fit: contain; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.pair-flag {
  width: 22px; height: 15px; border-radius: 2px; object-fit: contain;
  vertical-align: -2px; margin: 0 6px 0 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* items désactivés dans les listes */
.combo-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.combo-item.is-disabled:hover {
  background: transparent;
}

/* =========================
   Pays A / Pays B : repères
========================= */
.label-a { color: var(--a); font-weight: 700; }
.label-b { color: var(--b); font-weight: 700; }

#countryAInput:not(:placeholder-shown) { border-color: var(--a); }
#countryBInput:not(:placeholder-shown) { border-color: var(--b); }

/* =========================
   CARTE (IMPORTANT)
   - Ta carte est dans <object>, donc il faut styliser <object>.
   - On NE DOIT PAS forcer des "fill" ici, sinon ça écrase les couleurs A/B.
========================= */
.map-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  padding: 12px;

  aspect-ratio: 2000 / 857;
  min-height: 300px;
}

/* très important : ton <object> doit prendre toute la place */
.map-wrap object,
.map-wrap embed {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* si jamais un jour tu injectes inline un <svg>, ça reste propre */
.map-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* =========================
   FOOTER
========================= */
.footer {
  font-size: 0.9rem;
  color: var(--muted);
}
.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ----- Page legale (mentions, CGU, confidentialite) ----- */
.legal-card { max-width: 820px; margin: 0 auto; }
.legal-h1 { font-family: var(--serif); color: var(--accent); font-size: 1.7rem; margin: 0 0 4px; }
.legal-updated { font-size: 0.82rem; margin: 0 0 18px; }
.legal-h2 {
  font-family: var(--serif); color: var(--accent); font-size: 1.25rem;
  margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--border);
}
.legal-h3 { font-family: var(--sans); color: var(--accent); font-size: 0.95rem; font-weight: 700; margin: 14px 0 4px; }
.legal-p { font-size: 0.95rem; line-height: 1.6; color: var(--text, #1a2a40); margin: 0 0 10px; }
.legal-ul { margin: 4px 0 10px; padding-left: 20px; }
.legal-ul li { font-size: 0.95rem; line-height: 1.55; color: var(--text, #1a2a40); margin: 4px 0; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 820px) {
  .compare-countries {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topnav a { margin-left: 0; margin-right: 8px; }
}

/* ----- Ajustements TELEPHONE ----- */
@media (max-width: 640px) {
  /* La carte du monde est peu exploitable au doigt et s'affiche mal (min-height
     vs aspect-ratio) : on la masque sur telephone. Les selecteurs texte suffisent
     pour choisir les pays. */
  #mapCard { display: none; }

  /* Les onglets de navigation se masquent quand on defile vers le bas (gain de
     place), et reviennent des qu'on remonte. Uniquement sur telephone : sur
     ordinateur la nav reste toujours visible. */
  .topbar .topnav { transition: opacity 0.2s ease; }
  .topbar.gp-nav-hidden .topnav { display: none; }
}

/* ===== Geopolitest launch ===== */
.geopolitest-launch {
  text-align: center;
}

.geopolitest-launch-inner {
  margin-top: 16px;
}

.geopolitest-btn {
  font-size: 1.1rem;
  padding: 14px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-weight: 600;
  letter-spacing: 0.4px;

  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.geopolitest-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.geopolitest-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.geopolitest-launch h2::before {
  display: none;
}

/* Bouton Geopolitest désactivé */
.geopolitest-btn:disabled {
  background: #9ca3af;        /* gris */
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.8;
}

.results {
  margin-top: 18px;
}

.results-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
}

.result-card h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
}
.result-by { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin: 8px 0 0; }
.result-by[hidden] { display: none; }
.result-by-name { background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--accent); }
.result-by-name:hover { color: var(--gold); text-decoration: underline; }
/* Gel de relation (protection modération) */
.relation-lock {
  margin: 4px 0 10px; padding: 9px 14px; border-radius: 10px;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  color: #8a6410; background: rgba(176, 132, 40, 0.1); border: 1px solid rgba(176, 132, 40, 0.4);
}
.relation-lock[hidden] { display: none; }
.relation-lock-btn {
  margin: 0 0 12px; font-family: var(--sans); font-size: 0.8rem; padding: 6px 12px;
  border-radius: 999px; cursor: pointer; border: 1px solid rgba(176, 132, 40, 0.5);
  background: transparent; color: #8a6410;
}
.relation-lock-btn:hover { background: rgba(176, 132, 40, 0.1); }
.relation-lock-btn.is-locked { border-color: rgba(31, 122, 92, 0.5); color: #1f7a5c; }
.relation-lock-btn.is-locked:hover { background: rgba(31, 122, 92, 0.08); }
.relation-lock-btn[hidden] { display: none; }
.relation-lock-btn:disabled { opacity: 0.6; cursor: default; }

/* Suivi + alertes : bouton "Suivre cette relation" (etat suivi = dore plein) */
.relation-follow-btn {
  margin: 0 0 12px; font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 6px 14px;
  border-radius: 999px; cursor: pointer; border: 1px solid rgba(37, 99, 235, 0.4);
  background: transparent; color: var(--accent);
}
.relation-follow-btn:hover { background: rgba(37, 99, 235, 0.09); }
.relation-follow-btn.is-following {
  border-color: rgba(176, 132, 40, 0.6); background: rgba(176, 132, 40, 0.14); color: #8a6410;
}
.relation-follow-btn.is-following:hover { background: rgba(176, 132, 40, 0.22); }
.relation-follow-btn[hidden] { display: none; }
.relation-follow-btn:disabled { opacity: 0.6; cursor: default; }

.score {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

@media (max-width: 820px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* =========================
   Barème Geopolitest
========================= */
.gp-scale {
  text-align: left;
}

.gp-scale-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gp-scale-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
}

.gp-scale-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
}

.gp-scale-list {
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.gp-scale-list li {
  margin: 6px 0;
}

/* =========================
   LE PALMARES : classements vivants (palmares.js)
========================= */
#palmaresBody { margin-top: 12px; }
.plm-loading, .plm-empty { margin: 8px 0; }

.plm-cover {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(176, 132, 40, 0.07);
}
.plm-cover-main { flex: 1 1 260px; min-width: 210px; }
.plm-cover-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.plm-cover-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.plm-cover-label { font-size: 0.95rem; }
.plm-bar { height: 8px; border-radius: 999px; background: rgba(10, 26, 48, 0.12); overflow: hidden; margin: 9px 0 5px; }
.plm-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b08428, #1f7a5c); }
.plm-cover-sub { font-size: 0.8rem; }
.plm-help-btn {
  flex: 0 0 auto; align-self: center;
  background: var(--accent); color: #fff; border: 1px solid var(--gold);
  border-radius: 10px; padding: 9px 15px; cursor: pointer;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
}
.plm-help-btn:hover { filter: brightness(1.1); }

.plm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plm-cat {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  background: var(--card, #fff);
}
.plm-cat-title { margin: 0 0 9px; font-size: 1rem; font-family: var(--serif); }
.plm-list { display: flex; flex-direction: column; gap: 3px; }
.plm-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: 1px solid transparent; border-radius: 9px;
  padding: 6px 8px; cursor: pointer; text-align: left;
  font-family: var(--sans); font-size: 0.9rem; color: inherit;
}
.plm-row:hover { background: rgba(176, 132, 40, 0.1); border-color: rgba(176, 132, 40, 0.35); }
.plm-rank { flex: 0 0 auto; width: 22px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.plm-flags { flex: 0 0 auto; display: inline-flex; gap: 2px; }
.plm-flag { width: 20px; height: 14px; object-fit: contain; border-radius: 2px; }
.plm-pair { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plm-chips { flex: 0 0 auto; display: inline-flex; gap: 4px; }
.plm-chip {
  min-width: 30px; text-align: center; color: #fff; font-weight: 800;
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
  border-radius: 999px; padding: 2px 7px;
}
@media (max-width: 640px) {
  .plm-grid { grid-template-columns: 1fr; }
}

.gp-scale-overall .gp-formula {
  margin-top: 10px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gp-scale-overall .gp-note {
  margin-top: 10px;
}

/* Liens des sources (section Méthodologie) */
.gp-src-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.gp-src-list a:hover {
  text-decoration: underline;
}

/* =========================
   PUCES ORGANISATIONS (carte)
========================= */
.org-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.org-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}

.org-chip:hover {
  border-color: #10b981;
  color: #059669;
  transform: translateY(-1px);
}

.org-chip.active {
  background: #34d399;
  border-color: #10b981;
  color: #064e3b;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Barre au-dessus de la carte : puces à gauche, réinitialiser à droite */
.map-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.map-toolbar .org-chips {
  flex: 1 1 auto;
  margin: 0;
}

/* Encart "site officiel" qui apparait sous les puces quand une orga est choisie */
.org-link {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -4px 0 16px; padding: 9px 15px;
  background: rgba(31, 122, 92, 0.08);
  border: 1px solid rgba(31, 122, 92, 0.25); border-left: 3px solid var(--green, #1f7a5c);
  border-radius: 10px; font-family: var(--sans); font-size: 0.92rem;
}
.org-link-name { font-weight: 600; color: var(--green, #1f7a5c); }
.org-link-a { color: var(--accent); text-decoration: none; font-weight: 600; }
.org-link-a:hover { color: var(--gold); text-decoration: underline; }

.reset-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}

.reset-chip:hover {
  border-color: #ef4444;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}

/* =========================
   ZOOM SUR LA CARTE
========================= */
.map-wrap {
  position: relative;
}

.map-svg-host {
  width: 100%;
  height: 100%;
}

.map-svg-host.zoomed { cursor: grab; }
.map-svg-host.dragging { cursor: grabbing; }

.map-zoom-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.map-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, color 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}

.map-zoom-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.map-zoom-btn-reset {
  font-size: 11px;
  font-weight: 700;
}

/* =========================
   LEXIPOLIS
========================= */

/* Haut de page : concept + terme du jour côte à côte,
   pour que "Explorer le lexique" reste visible sans scroller. */
.lex-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
}

.lex-top .card {
  margin: 0;
  height: 100%;
}

@media (max-width: 820px) {
  .lex-top { grid-template-columns: 1fr; }
}

.lex-search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: var(--card);
  color: var(--text);
  margin: 4px 0 14px;
}

.lex-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  outline: none;
}

.lex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.lex-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lex-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.lex-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lex-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.lex-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--accent);
  white-space: nowrap;
}

.lex-def {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--text);
}

.lex-ex {
  margin: 8px 0 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 820px) {
  .lex-grid { grid-template-columns: 1fr; }
}

/* =========================
   BIBLIOTHÈQUE
========================= */
.bib-chips-label {
  margin: 14px 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bib-author {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.bib-tags {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Badge "3 tomes" pour les séries */
.bib-tomes {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

/* =========================
   NAVIGATION : 6 onglets, retour à la ligne propre
   (sinon le menu chevauche le nom du site aux largeurs moyennes)
========================= */
.topbar-inner {
  flex-wrap: wrap;
  row-gap: 8px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  justify-content: flex-end;
}

.topnav a {
  margin: 0;
}

/* =========================
   EMBLÈME DE PAGE (logo en médaillon)
========================= */
.page-hero {
  display: flex;
  justify-content: center;
  padding: 6px 0 2px;
}

.page-emblem {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-emblem:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.34);
}

/* =========================
   SOMMAIRE DE SECTION (table des matieres interne)
========================= */
.section-toc {
  display: flex; justify-content: center;
  margin: 2px 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.section-toc-wrap { position: relative; }
.section-toc-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--sans); font-size: 0.88rem; color: var(--accent);
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card, #fffdf8);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.section-toc-toggle:hover { border-color: var(--gold); }
.section-toc-icon { font-size: 0.9rem; color: var(--gold); }
.section-toc-caret { color: var(--gold); transition: transform 0.18s ease; }
.section-toc.open .section-toc-toggle { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.15); }
.section-toc.open .section-toc-caret { transform: rotate(180deg); }
.section-toc-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 2px; z-index: 45;
  min-width: 250px; max-width: 86vw; max-height: 62vh; overflow-y: auto; padding: 7px;
  background: var(--card, #faf7ef); border: 1px solid var(--gold);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}
.section-toc-link {
  display: block; padding: 9px 13px; border-radius: 9px; white-space: nowrap;
  font-family: var(--sans); font-size: 0.9rem; color: var(--text, #1a2a40); text-decoration: none;
}
.section-toc-link:hover { background: rgba(20, 55, 95, 0.07); color: var(--accent); }
.section-toc-link.active { color: var(--accent); font-weight: 600; background: rgba(176, 132, 40, 0.12); }

/* Decalage pour que la barre de nav collante ne masque pas le titre vise */
section.card { scroll-margin-top: 84px; }

/* =========================
   MONÉTARIUM
========================= */
.mon-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 18px;
  margin: 16px 0 6px;
}

.mon-controls-stack {
  margin: 16px 0 6px;
}

.mon-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.mon-controls-row3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.mon-slider label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.mon-val {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.mon-slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.mon-results {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

.mon-result {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--card);
  min-width: 110px;
}

.mon-result-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.mon-result-value {
  font-size: 1.3rem;
  font-weight: 800;
}

.mon-chart {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  background: #ffffff;
}

.mon-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.mon-code {
  margin-top: 14px;
}

.mon-code summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0;
}

.mon-code pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 10px 0 0;
}

@media (max-width: 820px) {
  .mon-controls-row,
  .mon-controls-row3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .gp-scale-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   GEOPO : FOND D’ÉCRAN PLEIN ÉCRAN (VERSION FINALE)
   À COLLER TOUT EN BAS DE style.css
========================= */

/* 1) Fond animé plein écran sur la page Geopolitest */
body.site-blue-bg {
  background: #0b1220; /* fallback */
}

/* 2) L’élément HTML <div class="geo-bg"></div> doit exister dans geopolitest.html */
body.site-blue-bg .geo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;

  /* Gradient animé (bleu clair vivant) */
  background: linear-gradient(120deg, #0e2a5a, #1e4fa3, #2563eb, #0e2a5a);
  background-size: 400% 400%;
  animation: geoGradientMove 12s ease-in-out infinite;
}

/* 3) Voiles lumineux (animation visible, pas une grille) */
body.site-blue-bg .geo-bg::before {
  content: "";
  position: absolute;
  inset: -35%;
  background:
    radial-gradient(circle at 25% 35%, rgba(147,197,253,0.55), transparent 45%),
    radial-gradient(circle at 75% 30%, rgba(59,130,246,0.40), transparent 45%),
    radial-gradient(circle at 55% 80%, rgba(96,165,250,0.34), transparent 52%),
    radial-gradient(circle at 20% 85%, rgba(37,99,235,0.22), transparent 48%);
  filter: blur(40px);
  opacity: 0.95;
  animation: geoGlowMove 7s ease-in-out infinite;
}

/* 4) Un très léger grain “data” (mais pas des carrés) */
body.site-blue-bg .geo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 160px 160px;
  opacity: 0.12;
  animation: geoNoiseDrift 9s linear infinite;
}

@keyframes geoGradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes geoGlowMove {
  0%   { transform: translate(-5%, -4%) scale(1.05); }
  50%  { transform: translate(5%, 4%) scale(1.18); }
  100% { transform: translate(-5%, -4%) scale(1.05); }
}

@keyframes geoNoiseDrift {
  from { background-position: 0 0; }
  to   { background-position: 160px 160px; }
}

/* 4 bis) Carte du monde fantôme : remplit les grands écrans
   (silhouette blanche très discrète qui dérive lentement) */
body.site-blue-bg .geo-bg-map {
  position: absolute;
  inset: -6%;
  background: url("world.svg") center / cover no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.07;
  animation: geoMapDrift 80s ease-in-out infinite alternate;
}

@keyframes geoMapDrift {
  from { transform: translate(-1.5%, -1%) scale(1.02); }
  to   { transform: translate(1.5%, 1%) scale(1.06); }
}

/* 5) Tout le contenu au-dessus du fond
   (surtout ne pas inclure .topbar ici : position:relative écraserait
   son position:sticky défini plus haut, et le menu ne suivrait plus) */
body.site-blue-bg .container,
body.site-blue-bg footer {
  position: relative;
  z-index: 2;
}

/* 6) Lisibilité des cards (un petit effet “glass”) */
body.site-blue-bg .card {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
}

/* ===== Lang switch (FR/EN) ===== */
.brand-wrap{
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch{
  display: inline-flex;
  gap: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}

.lang-btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  border-radius: 10px;
  width: 34px;
  height: 30px;
  cursor: pointer;
  line-height: 1;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.lang-btn.active{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: white;
}

/* ===== Lang switch: drapeaux (FR / UK) ===== */
.lang-btn{
  /* on garde le texte dans le HTML pour l’accessibilité,
     mais on le rend invisible visuellement */
  font-size: 0;
  position: relative;
}

/* petit drapeau "carte" dans le bouton */
.lang-btn::before{
  content: "";
  width: 20px;
  height: 14px;
  display: block;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  background-size: cover;
  background-position: center;
}

/* 🇫🇷 France */
.lang-btn[data-lang="fr"]::before{
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='60' height='42' viewBox='0 0 60 42'>\
<rect width='20' height='42' x='0' y='0' fill='%230052B4'/>\
<rect width='20' height='42' x='20' y='0' fill='%23FFFFFF'/>\
<rect width='20' height='42' x='40' y='0' fill='%23D80027'/>\
</svg>");
}

/* 🇬🇧 Royaume-Uni (Union Jack simplifiée mais très reconnaissable) */
.lang-btn[data-lang="en"]::before{
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='60' height='42' viewBox='0 0 60 42'>\
<rect width='60' height='42' fill='%23012169'/>\
<path d='M0 0 L60 42 M60 0 L0 42' stroke='%23FFFFFF' stroke-width='10'/>\
<path d='M0 0 L60 42 M60 0 L0 42' stroke='%23C8102E' stroke-width='6'/>\
<path d='M30 0 V42 M0 21 H60' stroke='%23FFFFFF' stroke-width='14'/>\
<path d='M30 0 V42 M0 21 H60' stroke='%23C8102E' stroke-width='8'/>\
</svg>");
}

/* =========================
   ANIMATIONS & MICRO-INTERACTIONS
   (toutes désactivées si prefers-reduced-motion)
========================= */

html { scroll-behavior: smooth; }

@keyframes gpFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* --- Survol des grandes cartes : lueur douce --- */
.card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.10);
}

/* --- Survol des sous-cartes : légère élévation --- */
.result-card,
.gp-scale-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.result-card:hover,
.gp-scale-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

/* Cartes du bareme devenues interactives (curseur 0-100) : on y manipule un
   controle, donc pas d'effet de survol qui ferait bouger la cible. */
.gp-scale-card[data-dim] { cursor: default; }
.gp-scale-card[data-dim]:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}
.gp-scale-card[data-dim] .charte-scale { margin-top: 12px; }

/* --- Résultats : les 4 cartes arrivent en cascade --- */
.results.gp-animate .result-card {
  animation: gpFadeUp 0.45s ease backwards;
}

.results.gp-animate .result-card:nth-child(1) { animation-delay: 0s; }
.results.gp-animate .result-card:nth-child(2) { animation-delay: 0.09s; }
.results.gp-animate .result-card:nth-child(3) { animation-delay: 0.18s; }
.results.gp-animate .result-card:nth-child(4) { animation-delay: 0.27s; }

/* --- Résultats : les mots de la description apparaissent un à un --- */
.gp-word { display: inline-block; opacity: 0; animation: gpWordIn 0.4s ease forwards; }
@keyframes gpWordIn {
  from { opacity: 0; transform: translateY(0.5em); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .gp-word { animation: none; opacity: 1; }
}

/* Relation non documentee : encart d'appel a contribution (au lieu des scores) */
.results-pending {
  text-align: center; margin-top: 8px; padding: 34px 24px;
  background: rgba(31, 122, 92, 0.06);
  border: 1px dashed rgba(31, 122, 92, 0.45); border-radius: 14px;
}
.results-pending h3 {
  font-family: var(--serif); font-size: 1.35rem; color: var(--accent); margin: 0 0 10px;
}
.results-pending p {
  color: var(--text, #1a2a40); max-width: 560px; margin: 0 auto; line-height: 1.6;
}

/* --- Carte du monde : survol et sélection --- */
.gp-country {
  cursor: pointer;
  transition: filter 0.2s ease;
}

.gp-country:hover {
  filter: brightness(1.18);
}

.gp-selected-a,
.gp-selected-b {
  animation: gpPop 0.35s ease;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes gpPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* --- Bouton Geopolitest : lueur quand il est prêt --- */
.geopolitest-btn:not(:disabled) {
  animation: gpGlow 2.2s ease-in-out infinite;
}

@keyframes gpGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); }
  50%      { box-shadow: 0 10px 34px rgba(59, 130, 246, 0.55); }
}

/* --- Navigation et boutons de langue --- */
.topnav a {
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.topnav a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.lang-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn:hover {
  transform: scale(1.12);
}

/* --- Listes déroulantes : petit glissement au survol --- */
.combo-item {
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.combo-item:hover {
  padding-left: 18px;
}

/* --- Accessibilité : réduction des animations --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================================
   REFONTE ÉDITORIALE : bibliothèque érudite (navy + or + parchemin)
   Bloc placé en dernier : redéfinit les variables (recolore tout le site)
   puis surcharge les composants clés. Réversible en supprimant ce bloc.
===================================================================== */
:root {
  --card: #faf7ef;          /* parchemin chaud */
  --text: #1a2a40;          /* encre bleu nuit */
  --muted: #5c6a7e;         /* ardoise */
  --border: #e4dccb;        /* filet chaud */
  --accent: #14375f;        /* bleu nuit (primaire) */
  --gold: #b08428;          /* or / laiton */
  --gold-soft: #c9a85f;
  --green: #1f7a5c;         /* vert profond (sélections / membres) */
  --serif: "EB Garamond", Georgia, "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Typographie : serif érudit par défaut, sans pour les contrôles */
body { font-family: var(--serif); font-size: 1.06rem; line-height: 1.65; }
.brand, .card h2, .card h3, .hero h1,
.lex-card h3, .result-card h3, .gp-scale-card h3, .score, .mon-result-value {
  font-family: var(--serif);
}
.topnav a, .lang-btn, .country-input, .combo-item, .combo-btn,
.lex-search, .org-chip, .reset-chip, .map-zoom-btn, .geopolitest-btn,
.lex-badge, .bib-tomes, .bib-chips-label, .score .lbl, .gp-formula,
#lexCount, #bibCount, .mon-result-label, .mon-slider label,
input, select, button {
  font-family: var(--sans);
}

/* Barre de navigation : bleu nuit, filet d'or, liens en petites capitales */
.topbar {
  background: rgba(10, 26, 48, 0.82);
  border-bottom: 1px solid rgba(201, 168, 95, 0.4);
}
.brand { color: #f4efe4; font-weight: 600; font-size: 1.32rem; letter-spacing: 0.3px; }
.topnav a {
  border: 0; border-radius: 0; padding: 6px 2px;
  border-bottom: 1.5px solid transparent;
  color: #cdd7e3; text-transform: uppercase;
  font-size: 0.74rem; letter-spacing: 0.13em; transform: none;
}
.topnav a:hover {
  color: #f4efe4; border-color: transparent;
  border-bottom-color: rgba(201, 168, 95, 0.55); transform: none;
}
.topnav a.active {
  background: transparent; color: var(--gold-soft);
  border-color: transparent; border-bottom-color: var(--gold);
}
.lang-btn.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.16);
  background: #fffdf8;
}

/* Selecteur tutoiement / vouvoiement (a cote du drapeau FR/EN) */
.addr-switch {
  display: inline-flex; gap: 4px; align-items: center;
  padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--border);
}
.addr-btn {
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.6); color: var(--accent);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; line-height: 1;
  font-family: var(--sans); font-size: 0.72rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.addr-btn:hover { transform: scale(1.06); }
.addr-btn.active {
  border-color: var(--gold); background: #fffdf8; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.16);
}

/* Cartes parchemin : coins plus sobres, filet d'or sous les titres */
.card {
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(6, 16, 30, 0.22);
}
body.site-blue-bg .card { background: var(--card); backdrop-filter: none; }
.card:hover { border-color: rgba(176, 132, 40, 0.45); box-shadow: 0 16px 44px rgba(6, 16, 30, 0.26); }
.card h2 { color: var(--accent); font-size: 1.55rem; font-weight: 600; margin: 0 0 4px; }
.card h2::before { content: none; }
.card h2::after {
  content: ""; display: block; width: 46px; height: 2px;
  background: var(--gold); margin: 9px 0 2px;
}
.geopolitest-launch h2::after { margin-left: auto; margin-right: auto; }

/* ----- Sections repliables (collapse.js) ----- */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.collapsible .card-head { cursor: pointer; }
.card-head h2 { flex: 1 1 auto; }
.collapse-toggle {
  flex: 0 0 auto; margin-top: 6px; padding: 4px; background: none; border: none; cursor: pointer;
  color: var(--muted); display: inline-flex; align-items: center;
  transition: transform 0.2s ease, color 0.15s ease;
}
.collapse-toggle:hover { color: var(--gold); }
.card.collapsed .collapse-toggle { transform: rotate(-90deg); }
.card.collapsed > :not(.card-head) { display: none !important; }

/* Fond : carte du monde gravée sur bleu nuit, calme et immobile */
body.site-blue-bg { background: #0a1e36; }
body.site-blue-bg .geo-bg {
  background: radial-gradient(120% 92% at 50% 0%, #173a61 0%, #0f2a4a 46%, #081a30 100%);
  animation: none;
}
body.site-blue-bg .geo-bg::before {
  background: none; filter: none; animation: none; opacity: 1;
  box-shadow: inset 0 0 260px 70px rgba(4, 12, 24, 0.55);
}
body.site-blue-bg .geo-bg::after { background: none; animation: none; opacity: 0; }
body.site-blue-bg .geo-bg-map { opacity: 0.075; animation: geoMapDrift 120s ease-in-out infinite alternate; }

/* Champs de saisie : filet d'or au focus */
.country-input, .lex-search { background: #fffdf8; border-radius: 6px; }
.country-input:focus, .lex-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18);
}

/* Puces : parchemin au repos, vert profond sélectionnées */
.org-chip { background: #fffdf8; color: var(--accent); }
.org-chip:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.org-chip.active { background: var(--green); border-color: #155c44; color: #eafaf2; box-shadow: none; }
.reset-chip { background: #fffdf8; }
.reset-chip:hover { border-color: #b4452f; color: #9a3322; box-shadow: none; transform: translateY(-1px); }
.lex-badge {
  color: var(--gold); background: rgba(176, 132, 40, 0.08);
  border: 1px solid rgba(201, 168, 95, 0.5);
}

/* Bouton principal : bleu nuit, liston d'or, sans lueur clignotante */
.geopolitest-btn {
  background: var(--accent); color: #f4efe4;
  border: 1px solid var(--gold); border-radius: 5px;
  box-shadow: none; font-weight: 500; letter-spacing: 0.04em;
}
.geopolitest-btn:hover { background: #1c4778; box-shadow: 0 8px 22px rgba(8, 20, 38, 0.3); }
.geopolitest-btn:not(:disabled) { animation: none; }
.geopolitest-btn:disabled { background: #8a93a3; }

/* Médaillon : anneau doré ; chiffres de score en serif */
.page-emblem { border-color: var(--gold-soft); }
.score { color: var(--accent); font-weight: 600; }

/* Sous-cartes : survol doré plutôt que bleu */
.result-card:hover, .gp-scale-card:hover, .lex-card:hover, .mon-result:hover {
  border-color: rgba(176, 132, 40, 0.5);
  box-shadow: 0 8px 22px rgba(8, 20, 38, 0.12);
}

/* Lisibilité : EB Garamond a une petite hauteur d'x, on agrandit
   les fiches de Lexipolis et de la Bibliothèque (définitions, exemples). */
.lex-card h3 { font-size: 1.16rem; }
.lex-def { font-size: 1.06rem; line-height: 1.66; }
.lex-ex { font-size: 0.98rem; }
.bib-author { font-size: 0.92rem; }
.bib-year { color: var(--muted); font-weight: 400; }

/* Section "En train de lire" : une carte qui s'étire si seule, en grille sinon */
.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* =========================
   SALLE DE MARCHÉ (Monétarium) : panneaux "desk" bleu nuit
========================= */
/* En-tetes de rubrique de l'Œconomicon (chapitres, sur le fond bleu nuit) */
.mon-rubrique {
  font-family: var(--serif); font-size: 1.8rem; color: var(--gold-soft, #d8b65e);
  text-align: center; margin: 42px 0 2px;
}
.mon-rubrique-sub {
  text-align: center; color: #9fb1c6; font-family: var(--serif);
  margin: 4px 0 18px; font-size: 0.98rem;
}

/* Charte de notation (modale "Comment noter ?") */
.charte-title { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); margin: 0 0 4px; }
.charte-intro { margin: 0 0 16px; }
.charte-section-label { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin: 14px 0 6px; }
.charte-principles { margin: 0 0 18px; padding-left: 20px; }
.charte-principles li { margin: 4px 0; font-size: 0.92rem; }
.charte-dim { border-top: 1px solid var(--border); padding: 14px 0 4px; }
.charte-dim-name { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); font-weight: 600; }
.charte-dim-desc { font-size: 0.9rem; margin: 2px 0 8px; }
.charte-bands { display: flex; flex-direction: column; gap: 4px; }
.charte-band { display: flex; align-items: center; gap: 9px; }
.charte-band-range { flex: 0 0 auto; min-width: 52px; text-align: center; color: #fff; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.charte-band-desc { font-size: 0.88rem; color: var(--text, #1a2a40); }
/* Bareme fin interactif (curseur 0-100 -> une situation a la fois) */
.charte-scale { margin: 4px 0 2px; }
.charte-scale-readout { display: flex; align-items: baseline; gap: 9px; min-height: 40px; }
.charte-scale-num {
  flex: 0 0 auto; width: 52px; text-align: center; color: #fff;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 800; font-variant-numeric: tabular-nums;
  border: none; border-radius: 999px; padding: 4px 6px; transition: background 0.15s; cursor: text;
}
.charte-scale-num:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
/* On masque les fleches du champ nombre (elles jurent sur le fond colore) */
.charte-scale-num::-webkit-inner-spin-button,
.charte-scale-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.charte-scale-num { -moz-appearance: textfield; }
.charte-scale-desc { font-size: 0.9rem; color: var(--text, #1a2a40); line-height: 1.4; }
.charte-scale-slider { width: 100%; margin: 8px 0 2px; accent-color: var(--gold); cursor: pointer; }
.charte-example { font-size: 0.82rem; margin-top: 8px; font-style: italic; }
.charte-video { margin-top: 10px; }
.charte-video iframe, .charte-video video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.charte-btn { background: transparent; border: 1px solid var(--gold); color: var(--gold); border-radius: 9px; padding: 6px 14px; cursor: pointer; font-family: var(--sans); font-size: 0.85rem; margin-left: 8px; }
.charte-btn:hover { background: rgba(176, 132, 40, 0.1); }
/* Variante dans la carte "Le concept" : sur sa propre ligne, pas de marge a gauche */
.charte-btn-concept { margin: 12px 0 0; }
.charte-btn:hover { background: rgba(176, 132, 40, 0.1); }

/* Hierarchie des roles (espace chercheur) */
.wiki-roles { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.wiki-roles-title { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.wiki-role { display: flex; gap: 9px; align-items: baseline; margin: 6px 0; flex-wrap: wrap; }
.wiki-role-name { flex: 0 0 auto; font-family: var(--sans); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); border: 1px solid rgba(176, 132, 40, 0.5); border-radius: 999px; padding: 1px 9px; }
.wiki-role-desc { font-size: 0.86rem; color: var(--text, #1a2a40); flex: 1; min-width: 200px; }

/* Note de role dans le formulaire (lecteur = suggestion relue ; chercheur = direct) */
.edit-role-note {
  margin: 0 0 12px; font-family: var(--sans); font-size: 0.85rem;
  color: var(--text, #1a2a40); background: #fffdf8;
  border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 9px; padding: 8px 12px;
}
.edit-role-note.is-reader { border-left-color: var(--green, #1f7a5c); }

/* ----- Suggestions (modele wikipedia) : file de relecture + "mes suggestions" ----- */
.sugg-list { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.sugg-item {
  background: #fffdf8; border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 11px; padding: 13px 15px; text-align: left;
}
.sugg-item.sugg-mine { border-left-color: var(--muted); }
.sugg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sugg-pair {
  background: transparent; border: none; padding: 0; cursor: pointer;
  font-family: var(--serif); font-size: 1.05rem; color: var(--accent); font-weight: 600;
}
.sugg-pair:hover { color: var(--gold); text-decoration: underline; }
.sugg-meta { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.sugg-scores { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sugg-score { font-family: var(--sans); font-size: 0.9rem; color: var(--text, #1a2a40); }
.sugg-score-label { font-weight: 600; color: var(--accent); margin-right: 4px; }
.sugg-old { color: var(--muted); }
.sugg-arrow { color: var(--gold); padding: 0 4px; }
.sugg-new { color: var(--green, #1f7a5c); }
.sugg-text { margin-top: 9px; }
.sugg-text-label { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.sugg-text-body { margin: 3px 0 0; font-size: 0.92rem; color: var(--text, #1a2a40); white-space: pre-wrap; }
.sugg-justif {
  margin: 9px 0 0; font-style: italic; color: var(--text, #1a2a40);
  font-size: 0.92rem; padding-left: 10px; border-left: 2px solid var(--border);
}
.sugg-sources { margin-top: 9px; }
.sugg-actions { display: flex; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.sugg-approve {
  background: var(--green, #1f7a5c); color: #fff; border: 1px solid var(--green, #1f7a5c);
  border-radius: 9px; padding: 8px 18px; font-weight: 600; font-family: var(--sans);
  font-size: 0.88rem; cursor: pointer;
}
.sugg-approve:hover { filter: brightness(1.08); }
.sugg-approve:disabled, .sugg-reject:disabled { opacity: 0.55; cursor: default; }
.sugg-reject { border-radius: 9px; padding: 8px 16px; font-size: 0.88rem; cursor: pointer; }
.sugg-status {
  display: inline-block; float: right; font-family: var(--sans); font-size: 0.66rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 999px; padding: 2px 10px; border: 1px solid var(--border);
}
.sugg-status-pending  { color: var(--gold); border-color: rgba(176, 132, 40, 0.5); background: rgba(176, 132, 40, 0.08); }
.sugg-status-approved { color: var(--green, #1f7a5c); border-color: rgba(31, 122, 92, 0.5); background: rgba(31, 122, 92, 0.08); }
.sugg-status-rejected { color: #9a3322; border-color: rgba(154, 51, 34, 0.4); background: rgba(154, 51, 34, 0.07); }
.sugg-review-note { margin: 9px 0 0; font-size: 0.86rem; color: var(--muted); }

.desk-band {
  position: relative;
  z-index: 2;
  margin: 16px 0;
  border: 1px solid rgba(201, 168, 95, 0.3);
  border-radius: 8px;
  overflow: hidden;
  background: #0b1f38;
}
.desk-panel {
  position: relative;
  z-index: 2;
  background: #0b1f38;
  border: 1px solid rgba(201, 168, 95, 0.28);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
  box-shadow: 0 14px 40px rgba(6, 16, 30, 0.3);
}
.desk-title {
  font-family: var(--serif);
  color: var(--gold-soft);
  margin: 0;
}
.desk-panel h2.desk-title { font-size: 1.5rem; }
.desk-panel h3.desk-title { font-size: 1.2rem; }
.desk-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  background: var(--gold);
  margin: 9px 0 2px;
}
.desk-sub {
  color: #9fb1c6;
  font-family: var(--serif);
  margin: 6px 0 0;
}
.desk-widget {
  width: 100%;
  margin-top: 12px;
  border-radius: 6px;
  overflow: hidden;
}
.desk-widget-tall  { height: 540px; }
.desk-widget-mid   { height: 480px; }
.desk-widget-short { height: 420px; }
.desk-disclaimer {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #8aa0b8;
  font-size: 0.82rem;
  margin: 6px 0 24px;
}
.tradingview-widget-copyright { font-size: 11px; padding: 4px 2px 0; }
.tradingview-widget-copyright a { color: #6a8bb5; text-decoration: none; }
.tradingview-widget-copyright a:hover { color: var(--gold-soft); }

/* Watchlist perso */
.wl-add { display: flex; gap: 8px; margin-top: 12px; }
.wl-add input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 95, 0.3);
  background: #0a1a30;
  color: #e7eef6;
  font-family: var(--sans);
}
.wl-add input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.wl-add button {
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--accent);
  color: #f4efe4;
  cursor: pointer;
  font-family: var(--sans);
}
.wl-add button:hover { background: #1c4778; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 11px;
  border-radius: 999px;
  background: rgba(201, 168, 95, 0.1);
  border: 1px solid rgba(201, 168, 95, 0.35);
  color: #e7d9b0;
  font-size: 0.82rem;
  font-family: var(--sans);
}
.wl-chip button {
  background: none;
  border: none;
  color: #c9a85f;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0 2px;
}
.wl-chip button:hover { color: #fff; }
.wl-empty { color: #8aa0b8; font-family: var(--serif); padding: 18px 4px; }

/* Markowitz sur données réelles */
.mkreal-controls { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.mkreal-controls input {
  flex: 1; min-width: 220px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fffdf8;
  color: var(--text);
  font-family: var(--sans);
}
.mkreal-controls input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.mkreal-controls button {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--accent);
  color: #f4efe4;
  cursor: pointer;
  font-family: var(--sans);
}
.mkreal-controls button:hover { background: #1c4778; }
.mkreal-controls button:disabled { opacity: 0.6; cursor: default; }
.mkreal-status { margin: 6px 0 2px; }
.mkreal-tbl { width: 100%; border-collapse: collapse; margin: 12px 0; font-family: var(--sans); font-size: 0.9rem; }
.mkreal-tbl th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); padding: 7px 8px; }
.mkreal-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.mkreal-tbl td:first-child { font-weight: 600; color: var(--accent); }
.mkreal-tbl td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* Espace chercheur (connexion wiki) */
.wiki-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.wiki-form input {
  flex: 1; min-width: 200px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fffdf8;
  color: var(--text);
  font-family: var(--sans);
}
.wiki-form input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.wiki-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wiki-actions button {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--accent);
  color: #f4efe4;
  cursor: pointer;
  font-family: var(--sans);
}
.wiki-actions button:hover { background: #1c4778; }
.wiki-actions button.wiki-secondary { background: transparent; color: var(--accent); border-color: var(--border); }
.wiki-actions button.wiki-secondary:hover { background: #fffdf8; border-color: var(--gold); color: var(--gold); }
.wiki-msg { margin: 10px 0 0; min-height: 1.2em; }
.wiki-cgu {
  display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 12px;
  font-family: var(--sans); font-size: 0.82rem; color: var(--muted); line-height: 1.4; cursor: pointer;
}
.wiki-cgu input { margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.wiki-cgu a { color: var(--accent); text-decoration: underline; }
.wiki-cgu a:hover { color: var(--gold); }
/* ----- Notifications (messages recus, ex : mot joint a une promotion) ----- */
.notif-box { margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.notif-box[hidden] { display: none; }
/* Entree douce de la banniere a l'arrivee d'un message */
.notif-box:not([hidden]) { animation: notifSlideIn 0.35s ease both; }
@keyframes notifSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .notif-box:not([hidden]) { animation: none; } }
/* Bandeau "Vous avez un message" : couleur chaleureuse (doree), pas rouge */
.notif-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 0.9rem; color: #fff;
  background: linear-gradient(90deg, #b58a2e, #d8b35a);
  padding: 10px 16px; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(176, 132, 40, 0.28);
}
/* Nom de la relation cliquable dans une alerte de suivi */
.notif-pair-link {
  border: none; background: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--accent); font-weight: 700; text-decoration: underline;
}
.notif-pair-link:hover { color: var(--gold); }
.notif-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card, #fbf7ec); border: 1px solid var(--gold); border-left: 4px solid var(--gold);
  border-radius: 10px; box-shadow: 0 4px 14px rgba(15, 23, 38, 0.1);
}
.notif-body { flex: 1 1 auto; min-width: 0; }
.notif-msg { font-family: var(--sans); font-size: 0.92rem; color: var(--text, #1a2a40); line-height: 1.45; }
.notif-meta { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.notif-dismiss {
  flex: 0 0 auto; font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 6px 14px;
  border-radius: 8px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
.notif-dismiss:hover { background: #1c4778; }
.notif-dismiss:disabled { opacity: 0.6; cursor: default; }
.wiki-link { display: inline-block; margin-top: 9px; padding: 0; background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 0.82rem; color: var(--accent); text-decoration: underline; }
.wiki-link:hover { color: var(--gold); }
.pwr-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(8, 18, 32, 0.62); display: flex; align-items: center; justify-content: center; padding: 18px; }
.pwr-modal { background: var(--card, #fbf7ec); border-radius: 16px; padding: 22px; max-width: 360px; width: 100%; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }
.pwr-modal h3 { font-family: var(--serif); color: var(--accent); margin: 0 0 6px; font-size: 1.25rem; }
.pwr-modal p { font-size: 0.86rem; color: var(--muted); margin: 0 0 12px; line-height: 1.45; }
.pwr-modal input { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--sans); font-size: 0.95rem; }
.pwr-msg { font-size: 0.82rem; margin: 8px 0 0; min-height: 1em; }
.pwr-msg.err { color: #b4261f; }
.pwr-modal .wiki-actions { justify-content: flex-end; margin-top: 14px; }
.wiki-userline { font-family: var(--serif); font-size: 1.15rem; margin: 6px 0 14px; color: var(--accent); }
.wiki-badge {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold); border: 1px solid rgba(201, 168, 95, 0.5);
  border-radius: 999px; padding: 2px 10px; margin-left: 10px;
  font-family: var(--sans); vertical-align: middle;
}
#wikiLogoutBtn { border-color: var(--border); color: var(--muted); }
#wikiLogoutBtn:hover { border-color: #b4452f; color: #9a3322; background: #fffdf8; }

/* ----- Edition collaborative (4b) : panneau de modification ----- */
.edit-wrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.edit-toggle, .edit-add-source, .edit-save, .edit-cancel {
  font-family: var(--sans); cursor: pointer; border-radius: 10px; font-size: 0.92rem;
}
.edit-toggle {
  background: var(--accent); color: #fff; border: 1px solid var(--gold);
  padding: 9px 18px; font-weight: 600;
}
.edit-toggle:hover { filter: brightness(1.12); }
.edit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.edit-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.edit-overall-hint { margin: 8px 0 14px; font-size: 0.82rem; }
.edit-field { display: flex; flex-direction: column; gap: 5px; }
.edit-field > span {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--accent);
}
.edit-field input, .edit-field textarea {
  font-family: var(--sans); font-size: 0.95rem; padding: 9px 11px; color: var(--text, #1a2a40);
  border: 1px solid var(--border); border-radius: 10px; background: #fffdf8;
  width: 100%; box-sizing: border-box;
}
.edit-field textarea { resize: vertical; min-height: 2.4em; }
/* Rappel du bareme sous un champ de note (guide de saisie, meme donnees que la charte) */
.edit-scale-hint { font-family: var(--sans); font-size: 0.75rem; line-height: 1.3; color: #8a6410; min-height: 1em; }
.edit-scale-hint:not(:empty)::before { content: "→ "; opacity: 0.7; }
.edit-field input:focus, .edit-field textarea:focus {
  border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18);
}
.edit-source-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.edit-source-row .edit-src-cat {
  flex: 1 1 150px; min-width: 130px; font-family: var(--sans); font-size: 0.92rem;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: #fffdf8; color: var(--text, #1a2a40); cursor: pointer;
}
.edit-source-row .edit-src-cat:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.edit-source-row .edit-src-other {
  flex: 1 1 150px; font-family: var(--sans); font-size: 0.95rem;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: #fffdf8; color: var(--text, #1a2a40);
}
.edit-source-row .edit-src-other:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.edit-source-row .edit-src-url { flex: 2 1 200px; }
.edit-source-row .edit-src-title { flex: 1 1 130px; }
.edit-src-del {
  flex: 0 0 auto; width: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: #fffdf8; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.edit-src-del:hover { border-color: #b4452f; color: #9a3322; }
.edit-add-source {
  align-self: flex-start; background: transparent; border: 1px dashed var(--gold);
  color: var(--accent); padding: 6px 12px; font-size: 0.85rem;
}
.edit-add-source:hover { background: #fffdf8; }
.edit-actions { display: flex; gap: 10px; }
.edit-save {
  background: var(--green, #1f7a5c); color: #fff; border: 1px solid var(--green, #1f7a5c);
  padding: 9px 22px; font-weight: 600;
}
.edit-save:hover { filter: brightness(1.08); }
.edit-save:disabled { opacity: 0.55; cursor: default; }
.edit-cancel { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 9px 18px; }
.edit-cancel:hover { border-color: var(--gold); color: var(--gold); background: #fffdf8; }
@media (max-width: 640px) {
  .edit-scores { grid-template-columns: 1fr; }
  .edit-source-row { flex-wrap: wrap; }
}

/* ----- Historique des modifications (4c) : compact et repliable ----- */
.history-wrap { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.history-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: none; cursor: pointer; padding: 6px 0;
  font-family: var(--serif); font-size: 1.05rem; color: var(--accent);
}
.history-caret { color: var(--gold); font-size: 0.9rem; }
.history-count { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }
.history-body { margin-top: 8px; text-align: left; }
/* Graphe d'evolution des scores (reconstruit depuis l'historique) */
.hist-evo { margin: 0 0 14px; }
.hist-evo[hidden] { display: none; }
.hist-evo-title { font-family: var(--sans); font-weight: 700; font-size: 0.82rem; color: var(--accent); margin-bottom: 6px; }
.hist-evo-svg { display: block; width: 100%; height: auto; background: var(--card, #fbf7ec); border: 1px solid var(--border); border-radius: 8px; }
.hist-evo-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 7px; }
.hist-evo-leg { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }
.hist-evo-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; flex: 0 0 auto; }

/* --- FICHE PAYS (atlas) : barre d'acces sous les resultats + modale --- */
.results-atlas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; }
.results-atlas[hidden] { display: none; }
.results-atlas-label { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.atlas-link {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--accent);
  background: rgba(37, 99, 235, 0.07); border: 1px solid rgba(176, 132, 40, 0.4);
  border-radius: 999px; padding: 3px 12px;
}
.atlas-link:hover { background: rgba(37, 99, 235, 0.14); border-color: var(--gold); }
.atlas-link-flag { width: 18px; height: 12px; object-fit: contain; border-radius: 2px; }

.cv-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 38, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.cv-overlay[hidden] { display: none; }
.cv-card {
  position: relative; width: min(560px, 100%);
  background: var(--card, #faf7ef); border: 1px solid var(--gold);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(15, 23, 38, 0.4);
  padding: 24px 24px 28px; font-family: var(--sans);
}
.cv-close {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; z-index: 2;
  border: none; background: rgba(0, 0, 0, 0.28); cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: #fff; border-radius: 50%;
}
.cv-close:hover { background: rgba(0, 0, 0, 0.5); }
.cv-header { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.cv-flag {
  width: 56px; height: auto; flex: 0 0 auto; border-radius: 4px;
  border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(15, 23, 38, 0.2);
}
.cv-name { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); margin: 0; }
.cv-sub { font-size: 0.82rem; color: var(--muted); margin: 3px 0 0; }
.cv-body { margin-top: 16px; }
.cv-hint { font-size: 0.76rem; color: var(--muted); margin: 0 0 12px; font-style: italic; }
.cv-group { margin-bottom: 16px; }
.cv-group-title {
  display: flex; align-items: baseline; gap: 7px; margin: 0 0 8px;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--text, #1a2a40);
}
.cv-group-count { font-size: 0.76rem; color: var(--muted); font-weight: 400; }
.cv-rel-list { display: flex; flex-direction: column; gap: 6px; }
.cv-rel {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: transparent; font-family: var(--sans); transition: border-color 0.15s, background 0.15s;
}
.cv-rel:hover { border-color: var(--gold); background: rgba(176, 132, 40, 0.08); }
.cv-rel-flag { width: 22px; height: 15px; object-fit: contain; border-radius: 2px; flex: 0 0 auto; }
.cv-rel-name { flex: 1 1 auto; font-size: 0.92rem; color: var(--text, #1a2a40); }
.cv-rel-score {
  flex: 0 0 auto; font-size: 0.72rem; font-weight: 700; color: #fff;
  border-radius: 999px; padding: 2px 9px; min-width: 46px; text-align: center;
}

/* --- DISCUSSION PAR RELATION (fil de commentaires sous les resultats) --- */
.discussion-wrap { margin-top: 14px; }
.discussion-wrap[hidden] { display: none; }
.discussion-body { margin-top: 8px; text-align: left; }
.discussion-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.disc-head { display: flex; align-items: center; gap: 8px; }
.disc-author { font-family: var(--sans); font-weight: 700; font-size: 0.82rem; color: var(--accent); }
.disc-author-link { border: none; background: none; cursor: pointer; padding: 0; }
.disc-author-link:hover { text-decoration: underline; }
.disc-time { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-right: auto; }
.disc-report, .disc-del {
  border: none; background: none; cursor: pointer; color: var(--muted);
  line-height: 1; padding: 2px 5px; border-radius: 5px;
}
.disc-report { font-size: 0.9rem; }
.disc-del { font-size: 1.15rem; }
.disc-report:hover, .disc-del:hover { background: rgba(0, 0, 0, 0.07); color: var(--text, #1a2a40); }
.disc-bubble {
  font-family: var(--sans); font-size: 0.9rem; color: var(--text, #1a2a40); line-height: 1.5;
  margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.discussion-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.discussion-compose textarea {
  flex: 1 1 auto; resize: vertical; min-height: 42px; font-family: var(--sans); font-size: 0.9rem;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card, #faf7ef); color: var(--text, #1a2a40);
}
.discussion-send {
  flex: 0 0 auto; padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 0.85rem;
}
.discussion-send:hover { background: #1c4778; }
.discussion-send:disabled { opacity: 0.6; cursor: default; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: #fffdf8; border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 11px 14px; text-align: left;
}
.hist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hist-author { font-family: var(--sans); font-weight: 600; color: var(--accent); font-size: 0.9rem; }
.hist-date { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.hist-changes { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hist-change { font-family: var(--sans); font-size: 0.9rem; color: var(--text, #1a2a40); }
.hist-arrow { color: var(--gold); padding: 0 2px; }
.hist-justif {
  margin: 8px 0 0; font-style: italic; color: var(--text, #1a2a40);
  font-size: 0.92rem; padding-left: 10px; border-left: 2px solid var(--border);
}
.hist-sources { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hist-sources li { font-size: 0.82rem; }
.hist-sources a { color: var(--gold); text-decoration: none; }
.hist-sources a:hover { text-decoration: underline; }
.hist-src-cat {
  font-size: 0.68rem; color: var(--muted); margin-right: 5px; vertical-align: middle;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); background: #fffdf8;
}
.history-more {
  margin-top: 12px; background: transparent; border: 1px solid var(--border);
  color: var(--accent); border-radius: 10px; padding: 7px 16px; cursor: pointer;
  font-family: var(--sans); font-size: 0.88rem;
}
.history-more:hover { border-color: var(--gold); color: var(--gold); background: #fffdf8; }

/* ----- Presence temps reel (5) : widget flottant ----- */
.presence-widget {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 250px; max-width: calc(100vw - 36px);
  background: var(--card, #faf7ef); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(20, 30, 48, 0.18);
  font-family: var(--sans); overflow: hidden; text-align: left;
}
.presence-widget[hidden] { display: none; }
.presence-header { display: flex; align-items: stretch; }
.presence-toggle {
  display: flex; align-items: center; gap: 8px; flex: 1; width: auto;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 9px 13px; font-size: 0.9rem; font-weight: 600; font-family: var(--sans);
}
.presence-min {
  border: none; background: var(--accent); color: rgba(255, 255, 255, 0.75);
  cursor: pointer; padding: 0 13px; font-size: 1.25rem; line-height: 1;
  font-family: var(--sans); font-weight: 700;
}
.presence-min:hover { color: #fff; background: #1b4a7e; }
.presence-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: 1px solid var(--gold);
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 8px 28px rgba(20, 30, 48, 0.18);
}
.presence-launcher:hover { filter: brightness(1.12); }
@media (min-width: 1440px) {
  .presence-launcher { top: 88px; bottom: auto; }
}

/* ----- Salon (chat general). Bulle dans la barre de presence (a droite) ;
   panneau flottant ouvert a gauche de la presence ----- */
.salon-widget {
  position: fixed; right: 286px; bottom: 18px; z-index: 61;
  width: 310px; max-width: calc(100vw - 36px); max-height: min(72vh, 480px);
  background: var(--card, #faf7ef); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(20, 30, 48, 0.18);
  font-family: var(--sans); display: flex; flex-direction: column; overflow: hidden; text-align: left;
}
.salon-widget[hidden] { display: none; }
.salon-header { display: flex; align-items: stretch; }
.salon-headtitle {
  display: flex; align-items: center; gap: 8px; flex: 1;
  background: var(--accent); color: #fff; padding: 9px 13px; font-size: 0.9rem; font-weight: 600;
}
.salon-min {
  border: none; background: var(--accent); color: rgba(255, 255, 255, 0.75);
  cursor: pointer; padding: 0 13px; font-size: 1.25rem; line-height: 1; font-weight: 700;
}
.salon-min:hover { color: #fff; background: #1b4a7e; }
.salon-body { display: flex; flex-direction: column; min-height: 0; padding: 11px 12px; gap: 9px; }
.salon-intro { margin: 0; font-size: 0.78rem; }
.salon-list {
  list-style: none; margin: 0; padding: 2px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 9px; min-height: 130px; max-height: 300px;
}
.salon-empty { margin: 0; font-size: 0.84rem; text-align: center; padding: 14px 4px; }
.salon-item { display: flex; flex-direction: column; gap: 2px; }
.salon-item-head { display: flex; align-items: baseline; gap: 7px; }
.salon-author { font-weight: 600; color: var(--accent); font-size: 0.82rem; }
.salon-author-link { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--sans); }
.salon-author-link:hover { color: var(--gold); text-decoration: underline; }
.salon-time { font-size: 0.7rem; color: var(--muted); }
.salon-del {
  margin-left: auto; border: none; background: none; color: var(--muted);
  cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px;
}
.salon-del:hover { color: #9a3322; }
.salon-bubble {
  background: #fffdf8; border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 10px; font-size: 0.88rem; color: var(--text, #1a2a40);
  word-break: break-word; white-space: pre-wrap;
}
.salon-item.mine .salon-bubble { background: rgba(31, 122, 92, 0.08); border-color: rgba(31, 122, 92, 0.25); }
.salon-compose { display: flex; gap: 6px; }
.salon-input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px;
  font-family: var(--sans); font-size: 0.88rem; background: #fffdf8; color: var(--text, #1a2a40);
}
.salon-input:focus { outline: none; border-color: var(--gold); }
.salon-send {
  background: var(--green, #1f7a5c); color: #fff; border: 1px solid var(--green, #1f7a5c);
  border-radius: 9px; padding: 7px 14px; font-weight: 600; font-size: 0.85rem; cursor: pointer; white-space: nowrap;
}
.salon-send:hover { filter: brightness(1.08); }
.salon-send:disabled { opacity: 0.55; cursor: default; }
.salon-login { margin: 0; font-size: 0.82rem; }
.salon-msg { margin: 0; font-size: 0.78rem; color: var(--muted); }
/* Bulle du Salon, integree dans la barre de presence, au-dessus des contributions */
.salon-launcher {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; border-top: 1px solid var(--border);
  padding: 9px 13px; cursor: pointer; font-family: var(--sans); text-align: left;
}
.salon-launcher[hidden] { display: none; }
.salon-launcher:hover { background: rgba(20, 55, 95, 0.05); }
.salon-launcher-dot {
  position: relative; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 1px solid var(--gold); font-size: 1rem;
}
.salon-launcher-label { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
/* Bulle rouge "non lus" facon Insta, en haut a droite du pictogramme */
.salon-unread {
  position: absolute; top: -6px; right: -6px;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  min-width: 18px; height: 18px; line-height: 15px; box-sizing: border-box;
  text-align: center; background: #e23b2e; color: #fff;
  border: 2px solid var(--card, #faf7ef); border-radius: 999px; padding: 0 4px;
}
@media (max-width: 640px) {
  .salon-widget { right: 10px; left: 10px; bottom: 10px; width: auto; max-width: none; }
}

/* ----- Carte d'identite (barre laterale gauche) ----- */
.identity-card {
  position: fixed; left: 16px; top: 88px; bottom: 16px; z-index: 55;
  width: min(230px, calc((100vw - 1100px) / 2 - 24px));
  display: flex; flex-direction: column; overflow-y: auto;
  background: var(--card, #faf7ef); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 8px 28px rgba(20, 30, 48, 0.18); font-family: var(--sans);
}
.id-cover {
  flex: 0 0 auto; width: 100%; aspect-ratio: 2.5 / 1;
  background-image: linear-gradient(120deg, var(--accent), #1b4a7e);
  background-size: cover; background-position: center;
}
.id-avatar.clickable { cursor: zoom-in; }
.id-avatar {
  width: 66px; height: 66px; border-radius: 50%; margin: -33px auto 0; flex: 0 0 auto;
  background-size: cover; background-position: center; background-color: var(--accent);
  border: 3px solid var(--card, #faf7ef); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.7rem;
}
.id-body { padding: 8px 14px 16px; text-align: center; }
.id-namerow { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 6px; }
.id-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--accent); line-height: 1.2; }
.id-badge {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gold); border: 1px solid rgba(176, 132, 40, 0.5); border-radius: 999px; padding: 1px 9px;
}
/* Pronoms (carte d'identite + fiche publique) : petite pastille discrete */
.id-pronouns, .pv-pronouns {
  font-family: var(--sans); color: var(--muted); font-size: 0.72rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; line-height: 1.5;
}
.id-sub { font-size: 0.8rem; color: var(--text, #1a2a40); margin-top: 7px; }
.id-bio { font-size: 0.82rem; color: var(--text, #1a2a40); margin: 9px 0 0; line-height: 1.5; }
.id-spec-label {
  font-family: var(--sans); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin-top: 12px;
}
.id-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 5px; }
.id-tag { font-size: 0.7rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); }
.id-tag-region { background: rgba(20, 55, 95, 0.08); color: var(--accent); border-color: rgba(20, 55, 95, 0.22); }
.id-tag-domain { background: rgba(31, 122, 92, 0.1); color: var(--green, #1f7a5c); border-color: rgba(31, 122, 92, 0.22); }
.id-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin-top: 11px; }
.id-social { font-size: 0.78rem; color: var(--gold); text-decoration: none; font-weight: 600; }
.id-social:hover { text-decoration: underline; }
.id-edit {
  margin-top: 14px; background: transparent; border: 1px solid var(--border); color: var(--accent);
  border-radius: 9px; padding: 6px 12px; cursor: pointer; font-family: var(--sans); font-size: 0.78rem;
}
.id-edit:hover { border-color: var(--gold); color: var(--gold); }
.id-stats { margin-top: auto; }   /* contributions perso ancrees en bas de la carte */
/* Seulement sur grand ecran (sinon pas de place a gauche) */
@media (max-width: 1439px) { .identity-card { display: none !important; } }
.presence-live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #34d399; flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: presencePulse 2s infinite;
}
@keyframes presencePulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.presence-count-num {
  margin-left: auto; background: rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 1px 9px; font-size: 0.82rem;
}
.presence-body { max-height: 320px; overflow-y: auto; }
/* Compteur de contributions (pied de la barre de presence) */
.presence-stats { border-top: 1px solid var(--border); padding: 10px 12px 12px; }
.presence-stats-title {
  font-family: var(--sans); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 7px;
}
.presence-stats-row { display: flex; gap: 8px; }
.presence-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 4px; background: #fffdf8; border: 1px solid var(--border); border-radius: 9px;
}
.presence-stat-num { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--accent); line-height: 1.1; }
.presence-stat-label { font-family: var(--sans); font-size: 0.68rem; color: var(--muted); text-align: center; }
.presence-search-wrap { padding: 8px 8px 2px; }
.presence-search {
  width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: 0.82rem;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fffdf8; color: var(--text, #1a2a40);
}
.presence-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(176, 132, 40, 0.18); }
.presence-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.presence-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 8px; font-size: 0.85rem; color: var(--text, #1a2a40);
}
.presence-item.is-editing { background: rgba(176, 132, 40, 0.12); }
.presence-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background-size: cover; background-position: center;
  background-color: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.95rem; border: 1px solid var(--gold);
}
.presence-item.is-editing .presence-avatar { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(176, 132, 40, 0.35); }
.presence-main { flex: 1; min-width: 0; }
.presence-namerow { display: flex; align-items: center; gap: 6px; }
.presence-name {
  font-weight: 600; color: var(--accent); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.presence-name-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 0.85rem; text-align: left;
}
.presence-name-link:hover { color: var(--gold); text-decoration: underline; }
.presence-badge {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; flex: 0 0 auto;
  color: var(--gold); border: 1px solid rgba(176, 132, 40, 0.5);
  border-radius: 999px; padding: 0 6px;
}
.presence-activity {
  display: block; font-size: 0.74rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.presence-item.is-editing .presence-activity { color: var(--gold); font-weight: 600; }
/* Les mots du statut "modifie" sautillent en continu, un par un (vague douce) */
.presence-activity .gp-jump { display: inline-block; animation: gpJump 1.5s ease-in-out infinite; }
@keyframes gpJump {
  0%, 55%, 100% { transform: translateY(0); }
  68%           { transform: translateY(-5px); }
  82%           { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .presence-activity .gp-jump { animation: none; }
}
/* Grand ecran : la barre occupe l'espace lateral droit, sur toute la hauteur */
@media (min-width: 1440px) {
  .presence-widget {
    top: 84px; bottom: 16px; right: 16px;
    width: min(230px, calc((100vw - 1100px) / 2 - 24px));
    display: flex; flex-direction: column;
  }
  .presence-body { flex: 1; max-height: none; }
}
@media (max-width: 640px) {
  .presence-widget { right: 10px; bottom: 10px; width: 210px; }
}

/* ----- Fil "Dernieres modifications" (global) ----- */
.feed-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feed-item {
  background: #fffdf8; border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 12px 15px; text-align: left;
}
.feed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.feed-pair {
  background: transparent; border: none; cursor: pointer; padding: 0;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--accent);
}
.feed-pair:hover { color: var(--gold); text-decoration: underline; }
.feed-meta { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.feed-changes { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }

/* ----- Gestion des roles (admin) ----- */
.admin-search-wrap { margin: 14px 0 4px; }
.admin-search {
  width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: 0.9rem;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text, #1a2a40);
}
.admin-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.admin-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-user {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; background: #fffdf8; border: 1px solid var(--border); border-radius: 10px;
}
.admin-name-wrap { flex: 1; min-width: 150px; }
.admin-name { font-family: var(--sans); font-weight: 600; color: var(--accent); }
.admin-name-link { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.admin-name-link:hover { color: var(--gold); text-decoration: underline; }
.admin-former { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.admin-former b { font-weight: 600; color: #7c6a3f; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-ban, .admin-purge {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(180, 38, 31, 0.4); background: transparent; color: #b4261f;
}
.admin-ban:hover, .admin-purge:hover { background: rgba(180, 38, 31, 0.08); }
.admin-ban:disabled, .admin-purge:disabled { opacity: 0.6; cursor: default; }
.admin-ban.is-unban { border-color: rgba(31, 122, 92, 0.45); color: #1f7a5c; }
.admin-ban.is-unban:hover { background: rgba(31, 122, 92, 0.08); }
/* Annuler l'activite recente : ton ambre (action ciblee, moins radicale que la suppression totale). */
.admin-recent {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(176, 132, 40, 0.55); background: transparent; color: #8a6410;
}
.admin-recent:hover { background: rgba(176, 132, 40, 0.1); }
.admin-recent:disabled { opacity: 0.6; cursor: default; }
/* Cible protegee (moderateur/admin) : un moderateur ne peut pas agir dessus. */
.admin-protected { font-family: var(--sans); font-size: 0.78rem; font-style: italic; color: var(--muted); align-self: center; padding: 4px 8px; }
.admin-banned-badge {
  display: inline-block; margin-left: 8px; font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #b4261f;
  background: rgba(180, 38, 31, 0.1); border: 1px solid rgba(180, 38, 31, 0.3); border-radius: 999px; padding: 1px 8px;
}
.admin-user.banned { opacity: 0.72; border-color: rgba(180, 38, 31, 0.35); background: rgba(180, 38, 31, 0.04); }
.admin-ban-duration {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text, #1a2a40); cursor: pointer;
}
.admin-ban-duration:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.admin-ban-info { font-family: var(--sans); font-size: 0.72rem; color: #b4261f; margin-top: 3px; }
.wiki-banned-note {
  margin: 10px 0 0; padding: 9px 12px; border-radius: 8px; font-family: var(--sans); font-size: 0.85rem;
  color: #b4261f; background: rgba(180, 38, 31, 0.08); border: 1px solid rgba(180, 38, 31, 0.3);
}
.admin-role-select {
  font-family: var(--sans); font-size: 0.9rem; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: var(--text, #1a2a40); cursor: pointer;
}
.admin-role-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.admin-role-select:disabled { opacity: 0.6; cursor: default; }

/* ----- Historique de profil (restauration admin) ----- */
.admin-hist-btn {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text, #1a2a40);
}
.admin-hist-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-hist-btn.is-open { border-color: var(--accent); color: var(--accent); background: rgba(37, 99, 235, 0.06); }
.admin-msg-btn {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text, #1a2a40);
}
.admin-msg-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-msg-btn:disabled { opacity: 0.6; cursor: default; }
.admin-hist-btn:disabled { opacity: 0.6; cursor: default; }
.admin-history {
  flex-basis: 100%; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.admin-hist-item {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.admin-hist-when { flex: 0 0 auto; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.admin-hist-thumbs { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.admin-hist-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.admin-hist-banner { width: 60px; height: 26px; border-radius: 5px; object-fit: cover; border: 1px solid var(--border); }
.admin-hist-info { flex: 1 1 auto; min-width: 0; font-family: var(--sans); font-size: 0.82rem; }
.admin-hist-pron { color: var(--muted); font-weight: 400; }
.admin-hist-meta { color: var(--muted); font-size: 0.75rem; }
.admin-hist-bio { color: var(--muted); font-size: 0.78rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-hist-restore {
  flex: 0 0 auto; font-family: var(--sans); font-size: 0.78rem; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(31, 122, 92, 0.5); background: transparent; color: #1f7a5c;
}
.admin-hist-restore:hover { background: rgba(31, 122, 92, 0.08); }
.admin-hist-restore:disabled { opacity: 0.6; cursor: default; }

/* ----- Revue des contributions (attribution d'XP) ----- */
.review-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.review-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); border-left: 3px solid var(--accent); }
.review-head { font-family: var(--sans); font-size: 0.88rem; line-height: 1.5; }
.review-who { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.review-who:hover { color: var(--gold); text-decoration: underline; }
.review-when { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-left: 8px; }
.review-dims { font-family: var(--sans); font-size: 0.8rem; color: var(--text, #1a2a40); margin-top: 3px; }
.review-changes { font-family: var(--sans); font-size: 0.8rem; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.review-change { line-height: 1.45; }
.review-change-label { font-weight: 600; color: var(--accent); }
.review-old { color: var(--muted); }
.review-arrow { color: var(--gold); font-weight: 700; }
.review-new { color: var(--text, #1a2a40); }
.review-justif { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); font-style: italic; margin-top: 3px; }
.review-award { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.review-note { flex: 1 1 160px; min-width: 120px; font-family: var(--sans); font-size: 0.8rem; padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text, #1a2a40); }
.review-note:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18); }
.review-xp-btn { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(37, 99, 235, 0.4); background: transparent; color: var(--accent); }
.review-xp-btn:hover { background: rgba(37, 99, 235, 0.08); }
.review-xp-btn:disabled { opacity: 0.6; cursor: default; }
.review-note-btn { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--muted); }
.review-note-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(176, 132, 40, 0.07); }
.review-note-btn:disabled { opacity: 0.6; cursor: default; }
.review-fb { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: #1f7a5c; }
.engagement-section { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.engagement-section h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.05rem; }
.engagement-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.engagement-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-family: var(--sans); font-size: 0.85rem; }
.eng-rank { flex: 0 0 auto; color: var(--muted); font-weight: 700; font-size: 0.78rem; min-width: 28px; }
.eng-who { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.eng-who:hover { color: var(--gold); text-decoration: underline; }
.eng-level { font-size: 0.7rem; font-weight: 600; color: var(--accent); background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.3); border-radius: 999px; padding: 1px 8px; }
.eng-xp { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 0.8rem; }

/* ----- Distinctions (decernement admin) ----- */
.admin-dist-open {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(176, 132, 40, 0.55); background: transparent; color: #8a6410;
}
.admin-dist-open:hover { background: rgba(176, 132, 40, 0.1); }
.admin-dist-open.is-open { background: rgba(176, 132, 40, 0.12); border-color: var(--gold); }
.admin-dist { flex-basis: 100%; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.admin-dist-cur { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-dist-chip {
  display: inline-flex; align-items: center; gap: 2px; font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  color: #8a6410; background: rgba(176, 132, 40, 0.1); border: 1px solid rgba(176, 132, 40, 0.4); border-radius: 999px; padding: 2px 6px 2px 10px;
}
.admin-dist-rm { background: none; border: none; cursor: pointer; color: #b4261f; font-size: 0.85rem; line-height: 1; padding: 0 2px; }
.admin-dist-rm:hover { color: #7d1a15; }
.admin-dist-grant { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-dist-btn {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--gold); background: var(--gold); color: #fff; font-weight: 600;
}
.admin-dist-btn:hover { filter: brightness(1.05); }
.admin-dist-btn:disabled { opacity: 0.6; cursor: default; }

/* ----- Journal de moderation ----- */
.admin-log { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-log h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.05rem; }
.admin-log-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.admin-log-search { flex: 1 1 180px; min-width: 140px; }
.admin-log-search, .admin-log-filter, .admin-log-day {
  font-family: var(--sans); font-size: 0.82rem; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text, #1a2a40);
}
.admin-log-filter, .admin-log-day { cursor: pointer; }
.admin-log-search:focus, .admin-log-filter:focus, .admin-log-day:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 132, 40, 0.18);
}
.admin-log-sort, .admin-log-clear {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text, #1a2a40);
}
.admin-log-sort:hover, .admin-log-clear:hover { border-color: var(--accent); color: var(--accent); }
.admin-log-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-log-item {
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  border-left: 3px solid var(--border);
}
.admin-log-item.log-ban { border-left-color: #b4261f; }
.admin-log-item.log-unban { border-left-color: #1f7a5c; }
.admin-log-item.log-role { border-left-color: var(--accent); }
.admin-log-item.log-purge { border-left-color: #b4261f; }
.admin-log-item.log-purge_recent { border-left-color: #b08428; }
.admin-log-item.log-lock { border-left-color: #b08428; }
.admin-log-item.log-unlock { border-left-color: #1f7a5c; }
.admin-log-item.log-restore { border-left-color: var(--accent); }
.admin-log-item.log-distinction { border-left-color: var(--gold); }
.admin-log-when { flex: 0 0 auto; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.admin-log-body { flex: 1 1 auto; min-width: 0; font-family: var(--sans); font-size: 0.85rem; }
.admin-log-head { line-height: 1.5; }
.admin-log-target { background: none; border: none; padding: 0; font: inherit; font-weight: 600; }
button.admin-log-target { color: var(--accent); cursor: pointer; }
button.admin-log-target:hover { color: var(--gold); text-decoration: underline; }
.admin-log-details { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.admin-log-reason { font-size: 0.8rem; margin-top: 2px; font-style: italic; }

/* ----- Mon profil : editeur d'identite ----- */
/* Banniere dans l'editeur "Mon profil" */
.profile-banner-block { margin-top: 16px; }
.profile-banner-preview {
  aspect-ratio: 2.5 / 1; border-radius: 12px; border: 1px solid var(--border);
  background-size: cover; background-position: center;
  background-image: linear-gradient(120deg, var(--accent), #1b4a7e);
}
.profile-banner-preview.empty { opacity: 0.85; }
.profile-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.profile-banner-actions .wiki-msg { width: 100%; margin: 0; }

/* Visionneuse d'image (photo de profil agrandie) */
.img-lightbox {
  position: fixed; inset: 0; z-index: 300; cursor: zoom-out;
  background: rgba(10, 15, 25, 0.85);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.img-lightbox img {
  max-width: 92vw; max-height: 92vh; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Fenetre de recadrage (photo de profil / banniere) */
.crop-overlay {
  position: fixed; inset: 0; z-index: 320; background: rgba(15, 23, 38, 0.65);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.crop-card {
  background: var(--card, #faf7ef); border: 1px solid var(--gold); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 38, 0.4); padding: 22px; font-family: var(--sans);
  display: flex; flex-direction: column; align-items: center; max-width: 92vw;
}
.crop-title { font-family: var(--serif); font-size: 1.25rem; color: var(--accent); margin: 0 0 4px; }
.crop-hint { font-size: 0.82rem; margin: 0 0 14px; text-align: center; }
.crop-viewport {
  position: relative; overflow: hidden; touch-action: none; cursor: grab;
  background: #11203a; border: 1px solid var(--border); border-radius: 10px;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport.round { border-radius: 50%; }
.crop-img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.crop-zoomrow { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; }
.crop-zoom { flex: 1; accent-color: var(--gold); cursor: pointer; }
.crop-zoom-icon { color: var(--muted); font-size: 1.1rem; width: 14px; text-align: center; }
.crop-actions { display: flex; gap: 10px; margin-top: 18px; }
.crop-confirm {
  background: var(--green, #1f7a5c); color: #fff; border: 1px solid var(--green, #1f7a5c);
  border-radius: 10px; padding: 9px 22px; font-weight: 600; cursor: pointer; font-family: var(--sans);
}
.crop-confirm:hover { filter: brightness(1.08); }
.crop-cancel {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  border-radius: 10px; padding: 9px 18px; cursor: pointer; font-family: var(--sans);
}
.crop-cancel:hover { border-color: var(--gold); color: var(--gold); }

.profile-edit { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; align-items: flex-start; }
.profile-avatar-block { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 150px; }
.profile-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--gold); box-shadow: 0 4px 14px rgba(20, 30, 48, 0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 3rem; color: #fff; background-color: var(--accent);
}
.profile-avatar.empty { background-color: var(--accent); }
.profile-upload-btn {
  cursor: pointer; background: var(--accent); color: #fff; border: 1px solid var(--gold);
  border-radius: 10px; padding: 7px 14px; font-family: var(--sans); font-size: 0.85rem;
  font-weight: 600; text-align: center;
}
.profile-upload-btn:hover { filter: brightness(1.12); }
.profile-remove-btn { font-size: 0.8rem; padding: 5px 12px; }
.profile-anim-hint {
  display: inline-flex; align-items: center; gap: 8px; flex: 1 1 240px;
  font-size: 0.82rem; line-height: 1.35; font-weight: 600; color: var(--accent);
  background: rgba(176, 132, 40, 0.12); border: 1px solid var(--gold);
  border-radius: 10px; padding: 8px 13px; text-align: left;
}
.anim-hint-ico { font-size: 1.05rem; flex: 0 0 auto; }
.profile-fields { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 14px; }
.profile-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-chip {
  cursor: pointer; font-family: var(--sans); font-size: 0.82rem;
  padding: 5px 12px; border-radius: 999px; background: #fffdf8;
  border: 1px solid var(--border); color: var(--muted);
}
.profile-chip:hover { border-color: var(--gold); color: var(--accent); }
.profile-chip.on { background: var(--green, #1f7a5c); border-color: var(--green, #1f7a5c); color: #fff; }
.social-label { flex: 1; }
.social-url { flex: 2; }
@media (max-width: 640px) {
  .profile-row2 { grid-template-columns: 1fr; }
  .profile-avatar-block { width: 100%; }
}

/* ----- Fiche profil publique (modale) ----- */
.pv-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 38, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
/* L'attribut hidden doit l'emporter sur le display ci-dessus */
.pv-overlay[hidden] { display: none; }
.pv-card {
  position: relative; width: min(560px, 100%); overflow: hidden;
  background: var(--card, #faf7ef); border: 1px solid var(--gold);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(15, 23, 38, 0.4);
  padding: 26px 26px 30px; font-family: var(--sans);
}
.pv-close {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; z-index: 2;
  border: none; background: rgba(0, 0, 0, 0.28); cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: #fff; border-radius: 50%;
}
.pv-close:hover { background: rgba(0, 0, 0, 0.5); }
.pv-header { text-align: center; position: relative; }
/* Distinctions : medailles dorees flanquant l'identite (une de chaque cote).
   margin-top en % = relatif a la LARGEUR -> suit la hauteur de la banniere
   (ratio 2.5:1) de facon responsive. */
.pv-distinction {
  position: absolute; top: 0; margin-top: 44%; z-index: 3; width: 64px;
  filter: drop-shadow(0 4px 7px rgba(15, 23, 38, 0.32));
}
.pv-distinction svg { display: block; width: 64px; height: auto; }
.pv-distinction-left  { left: 2px; }
.pv-distinction-right { right: 2px; }
.pv-cover {
  aspect-ratio: 2.5 / 1; margin: -26px -26px 0; border-radius: 15px 15px 0 0;
  background-size: cover; background-position: center;
  background-image: linear-gradient(120deg, var(--accent), #1b4a7e);
}
.pv-avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: -48px auto 0; position: relative;
  background-size: cover; background-position: center;
  background-color: var(--accent); color: #fff; border: 3px solid var(--card, #faf7ef);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 2.4rem;
}
.pv-nameline { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pv-name { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); }
.pv-badge {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gold); border: 1px solid rgba(176, 132, 40, 0.5); border-radius: 999px; padding: 1px 8px;
}
/* Badge de niveau (XP) : discret, ton bleu pour le distinguer du role (dore). */
.pv-level {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em;
  color: var(--accent); background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.3); border-radius: 999px; padding: 1px 9px; cursor: default;
}
/* Bloc niveau (XP) sous l'identite : grade + niveau + barre de progression. */
.pv-xp { max-width: 260px; margin: 14px auto 0; }
.pv-xp-head { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--accent); text-align: center; margin-bottom: 6px; }
.pv-xp-bar { height: 7px; border-radius: 999px; background: rgba(37, 99, 235, 0.14); overflow: hidden; }
.pv-xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.5s ease; }
.pv-xp-label { font-family: var(--sans); font-size: 0.68rem; color: var(--muted); text-align: center; margin-top: 4px; }
.pv-sub { color: var(--text, #1a2a40); font-size: 0.92rem; margin-top: 5px; }
.pv-since { color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.clickable { cursor: zoom-in; }
.pv-bio { margin: 16px 0 0; color: var(--text, #1a2a40); line-height: 1.6; }
.char-count { display: block; text-align: right; font-size: 0.72rem; margin-top: 3px; }
.char-count.warn { color: #b45309; }
.field-hint { display: block; font-size: 0.72rem; line-height: 1.35; margin-top: 4px; }
.pv-spec-label {
  font-family: var(--sans); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin-top: 16px;
}
.pv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pv-tag { font-size: 0.78rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); }
.pv-tag-region { background: rgba(20, 55, 95, 0.08); color: var(--accent); border-color: rgba(20, 55, 95, 0.2); }
.pv-tag-domain { background: rgba(31, 122, 92, 0.1); color: var(--green, #1f7a5c); border-color: rgba(31, 122, 92, 0.25); }
.pv-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.pv-social {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  color: var(--text, #1a2a40); text-decoration: none;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; line-height: 1;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pv-social:hover { border-color: var(--brand); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); transform: translateY(-1px); }
.pv-social-ic {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
}
.pv-social-ic svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.pv-social-name { white-space: nowrap; }
.pv-contribs { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.pv-section { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); margin: 0 0 10px; }

/* Galerie de distinctions (facon jeu video) : toutes montrees, les non obtenues
   grisees avec un cadenas. */
.pv-dist-gallery { margin: 16px 0 4px; }
.pv-dist-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.pv-dist-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 60px; text-align: center; }
.pv-dist-medal { width: 44px; }
.pv-dist-medal svg { display: block; width: 44px; height: auto; }
.pv-dist-cell.locked .pv-dist-medal { filter: grayscale(1) opacity(0.38); }
.pv-dist-lock { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 1rem; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.pv-dist-name { font-family: var(--sans); font-size: 0.72rem; line-height: 1.15; color: var(--muted); }
.pv-dist-cell:not(.locked) .pv-dist-name { color: #8a6410; font-weight: 600; }
.pv-contrib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pv-contrib { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pv-contrib-pair {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font-family: var(--sans); font-weight: 600; color: var(--accent); font-size: 0.92rem;
}
.pv-contrib-pair:hover { color: var(--gold); text-decoration: underline; }
.pv-contrib-date { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.pv-ban {
  margin-top: 20px; background: transparent; border: 1px solid #b4452f; color: #9a3322;
  border-radius: 10px; padding: 8px 16px; cursor: pointer; font-family: var(--sans); font-size: 0.85rem;
}
.pv-ban:hover { background: #fbeaea; }
.pv-ban:disabled { opacity: 0.6; cursor: default; }
.pv-mod { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; align-items: center; }
.pv-mod .pv-ban { margin-top: 0; }
.pv-report {
  border-radius: 10px; padding: 8px 14px; cursor: pointer; font-family: var(--sans); font-size: 0.85rem;
}

/* ----- Signaler : bouton dans le salon + modale + file admin ----- */
.salon-report {
  margin-left: 4px; border: none; background: none; color: var(--muted);
  cursor: pointer; font-size: 0.82rem; line-height: 1; padding: 0 2px;
}
.salon-report:hover { color: #b4452f; }
.report-modal { max-width: 440px; }
.report-modal h3 { font-family: var(--serif); color: var(--accent); margin: 0 0 6px; }
#reportReason {
  width: 100%; box-sizing: border-box; margin-top: 8px; border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; font-family: var(--sans); font-size: 0.9rem;
  background: #fffdf8; color: var(--text, #1a2a40); resize: vertical;
}
#reportReason:focus { outline: none; border-color: var(--gold); }
.report-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.report-send {
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 9px; padding: 8px 18px; font-weight: 600; font-size: 0.88rem; cursor: pointer;
}
.report-send:hover { filter: brightness(1.1); }
.report-send:disabled { opacity: 0.55; cursor: default; }
.report-cats { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 12px; }
.report-cat {
  font-family: var(--sans); font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--accent);
}
.report-cat:hover { border-color: var(--gold); }
.report-cat.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rep-cat {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: rgba(176, 132, 40, 0.14); color: #7c6a3f; border: 1px solid rgba(176, 132, 40, 0.3);
}
.rep-snap { margin: 8px 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.02); }
.rep-snap-title { font-family: var(--sans); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 7px; }
.rep-snap-banner { width: 100%; height: 62px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 7px; background: #e9e2cf; }
.rep-snap-row { display: flex; align-items: center; gap: 9px; }
.rep-snap-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #e9e2cf; }
.rep-snap-name { font-family: var(--sans); font-weight: 600; font-size: 0.92rem; color: var(--text, #1a2a40); }
.rep-snap-field { font-family: var(--sans); font-size: 0.8rem; color: var(--text, #1a2a40); margin: 6px 0 0; word-break: break-word; line-height: 1.4; }
.rep-snap-field b { color: var(--muted); font-weight: 600; }

.rep-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.rep-item {
  background: #fffdf8; border: 1px solid var(--border); border-left: 3px solid #b4452f;
  border-radius: 11px; padding: 12px 14px; text-align: left;
}
.rep-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rep-type {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border); color: var(--muted);
}
.rep-type-message { color: var(--accent); border-color: rgba(20, 55, 95, 0.4); }
.rep-type-profile { color: var(--green, #1f7a5c); border-color: rgba(31, 122, 92, 0.4); }
.rep-label { font-size: 0.9rem; color: var(--text, #1a2a40); }
.rep-reason { margin: 8px 0 0; font-size: 0.92rem; font-style: italic; color: var(--text, #1a2a40); }
.rep-meta { margin: 6px 0 0; font-family: var(--sans); font-size: 0.76rem; color: var(--muted); }
.rep-actions { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.rep-resolve {
  background: var(--green, #1f7a5c); color: #fff; border: 1px solid var(--green, #1f7a5c);
  border-radius: 9px; padding: 7px 16px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.rep-resolve:hover { filter: brightness(1.08); }
.rep-dismiss, .rep-open { border-radius: 9px; padding: 7px 14px; font-size: 0.85rem; cursor: pointer; }
.rep-resolve:disabled, .rep-dismiss:disabled { opacity: 0.55; cursor: default; }

/* Pastille d'alerte (admins) : signalements en attente, fixe et voyante */
.reports-alert {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 70;
  display: inline-flex; align-items: center;
  background: #b4452f; color: #fff; border: 1px solid #9a3322;
  border-radius: 999px; padding: 0;
  font-family: var(--sans); font-weight: 700; font-size: 0.88rem;
  box-shadow: 0 6px 20px rgba(154, 51, 34, 0.45);
  animation: reports-pulse 2s ease-in-out infinite;
}
.reports-alert[hidden] { display: none; }
.reports-alert-main {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; color: inherit; font: inherit; cursor: pointer;
  padding: 8px 6px 8px 17px; border-radius: 999px 0 0 999px;
}
.reports-alert-main:hover { filter: brightness(1.08); }
.reports-alert-close {
  background: none; border: none; color: rgba(255, 255, 255, 0.8);
  cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 8px 14px 8px 6px;
  border-radius: 0 999px 999px 0;
}
.reports-alert-close:hover { color: #fff; }
.reports-alert-ico { font-size: 1rem; }
@keyframes reports-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .reports-alert { animation: none; } }
@media (max-width: 640px) { .reports-alert { top: auto; bottom: 74px; font-size: 0.82rem; } }

/* Retour de signalement : reponse admin + verdict + suivi cote signalant */
.rep-reply {
  width: 100%; box-sizing: border-box; margin: 10px 0 0; border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 10px; font-family: var(--sans); font-size: 0.88rem;
  background: #fffdf8; color: var(--text, #1a2a40); resize: vertical;
}
.rep-reply:focus { outline: none; border-color: var(--gold); }
.rep-resolve-none { background: var(--muted, #5c6a7e); border-color: var(--muted, #5c6a7e); }
.rep-item.rep-mine { border-left-color: var(--muted); }
.rep-status {
  margin-left: auto; font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; border-radius: 999px; padding: 2px 9px;
  border: 1px solid var(--border); color: var(--muted);
}
.rep-status-open { color: var(--gold); border-color: rgba(176, 132, 40, 0.5); background: rgba(176, 132, 40, 0.08); }
.rep-status-resolved { color: var(--green, #1f7a5c); border-color: rgba(31, 122, 92, 0.5); background: rgba(31, 122, 92, 0.08); }
.rep-status-dismissed { color: var(--muted); }
.rep-outcome {
  display: inline-block; margin-top: 8px; font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  border-radius: 999px; padding: 2px 10px;
}
.rep-outcome-action { color: #9a3322; background: rgba(154, 51, 34, 0.09); border: 1px solid rgba(154, 51, 34, 0.4); }
.rep-outcome-none { color: var(--muted); background: #f0f2f4; border: 1px solid var(--border); }
.rep-feedback {
  margin-top: 9px; padding: 8px 11px; background: #fffdf8; border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: 9px;
}
.rep-feedback-label { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.rep-feedback-body { margin: 3px 0 0; font-size: 0.92rem; color: var(--text, #1a2a40); white-space: pre-wrap; }

/* ----- Quizz Geopolitest ----- */
.quiz-diffs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.quiz-diff {
  font-family: var(--sans); font-size: 0.85rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card, #fffdf8); color: var(--muted); cursor: pointer;
}
.quiz-diff:hover { border-color: var(--gold); color: var(--accent); }
.quiz-diff.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.quiz-area { margin-top: 8px; }
.quiz-q { text-align: center; margin: 14px 0 18px; }
.quiz-pair { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--accent); }
.quiz-dim { font-size: 0.98rem; color: var(--muted); margin-top: 5px; }
.quiz-answers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.quiz-opt {
  font-family: var(--sans); font-size: 1rem; font-weight: 600; min-width: 92px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--border);
  background: #fffdf8; color: var(--accent); cursor: pointer;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--gold); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.good { background: var(--green, #1f7a5c); color: #fff; border-color: var(--green, #1f7a5c); }
.quiz-opt.bad { background: #fbeaea; color: #9a3322; border-color: #d99; }
.quiz-exact {
  width: 130px; text-align: center; font-family: var(--sans); font-size: 1.1rem;
  padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #fffdf8; color: var(--text, #1a2a40);
}
.quiz-validate {
  background: var(--accent); color: #fff; border: 1px solid var(--gold);
  border-radius: 10px; padding: 10px 20px; cursor: pointer; font-family: var(--sans); font-weight: 600;
}
.quiz-validate:hover { filter: brightness(1.1); }
.quiz-feedback { text-align: center; margin-top: 18px; font-size: 1rem; }
.quiz-feedback.ok { color: var(--green, #1f7a5c); }
.quiz-feedback.no { color: #9a3322; }
.quiz-next {
  display: inline-block; margin-top: 12px; background: transparent; border: 1px solid var(--border);
  color: var(--accent); border-radius: 10px; padding: 8px 18px; cursor: pointer; font-family: var(--sans);
}
.quiz-next:hover { border-color: var(--gold); color: var(--gold); }
.quiz-score { text-align: center; margin-top: 16px; font-size: 0.92rem; color: var(--muted); }
.quiz-score strong { color: var(--accent); font-size: 1.05rem; }

/* ----- Succes Geopolitest ----- */
/* Medaille : HEXAGONE metallique grave, finition montant en gamme selon la rarete */
.ach-ico {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: none; overflow: hidden;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  font-size: 1.3rem; line-height: 1; color: #1a2a40;
  --m-hi: #e6eaef; --m-base: #aeb7c2; --m-lo: #717d8b;
  background: radial-gradient(circle at 36% 30%, var(--m-hi), var(--m-base) 58%, var(--m-lo));
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1.5px rgba(0, 0, 0, 0.16),
    inset 0 0 0 3px rgba(255, 255, 255, 0.16);
  filter: drop-shadow(0 1px 2px rgba(20, 30, 48, 0.4));
}
.ach-ico img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
/* Paliers : metal + eclat croissant (le filtre porte aussi la petite ombre de base) */
.ach-r-common    { --m-hi: #e6eaef; --m-base: #aeb7c2; --m-lo: #717d8b; }
.ach-r-uncommon  { --m-hi: #c2e8d4; --m-base: #5bb487; --m-lo: #2d7853; }
.ach-r-rare      { --m-hi: #c4e0f7; --m-base: #5a9ed6; --m-lo: #296aa6; filter: drop-shadow(0 1px 2px rgba(20, 30, 48, 0.4)) drop-shadow(0 0 4px rgba(59, 130, 196, 0.5)); }
.ach-r-epic      { --m-hi: #e0c6ef; --m-base: #a96fc2; --m-lo: #6b3d86; filter: drop-shadow(0 1px 2px rgba(20, 30, 48, 0.4)) drop-shadow(0 0 6px rgba(155, 89, 182, 0.55)); }
.ach-r-legendary { --m-hi: #ffe9b0; --m-base: #e0b53e; --m-lo: #a8771a; filter: drop-shadow(0 1px 2px rgba(20, 30, 48, 0.4)) drop-shadow(0 0 7px rgba(212, 166, 41, 0.65)); }
/* Reflet qui balaie la medaille legendaire */
.ach-r-legendary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.7) 48%, transparent 64%);
  transform: translateX(-130%); animation: ach-shine 3.4s ease-in-out infinite;
}
@keyframes ach-shine { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .ach-r-legendary::before { animation: none; opacity: 0; } }
.ach-ico.locked {
  background: #eef0f2; filter: none; font-weight: 700; color: var(--muted, #7c8a9a);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.12), inset 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.ach-ico.locked::before { display: none; }

/* Notifications (toasts, bas a droite) */
.ach-toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 1200;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.ach-toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 240px; max-width: 340px; padding: 12px 16px 12px 12px;
  background: #12233f; color: #fff; border-left: 4px solid var(--rar, #d4a629);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateX(120%); opacity: 0;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.42s;
}
.ach-toast.show { transform: translateX(0); opacity: 1; }
.ach-toast .ach-ico { box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.35); }
.ach-toast-head { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rar, #d4a629); font-weight: 700; }
.ach-toast-name { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; }
.ach-toast-rar { font-size: 0.75rem; color: #c7d2e0; }

/* Vitrine (sur les profils) */
.ach-vitrine { margin-top: 12px; }
.ach-vitrine-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; padding: 0 0 6px; cursor: pointer; font-family: var(--sans);
}
.ach-vitrine-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.ach-vitrine-count { font-size: 0.82rem; color: var(--accent); font-weight: 700; }
.ach-vitrine-head:hover .ach-vitrine-count { color: var(--gold); }
/* Vitrine en NID D'ABEILLE : les hexagones s'emboitent (rangees decalees) */
.ach-honeycomb { display: inline-flex; flex-direction: column; align-items: flex-start; margin-top: 8px; }
.ach-hc-row { display: flex; }
.ach-hc-row + .ach-hc-row { margin-top: -12px; }
.ach-hc-row.offset { margin-left: 21px; }
.ach-vitrine-ico { background: none; border: none; padding: 0; cursor: pointer; line-height: 0; transition: transform 0.12s ease; }
.ach-vitrine-ico:hover { transform: translateY(-2px); z-index: 3; }
.ach-vitrine-ico .ach-ico { width: 42px; height: 48px; font-size: 1.15rem; }
.ach-vitrine-empty { font-size: 0.82rem; margin: 2px 0 0; }

/* Collection complete (modale) */
.ach-overlay {
  position: fixed; inset: 0; z-index: 1150; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; background: rgba(8, 15, 28, 0.6);
}
.ach-modal {
  position: relative; width: min(720px, 100%); background: #fffdf8;
  border: 1px solid var(--border); border-radius: 16px; padding: 26px 26px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.ach-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.ach-modal-title { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); margin: 0 0 2px; }
.ach-progress { color: var(--muted); margin: 0 0 18px; }
.ach-progress strong { color: var(--accent); font-size: 1.1rem; }
.ach-section { margin-bottom: 18px; }
.ach-section-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--rar, #9aa4b2); border-left: 3px solid var(--rar, #9aa4b2); padding-left: 8px; margin-bottom: 10px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ach-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ach-card.unlocked { border-color: var(--rar, #9aa4b2); }
.ach-card.locked { opacity: 0.72; background: rgba(0, 0, 0, 0.025); }
.ach-card-body { min-width: 0; }
.ach-card-name { font-family: var(--serif); font-weight: 600; color: var(--accent); }
.ach-card.locked .ach-card-name { color: var(--muted); }
.ach-card-desc { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.ach-card-date { font-size: 0.72rem; color: var(--rar, #9aa4b2); margin-top: 5px; font-weight: 600; }

/* Selecteur de vitrine (editeur de profil) */
.ach-pick-chip { display: inline-flex; align-items: center; gap: 5px; }
.ach-pick-chip .ach-ico { width: 22px; height: 22px; font-size: 0.8rem; border-width: 1.5px; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .ach-toast { transition: opacity 0.3s; transform: none; }
}
@media (max-width: 520px) {
  .ach-toasts { left: 12px; right: 12px; align-items: stretch; }
  .ach-toast { max-width: none; }
}

/* Page "Qui suis-je" : cartes de liens */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--accent);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.link-card:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(8, 20, 38, 0.12);
}
.link-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 55, 95, 0.06);
  color: var(--accent);
}
.link-card:hover .link-ico { background: rgba(176, 132, 40, 0.12); }
.link-ico-img { width: 24px; height: 24px; display: block; }
.link-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.link-name { font-family: var(--serif); font-size: 1.14rem; }
.link-handle { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }
.link-arrow { flex: 0 0 auto; color: var(--gold-soft); font-size: 1.1rem; }

/* ============================================================
   ACCUEIL : accroche + portes d'entree
   L'accroche est posee directement sur le fond bleu nuit (pas de carte),
   les sections suivantes reutilisent la carte parchemin habituelle.
   ============================================================ */
.home-hero { text-align: center; padding: 40px 20px 34px; }
.home-motto {
  font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: 1rem; letter-spacing: 0.04em; margin: 0 0 10px;
}
.home-title {
  font-family: var(--serif); color: #fff; text-wrap: balance;
  font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.12; margin: 0 0 14px;
}
.home-lede {
  color: #c9d7e6; font-size: 1.02rem; line-height: 1.6;
  max-width: 62ch; margin: 0 auto 26px;
}
.home-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.home-cta {
  display: inline-block; padding: 11px 22px; border-radius: 999px; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.home-cta:hover { transform: translateY(-1px); }
.home-cta-primary { background: var(--gold); color: #1a2a40; border: 1px solid var(--gold); }
.home-cta-primary:hover { background: #c9a04a; border-color: #c9a04a; }
.home-cta-ghost { background: transparent; color: #e6eef7; border: 1px solid rgba(255, 255, 255, 0.35); }
.home-cta-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }

/* Ce qu'on peut faire sur Geopolitest */
.home-points {
  list-style: none; margin: 14px 0 20px; padding: 0;
  display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.home-points li {
  position: relative; padding-left: 22px; line-height: 1.45;
  font-size: 0.92rem; color: var(--text, #1a2a40);
}
.home-points li::before {
  content: "◆"; position: absolute; left: 0; top: 1px; font-size: 0.75rem; color: var(--gold);
}

/* Grille des autres sections */
.home-grid {
  display: grid; gap: 12px; margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.home-tile {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(176, 132, 40, 0.05);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.home-tile:hover { transform: translateY(-2px); background: rgba(176, 132, 40, 0.11); border-color: var(--gold); }
.home-tile-name { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }
.home-tile-text { font-family: var(--sans); font-size: 0.86rem; color: var(--muted); line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  .home-cta, .home-tile { transition: none; }
  .home-cta:hover, .home-tile:hover { transform: none; }
}

/* ----- Raccourci "Se connecter" en haut de Geopolitest (visiteur) ----- */
.wiki-top-login {
  display: block; width: fit-content; margin: 0 auto 14px; padding: 9px 22px;
  border-radius: 999px; text-decoration: none; text-align: center;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  background: var(--gold); color: #1a2a40; border: 1px solid var(--gold);
  box-shadow: 0 4px 14px rgba(176, 132, 40, 0.28); transition: background 0.2s, transform 0.15s;
}
.wiki-top-login:hover { background: #c9a04a; transform: translateY(-1px); }
.wiki-top-login[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .wiki-top-login:hover { transform: none; } }

/* ----- Bandeau "mode secours" (base injoignable) : sobre, informatif ----- */
.offline-notice {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 16px; padding: 11px 16px; border-radius: 10px;
  background: rgba(176, 132, 40, 0.14); border: 1px solid rgba(176, 132, 40, 0.55);
  font-family: var(--sans); font-size: 0.86rem; line-height: 1.45; color: #f0e4c8;
}
.offline-notice[hidden] { display: none; }
.offline-notice-icon { flex: 0 0 auto; color: var(--gold); font-size: 1rem; line-height: 1.3; }
.offline-notice-text { flex: 1 1 auto; }

/* ----- OEconomicon : les leviers de la puissance economique (geoeconomie) ----- */
.geo-leviers {
  display: grid; gap: 12px; margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.geo-levier {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(176, 132, 40, 0.05); border-left: 3px solid var(--gold);
}
.geo-levier-name {
  font-family: var(--serif); font-size: 1.02rem; color: var(--accent); margin: 0 0 5px;
}
.geo-levier-text {
  font-family: var(--sans); font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin: 0;
}
