/* =============================================================
   GOURMET REVIENT — PREMIUM BRANDING SYSTEM
   Identité Visuelle Haut de Gamme (Or / Crème / Chocolat)
   ============================================================= */

/* ---------- Premium Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,700&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ---------- Premium CSS Variables Override ---------- */
:root {
  /* — New Luxury Palette — */
  --gold: #C5A55A;
  --gold-light: #D4BA7A;
  --gold-dark: #A6883E;
  --gold-glow: rgba(197, 165, 90, 0.25);
  --gold-shimmer: linear-gradient(135deg, #C5A55A 0%, #E8D5A3 40%, #C5A55A 60%, #A6883E 100%);

  --chocolate: #3C1F0E;
  --chocolate-medium: #5C3A1E;
  --chocolate-light: #8B5E3C;
  --chocolate-milk: #A0714F;

  --cream: #FDF6E3;
  --cream-warm: #FAF0D7;
  --cream-deep: #F5E6C8;
  --vanilla: #FFFDF7;

  --caramel: #D4840A;
  --caramel-light: #E6A540;
  --praline: #C47A3F;

  /* — Override accent colors — */
  --accent: var(--gold);
  --accent-light: var(--gold-light);
  --accent-dark: var(--gold-dark);
  --accent-glow: var(--gold-glow);

  /* — Override surfaces — */
  --bg: var(--cream);
  --bg-alt: var(--cream-warm);
  --surface: #FFFFFF;
  --surface-hover: var(--vanilla);
  --surface-border: rgba(60, 31, 14, 0.08);
  --surface-shadow: rgba(60, 31, 14, 0.06);

  /* — Override text — */
  --primary: var(--chocolate);
  --primary-light: var(--chocolate-medium);
  --primary-dark: #2A1508;
  --text: var(--chocolate);
  --text-secondary: var(--chocolate-light);
  --text-muted: var(--chocolate-milk);

  /* — Premium typography — */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-elegant: 'Cormorant Garamond', 'Georgia', serif;

  /* — Premium shadows (Soft Warm Shadows) — */
  --shadow-sm: 0 4px 15px rgba(60, 31, 14, 0.03), 0 1px 3px rgba(197, 165, 90, 0.05);
  --shadow: 0 10px 40px rgba(60, 31, 14, 0.05), 0 2px 8px rgba(197, 165, 90, 0.08);
  --shadow-md: 0 20px 60px rgba(60, 31, 14, 0.07), 0 5px 15px rgba(197, 165, 90, 0.12);
  --shadow-lg: 0 40px 100px rgba(60, 31, 14, 0.09), 0 10px 30px rgba(197, 165, 90, 0.15);
  --shadow-accent: 0 15px 45px rgba(197, 165, 90, 0.3);
  --shadow-gold: 0 8px 30px rgba(197, 165, 90, 0.25);
  --shadow-chocolate: 0 8px 30px rgba(60, 31, 14, 0.12);
  --shadow-premium: 0 40px 100px rgba(60, 31, 14, 0.08), 0 0 0 1px rgba(197, 165, 90, 0.15);
}

/* ---------- Dark Mode Premium Override ---------- */
.dark-theme {
  --gold: #D4BA7A;
  --gold-light: #E8D5A3;
  --gold-dark: #C5A55A;
  --gold-glow: rgba(212, 186, 122, 0.15);
  --gold-shimmer: linear-gradient(135deg, #D4BA7A 0%, #E8D5A3 40%, #D4BA7A 60%, #C5A55A 100%);

  --chocolate: #F5E6C8;
  --chocolate-medium: #D4C4A0;
  --chocolate-light: #B8A88A;
  --chocolate-milk: #8B7B64;

  --cream: #1A1410;
  --cream-warm: #1E1812;
  --cream-deep: #252018;
  --vanilla: #1C1610;

  --bg: #1A1410;
  --bg-alt: #1E1812;
  --surface: #252018;
  --surface-hover: #2C2520;
  --surface-border: rgba(212, 186, 122, 0.1);
  --surface-shadow: rgba(0, 0, 0, 0.4);

  --primary: #F5E6C8;
  --primary-light: #D4C4A0;
  --primary-dark: #FFFDF7;
  --text: #F5E6C8;
  --text-secondary: #D4C4A0;
  --text-muted: #8B7B64;

  --bg-card: #252018;
  --surface-glass: rgba(30, 24, 18, 0.85);
  --surface-border-glass: rgba(212, 186, 122, 0.08);

  /* — Premium shadows (Soft Warm Shadows - Dark Mode) — */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(212, 186, 122, 0.03);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(212, 186, 122, 0.05);
  --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.6), 0 5px 15px rgba(212, 186, 122, 0.08);
  --shadow-lg: 0 40px 100px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(212, 186, 122, 0.1);
  --shadow-accent: 0 15px 45px rgba(212, 186, 122, 0.15);
  --shadow-gold: 0 8px 30px rgba(212, 186, 122, 0.15);
  --shadow-chocolate: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-premium: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 186, 122, 0.1);
}

