/* ═══════════════════════════════════════════════════════════
   BYSAR — layout.css
   Header · Navigation desktop · Burger · Menu mobile
   Footer · Back-to-top
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  transition: background var(--t), border-bottom-color var(--t);
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgba(8,8,8,.33);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--dark-mid);
}

/* ─────────────────────────────────────────
   NAVIGATION PRINCIPALE
───────────────────────────────────────── */
#main-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  /* pas de gap global : space-between gère la distribution */
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.nav-logo:hover { opacity: .7; }

.nav-logo-img {
  width: 50px; height: 50px;
  background: transparent;        /* on retire le fond foncé */
  border: none;                   /* on retire le cadre pointillé */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.nav-logo:hover .nav-logo-img { 
  transform: rotate(-8deg);       /* petit clin d'œil au hover */
  opacity: .9;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.01em;
  color: var(--pure-white);
  transition: color var(--t-fast);
}
.nav-logo:hover .nav-logo-name { color: var(--pure-white); }

/* ── Liens nav desktop ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2vw, 2.25rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pure-white);
  position: relative;
  padding-bottom: 3px;
  text-decoration: none;
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--off-white);
  transition: width var(--t);
}
.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-links a.active             { color: var(--off-white); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after,
.nav-links a.active::after      { width: 100%; }

/* ── Actions nav (lang + burger) ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}

/* Bouton langue — desktop uniquement */
.btn-lang {
  display: flex;
  align-items: center;
  gap: .2rem;
  background: none;
  border: 1px solid var(--dark-mid);
  color: var(--grey);
  font-family: var(--font-body);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn-lang:hover { border-color: var(--grey-light); color: var(--grey-light); }

/* Indicateur langue active */
body[data-lang="fr"] .lang-fr-lbl  { color: var(--off-white); }
body[data-lang="en"] .lang-en-lbl  { color: var(--off-white); }

/* Séparateur "/" dans le bouton lang */
.btn-lang .lang-sep { color: var(--dark-mid); }

/* ── Burger ── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 14px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  /* zone de clic plus grande */
  position: relative;
}
.burger::before {
  content: '';
  position: absolute;
  inset: -8px -6px;
}
.burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--off-white);
  transform-origin: left center;
  transition: transform var(--t), opacity var(--t-fast), width var(--t-fast);
  border-radius: 1px;
}
.burger.open span:nth-child(1) { transform: rotate(44deg) translate(1px, -1px); }
.burger.open span:nth-child(2) { opacity: 0; width: 0; }
.burger.open span:nth-child(3) { transform: rotate(-44deg) translate(1px, 1px); }

/* ── Responsive nav ── */
@media (max-width: 860px) {
  .nav-links  { display: none; }
  .btn-lang   { display: none; }   /* langue accessible dans le menu mobile */
  .burger     { display: flex; }
}

/* ─────────────────────────────────────────
   MENU MOBILE
───────────────────────────────────────── */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: var(--z-mobile);
  display: flex !important;   /* toujours dans le flux, géré par opacity/visibility */
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-slow), visibility var(--t-slow);
}
#mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Ligne séparatrice sous le header */
#mobile-menu::before {
  content: '';
  position: absolute;
  top: var(--nav-h); left: 0; right: 0;
  height: 1px;
  background: var(--dark-mid);
}

/* Liste de liens */
#mobile-menu ul {
  width: 100%;
  list-style: none;
  margin: 0; padding: 0;
}
#mobile-menu ul li { border-bottom: 1px solid var(--dark-mid); }
#mobile-menu ul a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 4.5rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.02em;
  color: var(--mid);
  padding: .45rem 0;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-20px);
  transition: color var(--t-fast),
              opacity .4s var(--ease-out),
              transform .4s var(--ease-out);
}
#mobile-menu.open ul a  { opacity: 1; transform: translateX(0); }
#mobile-menu ul a:hover { color: var(--off-white); }
#mobile-menu ul a[aria-current="page"] { color: var(--off-white); }

/* Délais d'entrée échelonnés */
#mobile-menu.open ul li:nth-child(1) a { transition-delay: .04s; }
#mobile-menu.open ul li:nth-child(2) a { transition-delay: .09s; }
#mobile-menu.open ul li:nth-child(3) a { transition-delay: .14s; }
#mobile-menu.open ul li:nth-child(4) a { transition-delay: .19s; }
#mobile-menu.open ul li:nth-child(5) a { transition-delay: .24s; }

/* Pied du menu mobile : langue + socials */
.mobile-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
}
.mobile-lang {
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: 1px solid var(--dark-mid);
  padding: .3rem .65rem;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.mobile-lang:hover { color: var(--off-white); border-color: var(--grey); }

.mobile-socials { display: flex; gap: 1rem; }
.mobile-socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--dark-mid);
  color: var(--mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.mobile-socials a:hover { border-color: var(--off-white); color: var(--off-white); }

/* Bouton fermer (×) — aligné dans le header */
.mobile-close {
  position: absolute;
  top: 0;
  right: clamp(1.25rem, 4vw, 3rem);
  height: var(--nav-h);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--grey);
  font-size: 1rem;
  cursor: pointer;
  transition: color var(--t-fast);
}
.mobile-close:hover { color: var(--off-white); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#site-footer {
  background: var(--black-soft);
  border-top: 1px solid var(--dark-mid);
}
.footer-top {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--dark-mid);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.02em;
  color: var(--off-white);
  line-height: 1;
}
.footer-tagline {
  font-size: .82rem;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.75;
  max-width: 280px;
}
.footer-social-row {
  display: flex;
  gap: .6rem;
  margin-top: .25rem;
}
.footer-social-row a {
  width: 38px; height: 38px;
  border: 1px solid var(--dark-mid);
  color: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.footer-social-row a:hover { border-color: var(--off-white); color: var(--off-white); }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.1rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-col ul a {
  font-size: .82rem;
  font-weight: 300;
  color: var(--grey-light);
  text-decoration: none;
  transition: color var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.footer-col ul a:hover { color: var(--off-white); }
.footer-col address {
  font-size: .82rem;
  font-weight: 300;
  color: var(--grey-light);
  line-height: 1.75;
  margin-top: .8rem;
}
.footer-col address i { color: var(--grey); font-size: .75rem; margin-right: .4rem; }

.footer-bottom { padding: 1.4rem 0; }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy,
.footer-credits {
  font-size: .65rem;
  font-weight: 300;
  color: var(--mid);
  letter-spacing: .08em;
}
.footer-credits a { color: var(--grey); text-decoration: none; transition: color var(--t-fast); }
.footer-credits a:hover { color: var(--off-white); }

/* Responsive footer */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* ─────────────────────────────────────────
   BACK TO TOP
───────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--dark);
  border: 1px solid var(--dark-mid);
  color: var(--grey-light);
  z-index: var(--z-backtop);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t), visibility var(--t), transform var(--t),
              background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover   { background: var(--off-white); border-color: var(--off-white); color: var(--black); }
