/* ========================================
   STREAM CARITATIF - PROTECTION CIVILE
   Design System & Global Styles
   ======================================== */

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

/* ---- CSS Variables ---- */
:root {
  /* Colors */
  --bg-primary: #06090f;
  --bg-secondary: #0d1321;
  --bg-tertiary: #141c2e;
  --bg-card: rgba(20, 28, 46, 0.7);
  --bg-card-hover: rgba(30, 42, 68, 0.8);
  --bg-glass: rgba(13, 19, 33, 0.6);
  --bg-glass-strong: rgba(13, 19, 33, 0.85);

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a5f;

  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f59e0b;
  --orange-600: #ea580c;

  --red-500: #ef4444;
  --green-500: #22c55e;
  --green-400: #4ade80;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: var(--blue-400);

  --border-color: rgba(59, 130, 246, 0.15);
  --border-glow: rgba(59, 130, 246, 0.3);

  /* Gradients */
  --gradient-blue: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  --gradient-orange: linear-gradient(135deg, var(--orange-600), var(--orange-400));
  --gradient-hero: linear-gradient(180deg, rgba(6,9,15,0) 0%, var(--bg-primary) 100%);
  --gradient-card: linear-gradient(145deg, rgba(59,130,246,0.08), rgba(245,158,11,0.04));

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow-blue: 0 0 30px rgba(59,130,246,0.15);
  --shadow-glow-orange: 0 0 30px rgba(245,158,11,0.15);

  /* Spacing */
  --nav-height: 72px;
  --container-max: 1280px;
  --section-padding: 80px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--blue-300);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

ul, ol {
  list-style: none;
}

/* ---- Background Effects ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--blue {
  background: var(--blue-500);
  top: -200px;
  right: -100px;
}

.bg-glow--orange {
  background: var(--orange-500);
  bottom: -200px;
  left: -100px;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition-base);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.nav__brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.nav__brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav__brand small {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--orange-400);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav__link:hover, .nav__link.active {
  color: var(--text-primary);
  background: rgba(59,130,246,0.1);
}

.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--blue-500);
  border-radius: 2px;
}

.nav__cta {
  padding: 8px 20px;
  background: var(--gradient-orange);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow-orange);
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(245,158,11,0.25);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(59,130,246,0.1) 0%, transparent 60%);
}

.hero__bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: var(--gradient-hero);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 850px;
  padding: 40px 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-300);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease-out;
}

.hero__badge .dot {
  width: 8px;
  height: 8px;
  background: var(--green-500);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--blue-300) 50%, var(--orange-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ---- Countdown ---- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.countdown__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue-400); /* Couleur bleue visible */
  background: var(--bg-card); /* Fond sombre de la carte */
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  line-height: 1;
  min-width: 90px;
  -webkit-text-fill-color: initial;
  background-clip: border-box;
  -webkit-background-clip: border-box;
}

.countdown__value {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue-400);
  line-height: 1;
  min-width: 90px;
}

.countdown__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  font-weight: 500;
}

.countdown__separator {
  font-size: 2.5rem;
  color: var(--blue-600);
  font-weight: 300;
  align-self: flex-start;
  padding-top: 12px;
}

/* ---- CTA Buttons ---- */
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59,130,246,0.3);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  background: rgba(59,130,246,0.08);
  border-color: var(--blue-500);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn--orange {
  background: var(--gradient-orange);
  color: #fff;
  box-shadow: var(--shadow-glow-orange);
}

.btn--orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(245,158,11,0.3);
  color: #fff;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn--danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}

.btn--success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* ---- Section ---- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
  z-index: 1;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-400);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.section__description {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-blue);
}

/* ---- Stats Grid ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
}

.stat-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.stat-card__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-400);
  margin-bottom: 4px;
}

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

/* ---- Features / About Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-card__icon--blue {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
}

.feature-card__icon--orange {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
}

.feature-card__title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.feature-card__text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---- Schedule ---- */
.schedule {
  max-width: 800px;
  margin: 0 auto;
}

.schedule__day {
  margin-bottom: 32px;
}

.schedule__day-title {
  font-size: 1.2rem;
  color: var(--orange-400);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.schedule__item {
  display: flex;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  align-items: flex-start;
}

.schedule__item:hover {
  background: rgba(59,130,246,0.05);
}

.schedule__time {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--blue-400);
  white-space: nowrap;
  min-width: 80px;
}

.schedule__info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

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

.schedule__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

.schedule__tag--main {
  background: rgba(59,130,246,0.1);
  color: var(--blue-400);
}

.schedule__tag--activity {
  background: rgba(245,158,11,0.1);
  color: var(--orange-400);
}

.schedule__tag--conf {
  background: rgba(34,197,94,0.1);
  color: var(--green-400);
}

/* ---- Streamer Cards ---- */
.streamers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.streamer-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.streamer-card__banner {
  height: 80px;
  background: var(--gradient-card);
  position: relative;
}

.streamer-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  position: absolute;
  bottom: -36px;
  left: 24px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
}

.streamer-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.streamer-card__body {
  padding: 44px 24px 24px;
}

