/* =====================================================
   LA RUCHE — Styles premium v3
   Street / graffiti / honey luxe
   ===================================================== */

:root {
  --bg: #080503;
  --bg-2: #110A04;
  --surface: #1A1208;
  --surface-2: #251A0C;
  --border: rgba(255, 176, 50, 0.14);
  --border-strong: rgba(255, 176, 50, 0.38);
  --honey: #FFB030;
  --honey-light: #FFD870;
  --honey-dark: #B87814;
  --honey-deep: #D89920;
  --honey-glow: rgba(255, 176, 50, 0.5);
  --text: #FFF8ED;
  --text-muted: #A39683;
  --text-faint: #5C5143;
  --danger: #E85C3B;
  --success: #7FB95A;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(255, 176, 50, 0.22);

  --font-display: 'Bungee', 'Rubik Mono One', Impact, sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
}

/* =============== RESET =============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* =============== FOND HONEYCOMB ORGANIQUE =============== */
.honeycomb-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 176, 50, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 176, 50, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(216, 153, 32, 0.06), transparent 60%),
    var(--bg);
}

/* Hexagones organiques (au lieu du pattern rigide) */
.honeycomb-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'><defs><filter id='b'><feGaussianBlur stdDeviation='0.4'/></filter></defs><g fill='none' stroke='%23FFB030' stroke-width='0.8' filter='url(%23b)'><polygon points='80,40 130,68 130,128 80,156 30,128 30,68' opacity='0.18'/><polygon points='250,110 290,135 290,185 250,210 210,185 210,135' opacity='0.22' transform='rotate(8 250 160)'/><polygon points='420,60 475,92 475,156 420,188 365,156 365,92' opacity='0.12' transform='rotate(-5 420 124)'/><polygon points='150,280 195,305 195,355 150,380 105,355 105,305' opacity='0.2'/><polygon points='350,320 410,355 410,425 350,460 290,425 290,355' opacity='0.1' transform='rotate(12 350 390)'/><polygon points='520,280 560,304 560,352 520,376 480,352 480,304' opacity='0.16' transform='rotate(-8 520 328)'/><polygon points='60,440 100,463 100,509 60,532 20,509 20,463' opacity='0.14'/><polygon points='240,470 280,493 280,539 240,562 200,539 200,493' opacity='0.18' transform='rotate(6 240 516)'/><polygon points='440,490 490,519 490,577 440,606 390,577 390,519' opacity='0.1' transform='rotate(-10 440 548)'/></g></svg>");
  background-size: 600px 600px;
  background-repeat: repeat;
  opacity: 0.85;
  animation: hive-drift 60s linear infinite;
}

/* Taches / splashes de miel */
.honeycomb-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    /* Grosses taches floues */
    radial-gradient(ellipse 180px 140px at 12% 18%, rgba(255, 176, 50, 0.18), transparent 70%),
    radial-gradient(ellipse 120px 90px at 88% 25%, rgba(255, 216, 112, 0.15), transparent 70%),
    radial-gradient(ellipse 220px 160px at 70% 75%, rgba(255, 176, 50, 0.12), transparent 70%),
    radial-gradient(ellipse 150px 110px at 25% 85%, rgba(184, 120, 20, 0.1), transparent 70%),
    radial-gradient(ellipse 100px 80px at 50% 50%, rgba(255, 176, 50, 0.08), transparent 70%);
  animation: shimmer 10s ease-in-out infinite;
}

@keyframes hive-drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, -30px) rotate(0.5deg); }
  100% { transform: translate(0, -60px) rotate(0deg); }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* =============== SPLASHES DÉCORATIFS =============== */
