/* Merkhet — documentation (plaquette + mode d'emploi). Couleurs reprises de src/styles.css. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #EFEBE1;
  --panel: #FFFFFF;
  --border: #DED8C8;
  --text: #0F1D2E;
  --muted: #5A6B7D;
  --primary: #124559;
  --primary-dark: #0A2F3D;
  --accent: #C68B2D;
  --garde: #B33636;
  --astreinte: #B87333;
  --conges: #4A7C4E;
  --soft: #F4F1EA;
  --note-bg: #FBF6EC;
  --warn-bg: #FBEEEE;
  --pill-bg: #E3ECEF;
  --shadow: rgba(15, 29, 46, .12);
  /* Bandeaux sombres (en-tête, hero, pied) : identiques dans les deux thèmes */
  --band: #0A2F3D;
  --band-2: #124559;
  --on-band: #FFFFFF;
  --on-band-muted: #CFE0E6;
  --on-band-accent: #E8C48A;
  --display: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1A20; --panel: #15242C; --border: #2A3B44; --text: #E4EBEE; --muted: #9DB0BA;
    --primary: #8CC3D6; --primary-dark: #CFE4EB; --accent: #D9A24A; --conges: #7DBA82;
    --soft: #1C2D36; --note-bg: #2A2419; --warn-bg: #2E1C1C; --pill-bg: #1E3A45; --shadow: rgba(0, 0, 0, .4);
    --band: #07202A; --band-2: #0E3644;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1A20; --panel: #15242C; --border: #2A3B44; --text: #E4EBEE; --muted: #9DB0BA;
  --primary: #8CC3D6; --primary-dark: #CFE4EB; --accent: #D9A24A; --conges: #7DBA82;
  --soft: #1C2D36; --note-bg: #2A2419; --warn-bg: #2E1C1C; --pill-bg: #1E3A45; --shadow: rgba(0, 0, 0, .4);
  --band: #07202A; --band-2: #0E3644;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; color: var(--primary-dark); }
h2 { font-size: 2rem; margin: 0 0 .5rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 .4rem; }
code, kbd { font: .9em ui-monospace, Menlo, monospace; background: var(--soft); border: 1px solid var(--border); border-radius: 4px; padding: 0 .3em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* Bandeau */
.topbar { background: var(--band); color: var(--on-band); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: 1.4rem; color: var(--on-band); text-decoration: none; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar nav a { color: var(--on-band-muted); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--on-band); }

/* Hero */
.hero { background: var(--band-2); color: var(--on-band); padding: 72px 0 0; overflow: hidden; }
.hero h1 { color: var(--on-band); font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 16px; max-width: 18ch; }
.hero p.lead { font-size: 1.2rem; color: var(--on-band-muted); max-width: 60ch; margin: 0 0 28px; }
.hero .shot { margin-top: 48px; border-radius: 12px 12px 0 0; box-shadow: 0 -10px 40px var(--shadow); }
.cta { display: inline-block; background: var(--accent); color: var(--band); text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 8px; }
.cta.ghost { background: transparent; border: 1px solid var(--on-band-muted); color: var(--on-band); margin-left: 10px; }

section { padding: 72px 0; }
section.alt { background: var(--panel); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 70ch; font-size: 1.08rem; }

/* Grilles */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 32px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
section.alt .card { background: var(--bg); }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }
.stat { font-family: var(--display); font-size: 2.4rem; color: var(--primary); line-height: 1; margin-bottom: 6px; }

.feature { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; margin-top: 56px; }
.feature.rev { grid-template-columns: 1.4fr 1fr; }
.feature.rev .text { order: 2; }
.feature ul { padding-left: 1.2em; margin: .5rem 0 0; }
.feature li { margin: .25rem 0; }
figure { margin: 0; }
figure img, .shot-frame { border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 6px 24px var(--shadow); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.phones { display: flex; gap: 20px; justify-content: center; }
.phones img { width: 46%; max-width: 260px; border-radius: 22px; border: 6px solid var(--band); }

.pill { display: inline-block; font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--pill-bg); color: var(--primary); margin: 2px 4px 2px 0; font-weight: 500; }
.check li { list-style: none; position: relative; padding-left: 1.6em; }
.check li::before { content: "✓"; position: absolute; left: 0; color: var(--conges); font-weight: 700; }

table { border-collapse: collapse; width: 100%; background: var(--panel); border-radius: 10px; overflow: hidden; font-size: .95rem; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--soft); font-weight: 600; }
td.c, th.c { text-align: center; }

