/* ============================================================
   BarDraft — vitrine
   ============================================================ */

:root {
  --accent: #f1554c;
  --accent-soft: #ff9d8a;
  --bg: #0a0d15;
  --bg2: #0c1019;
  --card: #11161f;
  --line: rgba(255, 255, 255, .07);
  --soft: rgba(255, 255, 255, .05);
  --text: #eef1f6;
  --muted: #9aa3b2;
  --muted-2: #7e879a;
  --headerbg: rgba(10, 13, 21, .88);
  --shadow: 0 40px 80px -20px rgba(0, 0, 0, .7);
  --icon-bg: rgba(255, 255, 255, .05);
  --r: 6px;
  --maxw: 1200px;
  --header-h: 66px;
}

html[data-theme="light"] {
  --bg: #f4f5f8;
  --bg2: #eceef3;
  --card: #ffffff;
  --line: rgba(15, 23, 42, .10);
  --soft: rgba(15, 23, 42, .04);
  --text: #1a2030;
  --muted: #5d6678;
  --muted-2: #6b7488;
  --headerbg: rgba(244, 245, 248, .92);
  --shadow: 0 30px 60px -25px rgba(20, 25, 40, .22);
  --icon-bg: rgba(15, 23, 42, .04);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
::selection { background: rgba(241, 85, 76, .3); }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

h1, h2, h3 { font-family: 'Sora', system-ui, sans-serif; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Scroll offset pour le header sticky */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 28px);
  padding-right: clamp(16px, 4vw, 28px);
}
.accent { color: var(--accent); }

/* ---------- Focus accessible ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ---------- Ambient glow ---------- */
.ambient {
  position: fixed; top: -260px; right: -200px; width: 680px; height: 680px;
  border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(20px);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--r); font-weight: 600; text-decoration: none;
  font-size: 15px; padding: 14px 24px; border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 65%, var(--accent-soft)));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 34%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 42%, transparent); }
.btn-ghost {
  color: var(--text); background: var(--soft); border-color: var(--line);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(1.4);
  background-color: var(--headerbg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-soft)));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent);
  flex-shrink: 0;
}
.brand-mark.sm { width: 30px; height: 30px; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-name.sm { font-size: 16px; }

/* Nav desktop */
.nav {
  display: flex; align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
}
.nav > a:not(.btn) {
  color: var(--muted); font-size: 15px; font-weight: 500;
  transition: color .15s ease;
}
.nav > a:not(.btn):hover { color: var(--text); }

/* Header controls (theme + hamburger) */
.header-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.theme-btn {
  width: 38px; height: 38px; border-radius: var(--r);
  border: none; background: var(--soft); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s;
}
.theme-btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--soft)); }

/* Hamburger */
.menu-toggle {
  display: none;
  width: 38px; height: 38px; border-radius: var(--r);
  border: none; background: var(--soft); color: var(--text);
  align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.menu-toggle:hover { background: color-mix(in srgb, var(--accent) 12%, var(--soft)); }

.menu-toggle .icon-open,
.menu-toggle .icon-close { display: flex; align-items: center; justify-content: center; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(36px, 5vw, 56px); align-items: center;
  padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 6vw, 64px);
}
.hero-copy { min-width: 0; animation: floatIn .7s ease both; }
.hero-visual { min-width: 0; position: relative; animation: floatIn .9s ease both; }

.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 24px;
  background: var(--soft); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.pill-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}

.hero h1 { font-weight: 800; font-size: clamp(30px, 5vw, 54px); line-height: 1.06; margin-bottom: 22px; }
.lead { font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65; color: var(--muted); max-width: 480px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 38px; }

.stats { display: flex; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap; align-items: center; }
.stat-num { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 26px; }
.stat-label { font-size: 13px; color: var(--muted-2); font-weight: 500; }
.divider { width: 1px; align-self: stretch; min-height: 34px; background: var(--line); }

