/* =================================================================
   BEYOND — design system
   Fond sombre, néons bleu (#35d4ff) & rose (#ff3fb5), typographies
   Unbounded (display) / Inter (texte courant).
   ================================================================= */

:root {
    --bg: #07070d;
    --bg-alt: #0c0c17;
    --panel: #101021;

    --blue: #35d4ff;
    --pink: #ff3fb5;
    --violet: #7a4dff;

    --text: #ece9f4;
    --text-dim: #8f8ba6;
    --hairline: #201f33;

    --font-display: "Unbounded", "Inter", sans-serif;
    --font-body: "Inter", sans-serif;

    --gradient: linear-gradient(90deg, var(--blue), var(--violet) 55%, var(--pink));

    --ease: cubic-bezier(.16, .8, .3, 1);
}

* { box-sizing: border-box; }

/* Aucune image (ou vidéo) ne doit jamais dépasser son conteneur — utile
   en particulier pour les vignettes venant du flux RSS du blog, dont on
   ne contrôle pas la taille d'origine. Les composants qui ont besoin
   d'une taille précise (grille portfolio, lightbox...) surchargent déjà
   width/height plus loin avec une règle plus spécifique. */
img, video { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;  cursor: url('assets/img/cursor.png'), auto;
}

/* Fond : deux halos de couleur fixes, asymétriques */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(680px 520px at 82% -8%, rgba(255, 63, 181, 0.20), transparent 60%),
        radial-gradient(620px 480px at -6% 38%, rgba(53, 212, 255, 0.16), transparent 60%),
        var(--bg);
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: repeating-linear-gradient(0deg, #fff 0px, transparent 1px, transparent 2px);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    margin: 0 0 .5em;
}

p { color: var(--text-dim); max-width: 62ch; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------------------------------------------------------------
   Header / navigation
   --------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
    background: linear-gradient(to bottom, rgba(7, 7, 13, 0.9), rgba(7, 7, 13, 0));
    backdrop-filter: blur(6px);
}

.logo { display: inline-flex; align-items: center; line-height: 1; }
.logo-group {
    display: inline-flex;
    align-items: center;
}
.logo-word {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--text);
    transition: text-shadow .3s var(--ease), color .3s var(--ease);
}
.logo:hover .logo-word {
    color: #fff;
    text-shadow: 0 0 14px rgba(53, 212, 255, .8), 0 0 28px rgba(255, 63, 181, .5);
}

/* Contrôle flottant, indépendant du header — voir header.php pour le
   raisonnement (contrôle d'expérience plutôt qu'élément de nav). Le
   safe-area-inset gère l'encoche/la barre de gestes sur mobile. */
