/* Maquette du 27/11/2026 (demande de Julien) : barre de navigation animée, d'après le composant React « AnimatedNavFramer »
   (framer-motion), refaite en CSS + JS sans dépendance. Remplace l'en-tête en 3 panneaux.
   Les ressorts framer-motion sont reproduits par des courbes CSS linear() calculées par simulation physique (masse 1) :
   --ressort-pilule = damping 18 / stiffness 250 (0,83 s, dépassement 11 %) ;
   --ressort-liens  = damping 15 / stiffness 100, la raideur par défaut de framer-motion (0,87 s, dépassement 2,7 %).
   Navigateurs sans linear() : courbe de Bézier approchée. Mouvement réduit : aucun mouvement, états instantanés.
   Pilule entièrement arrondie (« rounded-full » du composant) : exception assumée à la règle des coins de 4 px. */

:root {
  --ressort-pilule: cubic-bezier(.34, 1.4, .64, 1);
  --ressort-liens: cubic-bezier(.3, 1.1, .5, 1);
  --d-pilule: .83s; --d-liens: .87s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ressort-pilule: linear(0, .056 2.6%, .173 5%, .325 7.5%, .487 9.9%, .642 12.3%, .781 14.7%, .895 17.1%, .983 19.6%, 1.046 22%, 1.085 24.4%, 1.106 26.8%, 1.111 29.2%, 1.105 31.7%, 1.092 34.1%, 1.075 36.5%, 1.058 38.9%, 1.04 41.3%, 1.025 43.7%, 1.012 46.2%, 1.002 48.6%, .995 51%, .991 53.4%, .988 55.8%, .988 60.7%, .99 63.1%, .994 67.9%, .997 72.8%, 1 77.6%, 1.001 82.5%, 1);
    --ressort-liens: linear(0, .026 2.7%, .084 5.2%, .163 7.6%, .253 10.1%, .348 12.6%, .443 15.1%, .534 17.6%, .618 20%, .694 22.5%, .761 25%, .818 27.5%, .867 30%, .908 32.4%, .941 34.9%, .967 37.4%, .987 39.9%, 1.002 42.4%, 1.013 44.8%, 1.02 47.3%, 1.024 49.8%, 1.027 54.8%, 1.025 59.7%, 1.02 64.7%, 1.015 69.7%, 1.01 74.6%, 1.006 79.6%, 1.004 84.5%, 1.002 89.5%, 1);
  }
}

/* L'élément <header> garde sa hauteur d'origine dans la page (le premier écran ne bouge pas d'un pixel) ; la pilule est fixe. */
.entete .entete__barre { display: none; }