.splashes {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.splash {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0;
  animation: splash-pulse 8s ease-in-out infinite;
}

.splash-1 { top: 10%; left: 5%; width: 280px; height: 280px; background: radial-gradient(circle, var(--honey) 0%, transparent 60%); animation: splash-pulse 8s ease-in-out infinite, splash-drift-1 24s ease-in-out infinite; }
.splash-2 { top: 60%; right: 8%; width: 340px; height: 340px; background: radial-gradient(circle, var(--honey-light) 0%, transparent 60%); animation: splash-pulse 9s ease-in-out infinite 2s, splash-drift-2 28s ease-in-out infinite; }
.splash-3 { bottom: 15%; left: 30%; width: 260px; height: 260px; background: radial-gradient(circle, var(--honey-deep) 0%, transparent 60%); animation: splash-pulse 10s ease-in-out infinite 4s, splash-drift-3 22s ease-in-out infinite; }
.splash-4 { top: 30%; right: 30%; width: 180px; height: 180px; background: radial-gradient(circle, var(--honey) 0%, transparent 60%); animation: splash-pulse 7s ease-in-out infinite 6s, splash-drift-4 26s ease-in-out infinite; }

@keyframes splash-pulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.4; }
}

@keyframes splash-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(0.9); }
  33% { transform: translate(40px, 60px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(1); }
}
@keyframes splash-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -40px) scale(1.15); }
  66% { transform: translate(30px, -20px) scale(0.95); }
}
@keyframes splash-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -50px) scale(1.2); }
}
@keyframes splash-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(0.95); }
  33% { transform: translate(-40px, 40px) scale(1.1); }
  66% { transform: translate(40px, 20px) scale(0.9); }
}

/* =============== PARTICULES =============== */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--honey-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--honey), 0 0 16px var(--honey-glow);
  animation: sparkle linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}

.particle.p-small { width: 2px; height: 2px; box-shadow: 0 0 4px var(--honey), 0 0 8px var(--honey-glow); }
.particle.p-large { width: 5px; height: 5px; box-shadow: 0 0 12px var(--honey-light), 0 0 24px var(--honey); }
.particle.p-glow { background: var(--honey); box-shadow: 0 0 16px var(--honey-light), 0 0 30px var(--honey); }
.particle.p-drift { animation: drift ease-in-out infinite; }
.particle.p-firefly { animation: firefly ease-in-out infinite; width: 3px; height: 3px; }
.particle.p-shooting { animation: shooting linear infinite; width: 3px; height: 3px; }

@keyframes sparkle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  20% { opacity: 1; transform: translate(4px, -8px) scale(1); }
  50% { opacity: 0.9; transform: translate(-2px, -18px) scale(1.3); }
  80% { opacity: 0.6; transform: translate(3px, -28px) scale(0.9); }
  100% { opacity: 0; transform: translate(0, -40px) scale(0.3); }
}

/* Particules qui flottent horizontalement */
@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  50% { opacity: 0.8; transform: translate(40px, -20px); }
  85% { opacity: 0.6; transform: translate(-20px, -40px); }
  100% { opacity: 0; transform: translate(0, -60px); }
}

/* Fireflies qui suivent une courbe */
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  10% { opacity: 1; }
  25% { transform: translate(30px, -15px) scale(1.2); }
  50% { opacity: 0.7; transform: translate(-20px, -35px) scale(1); }
  75% { transform: translate(15px, -55px) scale(1.3); }
  90% { opacity: 0.5; }
  100% { opacity: 0; transform: translate(-10px, -80px) scale(0.5); }
}

/* Étoiles filantes qui traversent */
@keyframes shooting {
  0% { opacity: 0; transform: translate(0, 0); }
  5% { opacity: 1; }
  80% { opacity: 1; transform: translate(200px, 120px); }
  100% { opacity: 0; transform: translate(250px, 150px); }
}

/* Gouttes de miel qui tombent */
.honey-drop {
  position: absolute;
  width: 6px;
  height: 10px;
  background: linear-gradient(180deg, var(--honey-light), var(--honey-deep));
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  filter: drop-shadow(0 0 6px var(--honey)) drop-shadow(0 0 12px var(--honey-glow));
  animation: drop-fall linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}