/* ============================================================= */
/* PREMIUM SPLASH SCREEN (Loading Animation with Whisk)          */
/* ============================================================= */

#premiumSplash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #2A1508 0%, #3C1F0E 35%, #4A2815 65%, #2A1508 100%);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#premiumSplash.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Floating particles (cream/gold) */
.splash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 4s ease-in-out infinite;
}

.splash-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 3.5s; }
.splash-particle:nth-child(2) { left: 25%; animation-delay: 0.5s; animation-duration: 4s; }
.splash-particle:nth-child(3) { left: 40%; animation-delay: 1s; animation-duration: 3.2s; }
.splash-particle:nth-child(4) { left: 55%; animation-delay: 0.3s; animation-duration: 4.5s; }
.splash-particle:nth-child(5) { left: 70%; animation-delay: 0.8s; animation-duration: 3.8s; }
.splash-particle:nth-child(6) { left: 85%; animation-delay: 1.2s; animation-duration: 3.3s; }
.splash-particle:nth-child(7) { left: 15%; animation-delay: 0.6s; animation-duration: 4.2s; width: 4px; height: 4px; }
.splash-particle:nth-child(8) { left: 60%; animation-delay: 1.5s; animation-duration: 3.6s; width: 8px; height: 8px; }

@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* Whisk SVG Animation */
.splash-whisk {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  animation: whiskSpin 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(197, 165, 90, 0.4));
}

@keyframes whiskSpin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.05); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-15deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Logo text in splash */
.splash-logo-text {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gold-shimmer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
  animation: splashLogoIn 1s ease-out 0.3s both;
}

.splash-tagline {
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(197, 165, 90, 0.6);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: splashLogoIn 1s ease-out 0.6s both;
}

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

/* Progress bar */
.splash-progress {
  width: 200px;
  height: 3px;
  background: rgba(197, 165, 90, 0.15);
  border-radius: 3px;
  margin-top: 2.5rem;
  overflow: hidden;
  animation: splashLogoIn 1s ease-out 0.8s both;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold-shimmer);
  border-radius: 3px;
  animation: splashProgressFill 2.5s ease-in-out 0.5s both;
}

@keyframes splashProgressFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ============================================================= */
/* PREMIUM HEADER BRANDING                                       */
/* ============================================================= */

