/* =============================================================================
   En-tête du site — remplace le modèle Elementor Pro 2555.
   Valeurs relevées sur les styles calculés du rendu Elementor (Chrome headless,
   /artists/, largeurs 500 / 800 / 1024 / 1200 / 1440 / 1600 px).
   Ruptures d'origine : 767 / 1024 / 1025 / 1440 px.
   Couleurs globales du kit Elementor, résolues :
     --e-global-color-4f3aee6   = #F2F1EF (fond du bandeau)
     --e-global-color-secondary = #3A3A3A (texte, filets, icône burger)
     --e-global-color-primary   = #8B0000 (survol, focus, page courante)
   ============================================================================= */

/* --- Bandeau collant -------------------------------------------------- */
/* Elementor posait un position:fixed piloté en JS (jquery.sticky) + un clone
   .elementor-sticky__spacer. Offset 0 et bandeau en haut du document :
   position:sticky donne exactement la même géométrie, sans JS ni clone. */
.aec-header {
  --aec-header-bg: #F2F1EF;
  --aec-header-ink: #3A3A3A;
  --aec-header-ink-active: #8B0000;

  /* Largeur du logo : pleine taille en haut de page, réduite de moitié une fois
     le bandeau collé, pour rendre de la hauteur à la lecture pendant le
     défilement. La classe is-stuck est posée par override/assets/js/header.js. */
  --aec-header-logo-w: 54%;

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: var(--aec-header-bg);
}

/* Bandeau collé : logo à la moitié. Classe posée par header.js. */
.aec-header.is-stuck {
  --aec-header-logo-w: 27%;
}

/* Au repos le logo est collé au haut du bandeau (0 px au-dessus, 5 px en
   dessous) : c'est la valeur d'origine du montage Elementor, on n'y touche pas.
   Une fois réduit, il doit respirer autant au-dessus qu'en dessous. */
.aec-header.is-stuck .aec-header__brand {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Remplace .e-con-inner du conteneur racine.
   max-width 1400px : plafond global du thème (.e-con.e-flex>.e-con-inner
   dans override/assets/css/style.css:418). */
.aec-header__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 1px;
}
@media (max-width: 1024px) {
  .aec-header__inner { justify-content: center; }
}

/* --- Bloc logo (conteneur 142dd208 + widget image 4b336513) ----------- */
.aec-header__brand {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 0 5px;
}
@media (max-width: 767px) {
  .aec-header__brand { padding-bottom: 0; }
}

.aec-header__logo {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
}
@media (max-width: 1024px) {
  .aec-header__logo { margin-top: 15px; }
}
.aec-header__logo a { display: inline-block; }
.aec-header__logo img {
  display: inline-block;
  vertical-align: middle;
  width: var(--aec-header-logo-w);
  height: auto;
  max-width: 100%;
  transition: width .25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .aec-header__logo img { transition: none; }
}

/* --- Barre du menu (conteneur 7f7555c2 + son .e-con-inner) ------------ */
.aec-header__bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 0;
}
@media (max-width: 1024px) {
  .aec-header__bar {
    flex-direction: row;
    justify-content: space-between;
    row-gap: 40px;
    column-gap: 0;
    padding: 18px 24px;
  }
}
@media (max-width: 767px) {
  .aec-header__bar {
    flex-direction: column;
    row-gap: 0;
    column-gap: 0;
    padding: 5px 5px 30px;
  }
}

/* --- Filets (widgets divider) : visibles ≥1025 px seulement ----------- */
.aec-header__rule {
  display: block;
  width: 100%;
  padding-block: 2px;   /* hauteur totale 5 px : 2 + 1 + 2 */
}
.aec-header__rule::before {
  content: "";
  display: block;
  border-block-start: 1px solid var(--aec-header-ink);
}
@media (max-width: 1024px) {
  .aec-header__rule { display: none; }
}

/* --- Bloc navigation (widget 658692a3) ------------------------------- */
.aec-header__nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  gap: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 0;
}
@media (max-width: 1024px) {
  .aec-header__nav { padding: 0 15px; }
}
@media (max-width: 767px) {
  .aec-header__nav {
    justify-content: normal;
    padding: 0;
    margin-bottom: -25px;   /* remonte le bandeau, valeur d'origine */
  }
}

/* --- Listes : base commune aux deux menus ---------------------------- */
.aec-header .aec-menu {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
}
.aec-header .aec-menu ul { display: none; }   /* pas de sous-menu dans ce header */

/* Selecteur a deux classes : il doit passer devant `.aec-kit a` (0,1,1) du socle
   repris du kit, qui imposerait sinon Roboto-Bold 16px et word-spacing 11px. */
