/* ============================================================
   Fichier: style.css
   Description: Feuille de style principale
   CORRECTION : fond adaptatif des dropdowns (clair/sombre)
   ============================================================ */

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

/* ============================================================
   1. VARIABLES CSS (mode clair)
   ============================================================ */
:root {
  /* Couleurs */
  --color-gold: #C9A227;
  --color-gold-dark: #B08A1F;
  --color-navy: #0F1B2D;
  --color-navy-dark: #09111E;
  --color-cream: #F7F5F0;
  --color-emerald: #2E8B57;
  --color-emerald-dark: #1F6B3F;
  --color-white: #FFFFFF;
  --color-black: #1A1A1A;
  --color-gray: #6B7280;
  --color-gray-light: #D1D5DB;
  --color-success: #10B981;
  --color-danger: #EF4444;

  /* Typographie */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;

  /* Espacements */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Transitions */
  --transition: 0.3s ease;

  /* Mode clair */
  --bg-body: var(--color-cream);
  --bg-card: #FFFFFF;
  --bg-dropdown: #FFFFFF;
  --text-primary: var(--color-black);
  --text-secondary: var(--color-gray);
  --border-color: var(--color-gray-light);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   2. MODE SOMBRE
   ============================================================ */
.dark-mode {
  --bg-body: var(--color-navy);
  --bg-card: #1E2A3D;
  --bg-dropdown: #1E2A3D;
  --text-primary: var(--color-white);
  --text-secondary: #B0B8C4;
  --border-color: #2A3A50;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   3. RESET & BASE
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

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

a:hover {
  color: var(--color-gold-dark);
}

/* ============================================================
   4. UTILITAIRES & COMPOSANTS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--color-gold);
  color: white;
}

.btn-primary:hover {
  background: var(--color-gold-dark);
  color: white;
}

.btn-secondary {
  background: var(--color-emerald);
  color: white;
}

.btn-secondary:hover {
  background: var(--color-emerald-dark);
  color: white;
}

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

.btn-outline:hover {
  background: var(--color-gold);
  color: white;
}

/* Cartes */
.card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Grille */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

/* ============================================================
   5. HEADER & NAVIGATION
   ============================================================ */
header {
  background: var(--color-navy);
  color: white;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

/* Menu desktop */
.main-nav {
  flex: 1;
  margin: 0 20px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  color: #ddd;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-gold);
}

.main-nav a.active {
  color: var(--color-gold);
  background: rgba(201, 162, 39, 0.15);
}

/* ============================================================
   6. DROPDOWN - CORRECTION DÉFINITIVE (fond adaptatif)
   ============================================================ */
.dropdown {
  position: relative;
}

/* Masquage par défaut */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-dropdown);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 8px 0;
  list-style: none;
  z-index: 1001;
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-primary);
  font-weight: 400;
  white-space: nowrap;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
  background: var(--color-gold);
  color: white;
}

/* Affichage uniquement au survol ou au focus */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================================================
   7. BOUTON CTA CONTACT
   ============================================================ */
