/* ============================================================
   YAPAY — Stylesheet partagée (tokens + composants UI)
   Ref : YAPAY-DSGN-V1
   ============================================================ */

@font-face {
  font-family: 'Marianne';
  src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.13.0/dist/fonts/Marianne-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.13.0/dist/fonts/Marianne-Medium.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.13.0/dist/fonts/Marianne-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  /* === Drapeau CI === */
  --ci-orange-50:#FFF4E6; --ci-orange-100:#FFE0B3; --ci-orange-200:#FFCC80;
  --ci-orange-300:#FFB74D; --ci-orange-400:#FFA726; --ci-orange-500:#F77F00;
  --ci-orange-600:#E67100; --ci-orange-700:#D45F00; --ci-orange-800:#B85100;
  --ci-orange-900:#8C3D00;

  --ci-green-50:#E6F7EF; --ci-green-100:#B3E6CC; --ci-green-200:#80D5A9;
  --ci-green-300:#4DC487; --ci-green-400:#26B673; --ci-green-500:#009E60;
  --ci-green-600:#008552; --ci-green-700:#006D44; --ci-green-800:#005536;
  --ci-green-900:#003D26;

  /* === Neutres === */
  --n-50:#F8FAFC; --n-100:#F1F5F9; --n-200:#E2E8F0; --n-300:#CBD5E1;
  --n-400:#94A3B8; --n-500:#64748B; --n-600:#475569; --n-700:#334155;
  --n-800:#1E293B; --n-900:#0F172A;
  /* Séparateur de lignes (tableaux/listes) — plus marqué que --n-100. */
  --row-sep:#CBD5E1;

  --gov-blue:#1E40AF;

  /* === Sémantiques === */
  --success:#009E60; --success-bg:#E6F7EF;
  --warning:#F77F00; --warning-bg:#FFF4E6;
  --error:#DC2626;   --error-bg:#FEE2E2;
  --info:#2563EB;    --info-bg:#DBEAFE;

  /* === Surfaces === */
  --page-bg:#FAFAF7;
  --ink:#1A1D24;
  --ink-soft:#4A5160;
  --rule:#E4E2DA;
  --card:#FFFFFF;
  --mono-bg:#F4F2EC;

  /* === Type === */
  --font-sans: 'Marianne', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* === Shadows === */
  --sh-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --sh: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --sh-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --sh-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --sh-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* === Reset === */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--gov-blue); }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