.audio-toggle {
    position: fixed;
    left: max(1.5rem, env(safe-area-inset-left));
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 .7rem;
    background: rgba(12, 12, 23, .6);
    backdrop-filter: blur(6px);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.audio-toggle-icon {
    position: relative;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.audio-icon-play { display: block; transition: opacity .2s var(--ease); }

/* Mini égaliseur : 3 barres qui rebondissent quand la musique joue.
   Masqué au repos, remplace le triangle "play" une fois lancé — plus
   parlant qu'une simple icône pause pour signaler "ça joue". */
.audio-icon-bars {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 14px;
    height: 12px;
}
.audio-icon-bars .bar {
    width: 2.5px;
    height: 30%;
    background: currentColor;
    border-radius: 1px;
}

/* Label discret, révélé au survol / focus pour expliciter l'action
   sans alourdir le header en permanence. */
.audio-toggle-label {
    display: inline-block;
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    opacity: 0;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-dim);
    transition: max-width .35s var(--ease), margin-left .35s var(--ease), opacity .25s var(--ease), color .25s var(--ease);
}
.audio-toggle:hover .audio-toggle-label,
.audio-toggle:focus-visible .audio-toggle-label,
.audio-toggle.is-playing .audio-toggle-label {
    max-width: 60px;
    margin-left: .5rem;
    opacity: 1;
}

.audio-toggle:hover {
    color: var(--text);
    border-color: var(--blue);
    background: rgba(53, 212, 255, .06);
    box-shadow: 0 0 14px rgba(53, 212, 255, .25);
}
.audio-toggle.is-playing {
    color: #fff;
    border-color: var(--pink);
    background: rgba(255, 63, 181, .08);
    box-shadow: 0 0 16px rgba(255, 63, 181, .3);
}
.audio-toggle.is-playing .audio-toggle-label { color: #fff; }
.audio-toggle.is-playing .audio-icon-play { display: none; opacity: 0; }
.audio-toggle.is-playing .audio-icon-bars { display: flex; }

.audio-toggle.is-playing .bar-1 { animation: audio-eq-bounce 1.1s ease-in-out infinite; }
.audio-toggle.is-playing .bar-2 { animation: audio-eq-bounce 1.1s ease-in-out .18s infinite; }
.audio-toggle.is-playing .bar-3 { animation: audio-eq-bounce 1.1s ease-in-out .34s infinite; }
@keyframes audio-eq-bounce {
    0%, 100% { height: 30%; }
    50% { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .audio-toggle.is-playing .bar-1,
    .audio-toggle.is-playing .bar-2,
    .audio-toggle.is-playing .bar-3 { animation: none; height: 70%; }
}
@media (max-width: 760px) {
    .audio-toggle {
        left: max(1rem, env(safe-area-inset-left));
        bottom: max(1rem, env(safe-area-inset-bottom));
        width: 30px;
        height: 30px;
        padding: 0;
        justify-content: center;
    }
    /* Sur mobile, pas de survol : on repasse en simple bouton rond,
       le label et le padding horizontal n'ont plus lieu d'être. */
    .audio-toggle-label { display: none; }
}

.site-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }

.nav-link {
    position: relative;
    font-size: .9rem;
    color: var(--text-dim);
    padding-bottom: 5px;
    transition: color .25s var(--ease);
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--gradient);
    transition: right .3s var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: var(--text); }
.nav-link:hover::after,
.nav-link.is-active::after { right: 0; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px; height: 34px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    width: 100%; height: 2px;
    background: var(--text);
    border-radius: 2px;
}
/* Styles du menu déroulant de navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: .9rem;
}

.nav-dropdown-toggle .caret {
    width: 8px;
    height: 8px;
    transition: transform .25s var(--ease);
}
.nav-dropdown.is-open .caret { transform: rotate(180deg); }

/* Panneau flottant en verre, bordure en dégradé bleu → violet → rose
   (réutilise --gradient plutôt qu'un dégradé bleu/rose recréé à part). */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translate(-50%, -6px) scale(.98);
    width: 320px;
    padding: .5rem;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        var(--gradient) border-box;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
    z-index: 60;
}

.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

/* petite flèche reliant le panneau au trigger */
.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 11px;
    height: 11px;
    background: var(--panel);
    border-left: 1px solid rgba(53, 212, 255, .45);
    border-top: 1px solid rgba(53, 212, 255, .45);
    border-radius: 2px 0 0 0;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .8rem .85rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: background .15s var(--ease);
}
.dropdown-item + .dropdown-item { margin-top: 2px; }
.dropdown-item:hover,
.dropdown-item:focus-visible { background: rgba(255, 255, 255, .045); }
.dropdown-item:focus-visible { outline: 1px solid var(--blue); outline-offset: -1px; }

.dropdown-icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--hairline);
    color: var(--blue);
    overflow: hidden;
}
/* le 2e item (Lecteur mp3) s'allume en rose plutôt qu'en bleu */
.dropdown-item:nth-child(2) .dropdown-icon { color: var(--pink); }
.dropdown-item:hover .dropdown-icon,
.dropdown-item:focus-visible .dropdown-icon {
    box-shadow: 0 0 14px -2px currentColor;
    border-color: currentColor;
}
.dropdown-icon svg { display: block; width: 17px; height: 17px; flex-shrink: 0; }

.dropdown-text strong {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .15rem;
}
.dropdown-text span {
    display: block;
    font-size: .78rem;
    color: var(--text-dim);
    line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
    .nav-dropdown-menu,
    .nav-dropdown-toggle .caret { transition: none; }
}

/* Adaptation mobile : le panneau se déplie dans le menu latéral au lieu
   de flotter (pas de place pour un panneau détaché à cette largeur). */
