/**
 * animations.css — couche d'animations ADDITIVE.
 *
 * Elle s'ajoute au site sans modifier son contenu, ses couleurs ni sa mise en page.
 * - Les éléments déjà animés par AOS (data-aos) ne sont pas touchés, sauf un effet de "mise au point" sur les titres.
 * - Tout ce qui bouge est désactivé automatiquement si l'utilisateur a demandé "réduire les animations"
 *   dans son système (prefers-reduced-motion) : accessibilité.
 * - Si animations.js ne se charge pas, tout reste visible (filets de sécurité ci-dessous).
 *
 * Pour retirer toutes les animations : supprimer les lignes <link ... animations.css> et <script ... animations.js>.
 */

:root {
    --cti-ease: cubic-bezier(0.22, 1, 0.36, 1);       /* décélération douce, "premium" */
    --cti-orange: #F78A1D;
}

/* ───────────────────────── Barre de progression de lecture ───────────────────────── */
#cti-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 60;                                       /* au-dessus du header (z-50) */
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #F78A1D, #FFB45E);
    box-shadow: 0 0 10px rgba(247, 138, 29, 0.55);
    will-change: transform;
}

/* ───────────────────────── Lueur qui suit la souris dans les bannières ───────────────────────── */
.cti-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(247, 138, 29, 0.20), transparent 62%);
}
.hero-parallax.cti-hover .cti-glow { opacity: 1; }

/* ───────────────────────── Transition entre les pages : "porte d'entrée" ─────────────────────────
   theme-init.js pose html.cti-gate dès le <head> : la page reste invisible tant que Tailwind (CDN) n'a pas fini
   de la mettre en forme, puis animations.js la révèle. Filet de sécurité : visible d'office après 2,5 s. */
@keyframes ctiGateRescue { to { opacity: 1; } }
html.cti-gate body {
    opacity: 0;
    animation: ctiGateRescue 0.01s linear 2.5s forwards;
}

/* ───────────────────────── Bannière : entrée plus vive au changement de page ─────────────────────────
   Les durées d'origine (AOS : 1,5 s pour la bannière, 1 s + délais de 0,3 s / 0,5 s pour le texte) donnaient
   une arrivée trop lente. L'effet reste le même, il est simplement plus rapide : tout est en place en moins d'1 s. */
.hero-parallax[data-aos]      { transition-duration: 0.5s !important; transition-delay: 0s    !important; }
.hero-parallax h1[data-aos]   { transition-duration: 0.7s !important; transition-delay: 0.05s !important; }
.hero-parallax p[data-aos]    { transition-duration: 0.7s !important; transition-delay: 0.15s !important; }

