/* ==========================================================================
   Étude Tacos & Hygiène — Design System
   Inspiré des codes visuels de Transit App : nav en pilule flottante,
   badges "ligne" arrondis pour chaque ingrédient, cartes nettes sur fond
   clair, une touche de couleur par catégorie (tacos / hygiène / verrouillé).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink: #14171a;
  --ink-soft: #565c66;
  --muted: #8b909b;
  --bg: #ffffff;
  --surface: #f4f5f7;
  --surface-2: #eceef2;
  --border: #e4e7ec;

  --tacos: #ff5a36;
  --tacos-soft: #ffe6de;
  --hygiene: #00b8a9;
  --hygiene-soft: #d9f7f3;
  --lock: #6c5ce7;
  --lock-soft: #ece9fd;
  --ok: #22c55e;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(20, 23, 26, 0.04), 0 8px 24px -12px rgba(20, 23, 26, 0.12);
  --shadow-nav: 0 4px 18px -6px rgba(20, 23, 26, 0.18);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--lock);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- Nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--tacos), var(--hygiene));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.nav-pills {
  display: flex;
  gap: 6px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.nav-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-pill:hover { color: var(--ink); }
.nav-pill.active { background: var(--ink); color: #fff; }
.nav-cta {
  background: var(--tacos);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-nav);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Hero */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--tacos-soft);
  color: #c23e1e;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  max-width: 820px;
}
.hero h1 .accent { color: var(--tacos); }
.hero-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.55;
}
.hero-stats {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-stat {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-width: 140px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
}
.hero-stat .label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------------------------------------------------------------- Sections */
.section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.section-tag .dot { width: 8px; height: 8px; border-radius: 50%; }
.section h2 { font-size: 26px; font-weight: 800; }
.section-desc { color: var(--ink-soft); font-size: 15px; max-width: 560px; margin-top: 6px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.card .card-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.card canvas { max-height: 260px; }

/* ---------------------------------------------------------------- Line pills (signature element) */
.line-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.line-pill .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.line-pill .count { color: var(--muted); font-weight: 600; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Locked section */
.section-locked { background: var(--surface); }
.lock-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.lock-blur {
  filter: blur(7px);
  opacity: 0.5;
  pointer-events: none;
  padding: 22px;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.35);
}
.lock-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lock-soft);
  color: var(--lock);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.lock-overlay h3 { font-size: 18px; }
.lock-overlay p { color: var(--ink-soft); font-size: 14px; max-width: 320px; }
.btn-unlock {
  margin-top: 4px;
  background: var(--lock);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn-unlock:hover { transform: translateY(-1px); }

/* ---------------------------------------------------------------- Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 26, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px -20px rgba(20, 23, 26, 0.4);
}
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal p { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.modal .err { color: var(--tacos); font-size: 13px; margin-top: 8px; min-height: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------------------------------------------------------------- Form elements */
input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
input:focus, select:focus { border-color: var(--tacos); outline: none; }
label.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.field { margin-bottom: 18px; }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.btn-primary {
  background: var(--tacos);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------- Footer */
.footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .nav-pills { display: none; }
  .hero { padding: 40px 0 28px; }
  .section { padding: 40px 0; }
}
