/* =========================
   Base + Thèmes modernes
   ========================= */
:root {
  --bg: #0b1220;
  --bg-soft: #0f172a;
  --surface: rgba(17, 24, 39, 0.6);
  --text: #e5e7eb;
  --muted: #94a3b8;

  --brand: #60a5fa;        /* primaire */
  --brand-2: #a78bfa;      /* secondaire */
  --accent: #22d3ee;       /* accent doux */
  --danger: #ff4d4d;

  --border: rgba(255,255,255,.08);
  --ring: 0 0 0 3px rgba(96,165,250,0.35);
  --shadow: 0 8px 30px rgba(0,0,0,.25);
  --shadow-sm: 0 6px 18px rgba(0,0,0,.18);
  --radius: 16px;

  --nav-background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(255,255,255,0.72);
  --text: #0f172a;
  --muted: #475569;

  --brand: #60a5fa;
  --brand-2: #a78bfa;
  --accent: #0ea5b7;
  --danger: #e11d48;

  --border: rgba(2,6,23,.08);
  --ring: 0 0 0 3px rgba(37,99,235,0.28);
  --shadow: 0 10px 28px rgba(2,6,23,.12);
  --shadow-sm: 0 6px 16px rgba(2,6,23,.10);

  --nav-background: rgba(255,255,255,0.82);
}

/* Reset moderne */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  background:
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utilitaires */
.container { max-width: 1200px; margin: 0 auto; padding: 1.2rem; }
.section-pad { padding: clamp(4rem, 6vw, 6rem) 0; }
.title-xxl { font-size: clamp(1.8rem, 6vw + 0.5rem, 4rem); letter-spacing: -0.02em; }
.title-lg { font-size: clamp(1.1rem, 1.8vw + 0.7rem, 1.8rem); color: var(--accent); }

.link { color: var(--brand); text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .25s; }
.link:hover { border-color: var(--brand); }

/* Verre / glassmorphism */
.glass {
  background: var(--surface);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}

/* Header / Nav */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: transform .3s ease;
  background: var(--nav-background);
  backdrop-filter: blur(10px) saturate(120%);
}
nav {
  max-width: 1200px; margin: 0 auto;
  padding: .6rem .9rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .8rem;
  align-items: center;
}
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.logo img { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }

.nav-actions { display: flex; gap: .5rem; align-items: center; }

.icon-btn, .menu-toggle {
  appearance: none; border: 1px solid var(--border); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in oklab, var(--bg-soft) 80%, transparent);
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
  touch-action: manipulation;
}
.icon-btn:hover, .menu-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle .bar { height: 2px; width: 22px; background: currentColor; border-radius: 2px; }

.menu { display: flex; list-style: none; gap: 1.4rem; margin: 0; padding: 0; }
.menu a {
  position: relative; text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: .2px;
  padding: .3rem 0;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.menu a:hover::after { transform: scaleX(1); }

/* Drawer mobile */
.drawer { position: fixed; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 1200; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; right: 0; top: 0; height: 100%; width: min(88vw, 420px); padding: 1rem 1rem 2rem; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; gap: 1rem; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-close { align-self: flex-end; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; background: color-mix(in oklab, var(--bg-soft) 80%, transparent); color: var(--text); }
.drawer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.drawer-menu a { display: block; padding: .9rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text); font-size: 1.05rem; font-weight: 700; border: 1px solid transparent; }
.drawer-menu a:hover { background: color-mix(in oklab, var(--bg-soft) 92%, transparent); border-color: var(--border); }
.drawer-social { display: flex; gap: .6rem; margin-top: auto; }

.no-scroll { overflow: hidden; }

/* =========================
   HERO (mêmes couleurs en clair/sombre)
   ========================= */
.hero {
  /* Palette figée pour le hero */
  --hero-text: #ffffff;
  --hero-muted: rgba(235, 240, 255, 0.85);
  --hero-border: rgba(255,255,255,0.22);
  --hero-ghost: rgba(255,255,255,0.12);

  min-height: 50vh; position: relative; display: grid; place-items: center; text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  /* superposition fixe (identique light/dark) + image */
  background-image:
    radial-gradient(60% 60% at 50% 30%, rgba(0,0,0,.20), rgba(0,0,0,.55)),
    linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.50) 100%),
    url('public/fond2.jpg');
  background-position: center, center, center;
  background-size: cover, cover, cover;
  background-repeat: no-repeat, no-repeat, no-repeat;
  transform: scale(1.05);
}
.hero-content { position: relative; z-index: 1; padding: 1.6rem; animation: fadeIn .8s ease-out both; }
.logo-hero { width: 70px; height: 70px; margin-right: .5rem; vertical-align: middle; border-radius: 50%; }