@media (prefers-reduced-motion: no-preference) {

    /* ───────────────────────── Défilement fluide vers les ancres ───────────────────────── */
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 5rem;                      /* évite que le header fixe masque la cible */
    }

    /* ───────────────────────── Transition entre les pages ─────────────────────────
       Sortie : la page s'estompe légèrement (0,14 s) PENDANT que le navigateur charge la suivante (aucune attente ajoutée),
       et la barre du haut avance pour montrer que ça charge.
       Entrée : fondu de 0,22 s une fois la page prête (voir "porte d'entrée" plus haut). */
    body { transition: opacity 0.22s ease-out; }

    html.cti-leaving body {
        opacity: 0.45;
        transition-duration: 0.14s;
        transition-timing-function: ease-in;
    }
    html.cti-leaving #cti-progress {
        transform: scaleX(0.85) !important;
        transition: transform 3s cubic-bezier(0.1, 0.7, 0.2, 1);
    }

    /* ───────────────────────── Révélations douces (hors AOS) ─────────────────────────
       Cibles masquées dès le départ pour éviter tout clignotement :
       boutons de la bannière d'accueil et colonnes du pied de page.
       Filet de sécurité : si le JS ne répond pas, ils s'affichent d'eux-mêmes après 4 s. */
    @keyframes ctiRescue { to { opacity: 1; transform: none; } }

    .cti-reveal,
    .hero-parallax > div.z-10 > :not([data-aos]),
    footer > .container.grid > div {
        opacity: 0;
        transform: translateY(28px);
        animation: ctiRescue 0.01s linear 4s forwards;
    }
    .cti-reveal.cti-in,
    .hero-parallax > div.z-10 > :not([data-aos]).cti-in,
    footer > .container.grid > div.cti-in {
        opacity: 1;
        transform: none;
        animation: none;
        transition: opacity 0.7s var(--cti-ease) var(--d, 0s), transform 0.7s var(--cti-ease) var(--d, 0s);
    }

    /* ───────────────────────── Titres : "mise au point" synchronisée avec AOS ─────────────────────────
       Le flou se dissipe pendant que AOS fait apparaître le titre (même durée, même délai). */
    .hero-parallax h1[data-aos],
    main h2[data-aos] {
        filter: blur(10px);
        transition-property: opacity, transform, filter;
    }
    .hero-parallax h1[data-aos].aos-animate,
    main h2[data-aos].aos-animate {
        filter: none;
    }

    /* ───────────────────────── Images : fondu à l'arrivée ───────────────────────── */
    @keyframes ctiImgIn { from { opacity: 0; } }
    img.cti-img-pending { opacity: 0; }
    img.cti-img-in { animation: ctiImgIn 0.8s ease backwards; }

    /* ───────────────────────── Menus déroulants et modales ───────────────────────── */
    @keyframes ctiDrop {
        from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    }
    #lang-menu, #lang-menu-mobile, #mobile-menu {
        animation: ctiDrop 0.28s var(--cti-ease) backwards;
    }

    @keyframes ctiFade { from { opacity: 0; } }
    @keyframes ctiModalIn {
        from { opacity: 0; transform: translateY(28px) scale(0.96); }
    }
    #specialization-modal:not(.hidden) [data-modal-overlay] {
        animation: ctiFade 0.3s ease backwards;
    }
    #specialization-modal:not(.hidden) > .relative > div {
        animation: ctiModalIn 0.42s var(--cti-ease) backwards;
    }

    /* ───────────────────────── Navigation : soulignement qui se dessine au survol ───────────────────────── */
    @media (hover: hover) {
        header > nav > div.md\:flex > a {
            background-image: linear-gradient(#F78A1D, #F78A1D);
            background-repeat: no-repeat;
            background-position: 0 100%;
            background-size: 0% 2px;
            transition: color 0.3s ease, background-size 0.4s var(--cti-ease);
        }
        header > nav > div.md\:flex > a:hover {
            background-size: 100% 2px;
        }
    }

    /* ───────────────────────── Boutons principaux : reflet lumineux + effet d'appui ───────────────────────── */
    a.bg-primary-orange,
    button.bg-primary-orange {
        background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
        background-repeat: no-repeat;
        background-size: 250% 100%;
        background-position: 160% 0;
        transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, background-position 0.9s var(--cti-ease);
    }
    a.bg-primary-orange:hover,
    button.bg-primary-orange:hover,
    a.bg-primary-orange.cti-active,
    button.bg-primary-orange.cti-active {
        background-position: -60% 0;
    }
    a.bg-primary-orange:active,
    button.bg-primary-orange:active,
    .hero-parallax a:active,
    button[data-modal-close]:active {
        transform: scale(0.97);
    }

    /* Flèches des liens d'action : léger glissement au survol */
    a > .feather-arrow-right { transition: transform 0.35s var(--cti-ease); }
    a:hover > .feather-arrow-right { transform: translateX(5px); }

    /* Bouton thème : l'icône pivote quand on change de mode */
    @keyframes ctiSpin {
        from { opacity: 0; transform: rotate(-90deg) scale(0.4); }
    }
    .cti-spin svg { animation: ctiSpin 0.6s var(--cti-ease); }
}

/* Navigation au clavier : repère visuel net (n'apparaît jamais à la souris) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #F78A1D;
    outline-offset: 3px;
}

/* ═════════════════════════════════════════════════════════════════════════════════════════
   ANIMATIONS COMPLÉMENTAIRES
   Mêmes principes : aucune modification du contenu ni de la mise en page, désactivées si l'utilisateur
   demande de réduire les animations. Les effets utilisent les propriétés CSS individuelles (translate, scale)
   et des animations @keyframes pour ne JAMAIS entrer en conflit avec les transformations Tailwind/AOS existantes.
   ═════════════════════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────── Bouton "retour en haut" avec anneau de progression ───────────────────────── */
