/* Youtoube — styles. Aucune police ni ressource externe (CSP stricte). */
:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --line: #e3e5ea;
  --line-strong: #d5d8df;
  --ink: #12151a;
  --muted: #596070;
  --soft: #eef1f5;
  --accent: #0b6b63;
  --accent-dark: #084c46;
  --accent-tint: #e4f2f0;
  --accent-ink: #0b3f3a;
  --warn-bg: #fff4e0;
  --warn-line: #f0d9a8;
  --warn-ink: #5e3b00;
  --err-bg: #fdecec;
  --err-ink: #8f1d1d;
  --err-line: #e8b9b9;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
}
button, input { font-family: inherit; font-size: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.break { overflow-wrap: anywhere; }

/* ---- structure ---- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { font-size: 13px; color: var(--muted); }
#nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.who { font-size: 13px; color: var(--muted); }
.navbtn {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; cursor: pointer; background: transparent; color: #3e4654;
}
.navbtn[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); }
main {
  flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 40px 24px 64px;
  display: flex; flex-direction: column; gap: 24px;
}
main:focus, h1:focus { outline: none; } /* focus donné par le script pour les lecteurs d'écran, sans cadre visible */
.footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 16px 24px; font-size: 13px; color: var(--muted); }
.loading, .noscript { padding: 48px 0; text-align: center; color: var(--muted); }

section { display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* ---- cartes ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.card-lg { padding: 28px; gap: 20px; }
.card-center { align-self: center; width: 100%; max-width: 460px; }
.card-narrow { max-width: 400px; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.card p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.hero { padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-size: 40px; }
.hero p { font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.page-sub { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---- champs et boutons ---- */
label, .label { font-size: 14px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.input {
  min-height: 48px; padding: 0 14px; font-size: 16px; color: var(--ink); background: var(--card);
  border: 2px solid var(--line-strong); border-radius: var(--radius-sm); width: 100%;
}
.input-grow { flex: 1 1 320px; min-width: 0; width: auto; }
.hint { font-size: 12px; color: var(--muted); }
.btn {
  min-height: 48px; padding: 0 28px; font-size: 16px; font-weight: 600; cursor: pointer;
  border-radius: var(--radius-sm); border: 2px solid transparent; text-align: center;
}
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary { color: var(--ink); background: var(--card); border-color: var(--line-strong); }
.btn-danger { color: var(--err-ink); background: var(--card); border-color: var(--err-line); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn:disabled { background: var(--line); color: #3e4654; cursor: default; border-color: transparent; }
.btn-link {
  min-height: 44px; padding: 0; background: none; border: 0; font-size: 14px; color: var(--accent);
  cursor: pointer; text-decoration: underline; text-align: left;
}
.tabs { display: flex; gap: 8px; }
.tab {
  min-height: 44px; padding: 0 24px; font-size: 15px; font-weight: 600; cursor: pointer;
  border-radius: var(--radius-sm); border: 2px solid var(--line-strong); background: var(--card); color: var(--ink);
}
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px;
  padding: 10px 16px; border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  border: 2px solid var(--line-strong); background: var(--card); color: var(--ink);
}
.pill-label { font-size: 15px; font-weight: 600; }
.pill-sub { font-size: 12px; color: var(--muted); }
.pill[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); }
.pill[aria-pressed="true"] .pill-sub { color: #0b5a53; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }

/* ---- messages ---- */
.alert { font-size: 14px; border-radius: 8px; padding: 10px 12px; }
.alert-error { color: var(--err-ink); background: var(--err-bg); }
.note { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.note-info { background: var(--soft); color: #3e4654; }
.note-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); display: flex; flex-direction: column; gap: 6px; }
.note-ok { background: var(--accent-tint); border: 1px solid #b9dad6; color: var(--accent-ink); display: flex; flex-direction: column; gap: 12px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--card); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; color: var(--ink); }
.badge { font-size: 12px; font-weight: 600; border-radius: 8px; padding: 6px 10px; background: var(--soft); color: #3e4654; }
.badge-ok { background: var(--accent-tint); color: var(--accent-ink); }
.badge-err { background: var(--err-bg); color: var(--err-ink); }

/* ---- aperçu ---- */
.media { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.thumb {
  flex: 0 0 260px; max-width: 100%; height: 146px; border-radius: var(--radius-sm); object-fit: cover;
  background: linear-gradient(135deg, #2b3340, #12151a);
}
.media-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.media-text h1 { font-size: 22px; line-height: 1.25; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 14px; margin: 0; flex: 1 1 360px; min-width: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary dd.heavy { color: #7a4a00; }

/* ---- progression ---- */
.bar { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 12px; background: var(--accent); border-radius: 6px; width: 0; transition: width 0.4s ease; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.steps-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.step-dot {
  flex: none; width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--soft); color: var(--muted); border: 2px solid var(--soft);
}
.step[data-state="current"] { color: var(--ink); font-weight: 700; }
.step[data-state="current"] .step-dot { background: var(--accent-tint); color: var(--accent-ink); border-color: var(--accent); }
.step[data-state="done"] { color: var(--ink); }
.step[data-state="done"] .step-dot { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- listes ---- */
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.card .item { border-radius: var(--radius-sm); }
.item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 240px; }
.item-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.item-title.dim { color: var(--muted); }
.result-icon { width: 48px; height: 48px; }
.dot { width: 9px; height: 9px; border-radius: 5px; display: inline-block; background: #1e8e5a; }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.bullets-plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.bullets-plain li { background: var(--soft); border-radius: 8px; padding: 10px 12px; }

/* Les cartes sont en colonne par défaut ; ces deux-là se disposent en ligne. */
.card.media, .card.row-between { flex-direction: row; }

@media (max-width: 560px) {
  main { padding: 24px 16px 48px; }
  .topbar-inner, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 30px; }
  .card-lg { padding: 20px; }
  .btn { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
}