/* ---------- Browser mockup ---------- */
.visual-glow {
  position: absolute; inset: -22px; border-radius: 24px; z-index: -1; filter: blur(28px);
  background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%);
}
.browser {
  border-radius: var(--r); overflow: hidden; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.browser-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.tl { width: 11px; height: 11px; border-radius: 50%; }
.tl-r { background: #ff5f57; } .tl-y { background: #febc2e; } .tl-g { background: #28c840; }
.url {
  flex: 1; margin-left: 10px; padding: 5px 14px; border-radius: var(--r);
  background: var(--bg); color: var(--muted-2); font-size: 12px; text-align: center;
}

/* ---------- Sections ---------- */
.section {
  padding-top: clamp(56px, 7vw, 72px);
  padding-bottom: clamp(56px, 7vw, 72px);
  position: relative; z-index: 1;
}
.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 44px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; margin-bottom: clamp(40px, 5vw, 52px); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-head h2 { font-weight: 700; font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin-bottom: 16px; }
.section-head p { font-size: clamp(15px, 1.8vw, 17px); line-height: 1.6; color: var(--muted); }

/* ---------- Cards & grids ---------- */
.card { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-features { grid-template-columns: repeat(3, 1fr); }
.grid-roles { grid-template-columns: repeat(5, 1fr); }

.feature { transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.feature.highlight {
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--card)), var(--card));
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  background: var(--icon-bg); border: 1px solid var(--line); color: var(--accent);
  flex-shrink: 0;
}
.feature-icon.accent-icon { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.feature h3 { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Roles ---------- */
.roles-section { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.role-tag {
  display: inline-flex; padding: 5px 11px; border-radius: var(--r); margin-bottom: 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.role h3 { font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.role p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.role-client { color: #a78bfa; background: rgba(139, 92, 246, .16); }
.role-barman { color: #60a5fa; background: rgba(59, 130, 246, .16); }
.role-mod    { color: #fbbf24; background: rgba(245, 158, 11, .16); }
.role-modbar { color: #5eead4; background: rgba(20, 184, 166, .16); }
.role-admin  { color: #fff; background: color-mix(in srgb, var(--accent) 30%, transparent); }
html[data-theme="light"] .role-admin { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- Allergènes ---------- */
.grid-allerg { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(32px, 5vw, 52px); align-items: center; }
.grid-allerg .eyebrow { margin-bottom: 14px; }
.grid-allerg h2 { font-weight: 700; font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin-bottom: 16px; }
.lead-sm { font-size: clamp(15px, 1.8vw, 17px); line-height: 1.65; color: var(--muted); margin-bottom: 18px; }
.muted-sm { font-size: 14px; line-height: 1.6; color: var(--muted-2); }
.allerg-card { padding: clamp(20px, 3vw, 32px); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card)); }
.allerg-title { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.allerg-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.allerg-pill {
  display: inline-flex; align-items: center; padding: 8px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #a78bfa;
  background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .32);
}
.allerg-note { display: flex; align-items: flex-start; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.allerg-note svg { flex-shrink: 0; margin-top: 2px; }
.allerg-note p { font-size: 13px; line-height: 1.55; color: var(--muted-2); }

/* ---------- Banner (pour qui) ---------- */
.banner {
  border-radius: var(--r); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--bg2));
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; align-items: center;
}
.banner h2 { font-weight: 700; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.14; margin-bottom: 16px; }
.banner-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--text); font-weight: 500; }
.banner-logo { display: flex; align-items: center; justify-content: center; }
.logo-tile {
  width: 130px; height: 130px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-soft)));
  box-shadow: 0 24px 60px color-mix(in srgb, var(--accent) 36%, transparent);
}

/* ---------- CTA ---------- */
.cta {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto; text-align: center;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 28px) clamp(72px, 9vw, 100px);
}
.cta h2 { font-weight: 700; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; margin-bottom: 18px; }
.cta p { font-size: clamp(15px, 1.8vw, 18px); line-height: 1.6; color: var(--muted); max-width: 520px; margin: 0 auto 32px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px;
}
.footer-tag { color: var(--muted-2); font-size: 14px; margin-left: 6px; }
.footer-meta { color: var(--muted-2); font-size: 13px; }

/* ---------- Animations ---------- */
@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-copy, .hero-visual { animation: none; }
  .nav { transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .grid-features { grid-template-columns: repeat(3, 1fr); }
  .grid-roles { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE — Mobile nav (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--headerbg);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 16px;
    /* Hidden state */
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
  }

  .nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }

  .nav > a:not(.btn) {
    padding: 13px clamp(16px, 4vw, 28px);
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }

  .nav > a:not(.btn):last-of-type { border-bottom: none; }

  .nav > .btn {
    margin: 12px clamp(16px, 4vw, 28px) 0;
    justify-content: center;
  }

  .grid-features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-roles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============================================================
   RESPONSIVE — Small mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  .card { padding: 14px 12px; }

  .feature-icon { width: 36px; height: 36px; margin-bottom: 12px; }
  .feature-icon svg { width: 18px; height: 18px; }
  .feature h3 { font-size: 13px; margin-bottom: 6px; }
  .feature p { font-size: 12px; line-height: 1.5; }

  .role h3 { font-size: 14px; margin-bottom: 6px; }
  .role p { font-size: 12px; line-height: 1.5; }
  .role-tag { font-size: 10px; padding: 4px 8px; margin-bottom: 10px; }

  .stats { gap: 14px; }
  .divider { display: none; }

  .hero-actions { gap: 10px; }
  .hero-actions .btn { font-size: 14px; padding: 12px 18px; }

  .logo-tile { width: 100px; height: 100px; }
  .logo-tile svg { width: 56px; height: 56px; }

  .banner-logo { display: none; }
}
