/* ============================================================
   Calendar Tracker — feuille de style du site vitrine
   Palette : bleu nuit (fond), crème (texte), rouge pompier (actions)
   ============================================================ */

:root {
  --background: oklch(0.182 0.041 258);
  --foreground: oklch(0.965 0.015 86);
  --card: oklch(0.218 0.043 257);
  --primary: oklch(0.637 0.235 25.3);
  --primary-foreground: oklch(0.985 0.002 247);
  --muted-foreground: oklch(0.72 0.022 254);
  --accent: oklch(0.31 0.04 252);
  --border: oklch(0.35 0.034 253 / 65%);
  --input: oklch(0.35 0.034 253);
  --ring: oklch(0.637 0.235 25.3);
  --brand-deep: oklch(0.16 0.038 258);
  --brand-panel: oklch(0.22 0.043 257);
  --brand-elevated: oklch(0.265 0.043 254);
  --brand-line: oklch(0.4 0.035 252 / 70%);
  --brand-cream: oklch(0.93 0.025 83);
  --success: oklch(0.73 0.13 167);
  --radius: 0.375rem;
  --shadow-action: 0 10px 30px color-mix(in oklab, var(--primary) 24%, transparent);
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, opacity 180ms ease; }
::selection { background: var(--primary); color: var(--primary-foreground); }

.container { width: min(100% - 2.5rem, 80rem); margin-inline: auto; }
.muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.tabular { font-variant-numeric: tabular-nums; }

.eyebrow {
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn svg { width: 1rem; height: 1rem; flex: none; }
.btn-lg { height: 2.5rem; padding-inline: 2rem; }
.btn-xl { height: 3rem; padding-inline: 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-action { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); box-shadow: var(--shadow-action); }
.btn-action:hover { background: color-mix(in oklab, var(--primary) 88%, transparent); }
.btn-quiet { background: var(--brand-panel); color: var(--foreground); border-color: var(--brand-line); }
.btn-quiet:hover { background: var(--accent); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--input); }
.btn-outline:hover { background: var(--accent); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; height: 4.5rem; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--brand-line);
  background: var(--brand-panel);
  color: var(--brand-cream);
  clip-path: polygon(50% 0, 94% 17%, 86% 78%, 50% 100%, 14% 78%, 6% 17%);
}
.brand-mark svg { width: 1.25rem; height: 1.25rem; }
.brand-mark .tick {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  display: grid;
  place-items: center;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
}
.brand-mark .tick svg { width: 0.625rem; height: 0.625rem; }
.brand-name { display: block; font-size: 1rem; font-weight: 600; color: var(--foreground); line-height: 1; }
.brand-sub { display: block; margin-top: 0.25rem; font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-foreground); }

.nav { display: none; align-items: center; gap: 1.75rem; }
.nav-link { color: var(--muted-foreground); font-size: 0.875rem; font-weight: 500; }
.nav-link:hover { color: var(--foreground); }
.nav-link.is-active { color: var(--foreground); }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: 0;
  color: var(--foreground);
  cursor: pointer;
}
.menu-toggle svg { width: 1.25rem; height: 1.25rem; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--background); padding: 1.25rem 1.25rem; }
.mobile-nav.is-open { display: block; }
.mobile-nav-inner { max-width: 80rem; margin-inline: auto; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-link { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--border); color: var(--foreground); font-weight: 500; }
.mobile-nav .btn { margin-top: 1rem; }

@media (min-width: 1024px) {
  .nav { display: flex; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Blocs de titre ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  background: var(--brand-deep);
  overflow: hidden;
}
.hero-grid { display: grid; gap: 2.5rem; padding-block: 4rem; align-items: end; }
.hero-grid h1 {
  margin: 1.25rem 0 0;
  max-width: 56rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero-grid .lead { margin-top: 1.5rem; max-width: 42rem; font-size: 1.125rem; line-height: 1.75; color: var(--muted-foreground); }
.hero-home { gap: 3rem; }
.hero-home h1 {
  margin-top: 2rem;
  max-width: 48rem;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.02;
}
.hero-home .lead { margin-top: 1.75rem; max-width: 36rem; line-height: 2rem; }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-fine { margin-top: 1rem; font-size: 0.75rem; color: var(--muted-foreground); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--brand-line);
  background: var(--brand-panel);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.badge .dot { width: 0.375rem; height: 0.375rem; background: var(--primary); }

@media (min-width: 768px) { .hero-grid { padding-block: 6rem; } }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 0.8fr; }
  .hero-home { grid-template-columns: 1fr 0.9fr; align-items: center; }
}

