/* UNIVERS PIXHUNTERS – feuille propre */

/* =========================
   Variables globales
   ========================= */
:root {
    --accent: #ffffff;
    --ink: #f1f1f6;
    --muted: #b8b8c7;
    --glass: rgba(18, 16, 26, .32);
    --stroke: rgba(255, 255, 255, .08);
    --gap: 14px;
}

/* =========================
   Structure générale
   ========================= */
.univers-page {
    padding: 36px 0 60px 0;
}

.univers-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.univers-container h1 {
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    margin: 14px 0 22px 0;
    text-align: center;
    letter-spacing: .15em;
    font-size: 28px;
    color: #fff;
}

/* Panel principal */
.panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 60%), var(--glass);
    border: 1px solid var(--stroke);
    backdrop-filter: saturate(120%) blur(3px);
    -webkit-backdrop-filter: saturate(120%) blur(3px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    margin-top: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================
   Layout desktop : sidebar + scène
   ========================= */
.deck {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0;
}

/* ----- Sidebar gauche ----- */
.sidebar {
    position: relative;
    padding: 18px 14px;
    border-right: 1px solid var(--stroke);
}

.sidebar__title {
    font-family: 'lulo-clean-w01-one-bold', sans-serif;
    font-weight: 700;
    letter-spacing: .18em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: .9;
    margin: 2px 6px 20px 6px;
    color: var(--ink);
    font-size: 16px;
}

/* Boutons de scroll */
.scroll-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.scrollBtn {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
    transition: .2s;
    z-index: 3;
    font-size: 12px;
}

.scrollBtn:hover {
    background: rgba(255, 255, 255, .14);
}

/* Liste verticale de cartes */
.listWrap {
    position: relative;
    overflow: hidden;
    height: 810px;              /* 4 cartes visibles en desktop */
}

.list {
    transition: transform .35s ease;
}

/* Carte personnage (vignette de gauche) */
.card {
    position: relative;
    width: 100%;
    height: 202.5px;            /* 16:9 pour largeur 360px */
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    overflow: hidden;
}

/* Image de la carte – sombre par défaut */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) saturate(0.8);
    transition: transform .3s ease, filter .3s ease;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(0.6) saturate(0.9);
}

.card.is-active img {
    filter: brightness(1) saturate(1);
    transform: scale(1.02);
}

/* Nom sur la vignette (desktop uniquement) */
.card::after {
    content: attr(data-name);
    position: absolute;
    left: 12px;
    bottom: 10px;
    background: transparent;
    font-size: clamp(18px, 2.4vw, 26px);
    font-weight: 800;
    color: #fff;
    letter-spacing: .03em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
    font-family: 'lulo-clean-w01-one-bold', sans-serif;
    line-height: 1.05;
    max-width: calc(100% - 24px);
    right: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* ----- Zone centrale : texte + grande image ----- */
.contentShell {
    position: relative;
    margin: 0;
    padding: 0;
}

.content {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 44px;
    margin: 0;
    padding: 0 20px;
    position: relative;
    z-index: 0;
}

/* Bloc texte */
.stage__text {
    display: block;
    height: auto;
    overflow: visible;
    text-align: left;
    color: #fff;
    position: relative;
    top: 0;
    z-index: 5;
    padding: 40px 60px 40px 32px;
    flex: 0 1 540px;
    max-width: 600px;
    width: auto;
    line-height: 1.6;
}

#textInner {
    display: block;
    text-align: left;
    width: 100%;
}

/* Titre du personnage */
.title {
    display: block;
    font-family: 'lulo-clean-w01-one-bold', sans-serif;
    color: #ffffff;
    letter-spacing: 0.06em;
    margin: 0 0 14px 0;
    font-size: clamp(34px, 3.8vw, 64px);
    line-height: 1.1;
    text-shadow: 0 3px 8px rgba(0, 0, 0, .6);
    max-width: 100%;
    padding-right: 4px;
}

/* Petit trait */
.divider {
    display: block;
    height: 2px;
    background: rgba(255, 255, 255, 0.75);
    margin: 16px 0 20px 0;
    width: 120px;
}

/* Description */
.desc {
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    color: #d6e2f2;
    max-width: 480px;
    width: 100%;
    text-align: left;
}

/* Grande image à droite */
.stage__art {
    position: relative;
    overflow: visible;
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;

    --art-scale: 1.10;
    --art-nudge-x: -140px;
}

