/**
 * Swole Youth — Page d'accueil modernisée
 * Style épuré, moderne et accessible
 */

/* ============================================
   1. VARIABLES & TOKENS
   ============================================ */
:root {
  /* Couleurs principales */
  --home-primary: #0891B2;
  --home-primary-light: #22D3EE;
  --home-primary-dark: #0E7490;
  --home-accent: #6366F1;

  /* Surfaces - Light mode */
  --home-bg: #FAFAFA;
  --home-surface: #FFFFFF;
  --home-muted-bg: #F4F4F5;

  /* Textes - Light mode */
  --home-text: #18181B;
  --home-text-secondary: #52525B;
  --home-text-muted: #A1A1AA;

  /* Bordures - Light mode */
  --home-border: #E4E4E7;
  --home-border-light: #F4F4F5;

  /* Espacements */
  --section-py: clamp(56px, 8vw, 100px);
  --card-gap: 20px;

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

  /* Ombres subtiles */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;

  /* Typographie */
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ============================================
   DARK MODE - Palette complète
   ============================================ */
.dark {
  --home-primary: #22D3EE;
  --home-primary-light: #67E8F9;
  --home-primary-dark: #0891B2;
  --home-accent: #818CF8;

  /* Surfaces sombres */
  --home-bg: #09090B;
  --home-surface: #18181B;
  --home-muted-bg: #27272A;

  /* Textes clairs */
  --home-text: #FAFAFA;
  --home-text-secondary: #A1A1AA;
  --home-text-muted: #71717A;

  /* Bordures sombres */
  --home-border: #3F3F46;
  --home-border-light: #27272A;

  /* Ombres dark mode */
  --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 24px rgba(0,0,0,0.5);
}

/* ============================================
   2. HERO SECTION - Épuré
   ============================================ */
.hero {
  position: relative;
  min-height: min(75vh, 700px);
  display: flex;
  align-items: center;
  padding: clamp(60px, 10vw, 100px) 0;
  overflow: hidden;
  background: var(--home-bg);
}

/* Fond simplifié */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(250, 250, 250, 0.7) 50%,
      var(--home-bg) 100%
    ),
    url('/uploads/bg.jpg') center 20% / cover no-repeat;
}

.dark .hero-bg {
  background:
    linear-gradient(to bottom,
      rgba(9, 9, 11, 0.3) 0%,
      rgba(9, 9, 11, 0.85) 50%,
      var(--home-bg) 100%
    ),
    url('/uploads/bg.jpg') center 20% / cover no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Carte hero épurée */
.hero-card {
  max-width: min(680px, 90vw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 48px);
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.dark .hero-card {
  background: var(--home-surface);
  border-color: var(--home-border);
}

/* Eyebrow / Label */
.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-primary);
  background: var(--home-muted-bg);
  border-radius: 999px;
}

.dark .hero .eyebrow {
  background: var(--home-muted-bg);
  color: var(--home-primary);
}

/* Titre principal */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--home-text);
  margin-bottom: 20px;
}

/* Emoji étoile */
.hero-title .spark {
  display: inline-block;
}

/* Sous-titre */
.hero-card .sub {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  line-height: 1.7;
  color: var(--home-text-secondary);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* CTAs */
.hero-ctas {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-ctas .btn {
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.hero-ctas .btn-primary {
  background: var(--home-primary);
  color: #FFFFFF;
  border: none;
}

.hero-ctas .btn-primary:hover {
  background: var(--home-primary-dark);
  transform: translateY(-1px);
}

.dark .hero-ctas .btn-primary {
  background: var(--home-primary);
  color: #09090B;
}

.dark .hero-ctas .btn-primary:hover {
  background: var(--home-primary-light);
}

.hero-ctas .btn-outline {
  background: transparent;
  color: var(--home-text);
  border: 1px solid var(--home-border);
}

.hero-ctas .btn-outline:hover {
  border-color: var(--home-primary);
  color: var(--home-primary);
}

.dark .hero-ctas .btn-outline {
  border-color: var(--home-border);
  color: var(--home-text);
}

.dark .hero-ctas .btn-outline:hover {
  border-color: var(--home-primary);
  color: var(--home-primary);
}

/* ============================================
   3. SECTION PROGRAMMES - Épurée
   ============================================ */
.section#programmes {
  padding: var(--section-py) 0;
  background: var(--home-bg);
}

/* Header de section */
.section-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--home-text);
  letter-spacing: -0.01em;
}