@media (max-width: 760px) {
    .nav-dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: .2rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        background: transparent;
        border: none;
        padding-left: 1rem;
        display: none;
    }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown.is-open .nav-dropdown-menu { display: block; }
}
.page-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: var(--gradient);
    z-index: 60;
    transition: width .35s var(--ease), opacity .25s linear;
    box-shadow: 0 0 10px rgba(53, 212, 255, .8);
}
.page-progress.is-loading { width: 70%; }
.page-progress.is-done { width: 100%; opacity: 0; }

/* ---------------------------------------------------------------
   Rideau de préchargement (transition AJAX entre les pages)
   --------------------------------------------------------------- */

#ajax-loader-curtain {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(680px 520px at 82% 12%, rgba(255, 63, 181, 0.22), transparent 60%),
        radial-gradient(620px 480px at 10% 85%, rgba(53, 212, 255, 0.18), transparent 60%),
        var(--bg);
    transform: translateY(-100%);
    pointer-events: none;
    transition: transform .6s var(--ease);
    will-change: transform;
}

.curtain-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    opacity: 0;
    transform: translateY(10px) scale(.96);
    transition: opacity .35s var(--ease) .1s, transform .35s var(--ease) .1s;
}
#ajax-loader-curtain.is-visible .curtain-mark {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.curtain-ring {
    position: relative;
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 10px rgba(53, 212, 255, .35));
}
.curtain-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.curtain-ring circle { fill: none; stroke-width: 2.5; }
.curtain-ring-track { stroke: var(--hairline); }
.curtain-ring-fill {
    stroke: var(--blue);
    stroke-linecap: round;
    transition: stroke-dashoffset .2s linear;
}
#ajax-loader-curtain.is-visible .curtain-ring {
    animation: curtain-pulse 1.6s var(--ease) infinite;
}
@keyframes curtain-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(53, 212, 255, .35)); }
    50% { filter: drop-shadow(0 0 16px rgba(255, 63, 181, .5)); }
}

.curtain-label {
    font-family: var(--font-display);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
    min-width: 4.5em;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .curtain-ring { animation: none !important; }
}


/* ---------------------------------------------------------------
   Main / transitions (Fade in/out)
   --------------------------------------------------------------- */

main {
    display: block;
    min-height: 80vh;
    padding: clamp(6.5rem, 14vh, 9rem) clamp(1.25rem, 6vw, 4rem) 4rem;
    max-width: 1180px;
    margin: 0 auto;
    opacity: 1;
    transition: opacity .2s var(--ease);
}

main.is-fading {
    opacity: 0;
}

[data-animate-in] {
    animation: rise .6s var(--ease) both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------
   Hero (accueil)
   --------------------------------------------------------------- */

.hero { padding-bottom: clamp(3rem, 8vh, 5rem); }
.hero-accueil {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.hero-accueil-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 20px;
}

.hero-accueil-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.hero-accueil-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom, 
        rgba(10, 10, 10, 0.4), 
        rgba(10, 10, 10, 0.85)
    );
    z-index: 2;
}

.hero-accueil-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 2rem;
}
.hero-accueil-sub {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    max-width: 46ch;
}

.hero-accueil-cta {
    display: inline-block;
    margin-top: 2rem;
    padding: .8rem 1.6rem;
    font-size: .9rem;
    color: var(--text);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-accueil-cta:hover {
    border-color: transparent;
    box-shadow: 0 0 0 1px var(--blue), 0 0 22px rgba(53, 212, 255, .35);
}

.hero-accueil-actions {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 2.5rem 0 3.5rem;
    flex-wrap: wrap;
}

.hero-accueil-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .95rem 2.4rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}

.hero-accueil-btn:hover {
    transform: translateY(-2px);
}

/* Explorer : rempli au dégradé néon */
.hero-accueil-btn--explore {
    color: var(--bg);
    background: var(--gradient);
    box-shadow: 0 0 22px rgba(53, 212, 255, .25), 0 0 22px rgba(255, 63, 181, .18);
}

.hero-accueil-btn--explore:hover {
    box-shadow: 0 0 30px rgba(53, 212, 255, .45), 0 0 34px rgba(255, 63, 181, .35);
}

/* Download : contour, se remplit du dégradé au survol */
.hero-accueil-btn--download {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--hairline);
}

.hero-accueil-btn--download::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--gradient);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.hero-accueil-btn--download:hover {
    color: var(--bg);
    border-color: transparent;
}