.header-brand h1 {
  font-family: var(--font-display) !important;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.header-brand h1 span {
  background: var(--gold-shimmer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

.header-brand .logo-icon {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  box-shadow: var(--shadow-gold) !important;
  border: 1px solid rgba(197, 165, 90, 0.3);
}

/* Premium glow on header */
.app-header {
  border-bottom: 1px solid rgba(197, 165, 90, 0.12) !important;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.4;
}

/* ============================================================= */
/* PREMIUM HEADINGS                                              */
/* ============================================================= */

h1, h2, h3 {
  font-family: var(--font-display) !important;
}

.hero h2 {
  font-family: var(--font-display) !important;
  font-weight: 900;
}

.hero h2 .accent {
  background: var(--gold-shimmer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badge {
  background: var(--gold-glow) !important;
  color: var(--gold-dark) !important;
  border: 1px solid rgba(197, 165, 90, 0.2);
}

/* ============================================================= */
/* PREMIUM BUTTONS                                               */
/* ============================================================= */

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  box-shadow: var(--shadow-gold) !important;
  color: var(--chocolate) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(197, 165, 90, 0.3);
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary:hover {
  box-shadow: 0 12px 35px rgba(197, 165, 90, 0.35) !important;
  transform: translateY(-2px);
}

/* ============================================================= */
/* PREMIUM CARDS                                                 */
/* ============================================================= */

.card, .cockpit-card, .mgmt-glass-card {
  border: 1px solid rgba(197, 165, 90, 0.08) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover, .cockpit-card:hover {
  border-color: rgba(197, 165, 90, 0.15) !important;
  box-shadow: var(--shadow-premium) !important;
}

/* Gold accent line on cards */
.cockpit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gold-shimmer);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.4s, width 0.4s;
}

.cockpit-card:hover::before {
  opacity: 1;
  width: 60px;
}

/* ============================================================= */
/* AUTH SCREEN PREMIUM                                           */
/* ============================================================= */

.auth-overlay {
  background: linear-gradient(160deg, rgba(42, 21, 8, 0.92) 0%, rgba(60, 31, 14, 0.88) 50%, rgba(42, 21, 8, 0.92) 100%) !important;
  backdrop-filter: blur(24px) !important;
}

.auth-card {
  border: 1px solid rgba(197, 165, 90, 0.15) !important;
  box-shadow: var(--shadow-premium), 0 0 80px rgba(197, 165, 90, 0.08) !important;
}

.auth-card h2 {
  font-family: var(--font-display) !important;
}

.auth-logo {
  filter: drop-shadow(0 4px 20px rgba(197, 165, 90, 0.3));
}

.auth-tab.active {
  color: var(--gold) !important;
}

/* ============================================================= */
/* STEP INDICATOR PREMIUM                                        */
/* ============================================================= */

.step-dot.active .dot {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 4px 20px rgba(197, 165, 90, 0.35) !important;
}

.step-dot.active .step-label {
  color: var(--gold) !important;
}

.step-line.active {
  background: var(--gold) !important;
}

/* ============================================================= */
/* INGREDIENT ROW HOVER — WATERCOLOR EFFECT                      */
/* ============================================================= */

.ing-row {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ing-row::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 50%, 
    rgba(197, 165, 90, 0.06) 0%, 
    rgba(212, 132, 10, 0.04) 30%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.ing-row:hover::before {
  opacity: 1;
}

.ing-row:hover {
  transform: translateX(4px);
  border-color: rgba(197, 165, 90, 0.2) !important;
}

/* Watercolor splash on hover */
.ing-row .ing-row-icon,
.inv-row .inv-icon {
  position: relative;
  transition: all 0.4s ease;
  z-index: 2; /* Important: stack context to keep watercolor visible */
}

.ing-row:hover .ing-row-icon,
.inv-row:hover .inv-icon {
  transform: scale(1.3) rotate(-5deg);
  filter: drop-shadow(0 3px 8px rgba(197, 165, 90, 0.25));
}

.ing-row:hover .ing-row-icon::after,
.inv-row:hover .inv-icon::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: radial-gradient(circle at 40% 40%, rgba(197, 165, 90, 0.25) 0%, rgba(212, 132, 10, 0.15) 60%, transparent 80%);
  filter: blur(2px);
  animation: watercolorBloom 0.8s ease-out forwards;
  z-index: -1;
  pointer-events: none;
}

@keyframes watercolorBloom {
  0% { transform: scale(0.3) rotate(0deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.6) rotate(15deg); opacity: 0.8; }
}

/* ============================================================= */
/* CHOCOLATE RAIN — Celebration Effect                           */
/* ============================================================= */

#chocolateRainContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  overflow: hidden;
}

.choco-piece {
  position: absolute;
  top: -30px;
  font-size: 1.2rem;
  animation: chocoFall linear forwards;
  opacity: 0.9;
  will-change: transform;
}

@keyframes chocoFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.9;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) rotate(720deg) scale(0.6);
    opacity: 0;
  }
}

/* ============================================================= */
/* STEP VALIDATION — SUCCESS BURST                               */
/* ============================================================= */

.step-dot.completed .dot {
  position: relative;
  animation: stepCompletePulse 0.6s ease-out;
}

