/* ==========================================================================
   VIREA — Routine & Tracking Web Application
   Design System: Luxury Emerald & Prickly Pear Gold Glassmorphism
   Target Audience: Tunisia (Bilingual French / Derja Arabic)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-main: #070a11;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(245, 158, 11, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand Colors */
  --emerald-900: #022c22;
  --emerald-800: #064e3b;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;

  --gold-600: #d97706;
  --gold-500: #f59e0b;
  --gold-400: #fbbf24;
  
  --bronze-accent: #b38b4d;
  --whatsapp-green: #25d366;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, rgba(6, 78, 59, 0.6) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(7, 10, 17, 1) 100%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --grad-gold: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
  --grad-bronze: linear-gradient(135deg, #8c6d3f 0%, #d4af37 100%);
  --grad-whatsapp: linear-gradient(135deg, #128c7e 0%, #25d366 100%);

  /* Shadows & Blurs */
  --shadow-glow: 0 10px 30px -10px rgba(16, 185, 129, 0.3);
  --shadow-gold-glow: 0 10px 30px -10px rgba(245, 158, 11, 0.3);
  --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-fr: 'Outfit', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.03);
  --border-card: rgba(0, 0, 0, 0.08);
  --border-gold: rgba(217, 119, 6, 0.4);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --grad-hero: linear-gradient(135deg, rgba(236, 253, 245, 0.9) 0%, rgba(254, 243, 199, 0.5) 50%, rgba(248, 250, 252, 1) 100%);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Directional Base Styles */
html[dir="rtl"] body {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body {
  font-family: var(--font-fr);
  direction: ltr;
  text-align: left;
}

/* Directional Component Layout Adjustments */
html[dir="ltr"] .timeline-line {
  left: 120px;
  right: auto;
}

html[dir="ltr"] .timeline-time {
  text-align: right;
  padding-right: 1rem;
  padding-left: 0;
}

html[dir="ltr"] .timeline-node {
  margin-right: 1.5rem;
  margin-left: 0;
}

html[dir="ltr"] .tracker-table th,
html[dir="ltr"] .tracker-table td {
  text-align: left;
}

html[dir="ltr"] .tracker-table tr td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-left: 1px solid var(--border-card);
  border-right: none;
}

html[dir="ltr"] .tracker-table tr td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right: 1px solid var(--border-card);
  border-left: none;
}

html[dir="ltr"] .faq-question {
  text-align: left;
}

html[dir="ltr"] .meal-option-badge {
  left: 1.5rem;
  right: auto;
}

html[dir="ltr"] .usage-card-step {
  left: 1rem;
  right: auto;
}

.fr-text {
  font-family: var(--font-fr);
  display: inline-block;
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-ar);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 10, 17, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  padding: 0.85rem 1.5rem;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.55rem 1.5rem;
  background: rgba(7, 10, 17, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.15);
  border-bottom-color: rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Reading Progress Bar */
.scroll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  transition: width 0.1s linear;
  z-index: 1001;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-logo {
  height: 52px;
  width: auto;
  border-radius: var(--radius-full);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45);
  transition: var(--transition);
}

.brand-link:hover .nav-logo {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-fr);
  font-size: 1.4rem;
  font-weight: 900;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-400);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
  animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 50%;
  transform: translateX(50%);
  width: 0%;
  height: 2px;
  background: var(--grad-emerald);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--emerald-400);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 80%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Multilingual Language Select Pill (Flags Only) */
.lang-select {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  font-size: 1.15rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  text-align: center;
  appearance: auto;
  min-width: 44px;
}

.lang-select:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-500);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  transform: scale(1.05);
}

.lang-select option {
  background: #0f172a;
  color: #f8fafc;
  font-size: 1.1rem;
  padding: 0.4rem;
}

[data-theme="light"] .lang-select option {
  background: #ffffff;
  color: #0f172a;
}

.nav-wa-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  background: transparent;
  cursor: pointer;
  z-index: 1002;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: var(--transition);
}

.mobile-menu-toggle.active .bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Theme Toggle Switch */
.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--grad-emerald);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(16, 185, 129, 0.5);
}

.btn-whatsapp {
  background: var(--grad-whatsapp);
  color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(37, 211, 102, 0.6);
}

.btn-gold {
  background: var(--grad-gold);
  color: #070a11;
  box-shadow: var(--shadow-gold-glow);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(245, 158, 11, 0.5);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--emerald-500);
  color: var(--emerald-400);
}