/* Grille de cartes */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--card-gap);
}

@media (min-width: 1000px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Carte programme épurée */
.card.program {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.card.program:hover {
  border-color: var(--home-primary);
  box-shadow: var(--shadow-md);
}

.dark .card.program {
  background: var(--home-surface);
  border-color: var(--home-border);
}

.dark .card.program:hover {
  border-color: var(--home-primary);
}

/* Image/Flyer */
.program .flyer {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  max-height: 240px;
  padding: 16px;
  background: var(--home-muted-bg);
}

.program .flyer img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Badge catégorie */
.program .cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--home-text-secondary);
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 999px;
}

.dark .program .cat-badge {
  background: var(--home-muted-bg);
  border-color: var(--home-border);
  color: var(--home-text-secondary);
}

/* Couleurs par catégorie */
.program.cat-camp .cat-badge { color: #059669; }
.program.cat-speelweek .cat-badge { color: #0891B2; }
.program.cat-support .cat-badge { color: #7C3AED; }
.program.cat-inclusion .cat-badge { color: #DB2777; }
.program.cat-outing .cat-badge { color: #EA580C; }

.dark .program.cat-camp .cat-badge { color: #34D399; }
.dark .program.cat-speelweek .cat-badge { color: #22D3EE; }
.dark .program.cat-support .cat-badge { color: #A78BFA; }
.dark .program.cat-inclusion .cat-badge { color: #F472B6; }
.dark .program.cat-outing .cat-badge { color: #FB923C; }

/* Corps de la carte */
.program-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 16px 20px 20px;
  gap: 10px;
}

.program-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--home-text);
  margin: 0;
}

.program-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--home-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lien "Voir plus" */
.see-more {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--home-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.see-more:hover {
  text-decoration: underline;
}

/* Métadonnées */
.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--home-border-light);
  font-size: 0.8rem;
  color: var(--home-text-muted);
  list-style: none;
}

.program-price {
  font-weight: 600;
  color: var(--home-primary);
}

/* Actions */
.program-actions {
  margin-top: 12px;
}

.program-actions .btn-cta {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.program-actions .btn-primary {
  background: var(--home-primary);
  color: #FFFFFF;
  border: none;
}

.program-actions .btn-primary:hover {
  background: var(--home-primary-dark);
}

.dark .program-actions .btn-primary {
  background: var(--home-primary);
  color: #09090B;
}

.dark .program-actions .btn-primary:hover {
  background: var(--home-primary-light);
}

.program-actions .btn-outline {
  background: transparent;
  color: var(--home-text);
  border: 1px solid var(--home-border);
}

.program-actions .btn-outline:hover {
  border-color: var(--home-primary);
  color: var(--home-primary);
}

.program-actions .btn-disabled {
  background: var(--home-muted-bg);
  color: var(--home-text-muted);
  border: 1px solid var(--home-border);
  cursor: not-allowed;
}

/* Sold out */
.soldout-flag {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--home-muted-bg);
  z-index: 5;
}

.dark .soldout-flag {
  background: var(--home-muted-bg);
}

/* ============================================
   4. SECTION CONTACT + VLOG - Épurée
   ============================================ */
.section#contact {
  padding: var(--section-py) 0;
  background: var(--home-muted-bg);
}

.dark .section#contact {
  background: var(--home-surface);
}

.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .two {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Cartes de section */
.section#contact .card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.dark .section#contact .card {
  background: var(--home-muted-bg);
  border-color: var(--home-border);
}

/* Formulaire de contact */
.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form .field {
  display: grid;
  gap: 6px;
}

.contact-form .label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-text);
}

.contact-form .input,
.contact-form .textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--home-text);
  background: var(--home-bg);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast);
}

.dark .contact-form .input,
.dark .contact-form .textarea {
  background: var(--home-surface);
  border-color: var(--home-border);
  color: var(--home-text);
}

.contact-form .input:focus,
.contact-form .textarea:focus {
  outline: none;
  border-color: var(--home-primary);
}

.contact-form .textarea {
  min-height: 100px;
  resize: vertical;
}

.contact-form .actions {
  margin-top: 4px;
}

.contact-form .btn {
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Carte vlog */
.vlog-card {
  display: flex;
  flex-direction: column;
}

.vlog-head {
  margin-bottom: 12px;
}

.vlog-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--home-border);
}

