/* ==========================================================================
   AZIMUT PARTNERS — institutionnel.css
   Éléments communs à toutes les pages de l'univers institutionnel (clair).

   Sommaire
     1. En-tête : marque, signature, menu, bouton de contact
     2. Menu mobile (écrans de moins de 1280 px)
     3. Menu ordinateur (écrans de 1280 px et plus)
     4. Pied de page

   Dépend de socle.css (variables, boutons, icônes).
   ========================================================================== */

:root {
  --marge-entete: clamp(16px, 2.6vw, 40px);
}


/* 1. EN-TÊTE ------------------------------------------------------------- */

.entete {
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 rgba(8, 36, 72, 0.06);
  transition: box-shadow 0.3s;
}

/* L'en-tête reste accroché en haut de l'écran (uniquement si JavaScript est actif,
   pour que le menu déplié sans JavaScript ne masque pas la page). */
.js .entete {
  position: sticky;
  top: 0;
}

/* Ombre ajoutée par site.js dès que la page a défilé */
.entete.est-defilee {
  box-shadow: 0 1px 0 rgba(8, 36, 72, 0.06), 0 14px 30px -22px rgba(8, 36, 72, 0.45);
}

.entete__barre {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  max-width: 1600px;
  min-height: 64px;
  margin-inline: auto;
  padding-inline: var(--marge-entete);
}

/* Marque : symbole officiel + nom + signature */
.marque {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding-block: 8px;
  color: var(--marine);
  text-decoration: none;
}

.marque__symbole {
  width: auto;
  height: 34px;
}

.marque__nom {
  font-family: var(--police-titre);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Signature à côté du nom : masquée sur téléphone, où elle passe dans le bandeau ci-dessous */
.marque__signature {
  display: none;
}

/* Signature en bandeau sous la barre, sur téléphone */
.entete__signature {
  padding: 5px 12px 6px;
  border-top: 1px solid var(--filet);
  background: linear-gradient(90deg, rgba(1, 131, 134, 0.07), rgba(1, 131, 134, 0.02));
  color: var(--marine);
  font-size: 0.6563rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

/* Bouton « Nous contacter » de la barre : masqué sur téléphone (présent dans le menu) */
.entete__contact {
  display: none;
}

/* Bouton d'ouverture du menu mobile */
.entete__bascule {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: var(--rayon-s);
  color: var(--marine);
}

html:not(.js) .entete__bascule {
  display: none;
}

.entete__bascule-traits,
.entete__bascule-traits::before,
.entete__bascule-traits::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--courbe), background-color 0.2s;
}

.entete__bascule-traits {
  position: relative;
}

.entete__bascule-traits::before,
.entete__bascule-traits::after {
  content: "";
  position: absolute;
  left: 0;
}

.entete__bascule-traits::before {
  transform: translateY(-7px);
}

.entete__bascule-traits::after {
  transform: translateY(7px);
}

.menu-ouvert .entete__bascule-traits {
  background: transparent;
}

.menu-ouvert .entete__bascule-traits::before {
  transform: rotate(45deg);
}

.menu-ouvert .entete__bascule-traits::after {
  transform: rotate(-45deg);
}

@media (min-width: 560px) {
  .entete__contact {
    display: inline-flex;
  }

  .entete__bascule {
    margin-right: 0;
  }
}

@media (min-width: 700px) {
  .entete__barre {
    min-height: 70px;
  }

  .marque__symbole {
    height: 38px;
  }

  .marque__nom {
    font-size: 1.25rem;
  }

  .marque__signature {
    display: block;
    margin-left: 4px;
    padding-left: 14px;
    border-left: 1.5px solid rgba(8, 36, 72, 0.4);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .entete__signature {
    display: none;
  }
}


/* 2. MENU MOBILE (moins de 1280 px) -------------------------------------- */

.menu {
  flex-basis: 100%;
  padding: 4px 0 20px;
}

/* Avec JavaScript : panneau déroulant sous l'en-tête, fermé par défaut */
.js .menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100vh - var(--hauteur-entete, 90px));
  max-height: calc(100dvh - var(--hauteur-entete, 90px));
  padding: 8px var(--marge-entete) 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--filet);
  background: var(--blanc);
  box-shadow: 0 30px 40px -24px rgba(8, 36, 72, 0.35);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.3s var(--courbe), visibility 0s 0.3s;
}

