/* ===== Design tokens =====
   Palette : Ink #12181B (fond sombre) · Paper #F6F4EF (fond clair chaud)
   Signal (teal) #1F6F6B · Escalade (amber) #E8963C · Slate #5B6B70 · Line #DAD6CC
   Display : "Space Grotesk" · Body : "Inter" · Utilitaire : "IBM Plex Mono"
   Signature : le flux "message → ticket tamponné" dans le hero. */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --ink: #12181b;
  --paper: #f6f4ef;
  --signal: #1f6f6b;
  --signal-dark: #16514e;
  --escalade: #e8963c;
  --slate: #5b6b70;
  --line: #dad6cc;
  --white: #ffffff;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 10px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--slate); }
a { color: var(--signal-dark); }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-dark);
  display: inline-block;
  margin-bottom: 14px;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(18,24,27,.25); }
.btn-signal { background: var(--signal); color: var(--white); }
.btn-signal:hover { box-shadow: 0 6px 18px rgba(31,111,107,.3); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(246,244,239,.9); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.nav-logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--escalade); display: inline-block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--signal-dark); }

/* Hero */
.hero { padding: 88px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-lede { font-size: 1.1rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-note { font-family: var(--font-mono); font-size: .78rem; color: var(--slate); margin-top: 14px; }

/* Signature : bande message -> ticket tamponné */
.ticket-strip {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; box-shadow: 0 20px 50px rgba(18,24,27,.08);
}
.ticket-strip .msg {
  font-family: var(--font-mono); font-size: .82rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
  animation: slideIn .6s ease both;
}
.ticket-strip .msg:nth-child(2) { animation-delay: .15s; }
.ticket-strip .stamp {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; margin-top: 4px;
  animation: stampIn .35s ease .9s both;
}
.stamp-resolu { background: rgba(31,111,107,.12); color: var(--signal-dark); }
.stamp-escalade { background: rgba(232,150,60,.16); color: #9a5f16; }

@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes stampIn { from { opacity: 0; transform: scale(.8) rotate(-6deg); } to { opacity: 1; transform: scale(1) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) {
  .ticket-strip .msg, .ticket-strip .stamp { animation: none; }
}

/* Sections génériques */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }

/* Étapes numérotées (vraie séquence : configurer -> installer -> automatiser) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { border-left: 2px solid var(--line); padding-left: 20px; position: relative; }
.step .num {
  font-family: var(--font-mono); font-size: .78rem; color: var(--escalade); font-weight: 600;
  display: block; margin-bottom: 10px;
}

/* Tarifs */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 30px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--signal); box-shadow: 0 12px 30px rgba(31,111,107,.14); }
.plan .price { font-family: var(--font-display); font-size: 2.2rem; margin: 10px 0 4px; }
.plan .price span { font-family: var(--font-body); font-size: .95rem; color: var(--slate); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0; flex: 1; }
.plan li { padding: 7px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.plan li:first-child { border-top: none; }
.badge-featured { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--signal-dark); margin-bottom: 6px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer p { margin: 0; font-size: .85rem; }

/* Formulaires (signup / login) */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 34px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem; background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.form-error { background: rgba(232,150,60,.14); color: #9a5f16; border-radius: 8px; padding: 10px 12px; font-size: .85rem; margin-bottom: 16px; }
.form-success { background: rgba(31,111,107,.12); color: var(--signal-dark); border-radius: 8px; padding: 10px 12px; font-size: .85rem; margin-bottom: 16px; }

/* Dashboard */
.dash-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--ink); color: var(--white); padding: 24px 18px; }
.dash-sidebar .nav-logo { color: var(--white); margin-bottom: 30px; }
.dash-nav a {
  display: block; color: rgba(255,255,255,.72); text-decoration: none; padding: 10px 12px;
  border-radius: 8px; font-size: .9rem; margin-bottom: 4px;
}
.dash-nav a.active, .dash-nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.dash-main { padding: 32px 40px; max-width: 900px; }
.dash-panel { display: none; }
.dash-panel.active { display: block; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .value { font-family: var(--font-display); font-size: 1.7rem; }
.stat .label { font-family: var(--font-mono); font-size: .72rem; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; }
.code-box {
  background: var(--ink); color: #d7f2ef; font-family: var(--font-mono); font-size: .8rem;
  padding: 16px; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.faq-row { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; background: var(--white); }
.faq-row input, .faq-row textarea { width: 100%; margin-top: 6px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-body); }
.ticket-row { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: var(--white); }
.ticket-row .meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .74rem; color: var(--slate); margin-bottom: 8px; }
.pill { padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pill-ouvert { background: rgba(232,150,60,.16); color: #9a5f16; }
.pill-traite { background: rgba(31,111,107,.12); color: var(--signal-dark); }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .steps, .pricing-grid, .stat-row { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: flex; overflow-x: auto; padding: 14px; }
  .dash-nav { display: flex; gap: 6px; }
  .dash-main { padding: 24px; }
}

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
