/* HEADER & NAV */
.site-header,
.site-footer {
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--space-xl);
}

.home-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid var(--color-text);
  box-shadow: 0 0 0 1px rgba(244, 244, 244, 0.2);
}

.brand-mark :hover {
  color: var(--color-text-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-title,
.brand-baseline {
  display: inline-block;
  text-decoration: none;
  transition: color 0.18s ease-out;
}

.brand-title {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.brand-baseline {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.brand-title:hover,
.brand-title:focus {
  color: var(--color-text-primary);
}

.brand-baseline:hover {
  color: #000000;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.3rem;
  margin-left: auto;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background-color: var(--color-text-muted);
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

.main-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #b2b5bc;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width 0.2s ease-out;
}

.main-nav a:hover {
  color: var(--color-text);
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a[aria-current="page"] {
  color: var(--color-text);
}

.main-nav a[aria-current="page"]::after {
  width: 100%;
}

/* PORTFOLIO DROPDOWN - DESKTOP ONLY */
.nav-portfolio-toggle {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: #b2b5bc;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: color 0.18s ease-out;
  font-family: inherit;
}

.nav-portfolio-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width 0.2s ease-out;
}

.nav-portfolio-toggle:hover {
  color: var(--color-text);
}

.nav-portfolio-toggle:hover::after {
  width: 100%;
}

.nav-portfolio-submenu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-top: none;
  list-style: none;
  margin: 0;
  padding: 0.6rem 0;
  min-width: 140px;
  z-index: 100;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.nav-item-portfolio:hover .nav-portfolio-submenu {
  display: block !important;
}

.nav-portfolio-submenu li {
  margin: 0;
  padding: 0;
}

.nav-portfolio-submenu a {
  display: block;
  padding: 0.5rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #b2b5bc;
  position: relative;
  transition: color 0.18s ease-out, background-color 0.18s ease-out;
}

.nav-portfolio-submenu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background-color: #9da1aa;
  transition: width 0.2s ease-out;
}

.nav-portfolio-submenu a:hover {
  color: var(--color-text);
  background-color: var(--color-border);
}

.nav-portfolio-submenu a:hover::after {
  width: 100%;
}

.nav-portfolio-submenu a[aria-current="page"] {
  color: var(--color-text);
  background-color: var(--color-border);
}

.nav-portfolio-submenu a[aria-current="page"]::after {
  width: 100%;
}

/* 🟡  */
/* ==========================
   RESPONSIVE HEADER & NAV (header.css)
   ========================== */
@media (max-width: 768px) {

  :root {
    --header-height-mobile: 2rem !important;   /* ajuste à l’œil : 80, 90, 100… */
  }
/* 🟡 FIX MARGIN HEADER FIXE - PRÉCIS */
.home-header + main.page-main.home-page {
  padding-top: 50px !important;
}

/* 🟡 même espace pour les galeries */
  .site-header + main.page-main.gallery-page {
    padding-top: 5px !important;
  }

/* 🟡 FIXE TAILLE HEADER */
  .site-header {
    padding: 24px 30px !important;   /* ← augmente la valeur avant et après (vertical) */
    align-items: center;
    gap: 0.75rem;
  }

  .brand-mark {
    width: 60px !important;
    height: 60px !important;
  }

  .brand-text {
    gap: 0.15rem;
    margin-left: 50px;
  }

  /* burger visible */
  .nav-toggle {
    display: block;
  }

  /* menu plein écran sous le header */
  .main-nav {
    position: fixed;
    top: 150px;
    left: 0;
    right: 0;
    height: calc(100vh - 150px);
    background-color: #05070b;
    border-top: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease-out, opacity 0.22s ease-out;
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    z-index: 999;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    padding-top: 1rem !important;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    margin-top: 2.4rem;
  }

  .main-nav li {
    border: none;
  }

  .main-nav a {
    display: block;
    padding: 0.4rem 1.4rem;
    font-size: 0.9rem;
    text-align: center;
  }

  .main-nav a::after {
    display: none;
  }

  .nav-toggle.is-open .nav-toggle-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle.is-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  /* Portfolio en mobile */
  .nav-item-portfolio {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-portfolio-submenu {
    display: none !important;
    position: static;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: auto;
  }

  .nav-item-portfolio.is-open .nav-portfolio-submenu {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }

  .nav-portfolio-submenu a {
    padding: 0.3rem 1.4rem;
    font-size: 0.8rem;
    background-color: transparent;
  }

  .nav-portfolio-submenu a:hover {
    background-color: transparent;
    color: var(--color-text);
  }
}

/* DESKTOP */
@media (min-width: 769px) {
  .main-nav {
    display: flex !important;
  }
  
  .nav-toggle {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .home-header ~ main {
    padding-top: 100px;
  }
}

/* RESPONSIVE MOBILE - TITRE CENTRÉ, LOGO À GAUCHE */
@media (max-width: 1024px) {
  .brand {
    position: relative !important;
    justify-content: center !important;
    width: 100% !important;
  }

  /* RÉGLAGE LATÉRAL DU LOGO DANS LE HEADER */
  .brand-mark {
    position: absolute !important;
    left: -20px !important;
    margin: 0 !important;
  }

  .brand-text {
    text-align: center !important;
    flex: 1 !important;
  }

  .brand-title {
    text-align: center !important;
  }
}

.home-header + main.page-main.gallery-page {
  padding-top: 90px !important;
}

/* 💣 FIX MARGIN ULTIME - PRIORITÉ ABSOLUE */
main.page-main {
  margin-top: 0 !important;
  padding-top: 40px !important;
}

.home-page section.hero-gallery,
.gallery-page {
  margin-top: 5px !important;
}

/* ✅ FIX MARGIN PARFAIT - ACCUEIL vs GALERIE */
.home-header + main.page-main.gallery-page {
  margin-top: 20px !important;
}

/* ✅ MARGES UNIFORMES TOUTES PAGES */
.site-header + main,
.home-header + main {
  padding-top: 70px !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 🟡 */
/* ==========================
   RESET ALIGNEMENT LOGO MOBILE
   ========================== */
@media (max-width: 768px) {

  /* Ligne header : logo + titre + burger bien espacés */
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* logo/titre à gauche, burger à droite */
    gap: 1rem;                       /* espace entre logo+texte et burger */
  }

  /* Groupe logo + titre */
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;                       /* espace entre logo et texte */
  }

  .brand-mark {
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 auto;
  }
}