.vlog-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vlog-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--home-primary);
  color: #FFFFFF;
  border-radius: 50%;
  transition: transform var(--duration-fast);
}

.dark .vlog-play {
  background: var(--home-primary);
  color: #09090B;
}

.vlog-poster:hover .vlog-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.vlog-glow {
  display: none;
}

.vlog-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ============================================
   5. MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.dark .modal {
  background: rgba(0, 0, 0, 0.7);
}

.modal.show {
  display: flex;
}

.modal .panel {
  width: min(560px, 95vw);
  max-height: 80vh;
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dark .modal .panel {
  background: var(--home-surface);
  border-color: var(--home-border);
}

.modal .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--home-border);
}

.modal .head strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--home-text);
}

.modal .close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--home-muted-bg);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--home-text-secondary);
}

.modal .close:hover {
  background: var(--home-border);
}

.modal .body {
  padding: 18px;
  max-height: 60vh;
  overflow-y: auto;
  line-height: 1.6;
  color: var(--home-text-secondary);
}

/* ============================================
   6. FLASH MESSAGES
   ============================================ */
#flash-wrap {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(480px, 90vw);
}

#flash-wrap .flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--home-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--home-border);
  box-shadow: var(--shadow-md);
}

.dark #flash-wrap .flash {
  background: var(--home-muted-bg);
  border-color: var(--home-border);
}

#flash-wrap .flash.success {
  border-color: #34D399;
}

#flash-wrap .flash.error {
  border-color: #F87171;
}

.dark #flash-wrap .flash.success {
  border-color: #10B981;
}

.dark #flash-wrap .flash.error {
  border-color: #EF4444;
}

#flash-wrap .flash .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

#flash-wrap .flash .meta {
  flex-grow: 1;
}

#flash-wrap .flash .meta strong {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--home-text);
  margin-bottom: 2px;
}

#flash-wrap .flash .dim {
  font-size: 0.85rem;
  color: var(--home-text-secondary);
}

#flash-wrap .flash .close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--home-muted-bg);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--home-text-secondary);
}

#flash-wrap .flash .close:hover {
  background: var(--home-border);
}

/* ============================================
   7. ANIMATIONS
   ============================================ */

/* Reveal simplifié */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Respect préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   8. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 48px 0 64px;
  }

  .hero-card {
    padding: 24px 20px;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .cards-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section#contact .card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

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

  .program-body {
    padding: 14px 16px 16px;
  }
}

/* ============================================
   9. FOOTER
   ============================================ */
.site-footer {
  background: var(--home-bg);
  border-top: 1px solid var(--home-border);
  padding: 40px 0 0;
  margin-top: var(--section-py);
}

.dark .site-footer {
  background: var(--home-surface);
  border-color: var(--home-border);
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
  }
}

.foot-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--home-text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer address {
  font-style: normal;
  color: var(--home-text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer address a {
  color: var(--home-primary);
  text-decoration: none;
}

.site-footer address a:hover {
  text-decoration: underline;
}

.foot-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-links a {
  color: var(--home-text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.foot-links a:hover {
  color: var(--home-primary);
}

/* WhatsApp */
.wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wa-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M16 3c-6.6 0-12 5.4-12 12 0 2 .5 3.9 1.4 5.6L4 29l8.6-1.3C14.3 28.6 15.1 29 16 29c6.6 0 12-5.4 12-12S22.6 3 16 3z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M16 3c-6.6 0-12 5.4-12 12 0 2 .5 3.9 1.4 5.6L4 29l8.6-1.3C14.3 28.6 15.1 29 16 29c6.6 0 12-5.4 12-12S22.6 3 16 3z"/></svg>') center/contain no-repeat;
}

/* Login button */
.foot-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--home-primary) !important;
  background: transparent;
  border: 1px solid var(--home-primary);
  border-radius: var(--radius-md);
  text-decoration: none !important;
}

.foot-login:hover {
  background: var(--home-primary);
  color: #FFFFFF !important;
}

.dark .foot-login:hover {
  color: #09090B !important;
}

/* Footer bottom */
.foot-copy {
  text-align: center;
  padding: 20px 0;
  margin-top: 24px;
  border-top: 1px solid var(--home-border);
  color: var(--home-text-muted);
  font-size: 0.8rem;
}

.dark .foot-copy {
  border-color: var(--home-border);
}

/* ============================================
   10. PARTICLES (hidden in clean version)
   ============================================ */
.particles {
  display: none;
}