#cti-top {
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    width: 48px; height: 48px;
    padding: 0; border: 0; border-radius: 9999px;
    display: grid; place-items: center;
    cursor: pointer;
    color: #F78A1D;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
}
html.dark #cti-top { background: #2a2a2a; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
#cti-top.show { opacity: 1; visibility: visible; transform: none; }
#cti-top .ring { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
#cti-top .ring-track { fill: none; stroke: rgba(247, 138, 29, 0.18); stroke-width: 3; }
#cti-top .ring-bar { fill: none; stroke: #F78A1D; stroke-width: 3; stroke-linecap: round; }
#cti-top .arrow { position: relative; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {

    #cti-top { transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.45s var(--cti-ease), box-shadow 0.3s ease; }
    #cti-top .arrow { transition: transform 0.35s var(--cti-ease); }
    #cti-top.show:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(247, 138, 29, 0.35); }
    #cti-top.show:hover .arrow { transform: translateY(-2px); }
    #cti-top.show:active { transform: scale(0.94); }

    /* ───────────────────────── Header : se compacte et gagne en profondeur au défilement ───────────────────────── */
    header { transition: box-shadow 0.35s ease; }
    header > nav { transition: padding 0.3s var(--cti-ease); }
    html.cti-scrolled header { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.28); }
    html.cti-scrolled header > nav { padding-top: 0.6rem; padding-bottom: 0.6rem; }

    /* ───────────────────────── Cartes : lueur qui suit le curseur ───────────────────────── */
    .cti-spot:hover {
        background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(247, 138, 29, 0.11), transparent 65%);
    }

    /* ───────────────────────── Photos : rideau + zoom qui se pose, et reflet pendant le chargement ───────────────────────── */
    @keyframes ctiCurtain {
        from { clip-path: inset(0 0 100% 0); scale: 1.18; }
    }
    @keyframes ctiCurtainRescue { to { clip-path: inset(0); } }
    img.cti-curtain:not(.cti-in) {
        clip-path: inset(0 0 100% 0);
        animation: ctiCurtainRescue 0.01s linear 4s forwards;      /* filet de sécurité */
    }
    img.cti-curtain.cti-in {
        animation: ctiCurtain 1s var(--cti-ease) backwards;
        animation-delay: var(--d, 0s);
    }

    @keyframes ctiShimmer {
        from { background-position: 200% 0; }
        to   { background-position: -200% 0; }
    }
    .cti-skel {
        background-image: linear-gradient(100deg, transparent 30%, rgba(160, 160, 160, 0.18) 50%, transparent 70%);
        background-size: 200% 100%;
        animation: ctiShimmer 1.4s linear infinite;
    }

    /* ───────────────────────── Bannière d'accueil : profondeur au défilement ───────────────────────── */
    .hero-parallax > div.z-10 { will-change: transform, opacity; }

    /* ───────────────────────── Mot en orange des titres de bannière : éclat de lumière périodique ───────────────────────── */
    @supports ((-webkit-background-clip: text) or (background-clip: text)) {
        @keyframes ctiTextSheen {
            0%   { background-position: 100% 0; }
            55%, 100% { background-position: 0% 0; }
        }
        .hero-parallax h1 .text-primary-orange {
            background-image: linear-gradient(100deg, #F78A1D 0%, #F78A1D 40%, #FFD08A 50%, #F78A1D 60%, #F78A1D 100%);
            background-size: 250% 100%;
            background-repeat: no-repeat;
            background-position: 100% 0;
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: ctiTextSheen 6s ease-in-out 1.6s infinite;
        }
    }

    /* ───────────────────────── Bandeau orange : reflet lent (actif seulement quand il est visible) ───────────────────────── */
    @keyframes ctiSheen {
        0%        { background-position: 160% 0; }
        55%, 100% { background-position: -60% 0; }
    }
    section.bg-primary-orange {
        background-image: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.16) 50%, transparent 68%);
        background-size: 250% 100%;
        background-repeat: no-repeat;
        background-position: 160% 0;
        animation: ctiSheen 8s ease-in-out infinite;
        animation-play-state: paused;
    }
    section.bg-primary-orange.cti-live { animation-play-state: running; }

    /* ───────────────────────── Modales : les listes apparaissent en cascade ───────────────────────── */
    @keyframes ctiRise { from { opacity: 0; transform: translateY(10px); } }
    #specialization-modal:not(.hidden) li { animation: ctiRise 0.45s var(--cti-ease) backwards; }
    #specialization-modal:not(.hidden) li:nth-child(1) { animation-delay: 0.140s; }
    #specialization-modal:not(.hidden) li:nth-child(2) { animation-delay: 0.185s; }
    #specialization-modal:not(.hidden) li:nth-child(3) { animation-delay: 0.230s; }
    #specialization-modal:not(.hidden) li:nth-child(4) { animation-delay: 0.275s; }
    #specialization-modal:not(.hidden) li:nth-child(5) { animation-delay: 0.320s; }
    #specialization-modal:not(.hidden) li:nth-child(6) { animation-delay: 0.365s; }
    #specialization-modal:not(.hidden) li:nth-child(7) { animation-delay: 0.410s; }
    #specialization-modal:not(.hidden) li:nth-child(8) { animation-delay: 0.455s; }
    #specialization-modal:not(.hidden) li:nth-child(9) { animation-delay: 0.500s; }
    #specialization-modal:not(.hidden) li:nth-child(10) { animation-delay: 0.545s; }
    #specialization-modal:not(.hidden) li:nth-child(11) { animation-delay: 0.590s; }
    #specialization-modal:not(.hidden) li:nth-child(12) { animation-delay: 0.635s; }

    /* ───────────────────────── Pied de page : soulignement qui se dessine ───────────────────────── */
    @media (hover: hover) {
        footer ul a {
            background-image: linear-gradient(#F78A1D, #F78A1D);
            background-repeat: no-repeat;
            background-position: 0 100%;
            background-size: 0% 1px;
            transition: color 0.3s ease, background-size 0.35s var(--cti-ease);
        }
        footer ul a:hover { background-size: 100% 1px; }
    }
}