.section { padding-block: 5rem; }
.section-tight { padding-block: 3rem; }
.band { border-block: 1px solid var(--border); background: var(--brand-panel); }
.band-deep { border-block: 1px solid var(--border); background: var(--brand-deep); }
.surface { background: color-mix(in oklab, var(--background) 96%, transparent); }

.section-head { max-width: 48rem; }
.section-head h2, .plain-h2 {
  margin: 1rem 0 0;
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
}
.section-head p { margin-top: 1rem; font-size: 1rem; line-height: 1.75; color: var(--muted-foreground); }

@media (min-width: 768px) { .section { padding-block: 7rem; } }

/* ---------- Grilles de cases ---------- */
.grid-cards {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
  margin-top: 3rem;
}
.card { background: var(--card); padding: 1.75rem; }
.card .num { font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.card h3 { margin: 2rem 0 0; font-size: 1.25rem; font-weight: 600; }
.card p { margin: 0.75rem 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground); }
.card .icon { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.card .icon-row { display: flex; align-items: center; justify-content: space-between; }
.card .icon-row .idx { font-size: 0.75rem; color: var(--muted-foreground); }
.card h2 { margin: 2.5rem 0 0; font-size: 1.25rem; font-weight: 600; }

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 3rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.tile { border-top: 2px solid var(--brand-line); padding-top: 1.5rem; }
.tile svg { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.tile h3 { margin: 1.25rem 0 0; font-size: 1rem; font-weight: 600; }
.tile p { margin: 0.5rem 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground); }

.steps-band { display: grid; gap: 2rem; }
.step { border-left: 1px solid var(--brand-line); padding-left: 1.25rem; }
.step p.label { margin: 0; }
.step p.title { margin: 0.75rem 0 0; font-size: 1.125rem; font-weight: 500; }
@media (min-width: 768px) { .steps-band { grid-template-columns: repeat(3, 1fr); } }

.shield-note {
  margin-top: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--brand-line);
  background: var(--brand-panel);
  padding: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.shield-note svg { width: 1.25rem; height: 1.25rem; color: var(--success); flex: none; }

/* ---------- Panneau visuel ---------- */
.panel {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
}
.visual { padding: 1rem; box-shadow: 0 25px 50px -12px var(--brand-deep); }
.visual-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.visual-head .k { font-size: 0.75rem; color: var(--muted-foreground); margin: 0; }
.visual-head .v { margin: 0.25rem 0 0; font-weight: 600; }
.chip { border: 1px solid var(--brand-line); background: var(--brand-elevated); padding: 0.25rem 0.625rem; font-size: 0.75rem; color: var(--muted-foreground); }
.visual-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding-block: 1rem; }
.stat { border: 1px solid var(--border); background: var(--brand-deep); padding: 1rem; }
.stat .k { margin: 0; font-size: 11px; color: var(--muted-foreground); }
.stat .v { margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 600; }
.bar { margin-top: 0.75rem; height: 0.25rem; background: var(--brand-elevated); }
.bar i { display: block; height: 100%; background: var(--primary); }
.bar.green i { background: var(--success); }
.row {
  display: grid;
  grid-template-columns: 48px 22px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-block: 0.75rem;
  font-size: 0.75rem;
}
.row .time { color: var(--muted-foreground); }
.row .mark { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; }
.row .mark.done { background: var(--success); color: var(--brand-deep); }
.row .mark.now { background: var(--primary); color: var(--primary-foreground); }
.row .mark.next { border: 1px solid var(--brand-line); color: var(--muted-foreground); }
.row .mark svg { width: 0.75rem; height: 0.75rem; }
.row .mark.next svg { width: 0.5rem; height: 0.5rem; }
.row .street { color: var(--foreground); }
.row .status { color: var(--muted-foreground); }