.hero-accueil-btn--download:hover::before {
    opacity: 1;
}

@media (max-width: 560px) {
    .hero-accueil-btn {
        width: 100%;
        max-width: 280px;
    }
}
.hero-accueil-title {
    font-size: clamp(3.4rem, 13vw, 9rem);
    margin: 0;
    display: flex;
    flex-direction: column;
}
.hero-accueil-title-line { color: var(--text); }
.hero-accueil-title-glow {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(255, 63, 181, .35));
    margin-left: clamp(1rem, 8vw, 4rem);
}
.hero-title {
    font-size: clamp(3.4rem, 13vw, 9rem);
    margin: 0;
    display: flex;
    flex-direction: column;
}
.hero-title-line { color: var(--text); }
.hero-title-glow {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(255, 63, 181, .35));
    margin-left: clamp(1rem, 8vw, 4rem);
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    max-width: 46ch;
}

.hero-cta {
    display: inline-block;
    margin-top: 2rem;
    padding: .8rem 1.6rem;
    font-size: .9rem;
    color: var(--text);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-cta:hover {
    border-color: transparent;
    box-shadow: 0 0 0 1px var(--blue), 0 0 22px rgba(53, 212, 255, .35);
}

/* ---------------------------------------------------------------
   Hero — Icône et titre combinés
   --------------------------------------------------------------- */

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    color: var(--blue);
    box-shadow: 0 0 25px rgba(53, 212, 255, 0.15);
    transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.hero-icon:hover {
    border-color: rgba(53, 212, 255, 0.4);
    box-shadow: 0 0 30px rgba(53, 212, 255, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 760px) {
    .hero-title-wrapper {
        gap: 1rem;
    }
    .hero-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        border-radius: 12px;
    }
}

/* ---------------------------------------------------------------
   Système de vote 5 étoiles (lecteur.php, explorateur.php)
   --------------------------------------------------------------- */

.rating-widget {
    max-width: 460px;
    margin: 2.5rem auto 0;
    padding: 1.8rem 1.5rem;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 14px;
}

.rating-title {
    font-size: 1rem;
    margin: 0 0 1rem;
}

.rating-stars {
    display: inline-flex;
    gap: .35rem;
}

.rating-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: none;
    border: none;
    color: var(--hairline);
    cursor: pointer;
    transition: color .2s var(--ease), filter .2s var(--ease), transform .15s var(--ease);
}
.rating-star:hover { transform: translateY(-1px); }
.rating-star:disabled { cursor: default; transform: none; }

.rating-star svg { width: 26px; height: 26px; }

.rating-star.is-filled {
    color: #ffce54;
    filter: drop-shadow(0 0 8px rgba(255, 206, 84, .55));
}

.rating-widget.is-voted .rating-star { cursor: default; }

.rating-summary {
    margin: 1rem 0 0;
    font-size: .85rem;
    color: var(--text-dim);
}

@media (max-width: 480px) {
    .rating-star { width: 32px; height: 32px; }
    .rating-star svg { width: 22px; height: 22px; }
}

/* ---------------------------------------------------------------
   Intro grid (accueil)
   --------------------------------------------------------------- */

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-top: 1px solid var(--hairline);
    padding-top: 2.5rem;
    align-items: start;
}
.intro-block--offset { margin-top: 0; }
.intro-block h2 { font-size: 1.15rem; }

/* Toute la carte est un lien : on neutralise les styles de <a>,
   on l'habille en carte, et on ajoute les effets néon au survol. */
.intro-block {
    position: relative;
    display: block;
    padding: 1.4rem 1.4rem 1.6rem;
    margin: 0;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .45s var(--ease), border-color .35s var(--ease),
                background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.intro-block--offset { margin-top: 0; }

.intro-block:hover,
.intro-block:focus-visible {
    transform: translateY(-8px);
    border-color: rgba(122, 77, 255, .4);
    background-color: rgba(255, 255, 255, .02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .35), 0 0 30px rgba(122, 77, 255, .18);
    outline: none;
}
.intro-block:active { transform: translateY(-4px); }

/* Coins lumineux, façon .portfolio-card, qui se révèlent au survol */
.intro-block::before,
.intro-block::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    z-index: 2;
    opacity: 0;
    transition: opacity .35s var(--ease);
    pointer-events: none;
}
.intro-block::before { top: 10px; left: 10px; border-top: 2px solid var(--blue); border-left: 2px solid var(--blue); }
.intro-block::after { bottom: 10px; right: 10px; border-bottom: 2px solid var(--pink); border-right: 2px solid var(--pink); }
.intro-block:hover::before,
.intro-block:focus-visible::before,
.intro-block:hover::after,
.intro-block:focus-visible::after { opacity: .9; }