.js .menu-ouvert .menu {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.menu__lien {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--filet);
  color: var(--marine);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.menu__lien--demo {
  color: #046a6e;
  font-weight: 700;
}

.menu__lien[aria-current="page"] {
  color: var(--turquoise);
}

/* Actions commerciales, présentes uniquement dans le menu mobile */
.menu__actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}


/* 3. MENU ORDINATEUR (1280 px et plus) ----------------------------------- */
/* Les tailles grandissent progressivement entre 1280 et 1600 px pour que la
   marque, sa signature, les cinq liens et le bouton tiennent sur une ligne.
   Elles sont calées sur le libellé « Exemples concrets » (correctif B07), plus
   long que l'ancien « Cas d'usage » : tout allongement d'un libellé du menu
   impose de les revoir. */

@media (min-width: 1280px) {
  .entete__barre {
    flex-wrap: nowrap;
    gap: clamp(12px, 4.375vw - 44px, 26px);
    min-height: clamp(68px, 2.5vw + 36px, 76px);
  }

  .marque {
    gap: clamp(9px, 1.25vw - 7px, 13px);
  }

  .marque__symbole {
    height: clamp(34px, 2.5vw + 2px, 42px);
  }

  .marque__nom {
    font-size: clamp(1.0625rem, 2.1875vw - 11px, 1.5rem);
  }

  .marque__signature {
    padding-left: clamp(9px, 1.875vw - 15px, 15px);
    font-size: clamp(0.625rem, 0.625vw + 2px, 0.75rem);
  }

  .entete__bascule {
    display: none;
  }

  .menu,
  .js .menu {
    position: static;
    flex: none;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu__liste {
    display: flex;
    align-items: center;
    gap: clamp(12px, 5vw - 52px, 28px);
  }

  .menu__lien {
    position: relative;
    min-height: 44px;
    border: 0;
    color: var(--encre);
    font-size: clamp(0.875rem, 0.625vw + 6px, 1rem);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
  }

  .menu__lien::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 6px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--turquoise-vif);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--courbe);
  }

  .menu__lien:hover,
  .menu__lien[aria-current="page"] {
    color: var(--turquoise);
  }

  .menu__lien:hover::after,
  .menu__lien[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .menu__lien--demo {
    color: #046a6e;
    font-weight: 700;
  }

  .menu__actions {
    display: none;
  }
}


/* 4. PIED DE PAGE -------------------------------------------------------- */

.pied {
  border-top: 1px solid var(--filet);
  background: var(--fond-doux);
  color: var(--encre-douce);
  font-size: 0.9375rem;
}

.pied__grille {
  display: grid;
  gap: 32px 48px;
  padding-block: clamp(40px, 5vw, 72px) clamp(28px, 3vw, 44px);
}

.pied__logo {
  width: 172px;
}

.pied__titre {
  margin-bottom: 8px;
  color: var(--marine);
  font-family: var(--police-texte);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pied__liens a {
  display: inline-block;
  padding-block: 10px;
  color: var(--encre);
  text-decoration: none;
  transition: color 0.2s;
}

.pied__liens a:hover {
  color: var(--turquoise);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pied__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 12px 24px;
  border-top: 1px solid var(--filet);
  font-size: 0.875rem;
}

.pied__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.pied__legal a {
  display: inline-block;
  padding-block: 11px;
  text-decoration: none;
}

.pied__legal a:hover {
  color: var(--turquoise);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 720px) {
  .pied__grille {
    grid-template-columns: 1.4fr 1fr 1.3fr;
  }

  .pied__liens a {
    padding-block: 5px;
  }

  .pied__legal a {
    padding-block: 5px;
  }
}
