/* Barre de progression de lecture + lien de menu actif (pages d'accueil).
   Les éléments sont injectés par assets/scroll-nav.js : sans JavaScript, la
   page reste identique. */

/* ---------- Barre de progression ---------- */
/* Posée sur la bordure basse de l'en-tête collant, elle le suit au défilement. */
.adt-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #f97316 0%, #fbbf24 45%, #38bdf8 100%);
    box-shadow: 0 0 10px rgba(56, 189, 248, .45);
    will-change: transform;
}

/* ---------- Menu actif (ordinateur) ---------- */
.adt-nav {
    position: relative;
}

/* Trait qui glisse d'un lien à l'autre ; sa couleur reprend celle du lien. */
.adt-nav-indicator {
    position: absolute;
    left: 0;
    bottom: -8px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: #f97316;
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), width .35s cubic-bezier(.4, 0, .2, 1), opacity .25s, background-color .35s;
}

.adt-nav-indicator.is-visible {
    opacity: 1;
}

header nav a.is-active:not(.text-adt-cyan),
#mobileDrawer nav a.is-active:not(.text-adt-cyan) {
    color: #f97316;
}

html[data-theme="light"] header nav a.is-active:not(.text-adt-cyan),
html[data-theme="light"] #mobileDrawer nav a.is-active:not(.text-adt-cyan) {
    color: #ea580c;
}

/* Menu mobile : petit repère à gauche du lien actif. */
#mobileDrawer nav a.is-active {
    box-shadow: inset 3px 0 0 currentColor;
    padding-left: 12px;
    margin-left: -12px;
}

@media (prefers-reduced-motion: reduce) {
    .adt-nav-indicator {
        transition: none;
    }
}