.intro-block-image {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    background: var(--panel);
    margin-bottom: 1.2rem;
    transition: border-color .35s var(--ease);
}
.intro-block:hover .intro-block-image,
.intro-block:focus-visible .intro-block-image { border-color: rgba(255, 255, 255, .18); }

.intro-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    opacity: 0;
    transition: opacity .5s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
    filter: saturate(.9);
}
.intro-block-image.is-loaded { box-shadow: 0 0 25px rgba(53, 212, 255, .08); }
.intro-block-image.is-loaded img { opacity: 1; }
.intro-block:hover .intro-block-image img,
.intro-block:focus-visible .intro-block-image img { transform: scale(1.08); filter: saturate(1.1); }

.intro-image-skeleton { position: absolute; inset: 0; }
.intro-image-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(53, 212, 255, .12), rgba(255, 63, 181, .12), transparent);
    animation: portfolio-shimmer 1.6s infinite;
}

.intro-block h2 {
    position: relative;
    display: inline-block;
    transition: color .3s var(--ease), text-shadow .3s var(--ease);
}
.intro-block:hover h2,
.intro-block:focus-visible h2 { color: #fff; text-shadow: 0 0 18px rgba(53, 212, 255, .35); }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .6rem;
    font-size: .85rem;
    color: var(--blue);
    transition: color .25s var(--ease);
}
.intro-block:hover .text-link,
.intro-block:focus-visible .text-link { color: var(--pink); }

.text-link-arrow {
    display: inline-block;
    transition: transform .35s var(--ease);
}
.intro-block:hover .text-link-arrow,
.intro-block:focus-visible .text-link-arrow { transform: translateX(5px); }

/* ---------------------------------------------------------------
   Page head (actualites / portfolio / blog)
   --------------------------------------------------------------- */

.page-head { padding-bottom: 2.5rem; border-bottom: 1px solid var(--hairline); margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.page-lede { font-size: 1.05rem; }

/* ---------------------------------------------------------------
   Actualités
   --------------------------------------------------------------- */

.news-list {
    display: flex;
    flex-direction: column;
}
.news-item {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1.5rem;
    padding: 1.8rem 0;
    border-bottom: 1px solid var(--hairline);
}
.news-item time {
    font-size: .8rem;
    color: var(--text-dim);
    letter-spacing: .02em;
}
.news-item h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.news-item:hover time { color: var(--blue); }

/* ---------------------------------------------------------------
   Blog — déplacé dans blog.css (liste d'articles + vue "article
   complet"). Charger blog.css après ce fichier sur les pages qui
   en ont besoin ; les variables :root ci-dessus restent partagées.
   --------------------------------------------------------------- */

.filter-btn:disabled { opacity: .5; cursor: default; }

/* ---------------------------------------------------------------
   Portfolio — filtres
   --------------------------------------------------------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2.5rem;
}
.filter-btn {
    font-family: var(--font-body);
    font-size: .82rem;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    cursor: pointer;
    transition: color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }
.filter-btn.is-active {
    color: var(--text);
    border-color: transparent;
    background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 16px rgba(122, 77, 255, .3);
}

/* ---------------------------------------------------------------
   Portfolio — galerie par catégorie
   --------------------------------------------------------------- */

.portfolio-category { margin-bottom: 4rem; }
.portfolio-category:last-child { margin-bottom: 0; }

.portfolio-category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: .9rem;
    margin-bottom: 1.5rem;
}
.portfolio-category-head h2 { font-size: 1.3rem; margin: 0; }
.portfolio-count {
    font-family: var(--font-body);
    font-size: .78rem;
    color: var(--text-dim);
    letter-spacing: .02em;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.portfolio-empty {
    grid-column: 1 / -1;
    color: var(--text-dim);
    font-size: .9rem;
    padding: 1.5rem 0;
}

.portfolio-skeleton {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: var(--panel);
    border: 1px solid var(--hairline);
    position: relative;
    overflow: hidden;
}
.portfolio-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(53, 212, 255, .12), rgba(255, 63, 181, .12), transparent);
    animation: portfolio-shimmer 1.6s infinite;
}
@keyframes portfolio-shimmer { 100% { transform: translateX(100%); } }