/* ---------- Listes de contrôle ---------- */
.checklist { display: grid; gap: 0.75rem; padding: 0; margin: 0; list-style: none; }
.checklist li { display: flex; gap: 0.75rem; font-size: 0.875rem; line-height: 1.5; }
.checklist svg { width: 1.25rem; height: 1.25rem; color: var(--success); flex: none; margin-top: 0.125rem; }

/* ---------- Tarifs ---------- */
.plans { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan { padding: 1.75rem; }
.plan .price { margin: 1.25rem 0 0; font-size: 2.25rem; font-weight: 600; }
.plan .price span { font-size: 1rem; font-weight: 400; color: var(--muted-foreground); }
.plan .note { margin: 0.5rem 0 0; color: var(--muted-foreground); }
.plan hr { border: 0; border-top: 1px solid var(--border); margin-block: 1.75rem; }
.plan-featured { border-color: color-mix(in oklab, var(--primary) 60%, transparent); }
.plan .btn { margin-top: 2rem; }

.calc { padding: 1.5rem; margin-top: 2rem; }
.calc-head { display: flex; flex-direction: column; gap: 1.25rem; }
.calc-head h2 { margin: 0.75rem 0 0; font-size: 1.5rem; font-weight: 600; }
.calc-controls { display: flex; align-items: center; gap: 0.5rem; }
.calc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius);
  background: var(--brand-panel); border: 1px solid var(--brand-line);
  color: var(--foreground); cursor: pointer;
}
.calc-btn:hover { background: var(--accent); }
.calc-btn svg { width: 1rem; height: 1rem; }
.calc-input {
  height: 2.5rem; width: 8rem; text-align: center; font-weight: 600;
  border: 1px solid var(--input); background: var(--brand-deep);
  color: var(--foreground); font-family: inherit; outline: none;
}
.calc-input:focus { border-color: var(--ring); }
.calc-range { width: 100%; margin-top: 2rem; accent-color: var(--primary); }
.calc-scale { display: flex; justify-content: space-between; margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.calc-results { display: grid; gap: 1px; border: 1px solid var(--border); background: var(--border); margin-top: 2rem; }
@media (min-width: 768px) {
  .calc-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .calc-results { grid-template-columns: repeat(2, 1fr); }
}
.calc-cell { background: var(--brand-deep); padding: 1.5rem; }
.calc-cell .k { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }
.calc-cell .v { margin: 0.75rem 0 0; font-size: 1.875rem; font-weight: 600; }
.calc-cell .v span { font-size: 0.875rem; font-weight: 400; color: var(--muted-foreground); }
.calc-cell .f { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--muted-foreground); }
.calc-foot { margin: 1.25rem 0 0; font-size: 0.75rem; line-height: 1.25rem; color: var(--muted-foreground); }

.faq { max-width: 48rem; margin: 5rem auto 0; }
.faq-list { margin-top: 2rem; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); padding-block: 1.5rem; }
.faq-item h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.faq-item p { margin: 0.5rem 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground); }

/* ---------- Guide ---------- */
.steps { max-width: 56rem; margin-inline: auto; }
.guide-step { display: grid; gap: 1rem; border-top: 1px solid var(--border); padding-block: 2.25rem; }
@media (min-width: 640px) { .guide-step { grid-template-columns: 80px 1fr; } }
.guide-step .n { font-size: 1.875rem; font-weight: 600; color: var(--primary); }
.guide-step h2 { margin: 0; font-size: 1.5rem; font-weight: 600; }
.guide-step p { margin: 0.75rem 0 0; line-height: 1.75; color: var(--muted-foreground); }

