/* ══════════════════════════════════════════════════════════════════════════
   LA MÊME TÊTE DE PAGE PARTOUT — 22/11/2026

   Demandé : « comme ma demande pour Whileresume, avec le header qui soit
   ISO sur toutes les pages… fais-moi pareil sur toutes les pages de Whilo
   (visiteurs et connectés) ». Le modèle est l'en-tête « Base de données »
   de Whileresume : un titre surligné au fluo (le magenta de Whilo), un
   chapeau, éventuellement une rangée de boutons ; aligné à gauche, sans
   surtitre, sans carte, sans fond.

   Les écrans avaient chacun leur tête (bandeau magenta `hn-hero`, cartes
   `wh-tete`, `esp-tete`, `ev-tete`, `hero-interne`, `hero-reseau`, titres
   nus) : cette feuille, chargée EN DERNIER par les gabarits app et vitrine,
   les ramène toutes au même dessin. Les nouveaux écrans prennent les
   classes `wh-iso` (conteneur), `wh-iso__h1`, `wh-iso__chapeau`,
   `wh-iso__actions`.

   Pas concernés : l'accueil (son hero), les FICHES (une offre, un cabinet,
   un article, un espace, un événement : un nom propre ne se surligne pas),
   les documents à imprimer, le tunnel « publier une offre » et les cartes
   de connexion, qui gardent leur dessin.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Le conteneur : plus de carte, plus de fond ── */
.wh-iso,
.hn-hero, .hn-hero--wr,
.wh-carte.wh-tete,
.hn-shell--page .esp-tete, .hn-shell--page .ev-tete, .esp-tete, .ev-tete,
.wh-meme > .hero-interne, .hn-shell--page .wh-meme > .hero-interne,
.hero-reseau {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
  margin: 0 0 26px; padding: 6px 0 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--wh-nuit, #1E1B2E);
  text-align: left;
}
.hero-reseau > .container, .wh-meme > .hero-interne > .container { padding-left: 0; padding-right: 0; max-width: none; width: 100%; }
.wh-carte.wh-tete > .wh-tete__txt { flex: none; width: 100%; }