.streamer-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.streamer-card__channel {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.streamer-card__category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.streamer-card__category--invite {
  background: rgba(245,158,11,0.1);
  color: var(--orange-400);
  border: 1px solid rgba(245,158,11,0.2);
}

.streamer-card__category--benevole {
  background: rgba(59,130,246,0.1);
  color: var(--blue-400);
  border: 1px solid rgba(59,130,246,0.2);
}

.streamer-card__stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.streamer-card__stat {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.streamer-card__stat strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---- Subgoals ---- */
.subgoal {
  margin-bottom: 20px;
}

.subgoal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.subgoal__title {
  font-size: 0.9rem;
  font-weight: 600;
}

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

.subgoal__amount strong {
  color: var(--blue-400);
}

.subgoal__bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  overflow: hidden;
}

.subgoal__fill {
  height: 100%;
  border-radius: 50px;
  background: var(--gradient-blue);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.subgoal__fill--complete {
  background: var(--gradient-orange);
}

.subgoal__fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: 50px;
  animation: shimmer 2s infinite;
}

/* ---- Donation Page ---- */
.donation-section {
  max-width: 700px;
  margin: 0 auto;
}

.donation-global {
  text-align: center;
  margin-bottom: 48px;
}

.donation-global__amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.donation-global__label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.donation-global__bar {
  max-width: 500px;
  margin: 16px auto 0;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  overflow: hidden;
}

.donation-global__fill {
  height: 100%;
  border-radius: 50px;
  background: var(--gradient-orange);
  transition: width 1s ease;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form__input,
.form__select,
.form__textarea {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form__textarea {
  min-height: 100px;
  resize: vertical;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-preset {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.amount-preset:hover, .amount-preset.active {
  border-color: var(--orange-500);
  background: rgba(245,158,11,0.1);
  color: var(--orange-400);
}

/* ---- Recent Donations ---- */
.recent-donations {
  margin-top: 48px;
}

.donation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  background: var(--bg-card);
  transition: all var(--transition-base);
  animation: slideInLeft 0.4s ease-out;
}

.donation-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.donation-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.donation-item__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.donation-item__message {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.donation-item__amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--orange-400);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 550px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
  line-height: 1;
}

.modal__close:hover {
  color: var(--text-primary);
}

/* ---- HUD Overlay ---- */
.hud {
  position: fixed;
  inset: 0;
  background: transparent;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.hud__top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.hud__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.hud__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud__donation-total {
  text-align: right;
}

.hud__donation-total .label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hud__donation-total .amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--orange-400);
}

.hud__sidebar {
  position: absolute;
  top: 80px;
  right: 16px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud__card {
  background: rgba(13, 19, 33, 0.85);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.hud__card-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-400);
  margin-bottom: 12px;
  font-weight: 600;
}

.hud__bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  padding: 24px;
}

.hud__ticker {
  overflow: hidden;
  height: 32px;
  position: relative;
}

.hud__ticker-content {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.hud__ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.hud__ticker-item .name {
  font-weight: 600;
  color: var(--orange-400);
}

/* ---- Dashboard / Admin / Streamer Panels ---- */
.dashboard {
  padding-top: calc(var(--nav-height) + 24px);
  min-height: 100vh;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: calc(100vh - var(--nav-height) - 48px);
}

.dashboard__sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all var(--transition-fast);
}

.sidebar__link:hover, .sidebar__link.active {
  background: rgba(59,130,246,0.1);
  color: var(--text-primary);
}

.sidebar__link.active {
  border-left: 2px solid var(--blue-500);
}

.dashboard__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard__title {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Admin specific */
.alert-card {
  border-left: 3px solid var(--red-500);
  animation: slideInRight 0.4s ease-out;
}

.alert-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.alert-card__streamer {
  font-weight: 600;
  font-size: 1rem;
}

.alert-card__time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.alert-card__message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.alert-card__actions {
  display: flex;
  gap: 8px;
}

/* Status indicators */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status--online .status__dot { background: var(--green-500); }
.status--offline .status__dot { background: var(--text-muted); }
.status--issue .status__dot { background: var(--red-500); animation: pulse-dot 1.5s infinite; }

/* Chat */
.chat {
  display: flex;
  flex-direction: column;
  height: 400px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat__message {
  display: flex;
  gap: 10px;
  animation: fadeInUp 0.3s ease-out;
}

.chat__message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.chat__message-content {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-top-left-radius: 4px;
  max-width: 80%;
}

.chat__message-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-400);
  margin-bottom: 4px;
}

.chat__message-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.chat__message-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat__input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.chat__input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
}

.chat__input:focus {
  border-color: var(--blue-500);
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

tbody td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

tbody tr:hover {
  background: rgba(59,130,246,0.03);
}

/* ---- Toast / Notification ---- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 300px;
  animation: slideInRight 0.4s ease-out;
  box-shadow: var(--shadow-lg);
}

.toast--success { border-left: 3px solid var(--green-500); }
.toast--error { border-left: 3px solid var(--red-500); }
.toast--info { border-left: 3px solid var(--blue-500); }

.toast__icon { font-size: 1.2rem; }
.toast__message { font-size: 0.9rem; flex: 1; }
.toast__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
    --nav-height: 64px;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__hamburger {
    display: flex;
  }

  .countdown {
    gap: 8px;
  }

  .countdown__value {
    font-size: 2rem;
    min-width: 65px;
    padding: 12px 14px;
  }

  .countdown__separator {
    font-size: 1.5rem;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .amount-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard__grid {
    grid-template-columns: 1fr;
  }

  .dashboard__sidebar {
    position: static;
  }

  .hero__title {
    font-size: 2rem;
  }

  .streamers-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
  }

  .hud__sidebar {
    width: 220px;
    right: 8px;
    top: 60px;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 50px;
}

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

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--blue-400); }
.text-orange { color: var(--orange-400); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-sm { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* --- LOGOS --- */
.nav__brand-img {
    height: 40px; /* Ajustez selon la hauteur de votre logo */
    width: auto;
    object-fit: contain;
}

.footer__logo-img {
    height: 50px; /* Un peu plus grand dans le footer */
    width: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Pour les HUD et Sidebar */
.logo-icon-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* On nettoie les anciens styles d'icones texte */
.nav__brand-icon, .footer__logo-icon, .nav__logo-icon {
    display: none; /* On cache les anciens conteneurs d'emoji */
}