@keyframes stepCompletePulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.step-completed-burst {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 165, 90, 0.4) 0%, transparent 70%);
  animation: burstExpand 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes burstExpand {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* ============================================================= */
/* PREMIUM TOAST                                                 */
/* ============================================================= */

.toast {
  border-left: 4px solid var(--gold) !important;
  font-family: var(--font) !important;
}

.toast.success {
  border-left-color: var(--success) !important;
}

/* ============================================================= */
/* FORM INPUTS PREMIUM                                           */
/* ============================================================= */

.form-input, .settings-input, .library-search {
  border: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(197, 165, 90, 0.3) !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-position: center bottom;
  background-size: 0 2px;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus, .settings-input:focus, .library-search:focus {
  background-size: 100% 2px;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

.dark-theme .form-input, .dark-theme .settings-input, .dark-theme .library-search {
  border-bottom: 1px solid rgba(212, 186, 122, 0.2) !important;
  background-image: linear-gradient(var(--gold-light), var(--gold-light));
}

/* ============================================================= */
/* PILL MENUS (Pilules Célestes)                                 */
/* ============================================================= */

.nav-link {
  transition: all 0.3s ease;
}

.nav-link.active {
  border-radius: 50px !important;
  background: rgba(197, 165, 90, 0.15) !important;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.4), var(--shadow-sm) !important;
  border: 1px solid rgba(197, 165, 90, 0.25) !important;
  transform: translateY(-2px);
}

.dark-theme .nav-link.active {
  background: rgba(212, 186, 122, 0.1) !important;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.05), var(--shadow-sm) !important;
  border: 1px solid rgba(212, 186, 122, 0.15) !important;
}

/* ============================================================= */
/* MORNING BRIEFING PREMIUM                                      */
/* ============================================================= */

.morning-briefing {
  background: linear-gradient(135deg, 
    rgba(60, 31, 14, 0.03) 0%,
    rgba(197, 165, 90, 0.06) 50%,
    rgba(60, 31, 14, 0.03) 100%) !important;
  border: 1px solid rgba(197, 165, 90, 0.1) !important;
}

.morning-briefing h2 {
  font-family: var(--font-display) !important;
}

/* ============================================================= */
/* SCROLLBAR PREMIUM                                             */
/* ============================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cream-warm);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

.dark-theme ::-webkit-scrollbar-track {
  background: #1E1812;
}

.dark-theme ::-webkit-scrollbar-thumb {
  background: rgba(212, 186, 122, 0.3);
}

/* ============================================================= */
/* RECIPE SAVED CARDS — Premium Hover                            */
/* ============================================================= */

.saved-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.saved-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--shadow-premium), 0 0 40px rgba(197, 165, 90, 0.08) !important;
}

/* ============================================================= */
/* NAV LINKS PREMIUM                                             */
/* ============================================================= */

.nav-link:hover,
.nav-dropdown-link:hover {
  color: var(--gold) !important;
}

/* ============================================================= */
/* BADGE & TAGS PREMIUM                                          */
/* ============================================================= */

.badge-new {
  background: var(--gold-shimmer) !important;
  color: var(--chocolate) !important;
  font-family: var(--font) !important;
}

/* ============================================================= */
/* PAGE TRANSITION EFFECT                                        */
/* ============================================================= */

.page-transition-active {
  animation: pageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================= */
/* GOLDEN DIVIDER                                                */
/* ============================================================= */

.golden-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.25;
  margin: 2rem 0;
}

/* ============================================================= */
/* SELECTION COLOR                                               */
/* ============================================================= */

::selection {
  background: var(--gold-glow);
  color: var(--chocolate);
}

::-moz-selection {
  background: var(--gold-glow);
  color: var(--chocolate);
}

/* ============================================================= */
/* REFINEMENTS VISUELS : LUXURY EDITORIAL & GLASSMORPHISM        */
/* ============================================================= */

/* 1. Subtle Glassmorphism (Header & Menus Flottants) */
.app-header {
  background: rgba(253, 246, 227, 0.85) !important; /* var(--cream) avec transparence */
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(197, 165, 90, 0.2) !important;
}

.dark-theme .app-header {
  background: rgba(26, 20, 16, 0.85) !important;
}

.nav-dropdown-content, .profile-dropdown .dropdown-content, .notif-dropdown {
  background: rgba(255, 253, 247, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-premium) !important;
  border: 1px solid rgba(197, 165, 90, 0.15) !important;
}
.dark-theme .nav-dropdown-content, 
.dark-theme .profile-dropdown .dropdown-content, 
.dark-theme .notif-dropdown {
  background: rgba(37, 32, 24, 0.95) !important;
}

/* 2. Editorial Typography & Spacing */
.app-main > section {
  padding-top: 3rem; /* Respirations supplémentaires */
  padding-bottom: 4rem;
}

/* Filets séparateurs or extrêmement fins */
.golden-divider, hr {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent 0%, rgba(197, 165, 90, 0.6) 50%, transparent 100%) !important;
  margin: 2.5rem 0;
  opacity: 0.8;
}

