/* Identité visuelle Nakwak2.0 : bleu profond, or et acier, reprise du logo et de la bannière. */
:root {
  --bg: #071a36;
  --bg-2: #0c2a55;
  --surface: #0f3164;
  --surface-2: #14407e;
  --line: rgba(184, 196, 208, 0.18);
  --text: #e8eef6;
  --muted: #a9b8cc;
  --gold: #e3a93b;
  --gold-2: #f6cf74;
  --steel: #b8c4d0;
  --focus: #f6cf74;
  --todo-bg: #5c1f1f;
  --todo-text: #ffd7d7;
  --radius: 14px;
  --maxw: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, var(--surface-2), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  background-color: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1b1203; padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; min-width: 0; }
/* Les enfants d'un conteneur flex ne doivent pas s'élargir selon leur contenu (tableaux sur mobile). */
body > * { min-width: 0; }
.doc, .doc p, .doc li, .doc td { overflow-wrap: anywhere; }

/* ---- En-tête ---- */
.site-header { border-bottom: 1px solid var(--line); background: rgba(7, 26, 54, 0.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.2px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

/* ---- Boutons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid transparent; min-height: 46px; }
.btn-primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b1203; box-shadow: 0 6px 20px rgba(227, 169, 59, 0.25); }
.btn-primary:hover { color: #000; filter: brightness(1.06); }
.btn-ghost { border-color: var(--steel); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); color: #fff; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---- Accueil ---- */
.hero { text-align: center; padding: 48px 0 24px; }
.hero .banner { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.hero .logo { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--gold); margin-top: -64px; position: relative; background: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 12px 0 6px; letter-spacing: 0.5px; }
.hero .tagline { color: var(--muted); max-width: 680px; margin: 0 auto 24px; font-size: 1.1rem; }
.note { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

section { padding: 28px 0; }
section h2 { font-size: 1.6rem; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: linear-gradient(180deg, var(--surface), rgba(15, 49, 100, 0.55)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 60px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #1b1203; font-weight: 800; display: grid; place-items: center; }
.callout { background: rgba(227, 169, 59, 0.1); border: 1px solid rgba(227, 169, 59, 0.45); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }

/* ---- Documents juridiques ---- */
.doc { padding: 32px 0 16px; max-width: 820px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 4px; }
.doc .meta { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 1.3rem; margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.08rem; margin-top: 20px; }
.doc table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.doc td { min-width: 9rem; }
.doc th { min-width: 8rem; overflow-wrap: normal; word-break: normal; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.toc ol { margin: 6px 0; padding-left: 20px; }
.todo { background: var(--todo-bg); color: var(--todo-text); border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.draft { background: rgba(255, 120, 120, 0.12); border: 1px solid rgba(255, 120, 120, 0.5); border-radius: var(--radius); padding: 12px 16px; }

/* ---- Pied de page ---- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 0.92rem; background: rgba(7, 26, 54, 0.6); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text); }

@media (max-width: 560px) {
  .nav a { padding: 6px 8px; font-size: 0.9rem; }
  .hero .logo { width: 96px; height: 96px; margin-top: -52px; }
}