.honey-drop.drop-lg {
  width: 10px;
  height: 16px;
  filter: drop-shadow(0 0 10px var(--honey-light)) drop-shadow(0 0 20px var(--honey));
}

.honey-drop.drop-xs {
  width: 4px;
  height: 6px;
  filter: drop-shadow(0 0 3px var(--honey));
}

@keyframes drop-fall {
  0% { opacity: 0; transform: translateY(-20px) scale(0.6); }
  10% { opacity: 1; transform: translateY(0) scale(1); }
  90% { opacity: 1; transform: translateY(calc(100vh + 20px)) scale(1); }
  100% { opacity: 0; transform: translateY(calc(100vh + 60px)) scale(0.6); }
}

/* Gouttes de miel statiques qui scintillent sur place */
.honey-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--honey-light), var(--honey) 50%, var(--honey-dark) 90%);
  box-shadow:
    0 0 8px var(--honey-glow),
    0 0 16px rgba(255, 176, 50, 0.3),
    inset 1px 1px 2px rgba(255, 240, 180, 0.6);
  animation: orb-scintillate ease-in-out infinite;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.honey-orb.orb-sm { width: 4px; height: 4px; }
.honey-orb.orb-md { width: 7px; height: 7px; }
.honey-orb.orb-lg { width: 11px; height: 11px; }

@keyframes orb-scintillate {
  0%, 100% {
    opacity: 0;
    transform: scale(0.4);
    filter: brightness(0.8);
  }
  20% {
    opacity: 0.6;
    transform: scale(0.9);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
    filter: brightness(1.4);
  }
  80% {
    opacity: 0.8;
    transform: scale(1);
    filter: brightness(1.1);
  }
}

/* Petits highlights blancs sur les orbes (effet brillance) */
.honey-orb.orb-md::before,
.honey-orb.orb-lg::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 30%;
  height: 30%;
  background: rgba(255, 248, 220, 0.8);
  border-radius: 50%;
  filter: blur(0.5px);
}

/* =============== LAYOUT =============== */
.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============== TYPOGRAPHIE =============== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

h1 { font-size: clamp(1.8rem, 7vw, 3rem); }
h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 4vw, 1.35rem); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--honey);
  margin-bottom: 0.5rem;
}

.text-muted { color: var(--text-muted); }
.text-honey { color: var(--honey); }

/* =============== LOGO =============== */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  user-select: none;
}

.brand-logo {
  filter: drop-shadow(0 0 40px var(--honey-glow)) drop-shadow(0 8px 16px rgba(0,0,0,0.5));
  animation: logo-float 4s ease-in-out infinite;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 40px var(--honey-glow)) drop-shadow(0 8px 16px rgba(0,0,0,0.5)); }
  50% { transform: translateY(-6px); filter: drop-shadow(0 0 60px var(--honey-glow)) drop-shadow(0 16px 24px rgba(0,0,0,0.5)); }
}

.brand-slogan {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--honey-light);
  opacity: 0.9;
  text-shadow: 0 0 20px var(--honey-glow);
}

/* =============== LOGIN PAGE v4 — coulées extraites, adaptif parfait =============== */

/* Cache les décorations globales quand on est sur la page login */
body.login-active .honeycomb-bg,
body.login-active .splashes {
  display: none !important;
}
/* Les particules restent pour le mouvement */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  overflow: hidden;
  background-color: var(--bg);
  /* Empêche le bounce/pull-to-refresh iOS */
  overscroll-behavior: none;
  touch-action: none;
}

/* Motif hexagonal subtil en fond (reproduit celui du BG) */
.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='162' viewBox='0 0 140 162'><g fill='none' stroke='%23E8A530' stroke-width='1' opacity='0.22'><polygon points='70,4 134,40 134,122 70,158 6,122 6,40'/></g></svg>");
  background-size: 140px 162px;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Coulées de miel dans les coins — tailles adaptatives */
.honey-corner {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  display: block;
  user-select: none;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 176, 50, 0.25));
}