/* 3. Skeleton Loading (Reflets Dorés) */
.shimmer-loading, .timeline-empty, .ocr-upload-zone {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-alt);
  color: transparent !important;
  border-color: transparent !important;
}

.shimmer-loading::after, .timeline-empty::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
      transparent 0%, 
      rgba(197, 165, 90, 0.05) 30%, 
      rgba(197, 165, 90, 0.15) 50%, 
      rgba(197, 165, 90, 0.05) 70%, 
      transparent 100%);
  animation: goldShimmer 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme .shimmer-loading::after, .dark-theme .timeline-empty::after {
  background: linear-gradient(90deg, 
      transparent 0%, 
      rgba(212, 186, 122, 0.05) 30%, 
      rgba(212, 186, 122, 0.15) 50%, 
      rgba(212, 186, 122, 0.05) 70%, 
      transparent 100%);
}

@keyframes goldShimmer {
  0% { left: -150%; }
  100% { left: 250%; }
}

/* Fluid animations for interactive magnetic state */
.btn-primary, .btn-outline, .nav-dropdown-trigger {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease !important;
}

/* ============================================================= */
/* 2. ANIMATION "DÉGUSTATION" (Page Flip)                        */
/* ============================================================= */

.step-section.active {
  animation: pageFlipLeft 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transform-origin: left center;
}

@keyframes pageFlipLeft {
  0% { opacity: 0; transform: perspective(1200px) rotateY(8deg) translateX(20px) scale(0.98); }
  100% { opacity: 1; transform: perspective(1200px) rotateY(0deg) translateX(0) scale(1); }
}

/* ============================================================= */
/* 3. PAPIER GAUFRÉ (Letterpress Cards)                          */
/* ============================================================= */

.library-card, .saved-card {
  background-color: var(--surface) !important;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E') !important;
  box-shadow: inset 0 0 0 1px rgba(197, 165, 90, 0.35), var(--shadow-sm) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
}

.library-card:hover, .saved-card:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: inset 0 0 0 2px rgba(197, 165, 90, 0.5), var(--shadow-md) !important;
}

.dark-theme .library-card, .dark-theme .saved-card {
  box-shadow: inset 0 0 0 1px rgba(212, 186, 122, 0.2), var(--shadow-sm) !important;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.06"/%3E%3C/svg%3E') !important;
}

.dark-theme .library-card:hover, .dark-theme .saved-card:hover {
  box-shadow: inset 0 0 0 2px rgba(212, 186, 122, 0.35), var(--shadow-md) !important;
}

/* ============================================================= */
/* 4. FEUILLES D'OR, D'ARGENT ET DE CUIVRE (Metallic Badges)     */
/* ============================================================= */

.badge.status-ok, .badge.bg-green-100 {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important; /* Emerald Leaf */
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3), inset 0 1px 1px rgba(255,255,255,0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 800 !important;
}

.badge.status-warn, .badge.bg-yellow-100 {
  background: linear-gradient(135deg, #e1a052 0%, #b86b11 100%) !important; /* Copper Leaf */
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(184, 107, 17, 0.3), inset 0 1px 1px rgba(255,255,255,0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 800 !important;
}

.badge.status-critical, .badge.bg-red-100 {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important; /* Crimson Alert */
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 1px 1px rgba(255,255,255,0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 800 !important;
  animation: criticalPulse 2s ease-in-out infinite;
}

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 1px 1px rgba(255,255,255,0.3); }
  50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6), inset 0 1px 1px rgba(255,255,255,0.3); }
}

/* ============================================================= */
/* 5. MODULE CRM (Clients & Ventes)                              */
/* ============================================================= */

.crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.crm-kpi-card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.crm-kpi-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.5rem 0;
}

.crm-kpi-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 700;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border);
  position: relative;
  overflow: hidden;
}

.order-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 6px; height: 100%;
  background: var(--accent);
}

.order-card[data-status="paid"]::before { background: var(--success); }
.order-card[data-status="delivered"]::before { background: var(--text-muted); }

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.order-id {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.order-client {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.2rem 0;
}

.order-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.order-products {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--accent-light);
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--surface-border);
  padding-top: 1rem;
}

.order-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.vip-client-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border-glass);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vip-client-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.vip-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-family: var(--font-display);
  margin: 0 auto 1.2rem;
  box-shadow: var(--shadow-gold);
}

.vip-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.vip-contact {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.vip-notes {
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #e1a052, #b86b11);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  box-shadow: 0 4px 10px rgba(184, 107, 17, 0.3);
}