/* Effet de transition "ghost" */
.stage__art img {
    position: absolute;
    height: calc(100% * var(--art-scale));
    width: auto;
    max-width: none;
    left: 50%;
    top: 50%;
    transform:
        translate(-50%, -50%)
        translateX(var(--art-nudge-x))
        scale(0.92);
    transform-origin: center center;

    opacity: 0;
    filter:
        brightness(2)
        contrast(0.7)
        blur(20px)
        saturate(1.2);
    mix-blend-mode: screen;

    transition:
        opacity 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    z-index: 0;
    pointer-events: none;
}

.stage__art img.active {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        translateX(var(--art-nudge-x))
        scale(1);
    filter:
        brightness(1)
        contrast(1.05)
        blur(0px)
        saturate(1.1);
    mix-blend-mode: normal;
}

/* =========================
   Tablettes (≤ 1024px)
   ========================= */
@media (max-width: 1024px) {
    .deck {
        grid-template-columns: 300px 1fr;
    }

    .sidebar {
        padding: 15px 10px;
    }

    .content {
        gap: 30px;
    }

    .stage__text {
        padding: 30px 40px 0 30px;
    }

    .stage__art {
        height: 400px;
        order: -1;
        --art-scale: 1.15;
        --art-nudge-x: -60px;
    }

    .stage__art img {
        height: 85%;
        max-width: 90%;
    }

    .title {
        font-size: clamp(32px, 7vw, 48px);
    }

    .desc {
        font-size: 15px;
    }

    .sidebar__title {
        font-size: 20px;
    }

    .listWrap {
        height: 607.5px;
    }

    .card {
        height: 151.875px;
    }
}

/* =========================
   📱 Mobiles & mobiles paysage
   (largeur ≤ 768px OU hauteur ≤ 480px)
   ========================= */
@media (max-width: 768px), (max-height: 480px) {

    .univers-page {
        padding: 20px 0 40px 0;
    }

    .univers-container {
        padding: 0 10px;
    }

    .univers-container h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .panel {
        margin-top: 10px;
        max-width: 100%;
    }

    /* On n'utilise plus la scène de droite en mobile */
    .contentShell,
    .stage__art {
        display: none !important;
    }

    /* La grille devient une colonne */
    .deck {
        display: block;
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: none;
        padding: 12px 0 20px 0;
    }

    .sidebar__title {
        font-size: 16px;
        margin: 0 0 15px 0;
        padding: 0 4px;
    }

    /* Plus de boutons de scroll */
    .scroll-buttons {
        display: none;
    }

    /* Liste en hauteur naturelle */
    .listWrap {
        height: auto;
        overflow: visible;
    }

    /* Une carte = image 16/9 + texte en dessous */
    .card {
        width: 100%;
        max-width: 500px;
        margin: 25px auto;
        border-bottom: none;
        cursor: default;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        height: auto !important;
    }

    .card img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        display: block;
        filter: brightness(1) !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* On enlève le texte superposé sur l'image */
    .card::after {
        content: none !important;
    }

    /* Bloc de texte sous l'image – toujours visible */
    .card-accordion {
        width: 100%;
        max-width: 500px;
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        background: rgba(0, 0, 0, 0.55);
        padding: 18px 15px 22px;
        margin-top: -4px;
        text-align: center;
    }

    .card-accordion-inner {
        text-align: center;
    }

    .card-accordion-inner h3 {
        margin: 0 0 8px 0;
        font-family: 'lulo-clean-w01-one-bold', sans-serif;
        font-size: 20px;
        letter-spacing: 0.06em;
        color: #fff;
    }

    .card-accordion-inner p {
        margin: 0;
        font-family: 'Open Sans', sans-serif;
        font-size: 15px;
        line-height: 1.5;
        color: #e6e6e6;
        white-space: normal;
    }

    /* Neutralise complètement les effets desktop */
    .card:hover img,
    .card.is-active img,
    .card:not(.is-active) img {
        filter: brightness(1) !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =========================
   Très petits écrans (≤ 360px)
   ========================= */
@media (max-width: 360px) {
    .card {
        max-width: 100%;
        margin: 16px auto;
    }

    .card-accordion-inner h3 {
        font-size: 18px;
    }

    .card-accordion-inner p {
        font-size: 14px;
    }
}
