/* En-tête et hero communs à TOUTES les pages : chargés par l'application React
   (import dans src/components/Navbar.jsx) et copié en /ressources/entete.css
   pour les pages statiques (scripts/lib/entete.js). Un seul fichier, donc un
   seul rendu. Les classes sont préfixées cbh- pour ne rien toucher d'autre.
   Le texte des boutons verts est bleu nuit : le blanc sur #10b981 ne donne que
   2,5:1, sous le seuil de 4,5:1. */

:root { --cbh-hauteur: 65px; }
.cbh-fixe { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.cbh-cale { height: 65px; }


.cbh {
  position: relative; background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: Montserrat, system-ui, sans-serif; color: #e2e8f0;
}
.cbh * { box-sizing: border-box; }
.cbh-in {
  max-width: 80rem; height: 64px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 24px; font-size: 14px;
}
.cbh-logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: #fff; font: 700 18px/1 Montserrat, system-ui, sans-serif; text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.cbh-logo img { height: 40px; width: auto; display: block; }
.cbh-logo-boost { color: #34d399; }

.cbh-menu { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.cbh-lien, .cbh-compte {
  color: #cbd5e1; font: 600 14px/1.2 Montserrat, system-ui, sans-serif;
  text-decoration: none; white-space: nowrap;
}
.cbh-lien:hover, .cbh-compte:hover { color: #fff; }
.cbh-lien[aria-current="page"] { color: #34d399; }
.cbh-compte { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #fff; }
.cbh-compte svg { width: 20px; height: 20px; flex-shrink: 0; }
/* Entre 1140 et 1279 px, l'en-tête ne tient sur une ligne que si le lien du
   compte se réduit à son icône (mesuré en production, Coach actif, en
   allemand). Le libellé reste lu par les lecteurs d'écran. */
@media (min-width: 1140px) and (max-width: 1279px) {
  .cbh-compte span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.cbh-cta {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-height: 44px; padding: 0 20px; border-radius: 10px; border: 0;
  background: #10b981; color: #0f172a; font: 700 14px/1 Montserrat, system-ui, sans-serif;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.cbh-cta:hover { background: #34d399; color: #0f172a; }

/* Sélecteur de langue : <details>, donc utilisable sans JavaScript. */
.cbh .lang-switcher { position: relative; margin: 0; }
.cbh .lang-switcher summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 0 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  color: #e2e8f0; font: 600 14px/1 Montserrat, system-ui, sans-serif; cursor: pointer; white-space: nowrap;
  background: transparent;
}
.cbh .lang-switcher summary::-webkit-details-marker { display: none; }
.cbh .lang-switcher summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
}
.cbh .lang-switcher summary:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.cbh .lang-switcher ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; margin: 0; padding: 6px;
  list-style: none; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(2,6,23,.35); z-index: 60;
}
.cbh .lang-switcher li { margin: 0; }
.cbh .lang-switcher a {
  display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: #0f172a; font: 600 14px/1 'Open Sans', system-ui, sans-serif; text-decoration: none;
}
.cbh .lang-switcher a:hover { background: #f1f5f9; }
.cbh .lang-switcher a[aria-current] { color: #047857; background: #ecfdf5; }

.cbh-burger {
  display: none; width: 44px; height: 44px; flex-shrink: 0; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: transparent; color: #fff; cursor: pointer; padding: 0;
}
.cbh-burger svg { width: 22px; height: 22px; }

.cbh a:focus-visible, .cbh button:focus-visible, .cbh summary:focus-visible {
  outline: 3px solid #34d399; outline-offset: 2px;
}

/* Téléphone et tablette : le menu passe dans un panneau. Le seuil tient compte
   des libellés allemands, les plus longs (mesuré par scripts/test-entete.js). */
@media (max-width: 1139px) {
  .cbh-in { padding: 0 16px; gap: 10px; }
  .cbh-burger { display: inline-flex; }
  .cbh-cta { margin-left: auto; }
  .cbh-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px 16px 20px;
    background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.08);
    max-height: calc(100vh - 65px); overflow-y: auto;
  }
  .cbh.ouvert .cbh-menu { display: flex; }
  .cbh-lien, .cbh-compte {
    display: flex; align-items: center; min-height: 52px; font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .cbh .lang-switcher { margin-top: 16px; }
  .cbh .lang-switcher summary { min-height: 48px; }
  .cbh .lang-switcher ul { position: static; margin-top: 8px; box-shadow: none; }
}
@media (max-width: 479px) {
  .cbh-in { gap: 8px; }
  .cbh-logo { font-size: 16px; gap: 8px; }
  .cbh-logo img { height: 32px; }
  .cbh-cta { padding: 0 10px; font-size: 13px; }
}
/* Sous 390 px, le bouton allemand (« Lebenslauf erstellen ») ne laisse plus
   la place au nom : le logo seul reste. Sous 360 px, idem pour toutes. */
@media (max-width: 389px) { .cbh:lang(de) .cbh-logo-texte { display: none; } }
@media (max-width: 359px) { .cbh-logo-texte { display: none; } }

/* ─── Hero sombre : premier bloc de chaque page, dans l'esprit de l'accueil.
   Contrastes sur #0f172a : blanc 17:1, #cbd5e1 12:1, #94a3b8 6,9:1,
   #6ee7b7 11:1. Les pages statiques ajoutent leurs réglages dans blog.css. */
.cbh-hero {
  position: relative; overflow: hidden; color: #cbd5e1;
  background: radial-gradient(ellipse 60% 90% at 88% 0%, rgba(16,185,129,.16), transparent 70%), #0f172a;
}
.cbh-hero h1 { color: #fff; font-family: Montserrat, system-ui, sans-serif; font-weight: 800; letter-spacing: -.02em; }
.cbh-hero p, .cbh-hero li { color: #cbd5e1; }
.cbh-hero strong { color: #fff; }
.cbh-hero a:not(.cbh-btn):not([class*="cta"]) { color: #a7f3d0; }
.cbh-hero-pastille {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(16,185,129,.12); border: 1px solid rgba(52,211,153,.35); color: #6ee7b7;
  font: 600 13px/1.2 Montserrat, system-ui, sans-serif;
}
.cbh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 12px; background: #10b981; color: #0f172a; border: 0; cursor: pointer;
  font: 700 16px/1.2 Montserrat, system-ui, sans-serif; text-decoration: none;
}
.cbh-btn:hover { background: #34d399; color: #0f172a; }
.cbh-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); font-weight: 600; }
.cbh-btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.45); }

@media print { .cbh-fixe, .cbh-cale { display: none; } .cbh-hero { background: none; color: #000; } }
