/* Fil de navigation sur le côté (Tony 14/11) : un trait vertical, un point par section, le point de la section en cours
   allumé, le trait qui se remplit au défilement (--fil, de 0 à 1, écrit par js/fil.js), et deux flèches pour monter ou
   descendre d'une section. Même verre sombre que le menu. Aucune animation si l'utilisateur en demande moins (css/base.css). */
.fil {
  position: fixed; right: 18px; top: 50%; z-index: 35; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; background: rgba(14, 14, 20, 0.6);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: opacity 0.3s;
}
.fil-fleche {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--doux); cursor: pointer; transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.fil-fleche:hover { background: rgba(255, 255, 255, 0.1); color: var(--texte); }
.fil-fleche:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--doux); }
.fil-liste { position: relative; list-style: none; display: flex; flex-direction: column; align-items: center; }
/* Le trait : du premier au dernier point ; son remplissage part du haut. */
.fil-trait { position: absolute; left: 50%; top: 13px; bottom: 13px; width: 2px; margin-left: -1px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); pointer-events: none; overflow: hidden; }
.fil-trait i { position: absolute; inset: 0; background: var(--bleu); transform-origin: 50% 0; transform: scaleY(var(--fil, 0)); }
.fil-point { position: relative; display: grid; place-items: center; width: 32px; height: 26px; border-radius: 999px; text-decoration: none; }
.fil-point::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #41424e; transition: transform 0.3s var(--ressort), background 0.3s, box-shadow 0.3s; }
.fil-point:hover::before { background: var(--texte); }
.fil-point.passe::before { background: var(--bleu); }
.fil-point[aria-current]::before { background: var(--bleu); transform: scale(1.6); box-shadow: 0 0 0 3px rgba(14, 14, 20, 0.9); }
.fil-fleche:focus-visible, .fil-point:focus-visible { outline: 2px solid var(--bleu); outline-offset: 1px; }
/* Le nom de la section : au survol, au clavier, et en permanence pour la section en cours quand l'écran est assez large. */
.fil-nom {
  position: absolute; right: 100%; top: 50%; margin-right: 10px; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--texte); background: rgba(14, 14, 20, 0.88);
  opacity: 0; transform: translate(6px, -50%); pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ressort);
}
.fil-point:hover .fil-nom, .fil-point:focus-visible .fil-nom { opacity: 1; transform: translate(0, -50%); }
@media (min-width: 1600px) {
  .fil-point[aria-current] .fil-nom { opacity: 1; transform: translate(0, -50%); color: var(--bleu); background: transparent; }
}

/* Téléphone et tablette : version discrète. Le trait et ses points tiennent dans la marge de droite (16 px), sans fond,
   donc jamais sur le texte. Les deux flèches n'apparaissent que pendant le défilement, en bas à droite au-dessus de la
   barre d'achat, puis s'effacent (.repos, js/fil.js) ; en haut de page, rien n'est affiché (.debut). */
@media (max-width: 920px) {
  .fil { top: 0; bottom: 0; right: 0; width: 16px; padding: 0; gap: 0; transform: none; justify-content: center; border-radius: 0;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
  .fil-liste { pointer-events: auto; transition: opacity 0.3s; }
  .fil-point { width: 16px; height: 16px; }
  .fil-point::before { width: 4px; height: 4px; }
  .fil-point[aria-current]::before { transform: scale(1.75); box-shadow: none; }
  .fil-trait { top: 8px; bottom: 8px; width: 1px; margin-left: -0.5px; }
  .fil-nom { width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .fil-fleche { position: absolute; right: 10px; width: 38px; height: 38px; pointer-events: auto; color: var(--texte);
    background: rgba(18, 18, 26, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: opacity 0.3s; }
  .fil-fleche:hover, .fil-fleche:disabled { background: rgba(18, 18, 26, 0.9); color: var(--texte); }
  .fil-fleche[data-fil="-1"] { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 122px); }
  .fil-fleche[data-fil="1"] { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 78px); }
  .fil.repos .fil-liste { opacity: 0.6; }
  .fil.repos .fil-fleche, .fil.debut .fil-fleche, .fil.debut .fil-liste { opacity: 0; pointer-events: none; }
  .fil:focus-within .fil-fleche, .fil:focus-within .fil-liste { opacity: 1; pointer-events: auto; }
  .fil:focus-within .fil-fleche:disabled { opacity: 0.3; }
}
/* Moins d'animations : sur téléphone, les flèches restent en place au lieu d'apparaître et de disparaître. */
@media (max-width: 920px) and (prefers-reduced-motion: reduce) {
  .fil.repos:not(.debut) .fil-fleche { opacity: 0.7; pointer-events: auto; }
  .fil.repos:not(.debut) .fil-fleche:disabled { opacity: 0.3; }
}
@media print { .fil { display: none; } }
