/* Barrel · barrelsurf.app — une seule feuille, sans dépendance. Mode sombre automatique. */

:root {
  /* Charte Vagues */
  --q-flat: #C7D0D4;
  --q-nul: #FF3B5C;
  --q-moyen: #FF8A00;
  --q-bon: #FFD60A;
  --q-tresbon: #A3E635;
  --q-epic: #22C55E;
  /* Accents */
  --pink: #FF2D95;
  --violet: #A855F7;
  /* Océan (icône de l'app) */
  --ocean-1: #3FD9E8;
  --ocean-2: #1FA2DB;
  --ocean-3: #0E5A8A;
  --sand: #FFF6E6;

  --bg: #FFF8EC;
  --bg-2: #F3FBFD;
  --text: #0B2A45;
  --text-soft: #3F5A70;
  --on-ocean: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 50px -18px rgba(11, 42, 69, 0.35);
  --hero-grad: linear-gradient(180deg, #52DEEB 0%, #23B4E0 45%, #1784C7 78%, #0E5A8A 100%);
  --radius: 28px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071A2C;
    --bg-2: #0A2136;
    --text: #EAF6FF;
    --text-soft: #A9C2D6;
    --glass: rgba(20, 44, 68, 0.58);
    --glass-strong: rgba(18, 40, 62, 0.86);
    --glass-line: rgba(255, 255, 255, 0.14);
    --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
    --hero-grad: linear-gradient(180deg, #0F4E73 0%, #0B3A5C 45%, #082A45 78%, #071A2C 100%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0; }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--glass-strong); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 12px; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ---------- Barre du haut ---------- */
.topbar {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 22px;
  width: min(1100px, calc(100% - 32px)); padding: 8px 10px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.topbar.scrolled { background: var(--glass-strong); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.25rem; }
.topbar:not(.scrolled) .brand { color: var(--on-ocean); text-shadow: 0 1px 8px rgba(0, 40, 80, 0.3); }
.brand img { border-radius: 50%; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; }
.topbar nav a {
  text-decoration: none; font-weight: 800; font-size: 0.95rem; padding: 8px 14px; border-radius: 999px;
  transition: background 0.2s ease;
}
.topbar:not(.scrolled) nav a { color: var(--on-ocean); }
.topbar nav a:hover { background: rgba(255, 255, 255, 0.25); }
@media (max-width: 560px) { .topbar nav { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--hero-grad);
  color: var(--on-ocean);
  padding: calc(96px + env(safe-area-inset-top)) 16px 120px;
}
.hero-inner {
  position: relative; z-index: 4;
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-logo {
  width: 96px; height: 96px; border-radius: 50%;
  box-shadow: 0 14px 30px -10px rgba(0, 30, 60, 0.55), 0 0 0 5px rgba(255, 255, 255, 0.55);
}
.hero h1 { font-size: clamp(3.4rem, 9vw, 6rem); text-shadow: 0 4px 24px rgba(0, 40, 80, 0.25); }
.tagline { font-size: clamp(1.5rem, 3.6vw, 2.25rem); font-weight: 900; line-height: 1.15; max-width: 16ch; }
.sub { font-size: 1.12rem; font-weight: 700; opacity: 0.95; max-width: 34ch; }

.cta-wrap { position: relative; z-index: 6; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; border: 0;
  padding: 16px 28px; border-radius: 999px; font-size: 1.15rem; color: #fff;
  transition: transform 0.35s var(--spring), box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 14px 30px -10px rgba(168, 85, 247, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  position: relative; overflow: hidden;
}
.btn-primary::after { /* reflet glossy */
  content: ""; position: absolute; inset: 2px 12% 50% 12%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(0.96); }
.btn-small { padding: 12px 18px; font-size: 1rem; background: linear-gradient(135deg, var(--pink), var(--violet)); }

.promises { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.promises li {
  font-size: 0.9rem; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Bulle du bouton */
.dl-pop {
  position: absolute; top: calc(100% + 14px); left: 0; z-index: 10;
  width: min(360px, calc(100vw - 32px)); padding: 20px; border-radius: 26px;
  color: var(--text); background: color-mix(in srgb, var(--bg) 95%, transparent);
  transform-origin: 30px -10px;
  animation: popIn 0.55s var(--spring);
}
.dl-pop::before { /* pointe */
  content: ""; position: absolute; top: -8px; left: 38px; width: 16px; height: 16px; transform: rotate(45deg);
  background: inherit; border-left: 1px solid var(--glass-line); border-top: 1px solid var(--glass-line);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.dl-pop[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: scale(0.6) translateY(-10px); } to { opacity: 1; transform: none; } }
.pop-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(127, 127, 127, 0.15); color: var(--text); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.pv { display: none; }
.dl-pop[data-device="ios"] .pv-ios,
.dl-pop[data-device="android"] .pv-android,
.dl-pop[data-device="desktop"] .pv-desktop { display: block; }
.pop-title { font-weight: 900; font-size: 1.2rem; padding-right: 36px; }
.pop-text { margin-top: 6px; color: var(--text-soft); }
.pop-hint { margin-top: 10px; font-size: 0.85rem; color: var(--text-soft); }
.notify { display: flex; gap: 8px; margin-top: 14px; }
.notify input {
  flex: 1; min-width: 0; font: inherit; font-weight: 700; color: var(--text);
  padding: 12px 14px; border-radius: 999px; border: 1.5px solid rgba(127, 127, 127, 0.3); background: var(--bg);
}
.notify input:focus { outline: none; border-color: var(--pink); }
.notify input[aria-invalid="true"] { border-color: var(--q-nul); }
.pv-android .btn { margin-top: 14px; }

.qr-row { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.qr { width: 132px; height: 132px; border-radius: 14px; flex: none; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.35); }
.badges { display: flex; flex-direction: column; gap: 10px; }
.badge {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: #0B0F17; color: #fff; padding: 8px 14px 8px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.2);
}
.badge span { display: flex; flex-direction: column; line-height: 1.1; }
.badge small { font-size: 0.68rem; font-weight: 700; opacity: 0.8; }
.badge b { font-size: 1.05rem; font-weight: 900; }
.badge-muted { opacity: 0.72; }

/* Message contextuel (invitation line-up, spot, référencement) */
.context {
  color: var(--text); background: var(--glass-strong);
  padding: 16px 18px; border-radius: 22px; max-width: 460px;
  display: grid; gap: 8px; animation: popIn 0.6s var(--spring) both 0.15s;
}
.context[hidden] { display: none; }
.context strong { font-size: 1.15rem; font-weight: 900; }
.context p { color: var(--text-soft); }
.code-chip {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  font: inherit; font-weight: 900; font-size: 1.35rem; letter-spacing: 0.14em; color: var(--text);
  padding: 8px 10px 8px 16px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.14), rgba(168, 85, 247, 0.16));
  border: 1.5px dashed rgba(168, 85, 247, 0.6);
}
.code-chip span { font-size: 0.8rem; letter-spacing: 0; padding: 4px 10px; border-radius: 999px; background: var(--violet); color: #fff; }
.context .open-app { font-weight: 800; color: var(--violet); }

/* Visuel du hero */
.hero-visual { position: relative; justify-self: center; }
.mascot {
  position: absolute; width: 118px; height: auto; left: -70px; bottom: 30px;
  filter: drop-shadow(0 12px 16px rgba(0, 30, 60, 0.35));
  animation: bob 2.8s ease-in-out infinite;
  cursor: pointer;
}
.mascot.jump { animation: jump 0.7s var(--spring); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes jump { 40% { transform: translateY(-46px) rotate(-8deg) scale(1.05); } }

/* ---------- Téléphone en CSS ---------- */
.phone {
  position: relative; flex: none;
  width: 280px; aspect-ratio: 600 / 1305; padding: 9px;
  border-radius: 48px;
  background: linear-gradient(145deg, #2A2F3A, #0B0D12 60%, #20242E);
  box-shadow: 0 40px 80px -30px rgba(0, 20, 45, 0.7), 0 0 0 1.5px rgba(255, 255, 255, 0.14) inset, 0 0 0 3px #3A404C;
}
.phone::before, .phone::after { /* boutons latéraux */
  content: ""; position: absolute; width: 4px; border-radius: 3px; background: #3A404C;
}
.phone::before { left: -4px; top: 22%; height: 60px; }
.phone::after { right: -4px; top: 28%; height: 84px; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 40px; background: #0B2A45; }
.phone-hero { width: 300px; transform: rotate(3deg); }

/* ---------- Bulles glossy ---------- */
.bubble, .dot {
  --c: var(--q-flat);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.9) 0 9%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 50% 60%, var(--c) 0 58%, color-mix(in srgb, var(--c) 72%, #000) 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 26px 4px color-mix(in srgb, var(--c) 60%, transparent);
}
.q-flat { --c: var(--q-flat); }
.q-nul { --c: var(--q-nul); }
.q-moyen { --c: var(--q-moyen); }
.q-bon { --c: var(--q-bon); }
.q-tresbon { --c: var(--q-tresbon); }
.q-epic { --c: var(--q-epic); }

.bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; animation: float 7s ease-in-out infinite, halo 2.6s ease-in-out infinite; }
.b1 { width: 74px; height: 74px; right: 6%; top: 18%; }
.b2 { width: 44px; height: 44px; right: 38%; top: 12%; animation-delay: -2s, -1s; }
.b3 { width: 56px; height: 56px; left: 4%; bottom: 20%; animation-delay: -4s, -0.5s; }
.b4 { width: 30px; height: 30px; left: 44%; bottom: 14%; animation-delay: -1s, -1.8s; }
.b5 { width: 24px; height: 24px; right: 12%; bottom: 22%; animation-delay: -3s, -0.2s; }
.b6 { width: 34px; height: 34px; left: 30%; bottom: 9%; animation-delay: -5s, -1.2s; }
.b7 { width: 22px; height: 22px; right: 2%; top: 52%; animation-delay: -6s, -2.1s; }
@keyframes float { 50% { transform: translate(8px, -18px); } }
@keyframes halo {
  50% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 44px 12px color-mix(in srgb, var(--c) 70%, transparent); }
}

.wave-divider { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; z-index: 3; }
.wave-divider path { fill: var(--bg); }

/* ---------- Blocs ---------- */
.feature {
  max-width: 1000px; margin: 0 auto; padding: 72px 16px;
  display: flex; align-items: center; justify-content: center; gap: 64px;
}
.feature-alt { flex-direction: row-reverse; }
.feature-text { max-width: 420px; display: grid; gap: 12px; }
.kicker {
  justify-self: start; font-weight: 900; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 6px 12px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet));
}
.feature h2 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.feature-text > p:not(.kicker) { font-size: 1.15rem; color: var(--text-soft); }
.legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.legend li { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.dot { width: 22px; height: 22px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 12px 1px color-mix(in srgb, var(--c) 60%, transparent); }

/* ---------- Commerces ---------- */
.shops {
  padding: 56px 16px 96px;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(255, 45, 149, 0.16), transparent 70%),
    radial-gradient(600px 300px at 85% 80%, rgba(63, 217, 232, 0.25), transparent 70%);
}
.shops-card {
  max-width: 760px; margin: 0 auto; padding: 40px 32px; border-radius: 36px; text-align: center;
  display: grid; justify-items: center; gap: 16px;
}
.shops-emoji { display: flex; gap: 10px; font-size: 2.2rem; }
.shops-emoji span { animation: bob 3s ease-in-out infinite; }
.shops-emoji span:nth-child(2) { animation-delay: -1s; }
.shops-emoji span:nth-child(3) { animation-delay: -2s; }
.shops h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); max-width: 22ch; }
.shops p { color: var(--text-soft); font-size: 1.1rem; }
.shops-alt a { font-weight: 900; color: var(--violet); }

/* ---------- Pied de page ---------- */
.footer {
  text-align: center; padding: 40px 16px calc(40px + env(safe-area-inset-bottom));
  background: var(--bg-2); color: var(--text-soft); display: grid; justify-items: center; gap: 12px;
}
.footer-mascot { width: 60px; height: auto; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer a { font-weight: 800; color: var(--text); text-decoration: none; }
.footer a:hover { color: var(--pink); }
.copy { font-size: 0.9rem; }

/* ---------- Apparitions en ressort (JS seulement) ---------- */
.js .reveal .phone, .js .reveal .feature-text, .js .reveal .shops-card {
  opacity: 0; transform: translateY(56px) scale(0.94);
  transition: transform 1s var(--spring), opacity 0.6s ease;
}
.js .reveal .feature-text { transition-delay: 0.08s; }
.js .reveal.in .phone, .js .reveal.in .feature-text, .js .reveal.in .shops-card { opacity: 1; transform: none; }
.js .reveal.in .phone { transform: rotate(-2deg); }
.js .reveal.feature-alt.in .phone { transform: rotate(2deg); }

.js .pop { animation: popIn 0.8s var(--spring) both; }
.js .hero-text .pop:nth-child(2) { animation-delay: 0.05s; }
.js .hero-text .pop:nth-child(3) { animation-delay: 0.12s; }
.js .hero-text .pop:nth-child(4) { animation-delay: 0.19s; }
.js .hero-text .pop:nth-child(5) { animation-delay: 0.26s; }
.js .hero-text .pop:nth-child(6) { animation-delay: 0.33s; }
.js .hero-text .pop:nth-child(7) { animation-delay: 0.4s; }
.js .hero-visual.pop { animation-delay: 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding-bottom: 110px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-text { align-items: center; }
  .tagline, .sub { margin-inline: auto; }
  .promises { justify-content: center; }
  .dl-pop { left: 50%; transform: translateX(-50%); animation: popInC 0.55s var(--spring); }
  .dl-pop::before { left: calc(50% - 8px); }
  .mascot { left: -56px; width: 96px; }
  .phone-hero { width: 260px; }
  .b1 { width: 50px; height: 50px; top: 60%; right: 5%; }
  .b2 { width: 32px; height: 32px; top: 9%; right: auto; left: 8%; }
  .b3 { bottom: 12%; }
  .b6 { top: 34%; bottom: auto; left: 4%; width: 26px; height: 26px; }
  .feature, .feature-alt { flex-direction: column; gap: 36px; padding: 56px 16px; text-align: center; }
  .feature-text { justify-items: center; }
  .kicker { justify-self: center; }
  .legend { justify-content: center; }
  .phone { width: 250px; border-radius: 44px; }
  .phone img { border-radius: 36px; }
}
@keyframes popInC { from { opacity: 0; transform: translateX(-50%) scale(0.6); } to { opacity: 1; transform: translateX(-50%); } }
@media (max-width: 400px) {
  .phone-hero { width: 230px; }
  .mascot { left: -40px; width: 80px; bottom: 10px; }
  .shops-card { padding: 32px 20px; }
  .qr-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal .phone, .js .reveal .feature-text, .js .reveal .shops-card { opacity: 1; transform: none; }
}

/* ---------- Pages légales ---------- */
.legal-page .topbar { background: var(--glass-strong); box-shadow: var(--shadow); }
.legal-page .topbar .brand, .legal-page .topbar nav a { color: var(--text); text-shadow: none; }
.legal-hero {
  background: var(--hero-grad); color: #fff; padding: calc(110px + env(safe-area-inset-top)) 16px 90px; position: relative; text-align: center;
}
.legal-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.legal-hero p { margin-top: 8px; opacity: 0.9; }
.legal {
  max-width: 760px; margin: -40px auto 64px; padding: 36px 32px; border-radius: 32px; position: relative; z-index: 4;
  background: var(--glass-strong);
}
.legal h2 { font-size: 1.45rem; margin: 30px 0 10px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-soft); font-weight: 600; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 1.2em; margin: 8px 0; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); font-weight: 800; }
.legal a { color: var(--violet); font-weight: 800; }
.todo { background: #FFD60A; color: #0B2A45; font-weight: 900; padding: 1px 6px; border-radius: 6px; }
.legal .updated { font-size: 0.9rem; margin-top: 28px; }
@media (max-width: 560px) { .legal { padding: 28px 20px; margin-inline: 12px; } }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 16px; background: var(--hero-grad); color: #fff; }
.notfound h1 { font-size: clamp(2.4rem, 8vw, 4rem); }
.notfound img { width: 120px; animation: bob 2.8s ease-in-out infinite; }
