/*
 * Liste des réalisations. Au survol, la ligne devient une console nuit et le
 * texte passe en blanc : l'effet porte sur la ligne elle-même.
 */

.apercu {
    position: relative;
    margin-block-start: clamp(2.5rem, 7vh, 5rem);
}

.apercu__liste {
    list-style: none;
    padding: 0;
    border-block-start: 1px solid var(--trait);
}

.apercu__ligne a {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding-block: clamp(1.25rem, 3vw, 2.25rem);
    padding-inline: 0.5rem;
    border-block-end: 1px solid var(--trait);
    text-decoration: none;
    transition:
        color 0.45s var(--ease-sortie),
        padding-inline 0.55s var(--ease-sortie),
        border-color 0.45s var(--ease-sortie);
}

/*
 * Le remplissage : une console nuit tramée qui se déplie depuis le bas, avec
 * un filet cyan à gauche. C'est un pseudo-élément transformé, composé par le
 * GPU, sans repeindre le texte.
 */
.apercu__ligne a::before {
    content: "";
    position: absolute;
    inset: -1px 0;
    z-index: -1;
    border-radius: var(--rayon-sm);
    background:
        linear-gradient(90deg, rgb(46 163 242 / 0.28), transparent 38%),
        radial-gradient(circle at 1px 1px, rgb(160 210 255 / 0.14) 1px, transparent 1.5px) 0 0 / 18px 18px,
        #070320;
    box-shadow:
        inset 3px 0 0 var(--cyan),
        inset 0 0 0 1px rgb(46 163 242 / 0.3),
        0 20px 50px -24px rgb(7 3 32 / 0.8);
    transform: scaleY(0);
    transform-origin: center bottom;
    transition: transform 0.5s var(--ease-sortie);
}

/*
 * La lueur qui traverse la ligne une fois, à l'entrée du pointeur. Elle
 * glisse par background-position sur un calque de la taille exacte de la
 * ligne : en translation, elle sortait à droite, élargissait la page de
 * 350 px et faisait sauter le défilement.
 */
.apercu__ligne a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: var(--rayon-sm);
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgb(46 163 242 / 0.3), transparent) no-repeat;
    background-size: 30% 100%;
    background-position: -50% 0;
}

.apercu__ligne a:is(:hover, :focus-visible)::after {
    animation: apercu-balayage 0.9s var(--ease-sortie) 0.15s;
}

@keyframes apercu-balayage {
    0% { opacity: 1; background-position: -50% 0; }
    100% { opacity: 0; background-position: 150% 0; }
}

.apercu__ligne a:is(:hover, :focus-visible) {
    padding-inline: clamp(1rem, 2.5vw, 2rem);
    color: #fff;
    border-color: transparent;
}

.apercu__ligne a:is(:hover, :focus-visible)::before {
    transform: scaleY(1);
}

.apercu__ligne a:is(:hover, :focus-visible) :is(.apercu__objet, .apercu__meta) {
    color: rgb(235 238 255 / 0.8);
}

.apercu__ligne a:is(:hover, :focus-visible) .apercu__index {
    color: var(--cyan);
}

/* Les lignes non survolées s'éteignent : le regard suit sans effort. */
.apercu__liste:has(a:hover) .apercu__ligne a:not(:hover) {
    color: var(--texte-tres-doux);
}

.apercu__index {
    color: var(--texte-tres-doux);
    transition: color 0.45s var(--ease-sortie);
}

.apercu__nom {
    font-family: var(--police-titre);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1;
}

.apercu__objet {
    color: var(--texte-doux);
    text-wrap: pretty;
    transition: color 0.45s var(--ease-sortie);
}

.apercu__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--texte-tres-doux);
    transition: color 0.45s var(--ease-sortie);
}

/* La flèche devient une pastille cyan : l'appel au clic, sans bulle. */
.apercu__meta .bouton__fleche {
    display: inline-grid;
    place-items: center;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    border: 1px solid var(--trait-fort);
    border-radius: 50%;
    transition: background-color 0.45s var(--ease-sortie), color 0.45s var(--ease-sortie), transform 0.45s var(--ease-sortie), border-color 0.45s var(--ease-sortie);
}

.apercu__ligne a:is(:hover, :focus-visible) .bouton__fleche {
    border-color: var(--cyan);
    color: #fff;
    background: rgb(46 163 242 / 0.2);
    box-shadow: 0 0 18px rgb(46 163 242 / 0.6);
    transform: rotate(-45deg);
}

.preuves__pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    margin-block-start: clamp(2.5rem, 6vh, 4rem);
}

@media (max-width: 62rem) {
    .apercu__ligne a {
        grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    }

    .apercu__objet {
        grid-column: 2 / -1;
        grid-row: 2;
    }
}
