/* =========================================================
   HEADER — Mobile First
========================================================= */

.site-header {
  background: var(--color-secondary);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Nouveau layout en GRID → indispensable */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "branding hamburger"
    "nav nav"
    "btn btn";
  align-items: center;
  row-gap: 0.8rem;
}

/* =======================================
   BRANDING (logo + titre)
======================================= */
.branding {
  grid-area: branding;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.site-logo {
  width: 70px;
  height: auto;
}

.site-title a {
  font-family: var(--font-title);
  font-size: 25px;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}

/* =======================================
   HAMBURGER ICON
======================================= */
.hamburger {
  grid-area: hamburger;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: 0.3s ease;
}

/* Quand actif : transformation en croix */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger,
.hamburger:hover,
.hamburger:active,
.hamburger:focus,
.hamburger.active {
  background: none !important;
  box-shadow: none !important;
}

/* =======================================
   MENU MOBILE (fermé par défaut)
======================================= */
.main-nav {
  grid-area: nav;

  width: 100%;
  overflow: hidden;

  /* caché mais animé */
  max-height: 0;
  opacity: 0;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  /* transition fluide */
  transition:
    max-height 0.35s ease,
    opacity 0.35s ease,
    margin-top 0.25s ease;
}

/* Quand on clique */
.main-nav.active {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.5rem;
}

/* =======================================
   LISTE MENU MOBILE
======================================= */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-list a {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 0.4rem 0;
  text-decoration: none;
}

/* =======================================
   BOUTON COMMANDER
======================================= */
.header-btn {
  grid-area: btn;
  display: block;
  background: var(--color-primary);
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  text-align: center;
  max-width: 180px;
  margin: 0 auto;
  font-weight: 600;
  text-decoration: none;
}