/* === Container === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* === Drapeau rule === */
.ci-rule { display: flex; height: 4px; width: 96px; border-radius: 2px; overflow: hidden; }
.ci-rule span { flex: 1; }
.ci-rule span:nth-child(1) { background: var(--ci-orange-500); }
.ci-rule span:nth-child(2) { background: #fff; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ci-rule span:nth-child(3) { background: var(--ci-green-500); }

/* ============================================================
   HEADER
   ============================================================ */
.ya-header { background: var(--card); border-bottom: 1px solid var(--n-200); position: sticky; top: 0; z-index: 50; }
.ya-header-strip { display: flex; height: 3px; }
.ya-header-strip span { flex: 1; }
.ya-header-strip span:nth-child(1) { background: var(--ci-orange-500); }
.ya-header-strip span:nth-child(2) { background: #fff; }
.ya-header-strip span:nth-child(3) { background: var(--ci-green-500); }
.ya-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 32px; max-width: 1440px; margin: 0 auto; }
.ya-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.ya-logo:hover { text-decoration: none; }
.crest {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ci-orange-500) 0%, var(--ci-green-500) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.15);
}
.crest-inner {
  width: 32px; height: 32px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-weight: 700; font-size: 11px; letter-spacing: .03em;
}
.ya-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.ya-logo-text .b { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.ya-logo-text .s { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.ya-nav { display: flex; gap: 4px; align-items: center; }
.ya-nav a { padding: 8px 14px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.ya-nav a:hover { background: var(--n-100); text-decoration: none; }
.ya-nav a.is-active { color: var(--ci-orange-700); background: var(--ci-orange-100); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ci-orange-200, #fed7aa); }
.ya-actions { display: flex; align-items: center; gap: 10px; }
.ya-lang {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  border: 1px solid var(--n-200); border-radius: 6px; background: var(--card); cursor: pointer;
}
.ya-lang svg { width: 12px; height: 12px; }
.ya-avatar-btn {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--n-200); border-radius: 9999px; cursor: pointer; background: var(--card);
}
.ya-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ci-orange-100); color: var(--ci-orange-800); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.ya-avatar-btn .name { font-size: 13.5px; font-weight: 500; }

@media (max-width: 900px) {
  .ya-nav { display: none; }
  .ya-header-inner { padding: 12px 20px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.ya-footer { background: #1A1D24; color: #CBD5E1; padding: 56px 32px 24px; }
.ya-footer-inner { max-width: 1280px; margin: 0 auto; }
.ya-footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 32px; border-bottom: 1px solid #2A2F3A; }
.ya-footer .crest { margin-bottom: 16px; }
.ya-footer .crest-inner { color: #1A1D24; }
.ya-footer h6 { margin: 0 0 16px; font-size: 12.5px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.ya-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ya-footer a { color: #CBD5E1; text-decoration: none; font-size: 13.5px; }
.ya-footer a:hover { color: #fff; text-decoration: underline; }
.ya-footer .desc { font-size: 13.5px; line-height: 1.55; color: #94A3B8; margin: 0 0 14px; max-width: 38ch; }
.ya-footer .seal { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #23272F; border-radius: 6px; margin-top: 14px; max-width: 320px; }
.ya-footer .seal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ci-orange-500); flex-shrink: 0; }
.ya-footer .seal-text { font-size: 12px; color: #94A3B8; line-height: 1.35; }
.ya-footer .seal-text b { color: #fff; font-weight: 500; display: block; }
.ya-footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 12px; color: #64748B; }
.ya-footer-bottom .strip { display: flex; height: 3px; width: 64px; border-radius: 2px; overflow: hidden; }
.ya-footer-bottom .strip span { flex: 1; }
.ya-footer-bottom .strip span:nth-child(1) { background: var(--ci-orange-500); }
.ya-footer-bottom .strip span:nth-child(2) { background: #fff; }
.ya-footer-bottom .strip span:nth-child(3) { background: var(--ci-green-500); }
@media (max-width: 900px) { .ya-footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ya-footer-top { grid-template-columns: 1fr; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  padding: 11px 20px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s; line-height: 1.2; white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Spinner sur le bouton cliqué pendant son appel HTTP (géré par ButtonSpinnerService). */
.is-spinning { position: relative !important; color: transparent !important; pointer-events: none; }
.is-spinning > * { visibility: hidden; }
.is-spinning::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; border-radius: 50%; visibility: visible;
  border: 2px solid var(--spin-color, #fff); border-top-color: transparent;
  animation: ya-btn-spin .6s linear infinite;
}
@keyframes ya-btn-spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--ci-orange-500); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--ci-orange-600); box-shadow: 0 4px 6px -1px rgba(247,127,0,.25); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--card); color: var(--ci-orange-700); border: 1.5px solid var(--ci-orange-500); }
.btn-secondary:hover { background: var(--ci-orange-50); border-color: var(--ci-orange-600); text-decoration: none; color: var(--ci-orange-700); }
.btn-tertiary { background: transparent; color: var(--n-700); padding: 11px 14px; }
.btn-tertiary:hover { background: var(--n-100); color: var(--n-900); text-decoration: none; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #B91C1C; text-decoration: none; color: #fff; }
.btn-success { background: var(--ci-green-600); color: #fff; }
.btn-success:hover { background: var(--ci-green-700); text-decoration: none; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ci-orange-500); }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 9999px;
  font-size: 12px; font-weight: 500; line-height: 1.4;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-en-cours { background: var(--ci-orange-50); color: var(--ci-orange-900); }
.badge-en-cours .badge-dot { background: var(--ci-orange-500); }
.badge-valide { background: var(--ci-green-50); color: var(--ci-green-900); }
.badge-valide .badge-dot { background: var(--ci-green-500); }
.badge-rejete { background: var(--error-bg); color: #7F1D1D; }
.badge-rejete .badge-dot { background: var(--error); }
.badge-attente { background: #FEF3C7; color: #78350F; }
.badge-attente .badge-dot { background: #D97706; }
.badge-brouillon { background: var(--n-100); color: var(--n-700); }
.badge-brouillon .badge-dot { background: var(--n-400); }
.badge-info { background: var(--info-bg); color: #1E3A8A; }
.badge-info .badge-dot { background: var(--info); }

/* ============================================================
   FORM INPUT
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--ink); display: flex; gap: 4px; }
.field-label .req { color: var(--error); }
.input {
  appearance: none; font-family: var(--font-sans); font-size: 15px;
  padding: 10px 12px; border: 1.5px solid var(--n-300); border-radius: 6px;
  background: var(--card); color: var(--ink); transition: all .15s; width: 100%;
}
.input::placeholder { color: var(--n-400); }
.input:hover { border-color: var(--n-400); }
.input:focus { outline: none; border-color: var(--ci-orange-500); box-shadow: 0 0 0 3px rgba(247,127,0,.15); }
.input.is-error { border-color: var(--error); background: #FEF2F2; }
.input:disabled { background: var(--n-100); color: var(--n-500); cursor: not-allowed; border-color: var(--n-200); }
.field-helper { font-size: 12.5px; color: var(--ink-soft); }
.field-error { font-size: 12.5px; color: var(--error); display: flex; align-items: center; gap: 4px; }
.field-error svg { width: 13px; height: 13px; flex-shrink: 0; }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 38px; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--n-500); pointer-events: none; }
.input-icon svg { width: 16px; height: 16px; }

/* ============================================================
   CARDS GENERIC
   ============================================================ */
.card { background: var(--card); border: 1px solid var(--n-200); border-radius: 10px; padding: 20px; transition: all .15s; }
.card:hover { border-color: var(--n-300); box-shadow: 0 4px 6px -1px rgba(0,0,0,.06); }

/* === Card service === */
.card-service { display: flex; flex-direction: column; gap: 14px; min-height: 240px; cursor: pointer; }
.card-service .ic { width: 48px; height: 48px; border-radius: 10px; background: var(--ci-orange-50); color: var(--ci-orange-700); display: flex; align-items: center; justify-content: center; }
.card-service .ic svg { width: 24px; height: 24px; }
.card-service h4 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; }
.card-service .desc { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.5; flex: 1; }
.card-service .meta-row { display: flex; gap: 16px; font-size: 12.5px; color: var(--n-600); align-items: center; padding-top: 10px; border-top: 1px solid var(--row-sep); }
.card-service .meta-row span { display: flex; align-items: center; gap: 5px; }
.card-service .meta-row svg { width: 13px; height: 13px; color: var(--n-500); }

/* === Card dossier === */
.card-dossier { padding: 0; overflow: hidden; cursor: pointer; }
.card-dossier .top { padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--row-sep); }
.card-dossier .ref { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); letter-spacing: .04em; }
.card-dossier .title { font-size: 16px; font-weight: 600; margin: 4px 0 0; line-height: 1.3; }
.card-dossier .body { padding: 14px 20px; }
.card-dossier .progress-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.card-dossier .progress-row b { color: var(--ink); font-weight: 500; }
.progress-bar { height: 6px; background: var(--n-100); border-radius: 3px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--ci-orange-500); border-radius: 3px; transition: width .3s; }
.progress-bar.is-done > div { background: var(--ci-green-500); }
.progress-bar.is-error > div { background: var(--error); }
.card-dossier .foot { padding: 12px 20px; background: var(--n-50); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--row-sep); }

/* === Card ambassade === */
.card-amb { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.card-amb .photo {
  height: 140px; position: relative; display: flex; align-items: center; justify-content: center; color: var(--n-500);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  background: linear-gradient(135deg, var(--n-200) 0%, var(--n-300) 100%);
}
.card-amb .flag { position: absolute; top: 12px; left: 12px; width: 36px; height: 24px; border-radius: 3px; background: #fff; border: 1px solid rgba(0,0,0,.1); box-shadow: 0 1px 3px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; }
.card-amb .status-corner { position: absolute; top: 12px; right: 12px; }
.card-amb .meta { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-amb .meta h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.card-amb .meta .city { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.card-amb .meta .city svg { width: 12px; height: 12px; }
.card-amb .action { padding: 12px 18px; border-top: 1px solid var(--row-sep); display: flex; justify-content: space-between; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; color: var(--ci-orange-700); font-size: 13px; font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; color: var(--ci-orange-800); }
.link-arrow svg { width: 13px; height: 13px; }

/* ============================================================
   STEPPER
   ============================================================ */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 0; width: 100%; }
.stepper-step { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; position: relative; z-index: 2; }
.stepper-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  background: var(--card); border: 2px solid var(--n-300); color: var(--n-500);
  transition: all .2s;
}
.stepper-label { font-size: 13px; font-weight: 500; color: var(--n-500); text-align: center; line-height: 1.3; white-space: nowrap; }
.stepper-line { flex: 1; height: 2px; background: var(--n-300); position: relative; top: -22px; margin: 0 -4px; z-index: 1; }
.stepper-step.is-current .stepper-circle { background: var(--ci-orange-500); border-color: var(--ci-orange-500); color: #fff; box-shadow: 0 0 0 4px var(--ci-orange-50); }
.stepper-step.is-current .stepper-label { color: var(--ci-orange-700); font-weight: 600; }
.stepper-step.is-done .stepper-circle { background: var(--ci-green-500); border-color: var(--ci-green-500); color: #fff; }
.stepper-step.is-done .stepper-label { color: var(--ci-green-700); }
.stepper-line.is-done { background: var(--ci-green-500); }

/* Mobile : les libellés « nowrap » déborderaient (5 étapes) — on compacte en
   pastilles + lignes uniquement ; le titre d'étape reste visible dans la carte. */
@media (max-width: 600px) {
  .stepper-circle { width: 30px; height: 30px; font-size: 13px; }
  .stepper-line { top: -15px; margin: 0 -2px; }
  .stepper-label { display: none; }
}

/* ============================================================
   HOURS TABLE
   ============================================================ */
.hours-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--n-200); border-radius: 8px; overflow: hidden; font-size: 13.5px; }
.hours-table th, .hours-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--row-sep); }
.hours-table tr:last-child td { border-bottom: none; }
.hours-table thead th { background: var(--n-50); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.hours-table tr.is-today { background: var(--ci-orange-50); }
.hours-table tr.is-today td:first-child { font-weight: 600; color: var(--ci-orange-900); position: relative; }
.hours-table tr.is-today td:first-child::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ci-orange-500); }
.hours-table tr.is-closed td { color: var(--n-500); }
.hours-table .status-cell { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.hours-table .status-cell.ok { color: var(--ci-green-700); }
.hours-table .status-cell.partial { color: #B45309; }
.hours-table .status-cell.closed { color: var(--n-500); }

/* ============================================================
   CONTACT ITEM
   ============================================================ */
.contact-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--row-sep); }
.contact-item:last-child { border-bottom: none; }
.contact-item .ic { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; background: var(--n-100); color: var(--n-700); display: flex; align-items: center; justify-content: center; }
.contact-item.is-urgent .ic { background: var(--error-bg); color: #991B1B; }
.contact-item .ic svg { width: 18px; height: 18px; }
.contact-item .info { flex: 1; min-width: 0; }
.contact-item .info .lab { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.contact-item.is-urgent .info .lab { color: #991B1B; font-weight: 500; }
.contact-item .info .val { font-size: 15px; font-weight: 500; color: var(--ink); font-family: var(--font-mono); }
.contact-item .info .val.no-mono { font-family: var(--font-sans); font-weight: 400; }
.contact-item .info .help { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ============================================================
   SERVICE CARD AMBASSADE
   ============================================================ */
.sca { padding: 18px; background: var(--card); border: 1px solid var(--n-200); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; transition: all .15s; cursor: pointer; }
.sca:hover { border-color: var(--ci-orange-400); box-shadow: 0 2px 8px rgba(247,127,0,.1); }
.sca .head { display: flex; align-items: center; gap: 12px; }
.sca .ic { width: 40px; height: 40px; border-radius: 8px; background: var(--ci-orange-50); color: var(--ci-orange-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sca .ic svg { width: 20px; height: 20px; }
.sca .name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.sca .count { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.sca.is-unavailable { background: var(--n-50); border-style: dashed; cursor: default; }
.sca.is-unavailable .ic { background: var(--n-100); color: var(--n-500); }
.sca.is-unavailable .name { color: var(--n-600); }
.sca .redirect { font-size: 12px; color: var(--ink-soft); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--row-sep); }
.sca .redirect a { color: var(--ci-orange-700); text-decoration: none; font-weight: 500; }

/* ============================================================
   MAP VIEW
   ============================================================ */
.mapview {
  height: 480px; border-radius: 12px;
  background:
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(to bottom, rgba(0,0,0,.04) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(135deg, #EAEEE2 0%, #DEE5D4 100%);
  position: relative; overflow: hidden; border: 1px solid var(--n-200);
}
.mapview-continents { position: absolute; inset: 0; opacity: .35; }
.map-pin { position: absolute; width: 32px; height: 40px; transform: translate(-50%, -100%); z-index: 2; cursor: pointer; transition: transform .15s; }
.map-pin:hover { transform: translate(-50%, -110%); }
.map-pin .pin-body {
  width: 32px; height: 32px; border-radius: 50% 50% 50% 0;
  background: var(--ci-orange-500); transform: rotate(-45deg);
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
}
.map-pin .pin-body::after { content: ""; width: 10px; height: 10px; background: #fff; border-radius: 50%; transform: rotate(45deg); }
.map-pin.is-deploy .pin-body { background: var(--ci-orange-300); opacity: .85; }
.map-pin.is-info .pin-body { background: var(--n-400); }
.map-cluster {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ci-orange-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transform: translate(-50%, -50%); border: 3px solid #fff;
  cursor: pointer;
}
.map-controls { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.map-ctrl-btn {
  width: 36px; height: 36px; border-radius: 6px; background: var(--card);
  border: 1px solid var(--n-200); box-shadow: 0 1px 2px rgba(0,0,0,.05);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink); font-family: var(--font-sans); font-size: 20px; font-weight: 300;
}
.map-ctrl-btn:hover { background: var(--n-50); }
.map-ctrl-btn svg { width: 16px; height: 16px; }
.map-legend { position: absolute; bottom: 16px; left: 16px; background: rgba(255,255,255,.95); border: 1px solid var(--n-200); border-radius: 6px; padding: 10px 14px; font-size: 12px; color: var(--ink-soft); display: flex; gap: 16px; align-items: center; backdrop-filter: blur(4px); z-index: 3; }
.map-legend .item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ============================================================
   NEWS ITEM
   ============================================================ */
.news-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--row-sep); }
.news-item:last-child { border-bottom: none; }
.news-date { flex-shrink: 0; width: 64px; text-align: center; padding: 8px 0; background: var(--ci-orange-50); border-radius: 6px; color: var(--ci-orange-900); font-family: var(--font-mono); }
.news-date .d { font-size: 20px; font-weight: 600; line-height: 1; }
.news-date .m { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.news-item.is-urgent .news-date { background: var(--error-bg); color: #991B1B; }
.news-body { flex: 1; }
.news-body .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 500; margin-bottom: 4px; }
.news-body h5 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.news-body p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.news-body .more { font-size: 12px; color: var(--ci-orange-700); font-weight: 500; text-decoration: none; margin-top: 4px; display: inline-block; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.crumb { display: flex; align-items: center; gap: 6px; padding: 16px 0; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--ci-orange-700); text-decoration: underline; }
.crumb svg { width: 12px; height: 12px; opacity: .5; }
.crumb .current { color: var(--ink); font-weight: 500; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--ink-soft); }
.divider { height: 1px; background: var(--rule); margin: 24px 0; }
.kpi-card { background: var(--card); border: 1px solid var(--n-200); border-radius: 10px; padding: 18px 20px; }
.kpi-card .num { font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.kpi-card .lab { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* === Section headers === */
h1, h2, h3, h4, h5 { font-family: var(--font-sans); margin: 0; }
.h-display { font-size: 60px; font-weight: 700; line-height: 1.05; letter-spacing: -.025em; }
.h-hero { font-size: 48px; font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
.h-page { font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.h-section { font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.h-sub { font-size: 24px; font-weight: 600; line-height: 1.3; }
.h-card { font-size: 20px; font-weight: 500; line-height: 1.4; }
.lede { font-size: 18px; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 720px) {
  .h-display { font-size: 42px; }
  .h-hero { font-size: 32px; }
  .h-page { font-size: 28px; }
  .h-section { font-size: 24px; }
  .h-sub { font-size: 20px; }
}

/* === Tabs (for page Détail Ambassade) === */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--n-200);
  background: var(--card); position: sticky; top: 67px; z-index: 30;
  overflow-x: auto; scrollbar-width: none;
  /* Empêche le scroll horizontal des onglets de « chaîner » vers la page. */
  overscroll-behavior-x: contain;
}
.tabs::-webkit-scrollbar { display: none; }
/* Mobile : sticky + overflow-x provoque un tremblement vertical des onglets au
   scroll horizontal (bug iOS). On retire le sticky sous 900px — les onglets
   défilent horizontalement sans vaciller. */
@media (max-width: 900px) { .tabs { position: static; } }
.tabs a {
  padding: 16px 20px; text-decoration: none; color: var(--ink-soft);
  font-size: 14.5px; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: all .15s; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; background: var(--n-50); }
.tabs a.is-active { color: var(--ci-orange-700); border-bottom-color: var(--ci-orange-500); }

/* === Grid helpers === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* === Index nav (between page demos) === */
.demo-nav {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: var(--card); border: 1px solid var(--n-200); border-radius: 12px;
  box-shadow: var(--sh-lg); padding: 8px; display: flex; gap: 4px;
}
.demo-nav a {
  padding: 6px 10px; border-radius: 6px; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
  font-weight: 500; letter-spacing: .04em;
}
.demo-nav a:hover { background: var(--n-100); color: var(--ink); text-decoration: none; }
.demo-nav a.is-active { background: var(--ci-orange-500); color: #fff; }