/* Titres/texte figés en blanc */
.hero .title-xxl,
.hero .title-lg { color: var(--hero-text) !important; }
.hero p { max-width: 640px; margin: .7rem auto 1.6rem; color: var(--hero-muted); font-size: clamp(.98rem, 1.2vw + .8rem, 1.05rem); }

/* CTA Hero (toujours identiques) */
.hero-buttons { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero .cta-button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.2rem; border-radius: 999px; font-weight: 800;
  text-decoration: none; letter-spacing: .3px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid var(--hero-border);
}
.hero .cta-button i { font-size: 1.05rem; }
.hero .cta-button.primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(99,102,241,.35);
}
.hero .cta-button.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(99,102,241,.45); }
.hero .cta-button.secondary {
  background: var(--hero-ghost);
  color: var(--hero-text);
}
.hero .cta-button.secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }


/* Sections */
.section-title { text-align: center; margin: 0 0 2rem; font-size: clamp(1.4rem, 1.2vw + 1rem, 2.1rem); color: var(--text); position: relative; padding-bottom: .9rem; font-weight: 900; }
.section-title i { color: var(--accent); margin-right: .5rem; }
.section-title::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 96px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: .9; }

/* Conteneur général des sections légales */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 4rem;
    background-color: var(--background-light);
}

/* Styles pour chaque section « legal-section » */
.legal-section {
    background-color: var(--background-section);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--padding-section);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Titres et paragraphes */
.legal-section h3 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--heading-color);
    padding-bottom: 0.5rem;
}

.legal-section h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-section p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

/* Liens */
.legal-section a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Social */
.social-links { display: flex; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.social-link { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: color-mix(in oklab, var(--bg-soft) 92%, transparent); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; border: 1px solid var(--border); }
.social-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

/* Footer */
footer { background: linear-gradient(180deg, var(--bg-soft), color-mix(in oklab, var(--bg) 85%, #000 15%)); color: color-mix(in oklab, var(--text) 92%, #fff 8%); padding: 2.2rem 0 2rem; margin-top: 2rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.footer-section h3 { color: var(--accent); margin-bottom: .6rem; }
.footer-section ul { list-style: none; margin: 0; padding: 0; }
.footer-section li { margin: .4rem 0; }
.footer-section a { color: inherit; text-decoration: none; }
.footer-section a:hover { color: var(--brand); }
.footer-bottom { text-align: center; padding-top: 1.2rem; border-top: 1px solid var(--border); color: var(--muted); }

/* Masquer vidéos invisibles */
#hidden-video-1, #hidden-video-2, #hidden-video-3 { display: none; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%,20%,50%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }
@keyframes scroll { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 10px); opacity: 0; } }

/* Accessibilité focus */
:where(a, button, .cta-button):focus-visible { outline: none; box-shadow: var(--ring); }

/* Responsive */
@media (max-width: 1024px) { .menu { display: none; } .menu-toggle { display: inline-flex; } }
@media (max-width: 640px) { .gallery-item { height: clamp(160px, 42vw, 220px); } }

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