.portfolio-card {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    background: var(--panel);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.portfolio-card.is-visible { opacity: 1; transform: translateY(0); }

.portfolio-card img,
.portfolio-card video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(.9);
    transition: transform .6s var(--ease), filter .6s var(--ease);
}
.portfolio-card:hover img,
.portfolio-card:hover video { transform: scale(1.07); filter: saturate(1.1); }

.portfolio-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7, 7, 13, .55);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: .8rem;
    padding-left: 3px;
    pointer-events: none;
    opacity: .9;
}

.portfolio-audio-visual {
    width: 100%; height: 100%;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(255, 63, 181, .18), rgba(122, 77, 255, .18));
}
.portfolio-audio-visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: .55; }
.portfolio-note-icon { position: relative; font-size: 2rem; color: var(--text); text-shadow: 0 0 20px rgba(255, 63, 181, .6); }

.portfolio-card figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: .9rem .9rem .7rem;
    font-size: .85rem;
    color: var(--text);
    background: linear-gradient(to top, rgba(7, 7, 13, .92), transparent);
}

.portfolio-card::before,
.portfolio-card::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    z-index: 2;
    opacity: 0;
    transition: opacity .3s var(--ease);
    pointer-events: none;
}
.portfolio-card::before { top: 8px; left: 8px; border-top: 2px solid var(--blue); border-left: 2px solid var(--blue); }
.portfolio-card::after { bottom: 8px; right: 8px; border-bottom: 2px solid var(--pink); border-right: 2px solid var(--pink); }
.portfolio-card:hover::before,
.portfolio-card:hover::after,
.portfolio-card:focus-visible::before,
.portfolio-card:focus-visible::after { opacity: .9; }

.portfolio-grid[data-glow="blue"] .portfolio-card:hover { border-color: rgba(53, 212, 255, .5); box-shadow: 0 0 30px rgba(53, 212, 255, .2); }
.portfolio-grid[data-glow="pink"] .portfolio-card:hover { border-color: rgba(255, 63, 181, .5); box-shadow: 0 0 30px rgba(255, 63, 181, .2); }
.portfolio-grid[data-glow="mix"] .portfolio-card:hover  { border-color: rgba(122, 77, 255, .5); box-shadow: 0 0 30px rgba(122, 77, 255, .22); }

/* ---------------------------------------------------------------
   Lightbox (portfolio)
   --------------------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(5, 5, 10, .88);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.lightbox.is-active { opacity: 1; visibility: visible; }

.lightbox-figure {
    max-width: min(900px, 92vw);
    max-height: 88vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(.94);
    transition: transform .35s var(--ease);
}
.lightbox.is-active .lightbox-figure { transform: scale(1); }

.lightbox-figure img,
.lightbox-figure video {
    max-width: 100%;
    max-height: 62vh;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--hairline);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(122, 77, 255, .18);
}

.lightbox-media { display: flex; justify-content: center; max-width: 100%; }

.lightbox-audio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.lightbox-audio img {
    max-width: min(360px, 70vw);
    border-radius: 6px;
    border: 1px solid var(--hairline);
    box-shadow: 0 0 40px rgba(255, 63, 181, .18);
}

/* Lecteur audio custom (BeyondLightboxAudio), monté dans .lightbox-audio
   à la place du <audio controls> natif — voir portfolio-gallery.js */
.lb-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    width: min(420px, 80vw);
    padding: 2rem 1.5rem;
    background:
        radial-gradient(420px 260px at 50% 0%, rgba(255, 63, 181, 0.14), transparent 65%),
        var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 10px;
}

.lb-player-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 46px;
}
.lb-bar {
    width: 4px;
    border-radius: 3px;
    height: 6px;
    background: var(--pink);
    opacity: .55;
    box-shadow: 0 0 8px rgba(255, 63, 181, .35);
    transition: box-shadow .2s var(--ease);
}
.lb-player.is-playing .lb-bar {
    opacity: 1;
    box-shadow: 0 0 14px rgba(255, 63, 181, .6);
}

