:root {
  --ink: #12343b;
  --muted: #5f7579;
  --sea: #0b4f6c;
  --lagoon: #20b2aa;
  --coral: #ff6b4a;
  --coral-dark: #e85433;
  --sun: #ffc857;
  --sand: #fbf6ee;
  --card: #ffffff;
  --line: #e6ddd0;
  --ok: #1d8a5b;
  --warn: #b7791f;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(18, 52, 59, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--sea); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.container { padding-top: 32px; padding-bottom: 48px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 14px; }
mark { background: #fff1b8; padding: 0 4px; border-radius: 4px; }

/* En-tête */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--sea); text-decoration: none; display: flex; gap: 8px; align-items: center; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; display: block; }
nav { display: flex; gap: 18px; align-items: center; }
nav a { text-decoration: none; font-weight: 600; }

/* Boutons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 700;
  background: var(--coral); color: #fff; padding: 12px 20px; border-radius: 12px; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn.btn-big { padding: 15px 26px; font-size: 1.05rem; }
.btn.btn-small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn.btn-ghost { background: transparent; color: var(--sea); box-shadow: inset 0 0 0 2px var(--sea); }
.btn.btn-ghost:hover { background: var(--sea); color: #fff; }
.btn.btn-danger { background: #c0392b; }
.btn.btn-danger:hover { background: #a93226; }
.btn.btn-danger-ghost { background: transparent; color: #c0392b; }
.btn.btn-danger-ghost:hover { background: #fdecea; }
button.link { background: none; border: 0; color: var(--sea); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* Formulaires */
input, select {
  font: inherit; width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px rgba(32, 178, 170, .2); }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }

