/* Feuille de style des articles de la section Ressources.
   Memes jetons que la page d'accueil, mise en page adaptee a la lecture longue. */

:root {
  --ink-900: #142035;
  --ink-700: #3D4C6B;
  --ink-500: #6C7796;
  --paper-0: #FAF7F0;
  --paper-100: #F0EAD9;
  --line-200: #DDD1B0;
  --accent-300: #FFAA7A;
  --accent-500: #F2672A;
  --accent-600: #D14F19;

  --surface: var(--paper-0);
  --surface-card: #FFFFFF;
  --surface-sunken: var(--paper-100);
  --text: var(--ink-900);
  --text-muted: var(--ink-700);
  --text-faint: var(--ink-500);
  --border: var(--line-200);
  --glow-rgb: 242, 103, 42;
  --shadow-rgb: 30, 20, 10;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-accent: 'Instrument Serif', ui-serif, Georgia, serif;
  --font-body: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-900: #F1EADA;
    --ink-700: #C9BEA4;
    --ink-500: #948A70;
    --paper-0: #10161F;
    --paper-100: #171F2C;
    --line-200: #2B3646;
    --accent-300: #FFB584;
    --accent-500: #FF7A3D;
    --accent-600: #FFA467;

    --surface: var(--paper-0);
    --surface-card: #141C28;
    --surface-sunken: var(--paper-100);
    --text: var(--ink-900);
    --text-muted: var(--ink-700);
    --text-faint: var(--ink-500);
    --border: var(--line-200);
    --glow-rgb: 255, 122, 61;
    --shadow-rgb: 0, 0, 0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink-900: #F1EADA;
  --ink-700: #C9BEA4;
  --ink-500: #948A70;
  --paper-0: #10161F;
  --paper-100: #171F2C;
  --line-200: #2B3646;
  --accent-300: #FFB584;
  --accent-500: #FF7A3D;
  --accent-600: #FFA467;

  --surface: var(--paper-0);
  --surface-card: #141C28;
  --surface-sunken: var(--paper-100);
  --text: var(--ink-900);
  --text-muted: var(--ink-700);
  --text-faint: var(--ink-500);
  --border: var(--line-200);
  --glow-rgb: 255, 122, 61;
  --shadow-rgb: 0, 0, 0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 640px) { .wrap { padding: 0 1.25rem; } }

/* ---------- en-tete ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1180px; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.logo .dot { color: var(--accent-500); }
.cta-mini {
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  background: var(--accent-500); color: #fff;
  padding: 0.6em 1.2em; border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-mini:hover { background: var(--accent-600); transform: translateY(-1px); }

/* ---------- titre ---------- */
.article-head { padding: 3.5rem 0 2rem; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent-600); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.5em;
}
.eyebrow::before { content: ""; width: 1.4em; height: 1px; background: currentColor; }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.12;
  margin: 0.5rem 0 0; text-wrap: balance;
}
.meta {
  margin-top: 1.2rem; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-faint); display: flex; gap: 1.2rem; flex-wrap: wrap;
}

/* ---------- corps ---------- */
article { padding-bottom: 3rem; }
article > p:first-of-type {
  font-size: 1.16rem; color: var(--text-muted);
  border-left: 3px solid var(--accent-500);
  padding-left: 1.1rem; margin-bottom: 2.2rem;
}
article h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem; margin: 2.6rem 0 0.8rem; text-wrap: balance;
}
article h3 {
  font-family: var(--font-body); font-weight: 700;
  font-size: 1.12rem; margin: 1.9rem 0 0.5rem;
}
article p { margin: 0 0 1.15rem; }
article ul, article ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
article li { margin-bottom: 0.55rem; }
article strong { color: var(--text); font-weight: 700; }
article a { color: var(--accent-600); text-decoration: underline; text-underline-offset: 2px; }
article blockquote {
  margin: 1.8rem 0; padding: 1.1rem 1.3rem;
  background: var(--surface-sunken); border-radius: 0 12px 12px 0;
  border-left: 3px solid var(--accent-500); color: var(--text-muted);
}
article blockquote p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; }
article table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
article th, article td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
article th { font-weight: 700; color: var(--text); }
article td { color: var(--text-muted); }

/* ---------- appel a l'action ---------- */
.article-cta {
  margin: 3rem 0 1rem; padding: 2rem;
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: 20px; text-align: center;
}
.article-cta h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 0.6rem; }
.article-cta p { color: var(--text-muted); margin: 0 0 1.4rem; }
.btn-primary {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--accent-500); color: #fff;
  padding: 0.85em 1.7em; border-radius: 999px;
  box-shadow: 0 14px 28px -12px rgba(var(--glow-rgb), 0.55);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover { background: var(--accent-600); transform: translateY(-1px); }

.retour { display: inline-block; margin: 1rem 0 2rem; font-size: 0.92rem; color: var(--text-muted); text-decoration: none; }
.retour:hover { color: var(--accent-600); }

/* ---------- pied ---------- */
footer.site { border-top: 1px solid var(--border); padding: 1.8rem 0; font-size: 0.85rem; color: var(--text-faint); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: 1180px; }
footer.site a { color: inherit; text-decoration: none; }
footer.site a:hover { color: var(--accent-600); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
}
