* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Fond : couleur + lueur + texture ---------- */
html {
    background-color: var(--couleur-fond);
    background-image: radial-gradient(900px 500px at 50% -80px, var(--lueur), transparent 70%);
    background-repeat: no-repeat;
    transition: background-color .4s ease;
}

body {
    font-family: var(--police-texte);
    color: var(--couleur-texte);
    min-height: 100vh;
    transition: color .4s ease;
}

/* Grain fin sur tout le fond */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: var(--grain-opacite);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.header {
    padding: 24px 48px;
}

.logo {
    font-family: var(--police-titre);
    font-size: 22px;
    font-weight: 800;
    color: inherit;
    text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 80px 20px 70px;
}

.hero h1 {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: clamp(36px, 6.5vw, 72px);
    line-height: 1.1;
}

.split {
    display: block;
}

.split.accent {
    font-family: var(--police-accent);
    font-style: italic;
    font-weight: 500;
    color: var(--couleur-doux);
}

.hero p {
    margin-top: 18px;
    color: var(--couleur-doux);
    font-size: 18px;
    animation: fondu 1s 1.1s both;
}

/* ---------- Animations de texte ---------- */
.lettre {
    display: inline-block;
    opacity: 0;
    animation: montee .8s cubic-bezier(.2, .8, .2, 1) forwards;
    transition: translate .25s ease;
}

.lettre:hover {
    translate: 0 -8px;
}

@keyframes montee {
    from {
        opacity: 0;
        transform: translateY(.7em) rotate(5deg);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fondu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Cartes de mods ---------- */
.liste {
    padding: 0 24px 60px;
}

.showcase {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 480px;
    max-width: 1200px;
    margin: 0 auto 40px;
    border-radius: var(--rayon);
    overflow: hidden;
    background: var(--panneau-fond);
    color: var(--panneau-texte);
    border: 1px solid var(--panneau-bordure);

    /* apparition au scroll */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1),
        background-color .4s ease, color .4s ease, border-color .4s ease;
}

.showcase.visible {
    opacity: 1;
    transform: none;
}

.showcase-image {
    position: relative;
    background: #222;
    overflow: hidden;
}

.showcase-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.showcase:hover .showcase-image img {
    transform: scale(1.04);
}

.showcase-texte {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 36px;
}

.showcase-texte h2 {
    font-family: var(--police-titre);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.showcase-texte p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--panneau-doux);
    margin-bottom: 14px;
}

.tag {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--panneau-tag);
}

.btn {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 24px;
    background: var(--bouton-fond);
    color: var(--bouton-texte);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    transition: opacity .2s ease, transform .2s ease;
}

.btn:hover {
    opacity: .85;
    transform: scale(1.04);
}

.vide {
    text-align: center;
    color: var(--couleur-doux);
    padding: 60px 0;
}

.vide a {
    color: inherit;
}

.footer {
    text-align: center;
    padding: 30px;
    color: var(--couleur-doux);
    font-size: 14px;
}

/* ---------- Dynamic Island (toujours noire, comme sur iPhone) ---------- */
.island {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 200px;
    background: #000;
    border: 1px solid #2b2b2b;
    border-radius: 26px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    overflow: hidden;
    transition: width .55s cubic-bezier(.2, .9, .25, 1.15);
}

.island.ouvert {
    width: min(560px, 92vw);
}

.island-bar {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    cursor: pointer;
    font-family: var(--police-texte);
    font-size: 14px;
    color: #fff;
}

.island-point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc84;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

.island-resume {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.island-compteur {
    padding: 2px 10px;
    background: #222;
    border-radius: 999px;
    font-size: 12px;
    color: #bbb;
}

.island-compteur:empty {
    display: none;
}

.island-contenu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .5s cubic-bezier(.2, .9, .25, 1);
}

.island.ouvert .island-contenu {
    grid-template-rows: 1fr;
}

.island-interieur {
    overflow: hidden;
    min-height: 0;
}

.island-panneau {
    padding: 6px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 70vh;
    overflow-y: auto;
    color: #fff;
}

#reglages {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.island-recherche {
    width: 100%;
    padding: 11px 16px;
    background: #151515;
    border: 1px solid #2b2b2b;
    border-radius: 999px;
    color: #fff;
    font-family: var(--police-texte);
    font-size: 14px;
    outline: none;
}

.island-recherche:focus {
    border-color: #666;
}

.groupe-titre {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 8px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 8px 16px;
    background: transparent;
    color: #bbb;
    border: 1px solid #333;
    border-radius: 999px;
    font-family: var(--police-texte);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

.chip:hover {
    color: #fff;
    border-color: #777;
}

.chip.actif {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.pastille {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    border: 1px solid #666;
    vertical-align: -1px;
}

.island-reset {
    align-self: flex-start;
    background: none;
    border: none;
    color: #888;
    font-family: var(--police-texte);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.island-reset:hover {
    color: #fff;
}

/* ---------- Téléphone ---------- */
@media (max-width: 800px) {
    .showcase {
        grid-template-columns: 1fr;
    }

    .showcase-image {
        height: 280px;
    }

    .header {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .island {
        width: 170px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lettre,
    .hero p {
        animation: none;
        opacity: 1;
    }

    .showcase {
        opacity: 1;
        transform: none;
        transition: none;
    }
}