/* Guetteur — Direction A « Vigie » */
:root {
  --bg: #F3F2EC;
  --surface: #FFFFFF;
  --surface2: #E8E7DF;
  --field: #F3F2EC;
  --ink: #131512;
  --muted: #585B53;
  --line: #D6D5CB;
  --accent: #D6F24A;
  --accent-soft: #F1F8C8;
  --accent-ink: #131512;
  --blue: #2A4FD6;
  --ok: #1B6B37;
  --ok-soft: #DDF3E2;
  --err: #AE3B0A;
  --shadow: 0 1px 2px rgba(19,21,18,.06), 0 18px 40px -18px rgba(19,21,18,.22);
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F0C; --surface: #171A16; --surface2: #21251F; --field: #0D0F0C; --ink: #EFF1E8; --muted: #A4A89A;
    --line: #30352C; --accent-soft: #2B3312; --blue: #9DB1FF; --ok: #8BDDA2; --ok-soft: #173322; --err: #FF9E6E;
    --shadow: 0 1px 0 rgba(255,255,255,.04), 0 20px 48px -18px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0F0C; --surface: #171A16; --surface2: #21251F; --field: #0D0F0C; --ink: #EFF1E8; --muted: #A4A89A;
  --line: #30352C; --accent-soft: #2B3312; --blue: #9DB1FF; --ok: #8BDDA2; --ok-soft: #173322; --err: #FF9E6E;
  --shadow: 0 1px 0 rgba(255,255,255,.04), 0 20px 48px -18px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 64px; }
@media (min-width: 720px) { .wrap { padding: 0 32px 80px; } }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 22px var(--display); letter-spacing: -.02em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.top-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.private-note { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
@media (min-width: 640px) { .private-note { display: inline-flex; } }

/* Pills & badges */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); flex: none; }
.dot.hollow { background: transparent; }
.dot.off { background: var(--line); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.free { background: var(--ok-soft); color: var(--ok); }
.tag.premium { background: var(--ink); color: var(--bg); }
.tag.premium::before { content: '✦'; color: var(--accent); font-size: 10px; }

/* Typography */
.display { font: 800 clamp(58px, 16vw, 92px)/.94 var(--display); letter-spacing: -.045em; margin: 22px 0 26px; }
.display .hl { background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%); padding: 0 .04em; }
.h1 { font: 800 clamp(40px, 6vw, 64px)/1 var(--display); letter-spacing: -.04em; margin: 0; }
.h2 { font: 700 18px var(--display); letter-spacing: -.01em; margin: 0; }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font: 400 12px var(--mono); color: var(--muted); }
.eyebrow { font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.card.pad { padding: 24px; }
@media (min-width: 720px) { .card.pad { padding: 34px; } }
@media (min-width: 1000px) { .display { font-size: clamp(64px, 6.2vw, 92px); } }
.soft { background: var(--surface2); border-radius: 14px; }

/* Form fields */
.field { margin-bottom: 26px; }
.field-label { display: flex; align-items: baseline; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.help { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.input { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--field); transition: border-color .15s, box-shadow .15s; }
.input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.input svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.input input, .input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; padding: 16px 0; }
.input input.mono { font: 400 15px var(--mono); }
.input textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.input.area { align-items: flex-start; }
.input.invalid { border-color: var(--err); }
.field-error { color: var(--err); font-size: 13px; margin: 8px 0 0; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.clear-btn { border: 0; background: transparent; padding: 6px; display: grid; place-items: center; color: var(--muted); }

/* Site preview (after pasting a URL) */
.site { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; background: var(--surface2); border-radius: 14px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--blue); color: #fff; font: 700 14px var(--sans); display: grid; place-items: center; flex: none; }
.site-text { min-width: 0; flex: 1; }
.site-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-domain { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-state { font-size: 13px; font-weight: 600; color: var(--ok); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.site-state.neutral { color: var(--muted); font-weight: 500; }

/* Frequency options */
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.options.three { grid-template-columns: 1fr; }
@media (min-width: 560px) { .options.three { grid-template-columns: repeat(3, 1fr); } }
.option { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; min-height: 62px; transition: border-color .15s, background .15s; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; display: grid; place-items: center; }
.option .o-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.option .o-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.option:has(input:checked) { border: 2px solid var(--ink); background: var(--accent-soft); padding: 13px 15px; }
.option:has(input:checked) .radio { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 4px var(--accent-soft); }
.option:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.option.locked { cursor: pointer; }
.option.locked .radio { border-style: dashed; }
.premium-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; font-size: 13px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 14px; border: 1.5px solid var(--ink); font: 700 16px var(--sans); text-decoration: none; transition: transform .1s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.97); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: var(--surface); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.big { width: 100%; min-height: 64px; font: 800 20px var(--display); letter-spacing: -.01em; border-radius: 16px; }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn.danger { color: var(--err); border-color: var(--line); background: var(--surface); }
.reassure { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.reassure span { display: inline-flex; align-items: center; gap: 6px; }
.reassure svg { width: 14px; height: 14px; }

.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Info rows (recap tables) */
.rows { margin: 0; }
.rows > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.rows dt { font-size: 13px; color: var(--muted); padding-top: 2px; }
.rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .rows > div { grid-template-columns: 146px 1fr; } }

/* Reveal animation */
.reveal { animation: reveal .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .display { font-size: clamp(46px, 13.6vw, 92px); margin: 18px 0 20px; }
  .lead { font-size: 17px; }
  .card.pad { padding: 20px; border-radius: 24px; }
  /* 16px minimum, otherwise iOS zooms into the field on focus. */
  .input input, .input textarea, .input input.mono, .input select { font-size: 16px; }
  .input { min-height: 54px; }
  .field { margin-bottom: 22px; }
  /* Premium choices: three compact tiles on one row. */
  .options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .options.three .option { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; min-height: 0; }
  .options.three .option .o-title { font-size: 13px; }
  .options.three .option .o-sub { display: none; }
  .options.three .option .radio { width: 16px; height: 16px; }
  .btn.big { min-height: 58px; font-size: 19px; }
  .reassure { gap: 4px 14px; }
  .rows > div { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 13px 0; }
}

/* Long unbroken words (« SUV/4x4/Geländewagen/… », references, URLs) must not widen the page. */
.constat > div, .items li, .w-state > div, .rows dd, .site-text { min-width: 0; overflow-wrap: anywhere; }