.btn-header {
  background: var(--color-gold);
  color: white !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-header:hover {
  background: var(--color-gold-dark);
  color: white !important;
}

/* ============================================================
   8. ACTIONS HEADER (langue, devise, thème)
   ============================================================ */
.header-actions {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.lang-switcher,
.currency-switcher {
  display: flex !important;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
}

.lang-switcher a {
  color: #aaa;
  padding: 2px 4px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9rem;
}

.lang-switcher a.active {
  color: var(--color-gold);
  font-weight: 700;
}

.lang-switcher .separator {
  color: #555;
  margin: 0 2px;
}

.currency-switcher select {
  background: transparent;
  color: white;
  border: 1px solid #555;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.currency-switcher select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

#theme-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================================
   9. MENU MOBILE
   ============================================================ */
.mobile-menu {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-navy);
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  flex-direction: column;
}

@media (max-width: 992px) {
  .mobile-menu.open {
    display: flex !important;
  }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.mobile-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.mobile-menu ul li {
  margin-bottom: 4px;
}

.mobile-menu ul li a {
  display: block;
  padding: 12px 0;
  color: #ddd;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu ul li a:hover {
  color: var(--color-gold);
}

.mobile-sub {
  display: none;
  padding-left: 20px;
  margin: 5px 0;
  border-left: 2px solid var(--color-gold);
  list-style: none;
}

.mobile-sub.open {
  display: block;
}

.mobile-sub a {
  font-size: 1rem !important;
  border-bottom: none !important;
  padding: 8px 0 !important;
}

.mobile-toggle {
  cursor: pointer;
}

.mobile-toggle i {
  transition: transform 0.3s ease;
}

.mobile-toggle.open i {
  transform: rotate(90deg);
}

.mobile-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.mobile-actions .lang-switcher a {
  color: #aaa;
}

.mobile-actions .lang-switcher a.active {
  color: var(--color-gold);
}

.mobile-actions select {
  background: transparent;
  color: white;
  border: 1px solid #555;
  padding: 4px 8px;
  border-radius: 4px;
}

#theme-toggle-mobile {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
footer {
  background: var(--color-navy-dark);
  color: #ccc;
  padding: 40px 0;
}

footer a {
  color: #aaa;
}

footer a:hover {
  color: var(--color-gold);
}

footer h4 {
  margin-bottom: 10px;
  color: white;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 6px;
}

/* ============================================================
   11. WHATSAPP FLOTTANT
   ============================================================ */
#whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#whatsapp-toggle {
  background: #25D366;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

#whatsapp-menu {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 200px;
}

#whatsapp-menu a {
  display: block;
  padding: 10px;
  color: var(--text-primary);
}

#whatsapp-menu a:hover {
  background: var(--color-gold);
  color: white;
}

/* ============================================================
   12. BANDEAU COOKIES
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  padding: 16px;
  z-index: 999;
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#cookie-banner p {
  margin: 0;
}

#cookie-banner .btn {
  margin-left: 10px;
}

/* ============================================================
   13. PAGES SECTIONS
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-navy), var(--color-gold));
  color: white;
  padding: 80px 0;
  text-align: center;
}

.storytelling {
  padding: 60px 0;
}

.activities {
  padding: 60px 0;
  background: var(--bg-card);
}

.trust {
  padding: 40px 0;
  background: var(--color-navy);
  color: white;
}

.newsletter {
  padding: 60px 0;
  background: var(--bg-body);
}

.newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 500px;
  margin: 20px auto 0;
}

.newsletter input {
  flex: 1;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  min-width: 200px;
}

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .header-actions .lang-switcher,
  .header-actions .currency-switcher {
    display: flex !important;
  }
  .header-actions .currency-switcher select {
    max-width: 80px;
    font-size: 0.7rem;
    padding: 2px 4px;
  }
  .header-actions .lang-switcher a {
    font-size: 0.7rem;
    padding: 2px 4px;
  }
  .header-actions .lang-switcher .separator {
    margin: 0 2px;
  }
  #theme-toggle {
    font-size: 1rem;
    padding: 2px 6px;
  }
  .hamburger {
    font-size: 1.2rem;
  }
  .header-actions {
    gap: 6px;
  }
  .logo img {
    height: 32px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: 4px;
  }
  .lang-switcher a {
    font-size: 0.6rem;
    padding: 2px 3px;
  }
  .currency-switcher select {
    font-size: 0.6rem;
    padding: 2px 3px;
    max-width: 60px;
  }
  #theme-toggle {
    font-size: 0.8rem;
    padding: 2px 4px;
  }
  .hamburger {
    font-size: 1rem;
  }
}

@media (min-width: 993px) {
  .mobile-menu {
    display: none !important;
  }
  .hamburger {
    display: none;
  }
  .header-actions .lang-switcher,
  .header-actions .currency-switcher {
    display: flex !important;
  }
}

/* ============================================================
   FIN DU FICHIER style.css
   ============================================================ */