/* ---------- Bandeau d'appel ---------- */
.trial { display: flex; flex-direction: column; gap: 1.75rem; padding-block: 3rem; }
.trial h2 { margin: 0.75rem 0 0; font-size: 1.875rem; font-weight: 600; }
.trial p.sub { margin: 0.75rem 0 0; color: var(--muted-foreground); }
.trial-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 768px) {
  .trial { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 0.55fr 1fr; } }
.contact-side h2 { margin: 0; font-size: 1.5rem; font-weight: 600; }
.contact-side p { margin-top: 1rem; line-height: 1.75; color: var(--muted-foreground); }
.contact-mail { margin-top: 1.75rem; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--foreground); }
.contact-mail:hover { color: var(--primary); }
.contact-mail svg { width: 1rem; height: 1rem; }

.form { padding: 1.5rem; }
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.field { display: block; font-size: 0.875rem; font-weight: 500; }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 0.5rem;
  border: 1px solid var(--input); background: var(--brand-deep);
  color: var(--foreground); font-family: inherit; font-size: 0.9375rem;
  padding: 0.75rem 1rem; outline: none; border-radius: 0;
}
.field input { height: 3rem; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ring); }
.field::placeholder { color: var(--muted-foreground); }
.form-foot { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .form-foot { flex-direction: row; align-items: center; justify-content: space-between; } }
.form-foot p { margin: 0; max-width: 28rem; font-size: 0.75rem; line-height: 1.25rem; color: var(--muted-foreground); }
.hp { position: absolute; left: -9999px; }
.form-note { display: none; margin-top: 1rem; font-size: 0.875rem; color: var(--primary); }

/* ---------- Pages légales ---------- */
.legal { max-width: 48rem; color: var(--muted-foreground); line-height: 1.75; }
.legal h2 { color: var(--foreground); font-size: 1.35rem; font-weight: 600; margin: 2.25rem 0 0.75rem; }
.legal h3 { color: var(--foreground); font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.legal p { margin: 0 0 1rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 1rem; }
.legal a { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.legal-disclaimer {
  margin-top: 2.5rem; max-width: 48rem;
  border-left: 2px solid var(--primary); padding-left: 1rem;
  font-size: 0.75rem; line-height: 1.25rem; color: var(--muted-foreground);
}

/* ---------- À propos ---------- */
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
.about-grid h2 { margin: 0; font-size: 1.875rem; font-weight: 600; }
.about-grid p.lead { margin-top: 1.25rem; line-height: 1.75; color: var(--muted-foreground); }
.tiles { display: grid; gap: 1px; border: 1px solid var(--border); background: var(--border); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile-box { background: var(--card); padding: 1.5rem; }
.tile-box h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.tile-box p { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted-foreground); }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--brand-deep); }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-about p { margin: 1.25rem 0 0; max-width: 24rem; font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground); }
.footer-mail { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--foreground); }
.footer-mail:hover { color: var(--primary); }
.footer-mail svg { width: 1rem; height: 1rem; }
.footer-title { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--foreground); }
.footer-links { margin-top: 1rem; display: grid; gap: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-links a:hover { color: var(--foreground); }
.footer-links .app-link { display: inline-flex; align-items: center; gap: 0.25rem; }
.footer-links .app-link svg { width: 0.875rem; height: 0.875rem; }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 0.5rem; padding-block: 1.25rem;
  font-size: 0.75rem; color: var(--muted-foreground);
}
@media (min-width: 640px) { .footer-bottom-inner { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- Visuel d'aperçu ---------- */
.spotlight { display: grid; gap: 2rem; }
@media (min-width: 768px) { .spotlight { grid-template-columns: 0.7fr 1fr; align-items: center; } }
.spotlight h2 { margin: 0.75rem 0 0; font-size: 1.875rem; font-weight: 600; }
.spotlight p { margin-top: 1rem; line-height: 1.75; color: var(--muted-foreground); }
.spotlight img { width: 100%; border: 1px solid var(--brand-line); }

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  main > section:first-child > div { animation: rise 500ms ease-out both; }
}
