/*
 * Site public d'IronLog — ironlog-app.com (Cloudflare Pages).
 *
 * Même grammaire que l'app (DESIGN.md) : noir pur, surfaces #0D0D0D détachées
 * par un tracé #474747 et non par une ombre, Great Vibes pour UN titre par
 * page, Cormorant Infant pour tout le reste.
 *
 * Polices AUTO-HÉBERGÉES, jamais Google Fonts : le chargement depuis Google
 * transmet l'adresse IP de chaque visiteur à un tiers — ce que la politique de
 * confidentialité, publiée sur ce même site, dit ne pas faire.
 */

@font-face { font-family: "Great Vibes"; src: url("fonts/GreatVibes-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Infant"; src: url("fonts/CormorantInfant-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Infant"; src: url("fonts/CormorantInfant-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Infant"; src: url("fonts/CormorantInfant-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --fond: #000000;
  --surface: #0d0d0d;
  --trait: #474747;
  --texte: #e6e8e6;
  --blanc: #ffffff;
  --meta: #a3a3a3;          /* #818181 de l'app : trop sombre pour de longs paragraphes sur écran */
  --rouge-sombre: #8b0000;  /* lumière : halos, jamais un aplat de bouton */
  --lien: #ff4d55;          /* le #DB111B de l'app ne tient pas 4,5:1 en texte sur noir */
  --todo-fond: #ffe45c;
  --todo-texte: #1a1a1a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: "Cormorant Infant", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.6;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

/* ─── En-tête des pages intérieures ─────────────────────────────────────── */

header.marque {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--trait);
  margin-bottom: 32px;
}

header.marque img { width: 28px; height: 28px; }

header.marque a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--texte);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Typographie ───────────────────────────────────────────────────────── */

h1 {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--blanc);
}

h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  margin: 44px 0 12px;
  color: var(--blanc);
}

h3 { font-size: 20px; font-weight: 600; margin: 24px 0 8px; }

p, ul, ol, table { margin: 0 0 16px; }
li { margin-bottom: 6px; }
strong { font-weight: 600; color: var(--blanc); }

.maj { color: var(--meta); font-size: 16px; margin-bottom: 32px; }

.surtitre {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--meta);
  margin: 0 0 8px;
}

a { color: var(--texte); text-decoration-color: var(--lien); text-underline-offset: 3px; }
a:hover { color: var(--lien); }

/* ─── Surfaces ──────────────────────────────────────────────────────────── */

.encart {
  background: var(--surface);
  border: 0.5px solid var(--trait);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 24px 0;
}

.encart > :last-child { margin-bottom: 0; }

.tableau { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 17px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 0.5px solid var(--trait); }
th { color: var(--meta); font-weight: 600; }

/* Sur téléphone, trois colonnes de texte ne tiennent pas : chaque ligne du
   tableau devient une carte, chaque cellule porte son intitulé. */
@media (max-width: 520px) {
  table thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border-bottom: 0.5px solid var(--trait); padding: 12px 0; }
  td { border: 0; padding: 2px 0; }
  td::before {
    content: attr(data-label);
    display: block;
    color: var(--meta);
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
  }
}

mark.todo {
  background: var(--todo-fond);
  color: var(--todo-texte);
  padding: 0 4px;
  border-radius: 3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85em;
}

/* ─── Accueil ───────────────────────────────────────────────────────────── */

/* Halo d'ambiance en haut de page : l'ellipse rouge sombre de l'app (DESIGN.md
   §7.2), dimensionnée en PROPORTION de la largeur, jamais en pixels. */
body.accueil {
  background:
    radial-gradient(ellipse 90% 420px at 50% 0, rgba(139, 0, 0, 0.35), rgba(139, 0, 0, 0) 100%)
    no-repeat,
    var(--fond);
}

.hero { text-align: center; padding: 40px 0 16px; }

.hero img.embleme {
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 0 28px rgba(139, 0, 0, 0.9));
}

.hero h1 { font-size: 72px; margin-top: 8px; }

.hero .accroche {
  font-size: 23px;
  line-height: 1.4;
  color: var(--texte);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* Une plaque, pas un bouton : elle n'appelle aucune action tant que la fiche
   n'existe pas. DESIGN.md §4.2 — un état n'est jamais rouge. Le jour où
   l'app est publiée, elle devient un CTA : aplat #DB111B, rayon 3, halo. */
.plaque {
  display: inline-block;
  padding: 10px 22px;
  background: var(--surface);
  border: 0.5px solid var(--trait);
  border-radius: 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--meta);
  letter-spacing: 0.02em;
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}

.carte {
  background: var(--surface);
  border: 0.5px solid var(--trait);
  border-radius: 6px;
  padding: 18px 18px 16px;
}

.carte h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; color: var(--blanc); }
.carte p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--texte); }

/* ─── Pied de page ──────────────────────────────────────────────────────── */

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 0.5px solid var(--trait);
  color: var(--meta);
  font-size: 16px;
}

footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
footer a { color: var(--meta); }