.honey-corner-tr {
  top: 0;
  right: 0;
  /* Adaptatif : 200px min, 45% de la largeur viewport, max 420px */
  width: clamp(200px, 45vw, 420px);
  transform-origin: top right;
  animation: honey-sway-tr 6s ease-in-out infinite;
}

.honey-corner-bl {
  bottom: 0;
  left: 0;
  width: clamp(200px, 45vw, 420px);
  transform-origin: bottom left;
  animation: honey-sway-bl 7s ease-in-out infinite;
}

@keyframes honey-sway-tr {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2px, 2px) rotate(0.4deg); }
}
@keyframes honey-sway-bl {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2px, -2px) rotate(-0.4deg); }
}

/* Sur desktop large, les coulées peuvent être plus grandes */
@media (min-width: 1024px) {
  .honey-corner-tr, .honey-corner-bl { width: clamp(300px, 35vw, 520px); }
}

/* Hero : logo + tagline */
.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 20px;
  padding-bottom: 8px;
  min-height: 0;
  position: relative;
  z-index: 4;
}

/* LOGO SANS HALO */
.login-hero .brand-logo {
  position: relative;
  width: min(78vw, 340px);
  max-height: 42vh;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
  animation: logo-float 4s ease-in-out infinite;
}
.login-hero .brand-logo img {
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  display: block;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (min-width: 640px) {
  .login-hero .brand-logo { width: min(55vw, 400px); max-height: 45vh; }
}
@media (min-width: 1024px) {
  .login-hero .brand-logo { width: min(40vw, 460px); }
}

/* Baseline avec abeille */
.brand-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  width: min(85vw, 320px);
}

.tagline-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 50, 0.6), transparent);
}

.tagline-bee {
  width: 22px;
  height: 22px;
  color: var(--honey);
  filter: drop-shadow(0 0 6px var(--honey-glow));
  animation: bee-pulse 2.5s ease-in-out infinite;
}

@keyframes bee-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}

.login-hero .brand-slogan {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--honey-light);
  margin-top: 0.4rem;
  text-shadow: 0 0 20px var(--honey-glow), 0 2px 4px rgba(0,0,0,0.8);
}

@media (min-width: 640px) {
  .login-hero .brand-slogan { font-size: 0.78rem; letter-spacing: 0.4em; }
}

/* Card login */
.login-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-bottom: max(env(safe-area-inset-bottom, 0), 4px);
  position: relative;
  z-index: 5;
  width: 100%;
}

.login-card {
  position: relative;
  background: linear-gradient(145deg, rgba(18, 12, 5, 0.94), rgba(8, 5, 3, 0.97));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.2rem 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(255, 176, 50, 0.12),
    inset 0 1px 0 rgba(255, 176, 50, 0.15);
  animation: card-bounce 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes card-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.login-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--honey-light);
  text-align: center;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 24px var(--honey-glow);
}

.login-card-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 400;
}

.input-wrap {
  position: relative;
  margin-bottom: 0.85rem;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--honey);
  pointer-events: none;
  z-index: 2;
}

.input-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--honey);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}
.input-eye:hover { background: rgba(255, 176, 50, 0.1); }
.input-eye svg { width: 18px; height: 18px; }

.form-input.input-with-icons {
  padding-left: 42px;
  padding-right: 46px;
}

.form-input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  outline: none;
}

.form-input::placeholder { color: var(--text-faint); }

.form-input:focus {
  border-color: var(--honey);
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 176, 50, 0.15);
}

.btn-connect {
  width: 100%;
  padding: 0.95rem 1.4rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: none !important;
  font-size: 0.95rem !important;
}
.btn-connect svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
}
.btn-connect:hover svg { transform: translateX(3px); }

.login-trust {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.login-trust svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--honey);
  margin-top: 2px;
}

