
/* =========================
   GLOBAL FONT (toutes pages — style-header est chargé partout)
   ========================= */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* =========================
   HEADER – FIX (logo gauche | nav centre | langues droite)
   ========================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;

  /* On force le header à rester LTR même si la page passe en RTL (ar) */
  direction: ltr;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;

  padding: 12px 40px;
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(6px);
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}

/* Glassmorphism renforcé après le scroll */
.site-header.scrolled {
  background: rgba(8,12,22,0.92);
  backdrop-filter: blur(22px) saturate(1.4);
  padding-top: 8px;
  padding-bottom: 8px;
  box-shadow: 0 2px 32px rgba(0,0,0,.45), 0 1px 0 rgba(90,150,255,.08);
}

/* LEFT */
.header-left{
  display:flex;
  align-items:center;
}

/* Logo */
.logo-link{ display:inline-block; cursor:pointer; }
.logo-link img{ display:block; }
.logo-link:hover{ opacity:0.92; }

.logo-main{
  height: 100px;
  width: auto;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.015); }
}

/* CENTER NAV (vraiment centré) */
.header-center{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-center a{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease;
  position: relative;
}

.header-center a:not(.active)::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #5a96ff, #a78bfa);
  border-radius: 1px;
  transition: width .25s ease, left .25s ease;
}
.header-center a:not(.active):hover::after {
  width: 60%;
  left: 20%;
}
.header-center a:not(.active):hover {
  color: rgba(180, 210, 255, .95);
}

.header-center a.active{
  background: rgba(255,255,255,0.12);
  opacity: 0.9;
  transform: scale(0.95);
  pointer-events:none;
}

/* RIGHT */
.header-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

/* Lang switch (plus de position:fixed !) */
.lang-switch{
  display:flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}

.lang-switch button{
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform .25s ease, opacity .25s ease;
}

.lang-switch button img{
  width: 28px;
  height: 28px;
  display:block;
  border-radius: 50%;
}

.lang-switch button:hover{ transform: scale(1.08); }

html[lang="fr"] .lang-switch button:nth-child(1),
html[lang="en"] .lang-switch button:nth-child(2),
html[lang="ar"] .lang-switch button:nth-child(3){
  transform: scale(0.85);
  opacity: 0.6;
  pointer-events:none;
}

/* ── Hamburger button ─────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile */
@media (max-width: 768px) {
  .site-header {
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto;
    gap: 0 8px;
    padding: 10px 16px;
    position: relative;
  }

  .logo-main { height: 52px; }

  .hamburger {
    display: flex;
    align-self: center;
  }

  .header-center {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(13, 21, 36, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 8px 0;
    z-index: 999;
  }

  .header-center.is-open {
    display: flex;
  }

  .header-center a {
    padding: 13px 24px;
    border-radius: 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .header-center a:last-child {
    border-bottom: none;
  }
}




/* =======================
   SCROLL FADE-IN
   ======================= */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.07s; }
.fade-in:nth-child(3) { transition-delay: 0.14s; }
.fade-in:nth-child(4) { transition-delay: 0.21s; }
.fade-in:nth-child(5) { transition-delay: 0.28s; }
.fade-in:nth-child(6) { transition-delay: 0.35s; }
/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ==============================================
   BOUTON RETOUR EN HAUT
   ============================================== */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(90,150,255,.35);
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, background .2s, box-shadow .2s;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: rgba(90,150,255,.2);
  box-shadow: 0 0 18px rgba(90,150,255,.3);
}
@media (max-width: 600px) {
  #back-to-top { bottom: 90px; right: 18px; }
}

/* ==============================================
   BANNIÈRE RGPD
   ============================================== */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9990;
  background: rgba(8,12,22,.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .4s ease;
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner p {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  flex: 1;
  min-width: 200px;
}
#cookie-banner a { color: #5a96ff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.cookie-btn:hover { opacity: .8; }
.cookie-btn--accept {
  background: rgba(90,150,255,.2);
  border: 1px solid rgba(90,150,255,.4);
  color: #fff;
}
.cookie-btn--refuse {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.55);
}
@media (max-width: 600px) {
  #cookie-banner { padding: 14px 18px; }
  .cookie-actions { width: 100%; justify-content: flex-end; }
}
