/* ATLAS Studio Pro — design system « cartographique souverain ».
   Source unique de l'identité : encre nuit, bleu IGN, teal relief, ambre repère.
   Importer : <link rel="stylesheet" href="/atlas-theme.css"> puis NE PAS redéfinir :root. */

:root {
  --bg:        #0f1115;   /* encre nuit (fond)        */
  --card:      #171a21;   /* surface                  */
  --surface-2: #12151b;   /* surface enfoncée / carte */
  --line:      #262b35;   /* hairline                 */
  --line-2:    #2f3b4a;   /* hairline accentuée       */
  --ink:       #e7e9ee;   /* texte principal          */
  --ink-2:     #c7ccd4;   /* texte secondaire         */
  --soft:      #9aa1ad;   /* texte tertiaire / légende*/
  --blue:      #378add;   /* bleu IGN (accent primaire)*/
  --blue-ink:  #0a1422;   /* texte sur bleu           */
  --teal:      #1d9e75;   /* teal relief (succès)     */
  --green:     #1d9e75;   /* alias historique (= teal)*/
  --teal-soft: #5dcaa5;
  --amber:     #ba7517;   /* ambre repère (alerte)    */
  --danger:    #e24b4a;
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
.atlas-wrap { max-width: 900px; margin: 0 auto; padding: 28px 20px 64px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: .01em; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
     color: var(--soft); margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.atlas-sub { color: var(--soft); font-size: 13px; margin: 0 0 22px; }
.atlas-muted { color: var(--soft); }
code { background: #222732; padding: 1px 6px; border-radius: 5px; font-size: .92em; }

/* En-tête signature : logo + courbes de niveau en filigrane */
.atlas-head {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-2); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 20px;
}
.atlas-head__topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .15; pointer-events: none; }
.atlas-head__row { position: relative; display: flex; align-items: center; gap: 12px; }
.atlas-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* Cartes & KPI */
.atlas-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.atlas-row { display: flex; gap: 14px; flex-wrap: wrap; }
.atlas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.atlas-kpi { flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px; }
.atlas-kpi .l { color: var(--soft); font-size: 13px; }
.atlas-kpi .v { font-size: 26px; font-weight: 600; margin-top: 4px; }
.atlas-kpi .x { font-size: 12px; color: var(--soft); margin-top: 2px; }

/* Boutons */
.atlas-btn { display: inline-block; border: 0; border-radius: var(--r-md); padding: 9px 16px;
  font: 500 14px var(--font); cursor: pointer; }
.atlas-btn--primary { background: var(--blue); color: var(--blue-ink); }
.atlas-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.atlas-btn:hover { filter: brightness(1.08); }

/* Badges / pills */
.atlas-badge { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: var(--r-pill); }
.atlas-badge--sovereign { color: var(--teal-soft); border: 1px solid #0f6e56; }
.atlas-badge--blue { color: var(--blue); border: 1px solid #185fa5; }
.atlas-badge--amber { color: #efa54a; border: 1px solid #854f0b; }

/* Tables */
.atlas-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.atlas-table th, .atlas-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.atlas-table th { color: var(--soft); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* Lignes clé/valeur */
.atlas-lev { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.atlas-up { color: var(--teal-soft); } .atlas-down { color: #efa54a; }

@media (max-width: 760px) { .atlas-wrap { padding: 20px 14px 48px; } }