.aec-header .aec-menu__link {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  text-transform: uppercase;
  word-spacing: 0;
  color: var(--aec-header-ink);
  fill: var(--aec-header-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Menu horizontal (≥768 px) --------------------------------------- */
.aec-header__nav-desktop {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .aec-header__nav-desktop { display: none; }
}

.aec-header__nav-desktop .aec-menu {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0 auto;
}
.aec-header__nav-desktop .aec-menu > li {
  display: flex;
  position: relative;
  margin: 0;
  padding: 0;
  border-width: 0;
  line-height: normal;
}
.aec-header__nav-desktop .aec-menu__link {
  flex-grow: 1;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: center;
  transition: .4s;   /* couleur + opacité, comme Elementor */
}

/* ≥1025 px : ligne à 1.4px — valeur d'origine en px (et non en em) ;
   c'est elle qui donne les 41,41 px de haut du bloc menu. NE PAS corriger. */
@media (min-width: 1025px) {
  .aec-header__nav-desktop .aec-menu__link {
    font-size: 20px;
    line-height: 1.4px;
    letter-spacing: .8px;
    padding: 0 22px;
  }
}
@media (min-width: 1440px) {
  .aec-header__nav-desktop .aec-menu__link { padding: 0 26px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .aec-header__nav-desktop .aec-menu__link {
    font-size: 17px;
    line-height: 1.4em;
    letter-spacing: .6px;
    padding: 0 8px;
  }
}

.aec-header__nav-desktop .aec-menu__link:hover {
  color: var(--aec-header-ink-active);
  fill: var(--aec-header-ink-active);
  opacity: .7;
}
.aec-header__nav-desktop .aec-menu__link:focus,
.aec-header__nav-desktop .current-menu-item > .aec-menu__link {
  color: var(--aec-header-ink-active);
  fill: var(--aec-header-ink-active);
}

/* --- Burger + panneau (≤767 px) -------------------------------------- */
.aec-header__burger,
.aec-header__panel-slot { display: none; }

@media (max-width: 767px) {

  /* Neutralise entièrement le style bouton de assets/css/reset.css. */
  .aec-header__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: .25em;             /* 4 px pour 16 px de police */
    border: 0;
    border-radius: 3px;
    background-color: var(--aec-header-bg);
    color: var(--aec-header-ink);
    font: inherit;
    font-size: 16px;            /* --nav-menu-icon-size mobile */
    line-height: 1;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
    transition: none;
    -webkit-appearance: none;
    appearance: none;
  }
  .aec-header__burger:hover,
  .aec-header__burger:focus {
    color: var(--aec-header-ink-active);
    background-color: var(--aec-header-bg);
  }
  .aec-header__burger svg {
    display: block;
    width: 1em;
    height: auto;
    fill: var(--aec-header-ink);   /* l'icône ne change PAS au survol (quirk d'origine) */
  }
  .aec-header__burger .aec-header__burger-close { display: none; }
  .aec-header__burger.is-open .aec-header__burger-open  { display: none; }
  .aec-header__burger.is-open .aec-header__burger-close { display: block; }

  /* La « fente » réserve la place du panneau fermé (4 + 4 px de padding)
     pour que la hauteur du header fermé reste identique à l'original,
     et sert de bloc conteneur au panneau positionné. */
  .aec-header__panel-slot {
    display: block;
    position: relative;
    height: 8px;
    margin-top: 6px;
  }

  .aec-header__panel {
    position: absolute;
    top: 0;
    inset-inline: 0;
    padding: 4px 0;
    border-radius: 10px;
    background-color: var(--aec-header-bg);
    font-size: 13px;
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height .3s, transform .3s;
  }
  .aec-header__panel.is-open {
    max-height: var(--aec-menu-height, 100vh);
    transform: scaleY(1);
    overflow-x: hidden;
    overflow-y: auto;
    animation: aec-hide-scroll .3s backwards;
  }

  .aec-menu--panel > li {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
  }
  .aec-menu--panel .aec-menu__link {
    justify-content: center;
    padding: 4px 0;
    font-size: 14px;
    line-height: 1.18;
    letter-spacing: .5px;
    white-space: normal;
  }
  .aec-menu--panel > li:first-child .aec-menu__link { border-radius: 10px 10px 0 0; }
  .aec-menu--panel > li:last-child  .aec-menu__link { border-radius: 0 0 10px 10px; }

  .aec-menu--panel .aec-menu__link:hover,
  .aec-menu--panel .aec-menu__link:focus,
  .aec-menu--panel .current-menu-item > .aec-menu__link {
    color: var(--aec-header-ink-active);
    background-color: var(--aec-header-bg);
  }
  .aec-menu--panel .aec-menu__link:hover { opacity: .7; }
}

/* Masque la barre de défilement pendant l'ouverture (repris d'Elementor). */
@keyframes aec-hide-scroll { 0%, to { overflow: hidden; } }