/* ═════════════════════════════════════════════════════════════════════════════════════════
   ANIMATIONS "TECH" (style interface futuriste, sobre)
   Réseau interactif dans les bannières, bordures néon et reflets de verre sur les cartes, viseur + balayage sur les photos,
   grille de circuits dans le pied de page, pulsation radar, filet lumineux du header, glitch du logo.
   Aucune de ces animations ne modifie le texte (les traductions restent intactes) ; toutes sont coupées en mode "réduire les animations".
   ═════════════════════════════════════════════════════════════════════════════════════════ */

/* Angle animable (bordure néon) : pris en charge par les navigateurs récents ; sinon la bordure reste fixe, sans gêne */
@property --cti-a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

/* Canevas du réseau de points (dessiné par animations.js) */
.cti-net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.cti-net.on { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {

    /* ───────────────────────── Header : filet lumineux qui parcourt le bord inférieur ───────────────────────── */
    @keyframes ctiHeaderLine {
        0%        { background-position: -50% 0; }
        60%, 100% { background-position: 150% 0; }
    }
    header::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: -1px;
        height: 1px;
        pointer-events: none;
        background-image: linear-gradient(90deg, transparent, rgba(247, 138, 29, 0.95), transparent);
        background-size: 35% 100%;
        background-repeat: no-repeat;
        background-position: -50% 0;
        animation: ctiHeaderLine 7s ease-in-out infinite;
    }

    /* ───────────────────────── Logo : bref effet "glitch" au survol ───────────────────────── */
    @keyframes ctiGlitch {
        0%, 100% { text-shadow: none; translate: 0 0; }
        20%      { text-shadow: 2px 0 rgba(247, 138, 29, 0.7), -2px 0 rgba(60, 60, 60, 0.35); translate: 1px 0; }
        40%      { text-shadow: -2px 0 rgba(247, 138, 29, 0.7), 2px 0 rgba(60, 60, 60, 0.35); translate: -1px 0; }
        60%      { text-shadow: 1px 0 rgba(247, 138, 29, 0.6), -1px 0 rgba(60, 60, 60, 0.3); translate: 1px 0; }
        80%      { text-shadow: none; translate: 0 0; }
    }
    @media (hover: hover) {
        header > nav > a:hover > span:first-child { animation: ctiGlitch 0.45s steps(2, end) 1; }
    }

    /* ───────────────────────── Bouton principal de la bannière : pulsation "radar" ───────────────────────── */
    @keyframes ctiPing {
        0%        { opacity: 0.85; transform: scale(1); }
        70%, 100% { opacity: 0; transform: scale(1.35, 1.75); }
    }
    .hero-parallax a.bg-primary-orange { position: relative; }
    .hero-parallax a.bg-primary-orange::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 2px solid rgba(247, 138, 29, 0.8);
        pointer-events: none;
        opacity: 0;
        animation: ctiPing 2.8s cubic-bezier(0.2, 0.6, 0.3, 1) 2.2s infinite;
    }
    .hero-parallax a.bg-primary-orange:hover::after { animation: none; }

    /* ───────────────────────── Pied de page : grille de circuits + impulsion lumineuse ───────────────────────── */
    @keyframes ctiGrid { to { background-position: 56px 56px, 56px 56px; } }
    @keyframes ctiPulseLine {
        0%        { background-position: -40% 0; }
        70%, 100% { background-position: 140% 0; }
    }
    footer { position: relative; isolation: isolate; }
    footer::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;                                       /* sous le contenu, au-dessus du fond du footer */
        pointer-events: none;
        background-image:
            linear-gradient(rgba(247, 138, 29, 0.07) 1px, transparent 1px),
            linear-gradient(90deg, rgba(247, 138, 29, 0.07) 1px, transparent 1px);
        background-size: 56px 56px, 56px 56px;
        -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000 0%, transparent 72%);
                mask-image: radial-gradient(ellipse at 50% 100%, #000 0%, transparent 72%);
        animation: ctiGrid 28s linear infinite;
        animation-play-state: paused;
    }
    footer::after {
        content: '';
        position: absolute;
        left: 0; right: 0; top: 0;
        height: 1px;
        pointer-events: none;
        background-image: linear-gradient(90deg, transparent, rgba(247, 138, 29, 0.95), transparent);
        background-size: 30% 100%;
        background-repeat: no-repeat;
        background-position: -40% 0;
        animation: ctiPulseLine 5.5s linear infinite;
        animation-play-state: paused;
    }
    footer.cti-live::before,
    footer.cti-live::after { animation-play-state: running; }

    /* ───────────────────────── Cartes : bordure néon rotative + reflet de verre au survol ───────────────────────── */
    @keyframes ctiNeon  { to { --cti-a: 360deg; } }
    @keyframes ctiGlass { to { background-position: -60% 0; } }
    @media all {                                           /* souris (survol) ET tactile (.cti-active posée par animations.js) */
        .cti-spot { position: relative; }
        .cti-spot::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1.5px;
            pointer-events: none;
            background: conic-gradient(from var(--cti-a), transparent 0 60%, rgba(247, 138, 29, 0.15) 66%, #F78A1D 84%, #FFD08A 93%, transparent 100%);
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
                    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
            opacity: 0;
            transition: opacity 0.35s ease;
        }
        .cti-spot:hover::before { opacity: 1; animation: ctiNeon 3.2s linear infinite; }
        .cti-spot.cti-active::before { opacity: 1; animation: ctiNeon 3.2s linear infinite; }
        .cti-spot::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            background-image: linear-gradient(115deg, transparent 38%, rgba(247, 138, 29, 0.14) 50%, transparent 62%);
            background-size: 250% 100%;
            background-repeat: no-repeat;
            background-position: 160% 0;
        }
        .cti-spot:hover::after, .cti-spot.cti-active::after { animation: ctiGlass 0.95s var(--cti-ease) 1 forwards; }
    }

    /* ───────────────────────── Photos : viseur d'angle + balayage de scan au survol ───────────────────────── */
    @keyframes ctiScan {
        0%   { opacity: 0; top: 0; }
        12%  { opacity: 1; }
        88%  { opacity: 1; }
        100% { opacity: 0; top: calc(100% - 2px); }
    }
    @media all {
        .cti-hud { position: relative; }
        .cti-hud::before {
            content: '';
            position: absolute;
            left: 0; right: 0; top: 0;
            height: 2px;
            z-index: 2;
            pointer-events: none;
            opacity: 0;
            background: linear-gradient(90deg, transparent, rgba(247, 138, 29, 0.95), transparent);
            box-shadow: 0 0 14px 2px rgba(247, 138, 29, 0.55);
        }
        .cti-hud:hover::before, .cti-hud.cti-active::before { animation: ctiScan 1.3s var(--cti-ease) 1; }
        .cti-hud::after {
            content: '';
            position: absolute;
            inset: 10px;
            z-index: 2;
            pointer-events: none;
            opacity: 0;
            transform: scale(1.06);
            transition: opacity 0.35s ease, transform 0.5s var(--cti-ease);
            background-image:
                linear-gradient(#F78A1D, #F78A1D), linear-gradient(#F78A1D, #F78A1D),
                linear-gradient(#F78A1D, #F78A1D), linear-gradient(#F78A1D, #F78A1D),
                linear-gradient(#F78A1D, #F78A1D), linear-gradient(#F78A1D, #F78A1D),
                linear-gradient(#F78A1D, #F78A1D), linear-gradient(#F78A1D, #F78A1D);
            background-size: 20px 2px, 2px 20px, 20px 2px, 2px 20px, 20px 2px, 2px 20px, 20px 2px, 2px 20px;
            background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
            background-repeat: no-repeat;
        }
        .cti-hud:hover::after, .cti-hud.cti-active::after { opacity: 1; transform: scale(1); }
    }
}


/* ═════════════════════════════════════════════════════════════════════════════════════════
   PETITS ÉCRANS & TACTILE — les animations du grand écran restent présentes
   (menu mobile animé, parallaxe du fond, glitch / soulignements au toucher).
   ═════════════════════════════════════════════════════════════════════════════════════════ */

/* Calque d'image de la bannière (créé par animations.js quand le fond « fixed » n'est plus possible) */
.hero-parallax.cti-bgpar { overflow: hidden; }
.cti-bglayer { display: none; }                         /* grand écran : le fond « fixed » d'origine reste utilisé */
.hero-parallax.cti-bgpar > .cti-bglayer {
    display: block;
    position: absolute;
    left: 0; right: 0;
    top: -14%; bottom: -14%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    will-change: translate;
}

@media (prefers-reduced-motion: no-preference) {

    /* Menu mobile : les liens apparaissent en cascade et se soulignent au toucher (comme le menu complet au survol) */
    @keyframes ctiMenuIn { from { opacity: 0; transform: translateY(10px); } }
    #mobile-menu nav a {
        background-image: linear-gradient(#F78A1D, #F78A1D);
        background-repeat: no-repeat;
        background-position: 50% calc(100% - 2px);
        background-size: 0% 2px;
        transition: color 0.3s ease, background-size 0.4s var(--cti-ease);
    }
    #mobile-menu nav a:hover,
    #mobile-menu nav a:active,
    #mobile-menu nav a:focus-visible { background-size: 70% 2px; }
    #mobile-menu:not(.hidden) nav a { animation: ctiMenuIn 0.45s var(--cti-ease) backwards; }
    #mobile-menu:not(.hidden) nav a:nth-child(1) { animation-delay: 0.04s; }
    #mobile-menu:not(.hidden) nav a:nth-child(2) { animation-delay: 0.08s; }
    #mobile-menu:not(.hidden) nav a:nth-child(3) { animation-delay: 0.12s; }
    #mobile-menu:not(.hidden) nav a:nth-child(4) { animation-delay: 0.16s; }
    #mobile-menu:not(.hidden) nav a:nth-child(5) { animation-delay: 0.20s; }
    #mobile-menu:not(.hidden) nav a:nth-child(6) { animation-delay: 0.24s; }
    #mobile-menu:not(.hidden) nav a:nth-child(7) { animation-delay: 0.28s; }
    #mobile-menu:not(.hidden) nav a:nth-child(8) { animation-delay: 0.32s; }

    /* Tactile : le « survol » n'existe pas → l'appui déclenche le même effet */
    @media (hover: none) {
        header > nav > a:active > span:first-child { animation: ctiGlitch 0.45s steps(2, end) 1; }
        footer ul a {
            background-image: linear-gradient(#F78A1D, #F78A1D);
            background-repeat: no-repeat;
            background-position: 0 100%;
            background-size: 0% 1px;
            transition: color 0.3s ease, background-size 0.35s var(--cti-ease);
        }
        footer ul a:active,
        footer ul a:focus-visible { background-size: 100% 1px; }
        a > .feather-arrow-right { transition: transform 0.35s var(--cti-ease); }
        a:active > .feather-arrow-right { transform: translateX(5px); }
    }
}