/* ── Le titre : surligné, le même partout ── */
.wh-iso__h1, .hn-page__titre,
.hn-hero__titre,
.wh-carte.wh-tete .wh-h1,
.esp-tete h1, .ev-tete h1, .hn-shell--page .esp-tete h1, .hn-shell--page .ev-tete h1,
.wh-meme > .hero-interne h1, .hn-shell--page .wh-meme > .hero-interne h1,
.hero-reseau h1 {
  margin: 0; max-width: 980px;
  font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -.9px; font-style: normal;
  color: var(--wh-nuit, #1E1B2E);
  text-align: left;
  text-decoration-line: underline; text-decoration-style: solid;
  text-decoration-color: rgba(122, 44, 110, .24);
  text-decoration-thickness: .36em; text-underline-offset: -.16em; text-decoration-skip-ink: none;
}
/* Un mot mis en avant (« voici votre semaine ») : le même titre, d'un seul tenant. */
.wh-iso__h1 em, .hn-hero__titre em, .wh-carte.wh-tete .wh-h1 em, .hero-interne h1 em, .esp-tete h1 em, .ev-tete h1 em {
  font-style: normal; color: inherit;
}
/* Le titre automatique des écrans (partials/titre_page.ejs) : la même marge. */
.hn-page__titre { margin-bottom: 26px; }

/* ── Le chapeau ── */
.wh-iso__chapeau,
.hn-hero__sous,
.wh-carte.wh-tete .wh-tete__x,
.esp-tete > p, .ev-tete > p, .hn-shell--page .esp-tete > p, .hn-shell--page .ev-tete p,
.wh-meme .hero-interne__accroche, .hn-shell--page .wh-meme .hero-interne__accroche,
.hero-reseau__compte {
  margin: 12px 0 0; max-width: 760px;
  font-size: 16px; line-height: 1.6; color: var(--wh-gris-f, #4B5563);
}

/* ── Plus de surtitre ni de pastille au-dessus du titre ── */
.wh-meme__sur, .esp-tete__sur, .ev-tete__sur, .hn-shell--page .esp-tete__sur, .hn-shell--page .ev-tete__sur, .hn-hero__marque { display: none !important; }

/* ── La rangée de boutons, sous le chapeau ── */
.wh-iso__actions,
.hn-hero__cta, .hn-hero__actions,
.wh-carte.wh-tete .wh-tete__btns,
.ev-tete__actions, .hn-shell--page .esp-tete > .esp-tete__cta, .esp-tete__cta,
.wh-suivi__actions {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 20px 0 0; text-align: left;
}
/* Les boutons blancs faits pour le bandeau magenta deviennent les boutons de la page. */
.hn-hero .hn-btn--blanc {
  background: var(--wh-violet, #7A2C6E); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(122, 44, 110, .22);
}
.hn-hero .hn-btn--blanc:hover { background: var(--wh-violet-f, #5E1F55); color: #fff; }
.hn-hero__ghost { border-color: var(--wh-bord-f, #EBD3E7); color: var(--wh-violet-f, #5E1F55); background: #fff; }
.hn-hero__ghost:hover { background: #FBF3FA; color: var(--wh-violet-ff, #4A1844); }

/* La recherche de l'aide, sous le chapeau : un champ clair. */
.hn-hero__champ { margin-top: 20px; background: #fff; border-color: var(--wh-bord, #F1E4EF); color: var(--wh-nuit, #1E1B2E); }
.hn-hero__champ:hover { background: #fff; border-color: var(--wh-bord-f, #EBD3E7); }
.hn-hero__champ:focus-within { background: #fff; border-color: var(--wh-violet, #7A2C6E); box-shadow: 0 0 0 3px rgba(122, 44, 110, .14); }
.hn-hero__champ .ico, .hn-hero__champ svg { color: var(--wh-violet, #7A2C6E); }
.hn-hero__champ input { color: var(--wh-nuit, #1E1B2E); }
.hn-hero__champ input::placeholder { color: var(--wh-gris, #6B7280); }
.hn-hero__champ input::-webkit-search-cancel-button { background: var(--wh-gris, #6B7280); }

@media (max-width: 760px) {
  .wh-iso__h1, .hn-page__titre, .hn-hero__titre, .wh-carte.wh-tete .wh-h1,
  .esp-tete h1, .ev-tete h1, .hn-shell--page .esp-tete h1, .hn-shell--page .ev-tete h1,
  .wh-meme > .hero-interne h1, .hn-shell--page .wh-meme > .hero-interne h1, .hero-reseau h1 { font-size: 27px; letter-spacing: -.6px; }
  .wh-iso, .hn-hero, .wh-carte.wh-tete, .esp-tete, .ev-tete, .hn-shell--page .esp-tete, .hn-shell--page .ev-tete,
  .wh-meme > .hero-interne, .hn-shell--page .wh-meme > .hero-interne, .hero-reseau { margin-bottom: 20px; padding: 0; }
}

/* Les titres nus des pages de liste (plan, carte, FAQ) : plus forts que
   `.faq-liste h1`, `.container h1`… */
.wh-iso .wh-iso__h1 { margin: 0; font-size: 36px; color: var(--wh-nuit, #1E1B2E); }
.wh-iso .wh-iso__chapeau { margin: 12px 0 0; }
@media (max-width: 760px) { .wh-iso .wh-iso__h1 { font-size: 27px; } }

/* La FAQ : la tête sur toute la largeur, comme ailleurs ; les questions
   gardent leur colonne de lecture. */
.faq-liste { max-width: none; padding-top: 6px; }
.faq-liste > :not(.wh-iso) { max-width: 860px; }

/* Les pages de présentation à formulaire (annuaire des cabinets, CV
   anonyme) : plus de bandeau lilas en vague ; le titre et le chapeau
   comme partout, le formulaire reste à côté. */
.hero-lilas.hero-vague, .hn-shell--page .main .hero-lilas.hero-vague { background: none; padding: 6px 0 32px; border-radius: 0; }
.hero-vague::before { display: none; }
.hero-vague > .container { padding-left: 0; padding-right: 0; max-width: none; }
.hero-vague__texte h1 {
  margin: 0; font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -.9px; color: var(--wh-nuit, #1E1B2E);
  text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: rgba(122, 44, 110, .24);
  text-decoration-thickness: .36em; text-underline-offset: -.16em; text-decoration-skip-ink: none;
}
.hero-vague__sous { margin: 12px 0 0; font-size: 16px; font-weight: 600; color: var(--wh-nuit, #1E1B2E); }
.hero-vague__accroche { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--wh-gris-f, #4B5563); max-width: 760px; }
@media (max-width: 760px) { .hero-vague__texte h1 { font-size: 27px; } }

/* Une page dont la tête ouvre la section (plan, carte) : pas de marge en
   plus au-dessus, pour tomber au même endroit que les autres. */
.section:has(> .container > .wh-iso:first-child) { padding-top: 0; }
.hn-shell--page .section:has(> .container > .wh-iso:first-child) { padding-top: 0; }

/* Les formulaires d'annonce et d'événement : leur titre suit la règle (une
   ligne, sans le mot en italique). */
.hn-wrf__h1:not(.hn-wrf__h1--fiche) {
  font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -.9px; color: var(--wh-nuit, #1E1B2E);
  text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: rgba(122, 44, 110, .24);
  text-decoration-thickness: .36em; text-underline-offset: -.16em; text-decoration-skip-ink: none;
}
.hn-wrf__h1:not(.hn-wrf__h1--fiche) br { display: none; }
.hn-wrf__h1:not(.hn-wrf__h1--fiche) em { font-style: normal; color: inherit; }
.hn-wrf__h1:not(.hn-wrf__h1--fiche) em::before { content: ' '; }
@media (max-width: 760px) { .hn-wrf__h1:not(.hn-wrf__h1--fiche) { font-size: 27px; } }
.hn-shell--page .section > .container:has(> .wh-iso:first-child) { padding-left: 0; padding-right: 0; max-width: none; }

/* 22/11/2026 (soir) — Événements : « Ajouter un événement » à droite du titre
   (connecté seulement, views/vitrine/evenements.ejs). */
/* ⚠️  `width: 100%` : LE PARENT EST UNE COLONNE EN `align-items: flex-start`.
   Sans cette largeur, la ligne se réduit à son contenu et le
   `justify-content: space-between` ne pousse rien — le bouton restait collé
   au titre au lieu de tenir la droite de la page (23/11/2026). */
.ev-tete__ligne { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.ev-tete__ligne h1 { margin: 0 !important; }
.ev-tete__ajouter { flex: 0 0 auto; }

/* ══════════════════════════════════════════════════════════════════════
   23/11/2026 — LES BOUTONS DE LA TÊTE, À DROITE DU TITRE (demandé :
   « chaque bouton sous le header est float à droite du titre »).

   Le titre et le chapeau restent à gauche ; la rangée de boutons passe en
   haut à droite, sur la ligne du titre. Une grille plutôt qu'un flottant :
   le chapeau ne passe pas sous les boutons, et la rangée ne déborde pas.
   Sur téléphone, rien ne change : les boutons restent sous le chapeau.
   ══════════════════════════════════════════════════════════════════════ */
@media (min-width: 761px) {
  .wh-iso:has(> .wh-iso__actions),
  .hn-hero:has(> .hn-hero__actions), .hn-hero:has(> .hn-hero__cta),
  .wh-carte.wh-tete:has(> .wh-tete__btns),
  .wh-tete__txt:has(> .wh-tete__btns),
  .esp-tete:has(> .esp-tete__cta),
  .ev-tete:has(> .ev-tete__actions) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; row-gap: 0; align-items: start;
  }
  .wh-iso:has(> .wh-iso__actions) > *,
  .hn-hero:has(> .hn-hero__actions) > *, .hn-hero:has(> .hn-hero__cta) > *,
  .wh-carte.wh-tete:has(> .wh-tete__btns) > *,
  .wh-tete__txt:has(> .wh-tete__btns) > *,
  .esp-tete:has(> .esp-tete__cta) > *,
  .ev-tete:has(> .ev-tete__actions) > * { grid-column: 1; }
  .wh-iso > .wh-iso__actions,
  .hn-hero > .hn-hero__actions, .hn-hero > .hn-hero__cta,
  .wh-carte.wh-tete > .wh-tete__btns,
  .wh-tete__txt > .wh-tete__btns,
  .esp-tete > .esp-tete__cta,
  .ev-tete > .ev-tete__actions {
    grid-column: 2; grid-row: 1 / span 8; align-self: start;
    margin: 2px 0 0; justify-content: flex-end; max-width: 460px;
  }
}

/* 23/11/2026 (suite) — LES BOUTONS POSÉS DIRECTEMENT DANS LA TÊTE.
   « Suivi des candidatures » et le studio n'ont pas de `.wh-tete__btns` :
   le bouton est un enfant direct de `.wh-tete`, sous le texte. Toute la tête
   qui a un `.wh-tete__txt` met désormais le reste à sa droite. */
@media (min-width: 761px) {
  .wh-carte.wh-tete:has(> .wh-tete__txt + :not(.wh-tete__txt)) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; row-gap: 10px; align-items: start;
  }
  .wh-carte.wh-tete:has(> .wh-tete__txt + :not(.wh-tete__txt)) > .wh-tete__txt { grid-column: 1; grid-row: 1 / span 8; }
  .wh-carte.wh-tete:has(> .wh-tete__txt + :not(.wh-tete__txt)) > :not(.wh-tete__txt) {
    grid-column: 2; align-self: start; justify-self: end; margin: 2px 0 0;
  }
}