.btn-outline:hover {
  background: var(--emerald-500);
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6rem;
  background: var(--grad-hero);
  overflow: hidden;
}

.hero-bg-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(245, 158, 11, 0.1) 50%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-400);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle-fr {
  font-family: var(--font-fr);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald-400);
  margin-bottom: 1.25rem;
  display: block;
}

.hero-welcome {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-highlights {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid var(--border-card);
  padding-top: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.highlight-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.hero-visual-wrapper {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-gold);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: var(--transition);
}

.hero-img:hover {
  transform: scale(1.03);
}

.hero-floating-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
}

.floating-badge-icon {
  font-size: 2rem;
}

.floating-badge-text strong {
  display: block;
  font-size: 1.1rem;
  color: var(--gold-400);
}

.floating-badge-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section Header Shared Component */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Section 1: Mode d'emploi & Dosage */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.usage-card {
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.usage-card-step {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-fr);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.usage-icon {
  font-size: 2.8rem;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.usage-card-title {
  font-size: 1.3rem;
  color: var(--gold-400);
  margin-bottom: 0.6rem;
}

.usage-card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Interactive 9ml Water Mixer & 20-min Timer Widget */
.interactive-tool-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-gold);
}

.mixer-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.glass-graphic {
  position: relative;
  width: 120px;
  height: 160px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: none;
  border-radius: 0 0 20px 20px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 -20px 30px rgba(16, 185, 129, 0.3);
}

.water-level {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.4) 0%, rgba(16, 185, 129, 0.6) 100%);
  transition: var(--transition);
}

.vinegar-drop-anim {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 24px;
  background: var(--grad-gold);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: dropMix 3s infinite ease-in-out;
}

@keyframes dropMix {
  0% { top: -20px; opacity: 1; }
  50% { top: 60px; opacity: 0.9; }
  100% { top: 110px; opacity: 0.2; transform: translateX(-50%) scale(1.8); }
}

.mixer-labels {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.label-chip {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.chip-gold {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-400);
}

.chip-blue {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timer-display {
  font-family: var(--font-fr);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold-400);
  margin: 1rem 0;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Precautions Cards & Hydration Counter */
.precautions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.precaution-card {
  padding: 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.precaution-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.water-tracker-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.water-counter-display {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.glasses-grid {
  display: flex;
  gap: 0.5rem;
}

.glass-icon {
  font-size: 1.5rem;
  opacity: 0.3;
  cursor: pointer;
  transition: var(--transition);
}

.glass-icon.filled {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px #38bdf8);
}

/* Section 2: Routine Quotidienne */
.timeline-filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--grad-emerald);
  color: #ffffff;
  border-color: transparent;
}

.timeline-wrapper {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 120px;
  width: 4px;
  background: linear-gradient(180deg, var(--gold-500) 0%, var(--emerald-500) 50%, var(--bronze-accent) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.timeline-time {
  width: 100px;
  text-align: left;
  font-family: var(--font-fr);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-400);
  padding-left: 1rem;
}

.timeline-node {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  border: 3px solid var(--emerald-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.timeline-card {
  flex: 1;
  padding: 1.5rem;
}

.timeline-title {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.timeline-item.highlight-now .timeline-card {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}

/* Section 3: Conseils Alimentaires */
.nutrition-principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.principle-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.principle-card.avoid {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.principle-card.focus {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.principle-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.principle-card.avoid .principle-header { color: #f87171; }
.principle-card.focus .principle-header { color: var(--emerald-400); }

.food-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
}

.food-tag {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
}

.avoid .food-tag {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.focus .food-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
}

/* Tunisian Meal Examples Carousel / Tabs */
.meal-tabs-wrapper {
  margin-bottom: 2rem;
}

.meal-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.meal-tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meal-tab-btn:hover, .meal-tab-btn.active {
  background: var(--grad-gold);
  color: #070a11;
  border-color: transparent;
}

.meal-content-card {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.meal-option-box {
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  position: relative;
}

.meal-option-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: var(--emerald-600);
  color: #ffffff;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
}

.meal-option-title {
  font-size: 1.1rem;
  color: var(--gold-400);
  margin-bottom: 0.75rem;
}

.meal-option-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Section 4: Activité Physique */
.workout-level-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.level-card {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: 2px solid transparent;
}

.level-card.selected {
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-glow);
  background: rgba(6, 78, 59, 0.3);
}

.level-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.level-débutant .level-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}

.level-intermédiaire .level-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.level-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.level-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.level-details-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.virea-tip-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(180, 83, 9, 0.1) 100%);
  border: 1px solid var(--border-gold);
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.tip-icon {
  font-size: 2.2rem;
}

.tip-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-400);
}

/* Section 5: Suivi du Poids et Progrès (Interactive Tracker) */
.tracker-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.tracker-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.75rem;
}

.tracker-table th {
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  border-bottom: 2px solid var(--border-card);
}

.tracker-table td {
  padding: 1.25rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  transition: var(--transition);
}

.tracker-table tr td:first-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right: 1px solid var(--border-card);
  font-weight: 800;
  color: var(--gold-400);
}

.tracker-table tr td:last-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-left: 1px solid var(--border-card);
}

