:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #152033;
  --muted: #687386;
  --line: #e5e9f0;
  --blue: #1769e0;
  --green: #16874a;
  --green-soft: #eaf8f0;
  --orange: #b96300;
  --orange-soft: #fff4e5;
  --red: #c72d2d;
  --red-soft: #fff0f0;
  --shadow: 0 12px 32px rgba(22, 39, 69, .08);
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor:pointer; }
.app-shell { max-width: 560px; margin: 0 auto; min-height:100vh; background:var(--surface); padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom); }
.topbar { display:flex; align-items:center; justify-content:space-between; height:68px; }
.brand { font-weight:800; font-size:21px; display:flex; gap:9px; align-items:center; }
.brand-shield { width:34px; height:38px; color:var(--blue); display:block; }
.icon-btn { border:1px solid var(--line); background:white; width:42px; height:42px; border-radius:14px; display:grid; place-items:center; color:var(--text); }
.btn-icon { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.screen { display:none; padding-bottom:30px; }
.screen.active { display:block; }
.hero { text-align:center; padding:26px 8px 24px; }
.hero-icon { display:flex; justify-content:center; }
.hero-shield { width:70px; height:76px; color:var(--blue); display:block; }
h1 { font-size:34px; line-height:1.08; margin:12px 0 13px; letter-spacing:-.8px; }
h2 { font-size:28px; line-height:1.15; margin:14px 0 8px; letter-spacing:-.4px; }
h3 { margin:0 0 10px; }
.hero p, .lead { color:var(--muted); line-height:1.5; font-size:16px; }
.action-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.action-card { min-height:145px; border:1px solid var(--line); background:white; border-radius:20px; text-align:left; padding:18px; box-shadow:0 5px 16px rgba(22,39,69,.04); }
.action-card .action-icon { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; margin-bottom:14px; background:#edf4ff; color:var(--blue); }
.action-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.action-icon svg use[href="#icon-qr"] { fill:currentColor; stroke:none; }
.action-card b { display:block; font-size:16px; line-height:1.25; }
.action-card small { display:block; color:var(--muted); margin-top:6px; line-height:1.3; }
.emergency-btn { width:100%; border:1px solid #efbcbc; background:var(--red-soft); color:#8f2222; font-weight:800; border-radius:16px; padding:16px; margin-top:18px; display:flex; align-items:center; justify-content:center; gap:9px; }
.privacy-note { text-align:center; color:var(--muted); font-size:12px; margin:18px 0 0; display:flex; align-items:flex-start; justify-content:center; gap:6px; line-height:1.45; }
.inline-icon { width:17px; height:17px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.back { border:0; background:transparent; color:var(--blue); padding:10px 0; font-weight:700; }
textarea, input[type="url"], input[type="tel"], #urlInput, #phoneInput { width:100%; border:1.5px solid var(--line); border-radius:16px; padding:16px; background:#fbfcfe; outline:none; font-size:17px; }
textarea { min-height:230px; resize:vertical; }
textarea:focus, input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(23,105,224,.10); }
.primary, .secondary { width:100%; border-radius:16px; padding:16px; font-weight:800; margin-top:14px; border:0; }
.primary { background:var(--blue); color:white; }
.primary:disabled { opacity:.45; cursor:not-allowed; }
.secondary { background:white; border:1px solid var(--line); color:var(--text); }
.upload-box { border:2px dashed #cbd4e2; border-radius:20px; padding:36px 18px; display:grid; gap:8px; text-align:center; background:#fbfcfe; }
.upload-box input { display:none; }
.upload-icon { width:58px; height:58px; border-radius:16px; margin:0 auto 4px; display:grid; place-items:center; background:#edf4ff; color:var(--blue); }
.upload-icon svg { width:32px; height:32px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.upload-box small { color:var(--muted); }
.preview { width:100%; max-height:340px; object-fit:contain; border-radius:16px; margin-top:14px; border:1px solid var(--line); }
.center { text-align:center; padding-top:90px; }
.spinner { width:58px; height:58px; margin:0 auto 26px; border:6px solid #e5ebf5; border-top-color:var(--blue); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.checks { list-style:none; padding:0; color:var(--muted); line-height:2; }
.checks li::before { content:"✓ "; color:var(--blue); font-weight:900; }
.result-card { text-align:center; padding-top:10px; }
.result-summary { margin:10px 0 20px; padding:26px 20px 22px; border-radius:24px; border:2px solid transparent; }
.result-badge { width:82px; height:82px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; color:white; }
.status-svg { width:45px; height:45px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.level { text-transform:uppercase; font-size:14px; font-weight:950; letter-spacing:1.3px; margin:0; }
.result-summary h2 { margin-top:12px; font-size:30px; }
.result-action { font-size:20px; font-weight:850; line-height:1.35; margin:16px 0 0; }
.reason-box { text-align:left; margin:20px 0; padding:19px; border-radius:18px; border:1px solid transparent; }
.reason-box ul { margin:0; padding-left:22px; line-height:1.55; }
.reason-box li { margin:8px 0; }
.result-card.clear .result-summary { background:#dff5e8; border-color:#9bd9b4; }
.result-card.clear .result-badge { background:var(--green); }
.result-card.clear .level, .result-card.clear .result-summary h2 { color:#116b3b; }
.result-card.clear .reason-box { background:#f0faf4; border-color:#ccebd8; }
.result-card.clear #whatToDo { background:var(--green); }
.result-card.clear #alreadyActed { border-color:#b8dfc7; color:#116b3b; background:#f8fdf9; }
.result-card.caution .result-summary { background:#fff0d8; border-color:#efc482; }
.result-card.caution .result-badge { background:var(--orange); }
.result-card.caution .level, .result-card.caution .result-summary h2 { color:#8a4a00; }
.result-card.caution .reason-box { background:#fff8ec; border-color:#f2d8ad; }
.result-card.caution #whatToDo { background:var(--orange); }
.result-card.caution #alreadyActed { border-color:#e9c794; color:#7d4505; background:#fffaf2; }
.result-card.danger .result-summary { background:#ffe2e2; border-color:#eaa0a0; }
.result-card.danger .result-badge { background:var(--red); }
.result-card.danger .level, .result-card.danger .result-summary h2 { color:#9e2222; }
.result-card.danger .reason-box { background:#fff1f1; border-color:#f0c5c5; }
.result-card.danger #whatToDo { background:var(--red); }
.result-card.danger #alreadyActed { border-color:#e8b7b7; color:#982424; background:#fff8f8; }
.disclaimer { color:var(--muted); font-size:12px; line-height:1.45; margin-top:16px; }
.steps { display:grid; gap:12px; margin-top:24px; }
.step { display:grid; grid-template-columns:42px 1fr; gap:12px; padding:16px; border:1px solid var(--line); border-radius:16px; }
.step-num { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:#edf4ff; color:var(--blue); font-weight:900; }
.step p { margin:3px 0 0; color:var(--muted); line-height:1.4; }
.emergency-head { width:76px; height:76px; margin:16px auto 8px; border-radius:20px; display:grid; place-items:center; background:var(--red-soft); color:var(--red); }
.emergency-head svg { width:42px; height:42px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.choices { display:grid; gap:10px; margin:22px 0; }
.choices label { display:flex; gap:12px; align-items:flex-start; padding:15px; border:1px solid var(--line); border-radius:15px; line-height:1.3; }
.choices input { width:21px; height:21px; flex:0 0 auto; }
#emergencyOutput { margin-top:22px; border-top:1px solid var(--line); padding-top:18px; }
.history-item { border:1px solid var(--line); border-radius:15px; padding:15px; margin:10px 0; display:flex; justify-content:space-between; gap:12px; }
.history-item small { color:var(--muted); }
.pill { font-size:12px; font-weight:850; text-transform:uppercase; }
.pill.clear { color:var(--green); }.pill.caution { color:var(--orange); }.pill.danger { color:var(--red); }
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:#152033; color:white; border-radius:12px; padding:12px 16px; max-width:90%; box-shadow:var(--shadow); z-index:9; }
.hidden { display:none !important; }
@media (max-width:380px) { .action-grid { grid-template-columns:1fr; } h1 { font-size:30px; } }
.top-actions { display:flex; align-items:center; gap:8px; }
.mode-badge { font-size:11px; font-weight:850; padding:7px 9px; border-radius:999px; background:#f0f3f7; color:var(--muted); white-space:nowrap; }
.mode-badge.active { background:var(--green-soft); color:var(--green); }
.info-box { margin:14px 0 0; padding:13px 14px; border-radius:14px; background:#f4f7fb; color:var(--muted); font-size:13px; line-height:1.45; }
.info-box.good { background:var(--green-soft); color:#17653d; }
.info-box code { font-size:12px; color:var(--text); }
.qr-found { margin-top:14px; border:1px solid #cfe0ff; background:#f4f8ff; border-radius:16px; padding:14px; }
.qr-found p { margin:6px 0 0; color:var(--muted); word-break:break-all; font-size:13px; }
.primary.compact { margin-top:12px; padding:12px; }
@media (max-width:430px) { .mode-badge { display:none; } }
.upload-box.dragging { border-color:var(--blue); background:#eef5ff; box-shadow:0 0 0 4px rgba(23,105,224,.10); }
.drop-hint { display:block; margin-top:4px; color:var(--blue); font-size:12px; font-weight:650; }
.selected-image-info { margin-top:12px; padding:11px 13px; border-radius:12px; background:var(--green-soft); color:#17653d; font-size:13px; font-weight:650; }
.phone-note { margin-top:14px; }
.phone-meta { margin:18px 0 4px; padding:12px 14px; border-radius:14px; background:#f6f8fb; color:var(--muted); font-size:13px; font-weight:650; }
.phone-actions { margin-top:12px; }
.danger-outline { border-color:#efc9c9; color:#9c2626; background:#fffafa; }
.text-button { width:100%; margin-top:10px; border:0; background:transparent; color:var(--muted); text-decoration:underline; padding:8px; }


/* 0.5.0 — expérience mobile/installable */
.topbar { position:sticky; top:0; z-index:5; background:rgba(255,255,255,.94); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.install-card { margin:18px 0 0; padding:16px; border:1px solid #cfe0ff; background:#f4f8ff; border-radius:18px; text-align:left; }
.install-card p { color:var(--muted); margin:5px 0 2px; line-height:1.4; font-size:13px; }
.install-card .primary { margin-top:10px; }
.install-btn { color:var(--blue); font-weight:900; }
.action-card:active, .primary:active, .secondary:active, .emergency-btn:active { transform:scale(.985); }
@media (max-width: 520px) {
  body { background:#fff; }
  .app-shell { max-width:none; padding-left:16px; padding-right:16px; min-height:100dvh; }
  .topbar { height:62px; margin-left:-2px; margin-right:-2px; }
  .hero { padding-top:18px; }
  .hero-icon { font-size:46px; }
  h1 { font-size:32px; }
  .action-grid { gap:10px; }
  .action-card { min-height:132px; padding:15px; border-radius:18px; }
  .action-card span { margin-bottom:10px; }
  .primary, .secondary, .emergency-btn { min-height:52px; }
  textarea { min-height:190px; }
}
@media (display-mode: standalone) {
  .app-shell { padding-top:max(env(safe-area-inset-top), 4px); }
  .install-card, .install-btn { display:none !important; }
}


/* 0.5.1 — identité visuelle plate et verdicts renforcés */
.svg-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.action-card { transition:border-color .15s ease, background-color .15s ease, transform .08s ease; }
.action-card:hover { border-color:#c8d9f5; background:#fbfdff; }
.result-card .primary, .result-card .secondary { transition:background-color .15s ease, border-color .15s ease; }
@media (max-width:520px) {
  .hero-shield { width:62px; height:68px; }
  .result-summary { margin-left:-6px; margin-right:-6px; padding:24px 16px 20px; border-radius:22px; }
  .result-summary h2 { font-size:28px; }
  .result-action { font-size:18px; }
}

/* 0.7 — compte et quotas */
.quota-card { margin:4px 0 18px; padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:#f8fafc; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; }
.quota-card b { display:block; font-size:14px; }
.quota-card small { display:block; margin-top:3px; color:var(--muted); line-height:1.35; }
.compact-link { width:auto; margin:0; padding:6px 4px; white-space:nowrap; }
.account-summary { border:1px solid var(--line); border-radius:20px; background:#f8fafc; padding:18px; margin:18px 0; }
.account-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.account-head h3 { margin:0 0 4px; }
.account-head p { margin:0; color:var(--muted); word-break:break-word; }
.plan-pill { display:inline-flex; padding:6px 10px; border-radius:999px; background:#e7f0ff; color:#1458b8; font-weight:800; font-size:12px; text-transform:uppercase; }
.quota-meter { margin-top:16px; }
.quota-meter-head { display:flex; justify-content:space-between; gap:10px; font-size:13px; color:var(--muted); }
.quota-track { height:10px; background:#e6eaf0; border-radius:999px; overflow:hidden; margin-top:7px; }
.quota-fill { height:100%; background:var(--blue); border-radius:999px; min-width:0; }
.quota-hint { margin:10px 0 0; color:var(--muted); font-size:12px; line-height:1.4; }
.account-auth { display:grid; gap:14px; margin-top:16px; }
.auth-card { border:1px solid var(--line); border-radius:18px; padding:16px; background:white; }
.auth-card h3 { margin:0 0 12px; }
.form-input { width:100%; border:1.5px solid var(--line); border-radius:14px; padding:14px 15px; background:#fbfcfe; outline:none; font-size:16px; margin:0 0 10px; }
.form-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(23,105,224,.10); }
.auth-card .primary, .auth-card .secondary { margin-top:2px; }
.account-note { margin-top:18px; text-align:left; line-height:1.45; }

/* 0.8.0 — gestion de compte et confidentialité */
.account-copy { margin:0 0 12px; color:var(--muted); line-height:1.45; font-size:.94rem; }
.danger-zone { border-color:#efc3c3; background:#fff8f8; }
.danger-zone h3 { color:#9e2222; }
.danger-button { width:100%; border:0; border-radius:14px; padding:13px 16px; font:inherit; font-weight:700; background:var(--red); color:white; cursor:pointer; }
.danger-button:hover { filter:brightness(.96); }

/* 0.9.3 — plan d'action post-incident */
.emergency-hint { color:var(--muted); font-size:14px; line-height:1.45; margin:14px 0 8px; }
.primary:disabled { opacity:.48; cursor:not-allowed; transform:none !important; }
.emergency-result-head { margin-bottom:14px; }
.emergency-result-head h3 { margin:0 0 6px; font-size:24px; }
.emergency-result-head p { margin:0; color:var(--muted); line-height:1.45; }
.emergency-step.priority { border-color:#f0c36a; background:#fffaf0; }
.emergency-step.urgent { border-color:#e9a0a0; background:#fff3f3; }
.emergency-step.urgent .step-num { background:var(--red); color:white; }
.emergency-step.priority .step-num { background:#fff0ca; color:#8a5a00; }
.official-help { margin-top:18px; padding:16px; border:1px solid var(--line); border-radius:16px; background:#f8fafc; }
.official-help p { color:var(--muted); line-height:1.45; }
.official-links { display:flex; flex-wrap:wrap; gap:10px; }
.official-links a { display:inline-flex; align-items:center; min-height:42px; padding:10px 13px; border-radius:12px; border:1px solid #bfd2ee; background:white; color:var(--blue); font-weight:800; text-decoration:none; }

/* 1.0.0 RC2 — correctif validation e-mail */
.paywall-hero { text-align:center; margin:8px 0 24px; }
.paywall-shield { width:64px; height:70px; color:var(--blue); margin-bottom:8px; }
.eyebrow { margin:0 0 6px; font-size:12px; font-weight:900; letter-spacing:.12em; color:var(--blue); }
.pricing-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:22px 0; }
.price-card { position:relative; border:1.5px solid var(--line); border-radius:22px; padding:20px; background:white; }
.price-card.featured { border-color:var(--blue); box-shadow:0 10px 30px rgba(23,105,224,.12); background:#fbfdff; }
.price-tag { position:absolute; top:-11px; left:16px; padding:5px 9px; border-radius:999px; background:var(--blue); color:white; font-size:11px; font-weight:850; }
.price-card h3 { margin:4px 0 12px; font-size:20px; }
.price-main { display:flex; align-items:baseline; gap:6px; }
.price-main strong { font-size:32px; letter-spacing:-.03em; }
.price-main span { color:var(--muted); font-size:14px; }
.price-equivalent { color:var(--muted); margin:8px 0 4px; font-size:13px; line-height:1.45; }
.price-saving { color:#17653d; background:#edf9f2; border-radius:12px; padding:9px 10px; font-size:13px; font-weight:750; line-height:1.4; }
.subscription-benefits { display:grid; gap:10px; margin:18px 0; }
.subscription-benefits > div { display:flex; gap:10px; align-items:flex-start; padding:11px 12px; border-radius:14px; background:#f8fafc; }
.subscription-benefits .inline-icon { color:var(--green); margin-top:1px; }
.legal-mini { color:var(--muted); font-size:12px; line-height:1.5; margin-top:16px; text-align:center; }
.legal-mini a, .terms-line a, .app-footer a { color:var(--blue); }
.terms-line { display:flex; align-items:flex-start; gap:8px; margin:4px 0 12px; font-size:13px; line-height:1.45; color:var(--muted); }
.terms-line input { margin-top:3px; }
.subscription-account-card { border-color:#cfe0ff; background:#f7faff; }
.app-footer { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; padding:28px 0 10px; color:var(--muted); font-size:12px; }
.app-footer a { text-decoration:none; }
@media (max-width:620px) { .pricing-grid { grid-template-columns:1fr; } .price-card.featured { order:-1; } }

/* Récupération de compte / validation e-mail */
.auth-link { margin-top: 10px; width: 100%; text-align:center; }
.info-box.danger-soft { border-color:#efb1b1; background:#fff4f4; color:#842029; }
.info-box.good a, .info-box.danger-soft a { font-weight:700; }