/* Cartes & messages */
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.narrow { max-width: 560px; margin: 24px auto; }
.big-emoji { font-size: 3rem; }
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 20px; font-weight: 500; }
.flash-ok { background: #e3f6ec; color: #135c3c; }
.flash-warn { background: #fff4dc; color: #7a5410; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #e9eef0; font-size: .8rem; font-weight: 700; }
.badge-premium { background: linear-gradient(90deg, var(--sun), #ffad5a); color: #5a3a00; }

/* Accueil */
.hero { background: linear-gradient(160deg, #0b4f6c 0%, #137a8a 55%, #20b2aa 100%); color: #fff; padding: 64px 0 80px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; opacity: .85; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: 16px; }
.hl { color: var(--sun); }
.lead { font-size: 1.15rem; opacity: .95; max-width: 34em; }
.hero-form { display: flex; gap: 10px; margin-top: 24px; max-width: 520px; }
.hero-form input { border: 0; padding: 15px 16px; }
.hero-form .btn { white-space: nowrap; }
.hero-note { font-size: .9rem; opacity: .85; margin-top: 10px; }
.hero-visual { position: relative; min-height: 280px; }
.mock-mail { position: relative; z-index: 2; background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); transform: rotate(-2deg); max-width: 340px; margin: 20px auto 0; }
.mock-top { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.mock-route { font-weight: 800; font-size: 1.15rem; }
.mock-price { font-size: 2.2rem; font-weight: 800; color: var(--coral); }
.drop { font-size: 1rem; background: #e3f6ec; color: var(--ok); padding: 2px 8px; border-radius: 8px; vertical-align: middle; }
.mock-meta { color: var(--muted); font-size: .9rem; }
.mock-badge { margin-top: 12px; background: #fff4dc; color: #7a5410; font-size: .85rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.sun { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--sun); right: 0; top: -10px; opacity: .9; z-index: 1; }
.wave { position: absolute; left: -40%; right: -40%; bottom: -60px; height: 120px; background: rgba(255, 255, 255, .12); border-radius: 50%; }

.section { padding-top: 56px; }
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.route-card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.route-name { font-weight: 700; }
.arrow { color: var(--lagoon); }
.route-price strong { color: var(--coral); font-size: 1.15rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--lagoon); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step p { margin: 0; color: var(--muted); }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 820px; }
.plan { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; border: 2px solid transparent; }
.plan-premium { border-color: var(--coral); }
.plan-tag { position: absolute; top: -13px; left: 24px; background: var(--coral); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-price { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.plan-price span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan ul { padding-left: 20px; margin: 0 0 20px; }
.plan li { margin-bottom: 6px; }
.faq details { background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }
.cta-end { text-align: center; padding-bottom: 64px; }

/* Tableau de bord */
.dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.dash-head h1 { margin: 0; }
.alert-form { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; align-items: end; }
.alerts { display: grid; gap: 16px; margin-bottom: 28px; }
.alert-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 12px; border-left: 5px solid var(--lagoon); }
.alert-card.inactive { opacity: .6; border-left-color: #c9c2b6; }
.alert-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.alert-route { font-size: 1.2rem; font-weight: 800; }
.alert-right { text-align: right; }
.alert-price { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.alert-price.under { color: var(--ok); }
.alert-price.over { color: var(--ink); }
.alert-price.pending { color: var(--muted); }
.alert-history { background: var(--sand); border-radius: 12px; padding: 12px 14px; }
.alert-history.locked { display: grid; place-items: center; min-height: 70px; background: repeating-linear-gradient(135deg, #f3ede3, #f3ede3 10px, #f8f3ea 10px, #f8f3ea 20px); color: var(--muted); font-weight: 600; font-size: .92rem; text-align: center; }
.spark { width: 100%; height: 56px; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--sea); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.spark-budget { stroke: var(--coral); stroke-dasharray: 5 4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--coral); }
.spark-legend { display: flex; justify-content: space-between; margin-top: 4px; }
.budget-key { color: var(--coral); }
.insight { margin-top: 8px; font-size: .92rem; padding: 6px 10px; border-radius: 8px; }
.insight-great, .insight-good { background: #e3f6ec; color: #135c3c; }
.insight-normal { background: #eef3f4; }
.insight-high { background: #fff4dc; color: #7a5410; }
.alert-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.push { margin-left: auto; }
.upsell { background: linear-gradient(135deg, var(--sea), #137a8a); color: #fff; border-radius: var(--radius); padding: 28px; display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.upsell p { margin: 0; opacity: .92; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.stat-v { font-size: 1.6rem; font-weight: 800; color: var(--sea); }
.stat-l { color: var(--muted); font-size: .88rem; }
.progress { appearance: none; width: 100%; height: 14px; border: 0; background: #eee6da; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress::-webkit-progress-bar { background: #eee6da; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--lagoon), var(--coral)); }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--lagoon), var(--coral)); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

/* Pied de page */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px; font-size: .92rem; }
.footer-links { display: flex; gap: 18px; margin: 8px 0; }

/* Mobile */
@media (max-width: 860px) {
  .hero-grid, .pricing, .steps { grid-template-columns: 1fr; }
  .routes { grid-template-columns: 1fr 1fr; }
  .alert-form { grid-template-columns: 1fr 1fr; }
  .alert-form .btn { grid-column: 1 / -1; }
  .upsell { flex-direction: column; align-items: flex-start; }
  .hero { padding: 40px 0 56px; }
  .hero-visual { min-height: 220px; }
}
@media (max-width: 520px) {
  .hero-form { flex-direction: column; }
  .routes { grid-template-columns: 1fr; }
  .alert-form { grid-template-columns: 1fr; }
  .alert-head { flex-direction: column; }
  .alert-right { text-align: left; }
  nav { gap: 12px; }
  nav a:not(.btn) { display: none; }
  nav a[href="/dashboard"] { display: inline; }
}

/* Case de renonciation au droit de rétractation */
.checkout-form { display: grid; gap: 10px; justify-items: start; max-width: 420px; }
.account .checkout-form { margin-bottom: 8px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .85rem; line-height: 1.4; }
label.check input { margin-top: 3px; flex: none; width: auto; }
.upsell label.check a { color: #fff; }

/* ---- Parcours client : alerte depuis l'accueil, raccourcis, code ---- */
.hero-grid { align-items: start; }
.hero-card { background: #fff; color: var(--ink); border-radius: 20px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .22); }
.hero-card h2 { font-size: 1.25rem; margin: 0 0 12px; }
.hero-card .hero-note { color: var(--muted); opacity: 1; }
.hero-card .hero-note a { color: var(--sea); }
.quick-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-form .span-all { grid-column: 1 / -1; }
.quick-form label { font-size: .85rem; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: #eef7f6; color: var(--sea); font-weight: 600; font-size: .85rem; text-decoration: none; border: 1px solid transparent; }
.chip:hover { border-color: var(--lagoon); }
.chip-on { background: var(--lagoon); color: #fff; }
a.route-card { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.route-card:hover, a.route-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(18, 52, 59, .14); }
.route-cta { color: var(--coral); font-weight: 700; margin-top: 6px; }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.lead-dark { color: var(--muted); font-size: 1.05rem; }
.code-form { display: flex; gap: 10px; justify-content: center; margin: 12px auto 16px; max-width: 320px; }
.code-form input { text-align: center; font-size: 1.5rem; letter-spacing: .3em; font-weight: 700; }
.alert-actions a.btn { text-decoration: none; }
@media (max-width: 860px) {
  .example { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .quick-form { grid-template-columns: 1fr; }
  .hero-card { padding: 18px; border-radius: 16px; }
  .hero h1 { font-size: 1.9rem; }
}
.example .hero-visual { overflow: hidden; border-radius: 20px; background: linear-gradient(160deg, #0b4f6c, #20b2aa); padding: 10px 0 30px; }
html, body { overflow-x: hidden; }
@media (max-width: 520px) {
  .quick-form label:nth-of-type(3), .quick-form label:nth-of-type(4) { grid-column: span 1; }
  .quick-form { grid-template-columns: 1fr 1fr; }
  .quick-form label:nth-of-type(1), .quick-form label:nth-of-type(2), .quick-form label:nth-of-type(5) { grid-column: 1 / -1; }
}
.hint { margin: -4px 0 0; font-size: .82rem; color: var(--muted); background: #f4faf9; border-radius: 10px; padding: 8px 10px; }

/* Mobile : le formulaire d'alerte visible sans faire défiler */
@media (max-width: 520px) {
  .hero { padding: 20px 0 40px; }
  .hero .eyebrow, .hero .lead { display: none; }
  .hero h1 { font-size: 1.6rem; margin-bottom: 14px; }
}

/* Notifications push */
.push-card .row { gap: 10px; flex-wrap: wrap; }
.push-card .push-status { margin: 0 0 12px; }