.navpill { position: fixed; z-index: 1000; top: 24px; left: 50%; height: 48px; width: var(--l-deplie, auto); max-width: calc(100vw - 24px);
  display: flex; align-items: center; overflow: hidden; overflow: clip; border-radius: 9999px; /* clip : pas de conteneur défilable, donc jamais focusable */
  border: 1px solid var(--bord, #2E2E2E); background: rgba(10,10,10,.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transform: translate(-50%, 0); opacity: 1;
  transition: width var(--d-pilule) var(--ressort-pilule), transform var(--d-pilule) var(--ressort-pilule), opacity .3s ease-out; }
[data-palette="bleu"] .navpill { background: var(--verre-entete); border-color: var(--bord); }
/* Arrivée : descend de 80 px en apparaissant (classe retirée à la première image par hero-nav.js) */
.navpill.navpill--arrivee { transform: translate(-50%, -80px); opacity: 0; }

.navpill__contenu { display: flex; align-items: center; gap: 4px; height: 100%; padding: 0 6px 0 14px; white-space: nowrap; }
/* Largeur naturelle, jamais rétrécie (sinon la mesure de la largeur dépliée serait fausse et le nom serait coupé) */
.navpill__contenu { width: max-content; flex-shrink: 0; }
.navpill__contenu > * { flex-shrink: 0; }

/* Éléments en cascade : --i = rang. Apparition : délai 0,2 s + 0,07 s par rang ; disparition : cascade inverse, 0,05 s par rang. */
.navpill__el { transition: opacity .35s ease-out, transform var(--d-liens) var(--ressort-liens);
  transition-delay: calc(.2s + var(--i) * .07s); }
.navpill[data-etat="replie"] .navpill__el { opacity: 0; transform: translateX(-20px) scale(.95); pointer-events: none;
  transition-duration: .2s, .25s; transition-timing-function: ease-in; transition-delay: calc((var(--n) - var(--i)) * .05s); }
.navpill__logo.navpill__el { transform: none; }
.navpill[data-etat="replie"] .navpill__logo.navpill__el { transform: translateX(-25px) rotate(-180deg); }

.navpill__logo { display: inline-flex; align-items: center; gap: 10px; margin-right: 10px; color: var(--blanc, #fff); text-decoration: none; border-radius: 9999px; }
.navpill__logo img { display: block; height: 28px; width: auto; }

.navpill__liens { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.navpill__liens a, .navpill__liste a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9999px;
  font-family: var(--grotesk); font-size: 14px; color: #A6A6A6; text-decoration: none; transition: color .2s; }
.navpill__liens a:hover, .navpill__liste a:hover { color: #fff; }

/* « Devis gratuit » : le bouton actuel de l'en-tête, dans son style actuel, ajusté à la hauteur de la pilule */
.navpill .bouton--contact { height: 36px; min-height: 0; margin-left: 8px; padding: 0 14px; }

/* Cercle replié : icône menu (dessin lucide « Menu »), centrée dans les 48 px */
.navpill__rond { position: absolute; left: 0; top: 0; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9999px;
  background: transparent; color: var(--blanc, #fff); cursor: pointer; opacity: 0; transform: scale(.6); pointer-events: none;
  transition: opacity .2s ease-out, transform .3s var(--ressort-liens); }
.navpill[data-etat="replie"] .navpill__rond { opacity: 1; transform: scale(1); pointer-events: auto; transition-delay: .15s; }
.navpill[data-etat="replie"] { cursor: pointer; }
.navpill[data-etat="replie"]:hover { transform: translate(-50%, 0) scale(1.1); }
.navpill[data-etat="replie"]:active { transform: translate(-50%, 0) scale(.95); }
.navpill__rond svg, .navpill__menu svg { width: 20px; height: 20px; }

/* Bouton menu (mobile seulement) et liste déroulante des liens */
.navpill__menu { display: none; place-items: center; width: 36px; height: 36px; margin-left: 4px; padding: 0; border: 1px solid var(--bord, #2E2E2E); border-radius: 9999px;
  background: transparent; color: var(--blanc, #fff); cursor: pointer; }
.navpill__liste { position: fixed; z-index: 999; top: 80px; left: 50%; transform: translateX(-50%); width: min(320px, calc(100vw - 24px));
  margin: 0; padding: 8px; list-style: none; border: 1px solid var(--bord, #2E2E2E); border-radius: 16px;
  background: rgba(10,10,10,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.navpill__liste[hidden] { display: none; }
.navpill__liste a { display: flex; min-height: 44px; font-size: 16px; }

.navpill :focus-visible, .navpill__liste :focus-visible { outline: 2px solid var(--blanc, #fff); outline-offset: 2px; }

/* Mobile : logo + « Devis gratuit » + bouton menu ; les liens passent dans la liste déroulante */
@media (max-width: 760px) {
  .navpill__liens { display: none; }
  .navpill__menu { display: grid; }
  .navpill__contenu { padding-left: 10px; padding-right: 5px; }
  .navpill__logo { gap: 8px; margin-right: 4px; }
  .navpill .bouton--contact { margin-left: 4px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .navpill, .navpill__el, .navpill__rond { transition: none !important; }
  .navpill.navpill--arrivee { transform: translate(-50%, 0); opacity: 1; }
  .navpill[data-etat="replie"]:hover, .navpill[data-etat="replie"]:active { transform: translate(-50%, 0); }
}

/* Sélecteur de langue (28/11/2026, site FR / EN) : un drapeau (SVG, rendu identique partout, contrairement aux emojis
   drapeaux, affichés en lettres sous Windows). Drapeau britannique sur la page française, français sur la page anglaise. */
.navpill__langue .drapeau { display: block; flex: none; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 1px 3px rgba(0,0,0,.4);
  transition: transform .2s ease-out; }
.navpill__liens .navpill__langue { padding: 0 10px; }
.navpill__langue:hover .drapeau { transform: scale(1.12); }
.navpill__liste .navpill__langue { gap: 10px; }
@media (prefers-reduced-motion: reduce) { .navpill__langue .drapeau { transition: none; } }
