/* Carthage 300 — feuille commune (socle). Les modules ajoutent leur propre CSS dans leur dossier.
   Palette : nuit (fond), encre (texte), or (accent, « a repondu »), gris (neutre). Jamais rouge/vert
   pour qualifier un pays. Variables reutilisables par tous les modules. */
:root {
  --nuit: #0b1020; --nuit-2: #121a33; --nuit-3: #1b2547;
  --encre: #0a1f44; --texte: #e8ecf6; --texte-doux: #a9b3cc;
  --papier: #f7f5ef; --carte: #ffffff; --ligne: #dcd6c6;
  --or: #d4a73a; --or-sombre: #a8831c; --or-clair: #f2d98e;
  --bleu: #3d7bd9; --cyan: #33b5c9; --violet: #8b6fd6; --gris: #8a93a8;
  --alerte: #c9772e;   /* signalement : ambre, jamais rouge */
  --ok: #3f8f7a;        /* etat technique uniquement (enregistre), jamais pour un pays */
  --rayon: 10px; --ombre: 0 2px 10px rgba(10, 31, 68, .08);
  --police: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --titre: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--police); font-size: 15px; line-height: 1.5; color: var(--encre); background: var(--papier);
  font-feature-settings: "lnum" 1; } /* chiffres alignés : Georgia a des chiffres elzéviriens par défaut (0 lu « o », 7 qui descend) */
body.sombre { background: var(--nuit); color: var(--texte); }
a { color: var(--or-sombre); }
h1, h2, h3 { font-family: var(--titre); color: var(--encre); line-height: 1.2; margin: .6em 0 .4em; }
:where(body.sombre) :where(h1, h2, h3) { color: var(--texte); }
.conteneur { max-width: 1100px; margin: 0 auto; padding: 16px; }
.etroit { max-width: 680px; }

/* barre de navigation injectee par C300.entete() */
.c300-entete { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--encre); color: #fff; }
.c300-entete a { color: #fff; text-decoration: none; }
.c300-entete .marque { font-family: var(--titre); font-size: 18px; letter-spacing: .5px; }
.c300-entete .marque b { color: var(--or); }
.c300-entete .espace { flex: 1; }
.c300-entete .etat { font-size: 13px; color: var(--or-clair); }
.c300-entete .qui { font-size: 13px; opacity: .85; }
.c300-entete button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }

.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); }
body.sombre .carte { background: var(--nuit-2); border-color: var(--nuit-3); }
.grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tuile { display: block; text-decoration: none; color: inherit; }
.tuile:hover .carte { border-color: var(--or); }
.tuile .icone { font-size: 26px; }

button, .bouton { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 9px 16px;
  background: var(--encre); color: #fff; text-decoration: none; display: inline-block; }
button.or, .bouton.or { background: var(--or); color: var(--encre); font-weight: 600; }
button.discret, .bouton.discret { background: transparent; color: var(--encre); border: 1px solid var(--ligne); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--ligne); border-radius: 8px; background: #fff; color: var(--encre); }
label { display: block; font-size: 13px; color: #4a5470; margin: 10px 0 4px; }
.champ-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .champ-ligne { grid-template-columns: 1fr; } }

table.c300 { width: 100%; border-collapse: collapse; font-size: 14px; }
table.c300 th { background: var(--encre); color: #fff; text-align: left; padding: 7px 8px; font-weight: 600; }
table.c300 td { border-bottom: 1px solid var(--ligne); padding: 6px 8px; vertical-align: top; }
.defile-x { overflow-x: auto; }

.pastille { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: #eee8d6; color: var(--encre); }
.pastille.or { background: var(--or); }
.pastille.ambre { background: #f6dfc7; color: #7a4512; }
.pastille.gris { background: #e3e6ee; color: #4a5470; }
.note { font-size: 13px; color: #5b6480; }
.mention-ia { font-size: 12px; color: #6b7390; border-top: 1px solid var(--ligne); margin-top: 24px; padding-top: 8px; }

.toast { position: fixed; right: 16px; bottom: 16px; z-index: 99; background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--ombre); max-width: 420px; }
.toast.erreur { background: #7a4512; }
.cache { display: none !important; }
.chiffre-geant { font-family: var(--titre); font-size: 64px; color: var(--or); line-height: 1; }

[hidden] { display: none !important; }
.c300-entete { flex-wrap: wrap; }
@media (max-width: 640px) {
  .c300-entete { gap: 6px 10px; padding: 8px 12px; }
  .c300-entete .qui, .c300-entete .titre-page { display: none; }
  .c300-entete .etat { font-size: 12px; order: 3; flex-basis: 100%; line-height: 1.3; } /* l'état passe sous la marque, le bouton reste sur la première ligne */
  .c300-entete button { padding: 5px 9px; font-size: 13px; }
}

/* bouton Retour de l'en-tete commun */
.c300-entete .retour { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 6px 12px; font-size: 14px; }
.c300-entete .retour:hover { border-color: var(--or); color: var(--or-clair); }
@media (max-width: 640px) { .c300-entete .retour { padding: 4px 8px; font-size: 13px; } }
