/* En-tête unique d'alpha (src/entete.php) : le même sur toutes les pages, celui de l'accueil Boîtes vivantes.
   Les couleurs viennent du style choisi (variables --encre, --doux, --trait, --accent... de accueil-f.css sur le
   tableau, de public/assets/styles/<code>.css ailleurs). Chargée par l'accueil et par toutes les autres pages. */
.af-entete {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: stretch; gap: 18px;
  height: 46px; padding: 0 16px; border-bottom: 1px solid var(--trait);
  background: color-mix(in srgb, var(--fond) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px);
}
.af-marque {
  align-self: center; font-weight: 760; font-size: 17px; letter-spacing: -.01em; color: var(--encre); text-decoration: none;
}
.af-onglets {
  flex: 1; min-width: 0; display: flex; align-items: stretch; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.af-onglets::-webkit-scrollbar { display: none; }
.af-onglet {
  position: relative; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 0 11px; border: 0; background: none; color: var(--doux); font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.af-onglet:hover { color: var(--encre); }
.af-onglet[aria-selected="true"] { color: var(--encre); }
.af-onglet[aria-selected="true"]::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent);
}
.af-onglet .it-ico { opacity: .8; }
.af-onglet:focus-visible { outline-offset: -4px; }
.af-onglet-n {
  min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-doux); color: var(--accent);
  font-size: 11px; font-weight: 650; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums;
}
.af-onglet-n.af-zero { background: transparent; color: var(--doux); }

.af-outils { display: flex; align-items: center; gap: 8px; }
.af-outil {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; white-space: nowrap;
  border: 1px solid var(--trait-fort); border-radius: 7px; background: var(--carte); color: var(--encre);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.af-outil:hover, .af-outil[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.af-onglet-lien { text-decoration: none; }
.af-onglet-lien:hover { color: var(--accent); }
.af-onglet-lien[aria-current="page"] { color: var(--encre); }
.af-onglet-lien[aria-current="page"]::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent);
}
.af-outil-ico { width: 32px; padding: 0; justify-content: center; }
/* Champ de la recherche globale des pages autres que l'accueil (option « recherche » de entete_alpha) : le même dessin
   que le champ de l'accueil (.af-filtre de accueil-f.css), le panneau de résultats est recherche-globale.css. */
.af-cherche {
  display: flex; align-items: center; gap: 6px; width: 220px; height: 30px; padding: 0 6px 0 9px; box-sizing: border-box;
  border: 1px solid var(--trait-fort); border-radius: 7px; background: var(--carte); color: var(--doux); cursor: text;
}
.af-cherche:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.af-cherche svg { flex: none; }
.af-cherche input {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--encre);
  font: inherit; font-size: 13px; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.af-cherche input::-webkit-search-cancel-button { opacity: .6; }
.af-outil { text-decoration: none; }
.af-entete .palette__bouton { width: 32px; height: 30px; border-radius: 7px; border-color: var(--trait-fort); background: var(--carte); color: var(--encre); }
.af-entete .palette__bouton:hover, .af-entete .palette__bouton[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); background: var(--carte); }
.af-entete .palette__icone { width: 16px; height: 16px; }
.af-marque { font-weight: 760; font-size: 17px; }
.af-marque.af-logo-b { font-size: 19px; }
.af-marque.af-logo-d { font-size: 16px; }

/* Créer un compte (visiteurs) : panneau sous le bouton, Continuer avec Google dans le dessin de Google. */
.af-creer { position: relative; }
.af-creer > summary { list-style: none; gap: 7px; }
.af-creer > summary::-webkit-details-marker { display: none; }
.af-creer[open] > summary { border-color: var(--accent); color: var(--accent); }
.af-g-logo { flex: none; }
.af-creer-panneau {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 280px; box-sizing: border-box;
  display: grid; gap: 10px; padding: 14px; border: 1px solid var(--trait-fort); border-radius: 10px;
  background: var(--carte); color: var(--encre); box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.af-g-continuer {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 14px;
  border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f;
  font: 500 14px/1 Roboto, Arial, system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.af-g-continuer:hover { background: #f8faff; border-color: #5f6368; }
.af-g-continuer .af-g-logo { width: 18px; height: 18px; }
.af-g-continuer[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.af-creer-accord { margin: 0; font-size: 12px; line-height: 1.45; color: var(--doux); }
.af-creer-accord a, .af-creer-autres { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.af-creer-autres { font-size: 12.5px; color: var(--encre); }
.af-entete .af-creer-panneau a.af-g-continuer { color: #1f1f1f; }

@media (max-width: 640px) {
  .af-creer-panneau { position: fixed; left: 12px; right: 12px; top: 54px; width: auto; }
  .af-entete { flex-wrap: wrap; height: auto; gap: 8px 10px; padding: 8px 12px 0; }
  .af-marque { font-size: 18px; }
  .af-outils { flex: 1; min-width: 0; justify-content: flex-end; }
  .af-outil { height: 32px; padding: 0 9px; }
  .af-outil span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .af-onglets { order: 3; flex: 0 0 100%; height: 38px; margin: 0 -12px; padding: 0 6px; }
  .af-onglet { padding: 0 10px; }
  .af-connexion { display: inline-flex; }
  .af-cherche { flex: 1; width: auto; min-width: 0; height: 32px; }
}
@media (min-width: 641px) and (max-width: 1100px) { .af-cherche { width: 170px; } }

/* Sur les autres pages, la couleur générale des liens (.pn a) ne doit pas teinter l'en-tête. */
.af-entete .af-marque { color: var(--encre); }
.af-entete .af-onglet { color: var(--doux); }
.af-entete .af-onglet:hover, .af-entete .af-onglet[aria-current="page"], .af-entete .af-onglet[aria-selected="true"] { color: var(--encre); }
.af-entete .af-outil { color: var(--encre); }
.af-entete .af-outil:hover { color: var(--accent); }

/* Pages centrées (connexion) : l'en-tête garde toute la largeur. */
.af-entete { align-self: stretch; box-sizing: border-box; }
