/* Le site public : en-tête, menu, bandeaux et pied de page. Les sections sont dans sections.css et cards.css. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-bottom: 2px solid var(--color-on-primary);
}

.site-header > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  color: var(--color-on-primary);
  text-decoration: none;
}

/* Le logo d'origine, en blanc sur le marine de l'en-tête. */
.brand img {
  width: auto;
  height: 38px;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Sur un téléphone, le nom passe sur deux lignes : le bouton « Menu » reste à côté du logo, la barre reste basse. */
@media (max-width: 479.98px) {
  .site-header > .container {
    column-gap: var(--space-3);
  }

  .brand {
    gap: var(--space-2);
  }

  .brand img {
    height: 32px;
  }

  .brand span {
    max-width: 6.5em;
    font-size: var(--text-lg);
    line-height: 1.05;
    white-space: normal;
  }
}

/* Le grand bandeau : une photo (ou la vidéo de l'accueil) voilée de bleu, le titre en capitales. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  overflow: hidden;
  min-height: clamp(300px, 44vw, 520px);
  color: var(--color-on-primary);
  background: var(--color-photo-fallback);
}

.hero.compact {
  min-height: clamp(220px, 28vw, 340px);
}

.hero.home {
  min-height: min(88vh, 760px);
}

.hero > img,
.hero > .hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-overlay);
}

.hero .container {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-16);
}

.hero a:not(.button) {
  color: var(--color-on-primary);
}

.hero h1,
.hero .hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: 1.05;
  text-transform: uppercase;
  max-width: 22ch;
}

.hero .hero-title a {
  text-decoration: none;
}

/* Le texte sur la vidéo de l'accueil : justifié, coupé proprement, sans mot seul en dernière ligne. */
.hero-text {
  display: grid;
  gap: var(--space-3);
  max-width: 64ch;
  font-size: var(--text-lg);
  line-height: 1.65;
}

.hero.home .hero-text p {
  text-wrap: pretty;
}

/* Justifié dès qu'une ligne est assez longue ; sur téléphone, aligné à gauche (sinon de grands blancs entre les mots). */
@media (min-width: 640px) {
  .hero.home .hero-text p {
    text-align: justify;
    hyphens: auto;
  }
}

.eyebrow {
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Un bandeau photo au milieu d'une page (« École créée en 1985 », « La salle d'OPS ») : le texte à gauche, sur un voile
   qui s'efface vers la photo. */
.hero.band-photo {
  min-height: clamp(320px, 38vw, 480px);
}

.hero.band-photo::before {
  background: linear-gradient(90deg, var(--color-overlay-strong) 0%, var(--color-overlay) 45%, var(--color-overlay-clear));
}

.hero.band-photo .hero-title {
  font-size: clamp(var(--text-2xl), 4vw, 2.75rem);
  text-transform: none;
  max-width: 24ch;
}

.hero.band-photo .hero-text {
  max-width: 52ch;
}

.title-band {
  padding-block: var(--space-12);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.title-band .container {
  display: grid;
  gap: var(--space-2);
}

.title-band a {
  color: var(--color-on-primary);
}

.title-band h1 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-hero));
  text-transform: uppercase;
}
