/* ============================================================
   HEADER V4 — LNK Studio
   Header sticky + nav desktop + burger mobile + drawer
   Source : docs/refonte-v4/03-design-system.md section 12
   ============================================================ */

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 249, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lnk-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
}

@media (min-width: 1024px) {
  .site-header-inner {
    min-height: 76px;
  }
}

/* ============ LOGO ============ */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.site-logo img {
  height: 40px;
  width: auto;
  max-height: 40px;
  display: block;
}

@media (min-width: 1024px) {
  .site-logo img {
    height: 44px;
    max-height: 44px;
  }
}


/* ============ NAV DESKTOP ============ */
.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.site-nav-link {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--lnk-deep-green);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.site-nav-link:hover {
  background: rgba(0, 26, 23, 0.05);
  text-decoration: none;
}

.site-nav-link:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.site-nav-link.is-active {
  background: rgba(0, 26, 23, 0.08);
  font-weight: 700;
}

/* ============ ACTIONS (CTA + Lang) ============ */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-3);
}

.site-header-cta {
  display: none;
}

@media (min-width: 900px) {
  .site-header-cta {
    display: inline-flex;
    min-height: 38px;
    padding: 9px 16px;
    font-size: var(--fs-body-sm);
  }
}

/* ============ LANGUAGE SWITCHER (labels FR / EN) ============ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--lnk-surface-hover);
  border: 1px solid var(--lnk-border-strong);
  border-radius: var(--radius-full);
  height: 36px;
}

.lang-switcher-btn {
  padding: 0 10px;
  min-height: 28px;
  height: 100%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-kicker);
  letter-spacing: 0.04em;
  color: var(--lnk-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.lang-switcher-btn:hover {
  color: var(--lnk-deep-green);
}

.lang-switcher-btn.is-active {
  background: var(--lnk-deep-green);
  color: var(--lnk-mint-white);
}

.lang-switcher-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ============ BURGER MOBILE ============ */
.site-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--lnk-border-strong);
  border-radius: var(--radius-sm);
  color: var(--lnk-deep-green);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

@media (min-width: 900px) {
  .site-burger {
    display: none;
  }
}

.site-burger:hover {
  background: var(--lnk-surface-hover);
}

.site-burger:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.site-burger svg {
  width: 22px;
  height: 22px;
}

/* ============ DRAWER MOBILE (overlay) ============ */
.site-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.site-drawer.is-open {
  display: block;
}

/* Backdrop sombre */
.site-drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 26, 23, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: drawer-backdrop-in var(--duration-base) var(--ease-out);
}

@keyframes drawer-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Panneau (slide depuis la droite) */
.site-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--lnk-deep-green);
  color: var(--lnk-mint-white);
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  animation: drawer-slide-in var(--duration-base) var(--ease-out);
  overflow-y: auto;
}

@keyframes drawer-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Header du drawer */
.site-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid rgba(244, 249, 248, 0.15);
}

.site-drawer-header img {
  height: 36px;
  width: auto;
  max-height: 36px;
  display: block;
}

.site-drawer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--lnk-mint-white);
  margin: 0;
}

/* Bouton fermer */
.site-drawer-close {
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(244, 249, 248, 0.1);
  border: 1px solid rgba(244, 249, 248, 0.2);
  border-radius: var(--radius-sm);
  color: var(--lnk-mint-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--duration-fast) var(--ease-out);
}

.site-drawer-close:hover {
  background: rgba(244, 249, 248, 0.2);
}

.site-drawer-close:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-inverse);
}

.site-drawer-close svg {
  width: 20px;
  height: 20px;
}

/* Nav du drawer */
.site-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.site-drawer-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--lnk-mint-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

.site-drawer-link:hover {
  background: rgba(244, 249, 248, 0.1);
  text-decoration: none;
}

.site-drawer-link:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-inverse);
}

.site-drawer-link.is-active {
  background: rgba(244, 249, 248, 0.2);
  font-weight: 700;
  position: relative;
  padding-left: calc(var(--space-4) + 4px);
}

.site-drawer-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--lnk-mint-white);
  border-radius: 0 2px 2px 0;
}

/* CTA du drawer (en bas) */
.site-drawer-footer {
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  border-top: 1px solid rgba(244, 249, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-drawer-footer .lang-switcher {
  justify-content: center;
}

.site-drawer-footer .btn-primary {
  background: var(--lnk-mint-white);
  color: var(--lnk-deep-green);
  border-color: var(--lnk-mint-white);
  width: 100%;
  justify-content: center;
}

.site-drawer-footer .btn-primary:hover {
  background: rgba(244, 249, 248, 0.9);
  color: var(--lnk-deep-green);
}

/* Lang switcher dans le drawer */
.site-drawer-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2);
  color: var(--lnk-mint-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  background: transparent;
  border: 1px solid rgba(244, 249, 248, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.site-drawer-lang:hover {
  background: rgba(244, 249, 248, 0.1);
}

.site-drawer-lang:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-inverse);
}

.site-drawer-lang svg {
  width: 16px;
  height: 16px;
}

/* ============ BODY LOCK (quand drawer ouvert) ============ */
body.drawer-open {
  overflow: hidden;
}

/* ============ PREFERS-REDUCED-MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .site-drawer::before,
  .site-drawer-panel {
    animation: none;
  }
}

/* ============ SKIP-LINK (pour référence) ============ */
/* Voir base.css — .skip-link est défini là */
