/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.header.is-scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 2px 24px rgba(11, 31, 51, 0.05);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: var(--space-2);
}

@media (min-width: 600px) {
  .header__bar { gap: var(--space-3); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink-900);
  flex-shrink: 1;
  min-width: 0;
}

.brand__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand__name { letter-spacing: -0.01em; }
.brand__name em {
  font-style: normal;
  color: var(--rust-500);
}

.nav-desktop {
  display: none;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }
}

.nav-desktop a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--slate-600);
  position: relative;
  padding-block: 0.3em;
  transition: color var(--dur-fast);
}

.nav-desktop a:hover { color: var(--ink-900); }

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--rust-500);
  transition: right var(--dur-base) var(--ease-out);
}
.nav-desktop a:hover::after { right: 0; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .header__actions { gap: var(--space-2); }
}

.header__actions .btn--sm {
  padding: 0.7em 1em;
  font-size: var(--fs-xs);
}

@media (min-width: 480px) {
  .header__actions .btn--sm { padding: 0.7em 1.3em; }
}

/* Très petits écrans : on masque le CTA du header (déjà présent dans le menu burger et le hero) pour laisser respirer le logo */
@media (max-width: 400px) {
  .header__actions > a.btn { display: none; }
}

.header__phone {
  display: none;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-900);
}

@media (min-width: 1180px) {
  .header__phone { display: flex; }
}

.header__phone svg { width: 16px; height: 16px; color: var(--rust-500); }

/* Burger mobile */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink-900);
  margin-inline: auto;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

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

.nav-mobile {
  position: fixed;
  top: 76px; left: 0; right: 0;
  background: var(--paper-100);
  border-bottom: 1px solid var(--line-soft);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
  box-shadow: 0 16px 32px rgba(11, 31, 51, 0.08);
}

.nav-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-mobile a:not(.btn) {
  padding: 0.85em 0.4em;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
}

.nav-mobile a:not(.btn):last-of-type { border-bottom: none; }

.nav-mobile .btn { margin-top: var(--space-2); }

@media (min-width: 960px) {
  .nav-mobile { display: none; }
}