.note { border-left: 4px solid var(--accent); background: var(--note-bg); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.note.warn { border-color: var(--garde); background: var(--warn-bg); }

footer { background: var(--band); color: var(--on-band-muted); padding: 40px 0; font-size: .9rem; }
footer a, footer h2 { color: var(--on-band); }

/* Mode d'emploi : sommaire latéral */
.manual { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-top: 40px; padding-bottom: 80px; }
.toc { position: sticky; top: 20px; align-self: start; font-size: .92rem; max-height: calc(100vh - 40px); overflow: auto; }
.toc ol { padding-left: 1.8em; margin: 0; }
.manual article { min-width: 0; }
.toc li { margin: .3rem 0; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--primary); }
.manual article > section { padding: 0 0 48px; }
.manual article > section + section { border-top: 1px solid var(--border); padding-top: 40px; }
.manual figure { margin: 18px 0 8px; }
.steps { counter-reset: s; padding: 0; }
.steps > li { list-style: none; counter-increment: s; position: relative; padding-left: 2.4em; margin: .7rem 0; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: .05em; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--band-2); color: var(--on-band); font-size: .85em; font-weight: 600; display: grid; place-items: center; }
.cover { display: none; }

@media screen and (max-width: 820px) {
  .feature, .feature.rev { grid-template-columns: 1fr; gap: 20px; }
  .feature.rev .text { order: 0; }
  .manual { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  th, td { padding: 8px; }
  .cta.ghost { margin: 10px 0 0; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .table-scroll { overflow-x: auto; }
}

/* Impression / PDF (A4) */
@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  body { background: var(--panel); font-size: 10.5pt; }
  .topbar, .no-print { display: none !important; }
  section { padding: 22px 0; }
  .hero { padding-top: 28px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero .shot { margin-top: 24px; }
  section.alt, .card, th, .note, .pill, footer, .steps > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .feature, .card, figure, table, .note { break-inside: avoid; }
  .feature { margin-top: 26px; gap: 20px; grid-template-columns: 1fr 1.25fr; }
  .feature.rev { grid-template-columns: 1.25fr 1fr; }
  .feature h3 { margin-top: 0; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
  .card { padding: 14px; }
  .stat { font-size: 1.8rem; }
  .kicker { break-after: avoid; }
  .hero h1 { font-size: 30pt; }
  .phones img { border-width: 4px; }
  .page-break { break-before: page; }
  h2, h3 { break-after: avoid; }
  .manual { display: block; padding: 0; }
  .toc { position: static; max-height: none; break-after: page; }
  .manual article > section { break-before: page; border-top: 0 !important; padding-top: 0 !important; }
  .cover { display: flex; flex-direction: column; justify-content: center; height: 250mm; break-after: page; }
  .cover h1 { font-size: 34pt; margin: 0 0 8mm; }
  .cover p { font-size: 13pt; color: var(--muted); }
  a { text-decoration: none; color: inherit; }
}
.kicker.on-band { color: var(--on-band-accent); }
.table-scroll { overflow-x: auto; margin-top: 12px; }
.compare { min-width: 760px; font-size: .9rem; }
.compare thead th { vertical-align: bottom; font-size: .85rem; }
.compare th[scope="row"] { background: transparent; font-weight: 600; }
.compare small { display: block; font-weight: 400; color: var(--muted); }
.compare td { line-height: 1.2; }
.compare td span { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.compare .us { background: var(--pill-bg); }
.compare th.us { color: var(--primary); font-family: var(--display); font-size: 1rem; }
.compare td:nth-child(2) { background: var(--pill-bg); }
.compare td:nth-child(2) span { color: var(--text); font-weight: 500; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.yes { color: var(--conges); } .part { color: var(--accent); } .no { color: var(--muted); }
.yes .dot, .dot.yes { background: currentColor; }
.part .dot, .dot.part { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.legend { align-items: center; }
.legend { font-size: .85rem; color: var(--muted); display: flex; gap: 8px 14px; flex-wrap: wrap; margin: 24px 0 0; }
@media print { .compare { min-width: 0; font-size: 8.5pt; } .compare th[scope="row"] { width: 26%; } #comparatif .grid { break-inside: avoid; } .compare td, .compare th { padding: 3px 6px; line-height: 1.15; } .compare small { font-size: 7pt; } .compare td span { margin-top: 0; } #comparatif .intro { margin-bottom: 0; } .table-scroll { overflow: visible; } .compare td:nth-child(2), .compare .us { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Ouverture animee (index.html) */
.ouverture { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #071D26;
  transition: background 1.5s, opacity .7s; }
.ouverture.day { background: var(--bg); }
.ouverture.out { opacity: 0; pointer-events: none; }
.ouverture video { width: 100%; height: 100%; object-fit: contain; }
.ouverture-passer { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  font: 500 .9rem Inter, system-ui, sans-serif; color: #EFEBE1; background: rgba(10,47,61,.85); border: 1px solid rgba(239,235,225,.25);
  border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.ouverture-passer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