.login-trust p {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.login-trust strong {
  color: var(--honey);
  font-weight: 700;
}

.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: center;
  min-height: 0;
  font-weight: 500;
}
.error-message:not(:empty) { min-height: 1.2em; margin-top: 0.6rem; }

.login-tabs, .login-top { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(145deg, var(--honey-light), var(--honey) 50%, var(--honey-dark));
  color: #0A0705;
  box-shadow: 0 6px 20px var(--honey-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-weight: 800;
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(255, 176, 50, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before { left: 100%; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(232, 92, 59, 0.4);
}

.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: center;
  min-height: 1.2em;
  font-weight: 500;
}

/* =============== HEADER (après login) =============== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(8, 5, 3, 0.96), rgba(8, 5, 3, 0.82));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-brand { display: flex; align-items: center; gap: 0.6rem; }

.header-logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 12px var(--honey-glow));
}
.header-logo img { width: 100%; height: 100%; object-fit: contain; }

.header-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--honey-light);
  text-shadow: 0 0 20px var(--honey-glow);
}

.header-actions { display: flex; gap: 0.5rem; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  position: relative;
}
.icon-btn:hover, .icon-btn:active { background: rgba(255, 176, 50, 0.12); border-color: var(--honey); }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--text); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--honey);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--honey-glow);
}

/* =============== MAIN =============== */
main {
  flex: 1;
  padding: 24px 20px 100px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-header { margin-bottom: 1.5rem; text-align: left; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: var(--honey-light);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 30px var(--honey-glow);
}

.page-subtitle {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

/* =============== CATÉGORIES =============== */
.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  will-change: transform;
}

.category-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
  transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.category-card:hover .category-card-bg,
.category-card:active .category-card-bg { transform: scale(1.08); }

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 5, 3, 0.2) 0%, rgba(8, 5, 3, 0.55) 55%, rgba(8, 5, 3, 0.96) 100%);
  z-index: 1;
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, var(--honey-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.category-card:hover::after, .category-card:active::after { opacity: 0.6; }

.category-card-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  color: var(--text);
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.01em;
}

.category-card-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 85%;
}

.category-card-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 176, 50, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.3s;
}

.category-card:hover .category-card-arrow {
  background: var(--honey);
  transform: translateX(4px) rotate(-10deg);
}

.category-card-arrow svg { width: 18px; height: 18px; stroke: var(--honey-light); }
.category-card:hover .category-card-arrow svg { stroke: var(--bg); }

.category-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 176, 50, 0.3), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  z-index: 0;
}

.category-placeholder svg {
  width: 55%;
  height: 55%;
  opacity: 0.2;
}

/* =============== PRODUITS =============== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.4rem 0;
  margin-bottom: 1rem;
  font-weight: 500;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--honey); }
.back-btn svg { width: 16px; height: 16px; stroke: currentColor; }

.products-list { display: flex; flex-direction: column; gap: 1rem; }

.product-card {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card:hover, .product-card:active {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 176, 50, 0.15);
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.product-media img, .product-media video { width: 100%; height: 100%; object-fit: cover; }

.product-media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 176, 50, 0.25), transparent 60%),
    var(--surface-2);
}
.product-media-placeholder svg { width: 35%; height: 35%; opacity: 0.3; }

.product-video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--honey-light);
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.product-info { padding: 1.1rem; }

.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.product-desc {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.product-tiers { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }

.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
}

.tier-row.selected {
  border-color: var(--honey);
  background: rgba(255, 176, 50, 0.1);
  box-shadow: 0 0 0 1px var(--honey), 0 0 20px rgba(255, 176, 50, 0.2);
}

.tier-row:not(.selected):hover { border-color: var(--border-strong); }

.tier-label { font-weight: 500; color: var(--text); font-size: 0.9rem; }
.tier-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--honey-light);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.product-price-single { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1rem; }
.product-price-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--honey-light);
  letter-spacing: 0.01em;
}
.product-stock {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(145deg, var(--honey-light), var(--honey) 50%, var(--honey-dark));
  color: var(--bg);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(255, 176, 50, 0.35);
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn:hover, .add-to-cart-btn:active {
  box-shadow: 0 8px 22px rgba(255, 176, 50, 0.55);
  transform: translateY(-1px);
}

.add-to-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.add-to-cart-btn.added { animation: pulse-gold 0.5s ease; }

@keyframes pulse-gold {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(255, 176, 50, 0.8); }
}

/* =============== PANIER =============== */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  max-height: 85vh;
  max-height: 85dvh;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border-top: 1px solid var(--border-strong);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}
