/* =========================================================================
   En-tête du site (v49) — même style que la maquette des pages pays :
   bande transparente sur toute la largeur (verre dépoli), rubriques en pastilles,
   la rubrique en cours en bleu nuit soulignée d'orange, « Se connecter » en pastille
   blanche et « Créer une annonce + » en orange. Chargé après ui.css et lux.css.
   ========================================================================= */
.hd {
  --hd-navy: #0B2A66; --hd-ink: #0B1A3D; --hd-orange: #FF7B17; --hd-orange-d: #EF6A06; --hd-line: #D5DEED;
  --hd-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  position: sticky; top: 0; z-index: 40;
  padding-top: 0; pointer-events: auto;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 8px 24px -16px rgba(30, 70, 160, .25) !important;
  font-family: var(--hd-font);
  transition: background .25s, box-shadow .25s;
}
.hd.is-scrolled { background: rgba(255, 255, 255, .82); box-shadow: 0 10px 26px -18px rgba(30, 70, 160, .45) !important; }
/* l'ancienne « pilule » flottante disparaît : le contenu occupe toute la bande */
.hd .site-header__inner {
  width: 100%; max-width: 1520px; margin-inline: auto;
  padding-inline: clamp(16px, 4.4vw, 74px);
  min-height: 66px !important; gap: 12px;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.hd.is-scrolled .site-header__inner { background: none; box-shadow: none; }
.hd .logo { flex: none; }
.hd .logo__img { height: 36px; width: auto; max-width: none; }

/* --- Boutons de droite --- */
.hd .header-tools { gap: 8px; }
.hd .tool-btn {
  height: 44px; min-width: 44px; padding: 0 12px; justify-content: center;
  border-radius: 999px; background: #fff; color: var(--hd-navy);
  font: 700 14.5px/1 var(--hd-font);
  box-shadow: inset 0 0 0 1.5px var(--hd-line), 0 6px 16px -10px rgba(11, 42, 102, .35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.hd .tool-btn:hover { background: #fff; color: var(--hd-navy); transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px #BFCDE6, 0 8px 18px -10px rgba(11, 42, 102, .45); }
.hd .tool-btn:focus-visible { outline: 2px solid var(--hd-orange); outline-offset: 2px; }
.hd .tool-btn .icon { width: 20px; height: 20px; }
.hd .tool-btn > .icon:last-child:not(:first-child) { width: 14px; height: 14px; opacity: .55; }
.hd .tool-btn .flag { width: 22px; height: auto; border-radius: 3px; }
.hd a.tool-btn[aria-label]:not(.hd-login), .hd .dropdown > .tool-btn:has(.avatar) { width: 44px; padding: 0; }
.hd .tool-btn .avatar { width: 34px !important; height: 34px !important; }
.hd .tool-btn .badge-count { top: -3px; right: -3px; box-shadow: 0 0 0 2px #fff; }
/* « Se connecter » : pastille blanche, icône de personne */
.hd .hd-login { padding: 0 16px; gap: 8px; }
.hd .hd-login[aria-current="page"] { box-shadow: inset 0 0 0 2px #1B4FB8, 0 6px 16px -10px rgba(11, 42, 102, .35); }
.hd .hd-login .icon { width: 20px; height: 20px; opacity: 1 !important; }
/* Bouton du menu (tablette, mobile) : carré arrondi, comme la maquette */
.hd .ui-menu-btn { width: 44px; padding: 0; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--hd-line); }
.hd .ui-menu-btn span { display: none; }
.hd .ui-menu-btn .icon { width: 22px; height: 22px; }

/* « Créer une annonce + » : pastille orange, le + à droite */
.hd .hd-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--hd-orange); color: #fff; font: 700 15px/1 var(--hd-font); white-space: nowrap; text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(255, 123, 23, .85);
  transition: transform .15s ease, background .15s ease;
}
.hd .hd-create:hover { background: var(--hd-orange-d); color: #fff; transform: translateY(-1px); }
.hd .hd-create .icon { width: 16px; height: 16px; stroke-width: 3; }
.hd .hd-create__short { display: none; }

/* --- Rubriques (ordinateur) --- */
.hd .ui-nav { gap: clamp(0px, .2vw, 6px); margin-inline: clamp(8px, 1.4vw, 48px) auto; }
.hd .ui-nav a {
  height: 38px; padding: 0 clamp(8px, .7vw, 16px); border-radius: 999px;
  color: var(--hd-ink); font: 700 14px/1 var(--hd-font); letter-spacing: 0;
  background: transparent;
}
.hd .ui-nav a .icon { display: none; }
.hd .ui-nav a:hover { background: rgba(11, 42, 102, .06); color: var(--hd-ink); }
.hd .ui-nav a[aria-current="page"] { padding: 0 clamp(14px, 1.2vw, 24px); background: #0D2E6E; color: #fff; }
.hd .ui-nav a[aria-current="page"]::after { left: 50%; right: auto; bottom: 2px; width: 30px; height: 3px; margin-left: -15px; border-radius: 3px; background: var(--hd-orange); }
.hd .ui-nav a:focus-visible { outline: 2px solid var(--hd-orange); outline-offset: 2px; }

/* --- Barre de recherche de l'en-tête (tablette, mobile) : même blanc que les boutons --- */
.hd .hsearch { box-shadow: inset 0 0 0 1.5px var(--hd-line), 0 6px 16px -12px rgba(11, 42, 102, .4); font-family: var(--hd-font); }
.hd .hsearch:focus-within { box-shadow: inset 0 0 0 2px var(--hd-orange), 0 0 0 4px rgba(255, 123, 23, .15); }
.hd .hsearch__input { font-family: var(--hd-font); }

/* Tablette */
@media (min-width: 640px) {
  .hd .site-header__inner { min-height: 76px !important; }
  .hd .logo__img { height: 44px; }
}
/* Ordinateur : bande plus haute, dégradé blanc très léger, filet bleu pâle en bas */
@media (min-width: 1024px) {
  .hd {
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(250, 252, 255, .6));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(214, 226, 246, .9);
    box-shadow: 0 10px 26px -22px rgba(30, 70, 160, .4) !important;
  }
  .hd.is-scrolled { background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(250, 252, 255, .82)); }
  .hd .site-header__inner { max-width: 1760px; padding-inline: clamp(24px, 3vw, 64px); min-height: 84px !important; gap: 12px; }
  .hd .header-tools { gap: 10px; }
  .hd .tool-btn, .hd .hd-create { height: 46px; min-height: 46px; }
  .hd a.tool-btn[aria-label]:not(.hd-login), .hd .dropdown > .tool-btn:has(.avatar), .hd .ui-menu-btn { width: 46px; }
  .hd .logo__img { height: clamp(44px, 3.2vw, 58px); }
}
/* Rubriques affichées (grand écran) : on gagne de la place selon la largeur */
@media (min-width: 1341px) and (max-width: 1799.98px) {
  .hd .hd-login { width: 46px; padding: 0; }
  .hd .hd-login span { display: none; }
}
@media (min-width: 1341px) and (max-width: 1599.98px) {
  .hd .hd-create__long { display: none; }
  .hd .hd-create__short { display: inline; }
  .hd .ui-nav a { font-size: 13.5px; padding-inline: 8px; }
  .hd .ui-nav a[aria-current="page"] { padding-inline: 14px; }
  .hd .header-tools { gap: 7px; }
}
/* Les rubriques ne tiennent pas sur la ligne (langue aux mots longs, écran juste assez large) :
   app.js ajoute .hd--fold et l'en-tête prend la disposition tablette (recherche + bouton Menu). */
.hd.hd--fold .ui-nav { display: none; }
.hd.hd--fold .ui-menu-btn { display: inline-flex; }
.hd.hd--fold .hsearch { display: flex !important; grid-area: search; }
.hd.hd--fold .site-header__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo search tools"; column-gap: 14px; }
.hd.hd--fold .logo { grid-area: logo; }
.hd.hd--fold .header-tools { grid-area: tools; margin-left: 0; }
.hd.hd--fold .hd-create__long { display: none; }
.hd.hd--fold .hd-create__short { display: inline; }
.hd.hd--fold .hd-login { width: 46px; padding: 0; }
.hd.hd--fold .hd-login span { display: none; }
/* Tablette et mobile : la recherche remplace les rubriques ; « Créer une annonce » raccourci */
@media (max-width: 1180px) {
  .hd .hd-create__long { display: none; }
  .hd .hd-create__short { display: inline; }
}
@media (max-width: 1023.98px) {
  .hd .hd-login { width: 44px; padding: 0; }
  .hd .hd-login span { display: none; }
}
@media (max-width: 760px) {
  .hd .site-header__inner { min-height: 0 !important; padding-block: 8px 10px; row-gap: 8px; }
  .hd .header-tools { gap: 6px; }
  .hd .tool-btn { height: 42px; min-width: 42px; }
  .hd a.tool-btn[aria-label]:not(.hd-login), .hd .ui-menu-btn { width: 42px; }
}
@media (max-width: 380px) { .hd .logo__img { height: 30px; } .hd .header-tools { gap: 4px; } }

/* Bandeaux sombres de haut de page : avec une bande d'en-tête pleine largeur, ils commencent sous elle
   (glissés dessous, le blanc transparent sur fond nuit donnait un gris terne). */
.lx-band { margin-top: 0; padding-top: clamp(28px, 4vw, 52px); }
.lx-hero { margin-top: 0; padding-top: 0; }

@media (prefers-reduced-motion: reduce) { .hd, .hd .tool-btn, .hd .hd-create { transition: none; } }
@media print { .hd { position: static; } }
