/* Palette et échelle typographique reprises d'OptionsChecker :
   tailles 9 / 10 / 11 / 13 / 16 / 20 px, champs à 16 px (sinon iOS zoome). */
:root {
  --bg: #f0f2f8; --card: #ffffff; --border: #e2e5f0;
  --text: #1a1d35; --muted: #8890b0;
  --green: #00a855; --red: #e5334b; --yellow: #d97706;
  --blue: #2563eb; --purple: #6d4fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10121f; --card: #1a1d30; --border: #2c3050;
    --text: #e8eaf6; --muted: #8890b0;
    --green: #22c57a; --red: #ff5a6e; --yellow: #f0a030;
    --blue: #5b8cff; --purple: #8f7bff;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px; line-height: 1.4;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
main { max-width: 560px; margin: 0 auto; }
main.large { max-width: 760px; }

/* ── En-tête et menu (toutes les pages) ── */
.entete {
  max-width: 760px; margin: 4px auto 16px; display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between; gap: 8px 16px;
}
.logo { text-decoration: none; color: var(--text); }
.entete nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.entete nav a { font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 600; }
.entete nav a[aria-current="page"] { color: var(--text); }
.entete nav a.langue { font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.entete nav a.compte-lien { color: var(--purple); }

/* ── Pied de page ── */
.pied { max-width: 760px; margin: 28px auto 0; text-align: center; }
.pied nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.pied nav a { font-size: 11px; color: var(--muted); }
.pied p { font-size: 10px; color: var(--muted); margin: 8px 0 0; }

/* ── Titres et textes de page ── */
.titre-page { font-size: 20px; font-weight: 800; margin: 0 2px 12px; letter-spacing: -0.2px; }
.texte { font-size: 13px; line-height: 1.55; margin: 0 0 10px; }
h2.card-title { margin-top: 0; }
.card h2.card-title + .texte { margin-bottom: 14px; }
.chapitres { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.5; }
.chapitres li { padding: 3px 0; }

/* ── Accueil ── */
.hero { text-align: center; margin: 18px 4px 22px; }
.hero h1 { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.4px; margin: 0 0 10px; }
.hero p { font-size: 16px; line-height: 1.5; color: var(--muted); margin: 0 auto; max-width: 560px; }
.portes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.porte {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px 16px;
}
.porte:hover { border-color: var(--purple); }
.porte-badge { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.porte-titre { font-size: 20px; font-weight: 800; }
.porte-texte { font-size: 13px; line-height: 1.5; color: var(--muted); flex: 1; }
.porte-action { font-size: 13px; font-weight: 700; color: var(--purple); }
.methode { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.methode li { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; font-size: 13px; line-height: 1.45; }
.methode li b { font-size: 16px; }
.methode li span:last-child { grid-column: 2; color: var(--muted); }
.etape-num {
  grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.video-attente {
  aspect-ratio: 16 / 9; max-width: 480px; margin-left: auto; margin-right: auto; border-radius: 10px; background: var(--bg); border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--muted); margin-bottom: 8px;
}
.bientot a { font-weight: 700; }
@media (max-width: 640px) {
  .portes { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 13px; }
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.logo span { color: var(--purple); }
.sous-titre { font-size: 11px; color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px;
}
.card-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px;
}
.row { display: flex; gap: 10px; margin-bottom: 10px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
label { font-size: 11px; color: var(--muted); }
input {
  font-size: 16px; font-family: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px;
  width: 100%; min-width: 0; -webkit-appearance: none; appearance: none;
}
input:focus { outline: 2px solid var(--purple); outline-offset: -1px; }
.toggle-group { display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; height: 38px; }
.tgl {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  user-select: none; background: var(--bg); border: 0; font-family: inherit;
}
.tgl.on { background: var(--purple); color: #fff; }
details { margin-top: 2px; }
summary { font-size: 11px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.aide { font-size: 10px; color: var(--muted); margin-top: 2px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.tile { background: var(--bg); border-radius: 10px; padding: 9px 11px; }
.tile .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tile .val { font-size: 20px; font-weight: 800; margin-top: 2px; }
.tile .note { font-size: 10px; color: var(--muted); }
.c-green { color: var(--green); } .c-yellow { color: var(--yellow); }
.c-red { color: var(--red); } .c-muted { color: var(--muted); }

.iv-bloc { display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 10px; margin-bottom: 8px; }
.iv-bloc .val { font-size: 20px; font-weight: 800; }
table { width: 100%; border-collapse: collapse; }
td { padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; vertical-align: top; }
td:last-child { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 10px; }
td .expl { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.message { font-size: 13px; color: var(--muted); text-align: center; padding: 18px 8px; }
.message.erreur { color: var(--yellow); }
.mention { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.5; margin: 14px 8px 0; }
.bientot {
  font-size: 11px; text-align: center; color: var(--text);
  border: 1px dashed var(--border); border-radius: 12px; padding: 10px 12px;
}
.bientot b { color: var(--purple); }

/* ── En-tête : lien compte ── */
.compte-lien { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--purple); text-decoration: none; font-weight: 700; }
.compte-lien.muted { color: var(--muted); font-weight: 400; }
a { color: var(--purple); }

/* ── Formulaires de compte ── */
.btn {
  display: block; width: 100%; font-size: 16px; font-weight: 700; font-family: inherit;
  color: #fff; background: var(--purple); border: 0; border-radius: 10px;
  padding: 11px; cursor: pointer; margin-top: 4px;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.secondaire { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.onglets { display: flex; gap: 6px; margin-bottom: 12px; }
.onglets .tgl { border-radius: 9px; height: 34px; border: 1px solid var(--border); }
.info { font-size: 13px; border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; }
.info.ok { background: rgba(0,168,85,0.10); color: var(--green); }
.info.ko { background: rgba(229,51,75,0.10); color: var(--red); }
.lien-discret { font-size: 11px; color: var(--muted); background: none; border: 0; padding: 6px 0; cursor: pointer; font-family: inherit; text-decoration: underline; }
[hidden] { display: none !important; }

/* ── Bulles « ? » (public/js/bulles.js) ── */
.lbl-ligne { display: flex; align-items: center; gap: 5px; }
.q {
  width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; padding: 0;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  font: 700 10px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center;
}
.q:hover, .q[aria-expanded="true"] { border-color: var(--purple); color: var(--purple); }
.tiles > .bulle-hote, .tiles + .bulle-hote { grid-column: 1 / -1; }
.bulle {
  position: relative; background: rgba(109,79,255,0.08); border: 1px solid rgba(109,79,255,0.25);
  border-radius: 10px; padding: 10px 30px 10px 12px; margin: 0 0 10px;
  font-size: 13px; line-height: 1.5; font-weight: 400; text-align: left; white-space: normal;
}
.bulle b { font-size: 13px; }
.bulle p { margin: 4px 0 6px; }
.bulle-repere span { font-weight: 700; color: var(--purple); }
.bulle a { font-size: 11px; font-weight: 700; }
.bulle-fermer {
  position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 4px;
}
tr.bulle-hote td { border-top: 0; padding: 0 0 4px; text-align: left; font-weight: 400; white-space: normal; }