.tracker-input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.tracker-input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.energy-rating-select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--gold-400);
  font-weight: 700;
}

.tracker-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(6, 78, 59, 0.2);
  border: 1px solid var(--emerald-600);
  border-radius: var(--radius-md);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--emerald-400);
}

/* Section 6: FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: right;
}

.faq-question:hover {
  background: var(--bg-card-hover);
  color: var(--gold-400);
}

.faq-toggle-icon {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
  color: var(--emerald-400);
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease;
  background: var(--bg-glass);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  padding: 0 2rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 1.5rem 2rem;
}

/* Section 7: WhatsApp Suivi */
.whatsapp-cta-section {
  position: relative;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, rgba(18, 140, 126, 0.25) 0%, rgba(6, 78, 59, 0.4) 100%);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 5rem;
}

/* Real WhatsApp SVG Icon Styling */
.wa-icon-svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  vertical-align: -0.15em;
  display: inline-block;
  flex-shrink: 0;
}

.whatsapp-icon-large .wa-icon-svg {
  width: 72px;
  height: 72px;
  fill: var(--whatsapp-green);
  filter: drop-shadow(0 0 20px rgba(37, 211, 102, 0.6));
}

.floating-whatsapp-btn .wa-icon-svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

.contact-icon-wrapper .wa-icon-svg {
  width: 28px;
  height: 28px;
  fill: var(--whatsapp-green);
}

.whatsapp-icon-large {
  font-size: 4rem;
  color: var(--whatsapp-green);
  margin-bottom: 1rem;
}

.whatsapp-cta-title {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.whatsapp-cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

/* Section 8: Contact Virea & Footer */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contact-card {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid var(--border-gold);
}

.contact-card-title {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.contact-card-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  direction: ltr;
}

.contact-card-value a:hover {
  color: var(--emerald-400);
  text-decoration: underline;
}

footer {
  border-top: 1px solid var(--border-card);
  padding: 3rem 1.5rem 2rem 1.5rem;
  background: rgba(7, 10, 17, 0.95);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Floating WhatsApp Quick Action Button */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 999;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--grad-whatsapp);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
  transition: var(--transition);
}

.floating-whatsapp-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.7);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(7, 10, 17, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 2.5rem 2rem;
    gap: 1rem;
    border-top: 1px solid var(--border-card);
    overflow-y: auto;
    z-index: 999;

    /* Off-canvas state when menu is closed */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-15px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
  }

  .nav-link::after {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-highlights {
    justify-content: center;
  }

  .interactive-tool-box {
    grid-template-columns: 1fr;
  }

  /* Mobile Timeline Adaptation for LTR and RTL */
  html[dir="rtl"] .timeline-line {
    right: 20px;
    left: auto;
  }

  html[dir="rtl"] .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 45px;
    padding-left: 0;
  }

  html[dir="rtl"] .timeline-time {
    width: auto;
    padding-left: 0;
    margin-bottom: 0.5rem;
  }

  html[dir="rtl"] .timeline-node {
    position: absolute;
    right: 0;
    left: auto;
    top: 0;
    margin-left: 0;
  }

  html[dir="ltr"] .timeline-line {
    left: 20px;
    right: auto;
  }

  html[dir="ltr"] .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 45px;
    padding-right: 0;
  }

  html[dir="ltr"] .timeline-time {
    width: auto;
    padding-right: 0;
    margin-bottom: 0.5rem;
  }

  html[dir="ltr"] .timeline-node {
    position: absolute;
    left: 0;
    right: auto;
    top: 0;
    margin-right: 0;
  }

  .nutrition-principles-grid, .workout-level-selector {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-wa-btn {
    display: none !important;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .section-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .water-counter-display {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .glasses-grid {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-floating-badge {
    position: static;
    margin-top: 1rem;
    display: inline-block;
  }

  .tracker-summary-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