.lb-player-controls { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.lb-player-btn-wrap { position: relative; width: 64px; height: 64px; }
.lb-player-ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.lb-player-ring-bg { fill: none; stroke: var(--hairline); stroke-width: 2; }
.lb-player-ring-fill {
    fill: none;
    stroke: var(--pink);
    stroke-width: 2;
    stroke-linecap: round;
    transition: stroke-dashoffset .1s linear;
    filter: drop-shadow(0 0 5px rgba(255, 63, 181, .55));
}
.lb-player-btn {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .25s var(--ease), transform .2s var(--ease);
}
.lb-player-btn svg { width: 18px; height: 18px; fill: currentColor; }
.lb-player-btn:hover { color: #fff; transform: scale(1.05); }
.lb-player-btn .icon-pause { display: none; }
.lb-player.is-playing .lb-player-btn .icon-play { display: none; }
.lb-player.is-playing .lb-player-btn .icon-pause { display: flex; }

@keyframes lb-player-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 63, 181, 0); }
    50% { box-shadow: 0 0 18px rgba(255, 63, 181, .3); }
}
.lb-player.is-playing .lb-player-btn-wrap { animation: lb-player-pulse 2.4s var(--ease) infinite; }

.lb-player-time {
    font-family: var(--font-body);
    font-size: .75rem;
    letter-spacing: .04em;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .lb-player-btn-wrap { animation: none !important; }
}

.lightbox-figure figcaption { text-align: center; margin-top: 1.1rem; max-width: 52ch; }
.lightbox-kind { display: block; font-size: .75rem; color: var(--blue); letter-spacing: .04em; margin-bottom: .3rem; }
.lightbox-figure h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
.lightbox-figure p { font-size: .9rem; margin: 0 auto; }

.btn-lb {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 999px;
    background: rgba(16, 16, 33, .7);
    border: 1px solid var(--hairline);
    color: var(--text);
    cursor: pointer;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
    z-index: 210;
    font-size: 0;
}
.btn-lb:hover { border-color: var(--blue); box-shadow: 0 0 18px rgba(53, 212, 255, .35); color: #fff; }
.btn-lb:active { transform: scale(.94); }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 16px; height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.lightbox-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.arrow { top: 50%;  }
.arrow::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 1px;
}
.arrow.left::before { transform: translate(-50%, -50%) rotate(135deg); }
.arrow.right::before { transform: translate(-50%, -50%) rotate(-45deg); }
.arrow.left { left: 24px; }
.arrow.right { right: 24px; }

@media (max-width: 760px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .btn-lb { width: 40px; height: 40px; }
    .lightbox-close::before,
    .lightbox-close::after { width: 13px; }
    .arrow::before { width: 8px; height: 8px; }
    .arrow.left { left: 10px; }
    .arrow.right { right: 10px; }
    .lightbox-close { top: 12px; right: 12px; }
}
@media (max-width: 480px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.site-footer {
    padding: 3rem clamp(1.25rem, 6vw, 4rem) 2.5rem;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}
.footer-line {
    height: 1px;
    margin: 0 auto 1.5rem;
    max-width: 240px;
    background: var(--gradient);
    opacity: .5;
}
.footer-text { 
    color: var(--text-dim); 
    font-size: .85rem; 
    text-align: center;
    margin: 0 auto;
}
.footer-text a { color: var(--text); border-bottom: 1px solid var(--hairline); transition: color .25s var(--ease), border-color .25s var(--ease); }
.footer-text a:hover { color: var(--blue); border-color: var(--blue); }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: min(78vw, 300px);
        background: var(--panel);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform .35s var(--ease);
        border-left: 1px solid var(--hairline);
    }
    .site-nav.is-open { transform: translateX(0); }
    .nav-link { font-size: 1.1rem; }

    .intro-grid { grid-template-columns: 1fr; }
    .intro-block--offset { margin-top: 0; }

    .work-item, .work-item--reverse { flex-direction: column; align-items: flex-start; }
    .work-visual { flex-basis: auto; width: 100%; }

    .news-item { grid-template-columns: 1fr; gap: .4rem; }
}

