/* ==========================================================================
   Journal Ménière · base.css
   Reset, jetons de design, thèmes clair/sombre, typographie, landing page.
   ========================================================================== */

/* ---------- Jetons ---------- */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f4f7f8;
  --bg-grad: radial-gradient(1200px 600px at 12% -8%, #e4f2f0 0%, transparent 60%),
             radial-gradient(900px 500px at 100% 0%, #e8eefc 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f0f4f5;
  --surface-3: #e7edef;
  --text: #0d1b21;
  --text-2: #33505c;
  --muted: #64808c;
  --border: #dbe4e7;
  --border-strong: #c3d1d6;

  --primary: #0f766e;
  --primary-hover: #0b5e58;
  --primary-ink: #ffffff;
  --primary-soft: #e2f2ef;
  --primary-soft-ink: #0b5e58;

  --accent: #4f46e5;
  --accent-soft: #eceafc;

  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --ok: #15803d;
  --ok-soft: #e7f5ec;
  --info: #0369a1;
  --info-soft: #e6f2fa;

  --sev-0: #dfe8ea;
  --sev-1: #b7e4d3;
  --sev-2: #f5df9b;
  --sev-3: #f4b678;
  --sev-4: #e2795f;
  --sev-5: #b83c3c;

  --focus: #0ea5e9;
  --shadow-1: 0 1px 2px rgba(13, 27, 33, .06), 0 1px 3px rgba(13, 27, 33, .05);
  --shadow-2: 0 4px 12px rgba(13, 27, 33, .07), 0 2px 4px rgba(13, 27, 33, .04);
  --shadow-3: 0 18px 44px rgba(13, 27, 33, .16);

  --r-xs: 6px; --r-sm: 9px; --r-md: 13px; --r-lg: 18px; --r-xl: 26px; --r-full: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 22px; --sp-6: 30px; --sp-7: 42px; --sp-8: 60px;

  --topbar-h: 58px;
  --sidenav-w: 236px;
  --tabbar-h: 60px;
  --wrap: 1140px;
  --content: 1000px;
}


/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-wrap: break-word;
}
img, svg, video, canvas { display: block; max-width: 100%; }
svg { fill: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.05rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.09rem; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
:where(button, a, input, select, textarea):focus:not(:focus-visible) { outline: none; }
::selection { background: var(--primary); color: var(--primary-ink); }
[hidden] { display: none !important; }
hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--primary); color: var(--primary-ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; color: var(--primary-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.lp-narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.noscript-note { max-width: 640px; margin: 60px auto; padding: 24px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--r-md); }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.06rem; }
.brand-mark { width: 30px; height: 30px; color: var(--primary); flex: none; }
.brand-name { font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.brand-name strong { font-weight: 800; }
.brand-sm .brand-mark { width: 26px; height: 26px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px;
  border-radius: var(--r-full); border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; line-height: 1.1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-1); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); color: var(--primary-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: currentColor; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: .86rem; }
.btn-lg { min-height: 50px; padding: 13px 26px; font-size: 1.03rem; }
.btn-block { width: 100%; }
.btn-crisis {
  background: var(--danger); color: #fff; padding: 7px 15px; min-height: 36px;
  border-radius: var(--r-full); font-weight: 700; font-size: .87rem;
}
.btn-crisis:hover { filter: brightness(1.08); }
.dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-full);
  color: var(--text-2); border: 1px solid transparent; flex: none;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; }

/* ==========================================================================
   Landing page
   ========================================================================== */
.landing { display: flex; flex-direction: column; min-height: 100vh; }
.lp-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom: 1px solid var(--border); }
.lp-header-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 66px; }
.lp-nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
.lp-nav a { color: var(--text-2); text-decoration: none; font-size: .93rem; font-weight: 500; }
.lp-nav a:hover { color: var(--primary); }
@media (max-width: 640px) { .lp-nav a { display: none; } }

.lp-main { flex: 1; }
.lp-hero { padding: clamp(38px, 7vw, 84px) 0 clamp(30px, 6vw, 66px); }
.lp-hero-in { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 5vw, 60px); align-items: center; }
@media (max-width: 900px) { .lp-hero-in { grid-template-columns: 1fr; } .lp-hero-art { order: -1; } }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .74rem; font-weight: 700; color: var(--primary); margin-bottom: var(--sp-3); }
.lp-hero h1 { margin-bottom: var(--sp-4); }
.lead { font-size: clamp(1rem, .95rem + .35vw, 1.16rem); color: var(--text-2); max-width: 58ch; }
.lp-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.lp-microcopy { margin-top: var(--sp-3); font-size: .84rem; color: var(--muted); }

.mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; rotate: -1.2deg; }
.mock-bar { display: flex; gap: 6px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-body { padding: 18px; display: grid; gap: 12px; }
.mock-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: .82rem; }
.mock-row b { font-weight: 600; color: var(--text-2); }
.mock-row em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.lvl { display: block; height: 9px; border-radius: var(--r-full); background: var(--surface-3); position: relative; overflow: hidden; }
.lvl::after { content: ""; position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--sev-4)); }
.lvl-3::after { width: 30%; } .lvl-5::after { width: 50%; } .lvl-6::after { width: 60%; } .lvl-7::after { width: 70%; }
.mock-spark { height: 62px; border-radius: var(--r-sm); background:
  linear-gradient(to top, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
  repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 26px); }
.mock-note { font-size: .82rem; padding: 10px 12px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary-soft-ink); border-left: 3px solid var(--primary); }

.lp-section { padding: clamp(40px, 6vw, 76px) 0; }
.lp-section-alt { background: color-mix(in srgb, var(--surface) 62%, transparent); border-block: 1px solid var(--border); }
.lp-section h2 { margin-bottom: var(--sp-5); }
.lp-section p { color: var(--text-2); margin-bottom: var(--sp-3); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: var(--sp-4); }
.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.lp-card h3 { margin-bottom: var(--sp-2); color: var(--text); }
.lp-card p { font-size: .93rem; margin: 0; }
.lp-steps { display: grid; gap: var(--sp-4); counter-reset: step; list-style: none; padding: 0; }
.lp-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); color: var(--text-2); }
.lp-steps b { color: var(--text); }
.lp-links { font-size: .9rem; }
#faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
#faq summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
#faq summary::marker { color: var(--primary); }
#faq details p { margin: var(--sp-2) 0 var(--sp-1); font-size: .93rem; }
.lp-disclaimer { padding: var(--sp-6) 0; }
.lp-disclaimer p { font-size: .87rem; color: var(--text-2); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--r-md); padding: var(--sp-4); }
.lp-footer { border-top: 1px solid var(--border); padding: var(--sp-5) 0; font-size: .85rem; color: var(--muted); }
.lp-footer-in { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; }
