/* MCP4Ads — feuille de style commune du site.
   Mise en page : une colonne de lecture (~68ch) ; les bandes pleine largeur
   portent leur propre gouttière. Les couleurs ne passent que par les tokens. */
:root {
  /* Charte Les Formateurs du Digital (charte/lfd.py du dépôt lfd-flows) */
  --paper: #f5f7fb;      /* fond de page, proche du FOND LFD #e9edf3 en plus clair */
  --surface: #ffffff;
  --ink: #072047;        /* NAVY LFD : titres, texte, logo */
  --muted: #55647d;      /* GRIS LFD #6b7a90 assombri pour rester lisible */
  --line: #dbe2ec;       /* FILET LFD */
  --signal: #01a4ad;     /* TEAL LFD : accent, boutons, pictogramme */
  --signal-ink: #007a82; /* turquoise lisible sur fond clair (liens) */
  --on-signal: #072047;  /* texte posé sur le turquoise */
  --sky: #eaf1fb;        /* ENCADRE LFD : blocs mis en avant */
  --budget: #c0362c;     /* rouge brique : uniquement « attention / argent perdu » */
  --code-bg: #072047;
  --code-fg: #e6ecf5;

  --display: "Poppins", Arial, sans-serif;
  --body: "Open Sans", Arial, Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 5vw, 3.4rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #06142e; --surface: #0c1d3d; --ink: #e8edf5; --muted: #9fb3d4;
    --line: #1d2f52; --signal: #1fc2cb; --signal-ink: #4fd3da; --on-signal: #072047;
    --sky: #10264a; --budget: #ff7a6b;
    --code-bg: #040d20; --code-fg: #dce4f2; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #06142e; --surface: #0c1d3d; --ink: #e8edf5; --muted: #9fb3d4;
  --line: #1d2f52; --signal: #1fc2cb; --signal-ink: #4fd3da; --on-signal: #072047;
  --sky: #10264a; --budget: #ff7a6b;
  --code-bg: #040d20; --code-fg: #dce4f2; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
}
a { color: var(--signal-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 68ch; display: grid; gap: 1rem; }

/* En-tête */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font: 700 1.4rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; }
.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: var(--step--1); }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* Pied de page */
.foot { border-top: 1px solid var(--line); margin-top: 4rem; }
.foot .wrap { padding-block: 2rem; display: grid; gap: 0.75rem; font-size: var(--step--1); color: var(--muted); }
.foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot nav a { color: var(--ink); }

/* Pages légales */
.legal .wrap { padding-block: 3rem; }
.legal h1 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.legal h2 { font-size: var(--step-1); margin-top: 1.5rem; }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.legal .updated { color: var(--muted); font-size: var(--step--1); }
.todo { background: color-mix(in srgb, var(--budget) 22%, transparent); padding: 0 0.3em; border-radius: 3px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }

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