.cart-panel.open { transform: translateY(0); }

.cart-panel::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 176, 50, 0.35);
  border-radius: 100px;
}

.cart-header {
  padding: 1.8rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--honey-light);
  letter-spacing: 0.02em;
}

.cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
}
.cart-close svg { width: 18px; height: 18px; stroke: var(--text); }

.cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.cart-empty svg { width: 72px; height: 72px; opacity: 0.35; margin: 0 auto 1rem; }

.cart-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-image {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.95rem; font-weight: 500; color: var(--text); margin-bottom: 0.15rem; }
.cart-item-tier { font-size: 0.78rem; color: var(--text-muted); }
.cart-item-price {
  font-family: var(--font-display);
  color: var(--honey-light);
  font-size: 1rem;
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

.cart-item-controls { display: flex; align-items: center; gap: 0.4rem; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--honey); color: var(--bg); border-color: var(--honey); }
.qty-value { min-width: 24px; text-align: center; font-weight: 500; }

.cart-item-remove {
  background: none;
  color: var(--danger);
  font-size: 0.75rem;
  padding: 0.25rem 0;
}

.cart-footer {
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
}

.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.cart-total-label { color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.cart-total-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--honey-light);
  letter-spacing: 0.01em;
}

.cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cart-actions-full { grid-template-columns: 1fr; }

.cart-action-btn {
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s;
}

.cart-btn-copy {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.cart-btn-copy:hover, .cart-btn-copy:active { background: rgba(255, 255, 255, 0.12); }
.cart-btn-copy.copied {
  background: var(--success);
  color: var(--bg);
  border-color: var(--success);
}

.cart-btn-send {
  background: linear-gradient(145deg, var(--honey-light), var(--honey) 50%, var(--honey-dark));
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(255, 176, 50, 0.4);
}
.cart-btn-send:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 176, 50, 0.55); }

/* =============== TOAST =============== */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 176, 50, 0.15);
  animation: toast-in 0.3s ease-out;
  max-width: 90vw;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}
.toast.toast-success { border-color: var(--success); color: var(--success); }
.toast.toast-error { border-color: var(--danger); color: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============== ANIMATIONS =============== */
.fade-in {
  animation: fade-up 0.6s cubic-bezier(0.2, 0, 0.2, 1) backwards;
}

.fade-in-stagger > * {
  animation: fade-up 0.7s cubic-bezier(0.2, 0, 0.2, 1) backwards;
}
.fade-in-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.fade-in-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.fade-in-stagger > *:nth-child(3) { animation-delay: 0.25s; }
.fade-in-stagger > *:nth-child(4) { animation-delay: 0.35s; }
.fade-in-stagger > *:nth-child(5) { animation-delay: 0.45s; }
.fade-in-stagger > *:nth-child(6) { animation-delay: 0.55s; }
.fade-in-stagger > *:nth-child(n+7) { animation-delay: 0.65s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============== LOADER =============== */
.loader {
  width: 40px; height: 40px;
  margin: 3rem auto;
  position: relative;
}
.loader::before, .loader::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--honey);
  animation: spin 1s linear infinite;
}
.loader::after { border-top-color: var(--honey-light); animation-duration: 1.5s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============== RESPONSIVE =============== */
@media (min-width: 640px) {
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 960px) {
  main { max-width: 900px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .honeycomb-bg::before, .honeycomb-bg::after, .login-card::before { animation: none; }
}
