/* ==========================================================================
   Régis en régie — feuille de style unique

   Trois couleurs, partout : le NOIR de la scène, le BLEU de l'application
   (#3498DB) et l'ORANGE des guides de Régis (#E67E22). Le site vend de
   l'animation, des dégradés et des effets : il en montre à chaque geste.

   Plan :
     1. Polices & jetons    6. Formulaires          11. Messages & vides
     2. Base & fond animé   7. Cartes & grilles     12. Profil
     3. Transitions de page 8. Accueil              13. Admin
     4. Navigation          9. Bibliothèque         14. Pied de page
     5. Boutons & effets   10. Articles & notes     15. Mouvement réduit
   ========================================================================== */

/* 1. Polices & jetons ------------------------------------------------------ */

@font-face {
    font-family: "Oxanium";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/oxanium-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Oxanium";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/oxanium-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Polices Google (licence OFL) hébergées ici : aucune requête vers Google,
   donc rien à déclarer pour le RGPD. Fichiers variables : toutes les graisses. */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Angle animable (bordures en dégradé qui tournent). */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

:root {
    color-scheme: dark;

    /* Le noir */
    --bg: #08090c;
    --bg-2: #0d0f14;
    --surface: rgba(22, 24, 31, .72);
    --surface-solid: #16181f;
    --surface-2: rgba(34, 37, 47, .72);
    --surface-3: #2a2e3a;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #f1f2f6;
    --muted: #a3a7b5;
    --faint: #6d7180;

    /* Le bleu */
    --blue: #3498db;
    --blue-light: #6cc3ff;
    --blue-soft: rgba(52, 152, 219, .16);
    --blue-glow: rgba(52, 152, 219, .55);

    /* L'orange */
    --orange: #e67e22;
    --orange-light: #ffac4d;
    --orange-deep: #d35400;
    --orange-soft: rgba(230, 126, 34, .16);
    --orange-glow: rgba(230, 126, 34, .6);

    /* Les trois ensemble */
    --grad: linear-gradient(120deg, var(--blue) 0%, #7a8cff 38%, #f0765a 68%, var(--orange) 100%);
    --grad-orange: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 45%, var(--orange-deep) 100%);
    --grad-blue: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 60%, #1f6fa8 100%);
    --grad-text: linear-gradient(100deg, #ffffff 0%, var(--blue-light) 30%, #ffffff 50%, var(--orange-light) 72%, #ffffff 100%);

    --success: #34c28a;
    --danger: #ff5a5f;
    --danger-soft: rgba(255, 90, 95, .12);
    --twitch: #9146ff;

    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Oxanium", "Manrope", system-ui, sans-serif;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow: 0 20px 50px rgba(0, 0, 0, .45);

    --topbar-h: 64px;
    --rail-w: 88px;
    --tabbar-h: 68px;
    --drawer-w: 290px;
    --gutter: 16px;
    --content-max: 1280px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
}

@media (min-width: 768px) {
    :root { --gutter: 28px; }
}

/* 2. Base & fond animé ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    padding-top: var(--topbar-h);
    overflow-x: hidden;
}

body.drawer-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }

p { margin: 0 0 1em; }

::selection { background: var(--orange); color: #fff; }

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

/* Aurore : trois halos (bleu, orange, mélange) qui dérivent lentement
   derrière tout le site. Des dégradés radiaux, pas de filtre flou : léger. */
.bg-aurora {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(120% 80% at 50% -20%, #121726 0%, var(--bg) 60%);
}
.bg-aurora::after {
    /* Trame de points : donne de la matière au noir. */
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
.bg-aurora__blob {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    opacity: .5;
}
.bg-aurora__blob--blue {
    top: -35vmax; left: -20vmax;
    background: radial-gradient(circle, rgba(52, 152, 219, .45) 0%, rgba(52, 152, 219, 0) 62%);
}
.bg-aurora__blob--orange {
    top: -25vmax; right: -30vmax;
    background: radial-gradient(circle, rgba(230, 126, 34, .42) 0%, rgba(230, 126, 34, 0) 62%);
}
.bg-aurora__blob--mix {
    bottom: -45vmax; left: 20vw;
    background: radial-gradient(circle, rgba(240, 118, 90, .22) 0%, rgba(122, 140, 255, .12) 35%, transparent 62%);
}


.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    vertical-align: middle;
}
.icon--muted { color: var(--faint); }
.icon--accent { color: var(--orange); fill: currentColor; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed;
    left: 12px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--orange);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: top .2s;
}
.skip-link:focus { top: 12px; }

.main {
    width: 100%;
    max-width: calc(var(--content-max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 24px var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
    outline: none;
    view-transition-name: page;
}

@media (min-width: 1024px) {
    .main {
        padding-left: calc(var(--rail-w) + var(--gutter));
        padding-bottom: 40px;
        max-width: calc(var(--content-max) + var(--rail-w) + 2 * var(--gutter));
    }
}

/* Apparition au défilement (app.js ajoute .is-visible). */
.reveal {
    opacity: 0;
    transform: translateY(26px) scale(.98);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: calc(var(--i, 0) * 60ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* 3. Transitions de page ----------------------------------------------------
   Navigateurs récents : la page glisse comme dans une appli. De Accueil
   vers Bibliothèque vers Profil, le contenu part à gauche ; en revenant, à
   droite. Les barres (haut, rail, onglets) restent en place, et l'indicateur
   d'onglet orange glisse d'un onglet à l'autre. */

@view-transition { navigation: auto; }

::view-transition-group(page) { animation-duration: .42s; animation-timing-function: var(--ease); }
::view-transition-old(page) { animation: page-out .28s var(--ease) both; }
::view-transition-new(page) { animation: page-in .42s var(--ease) both; }

html:active-view-transition-type(forward)::view-transition-old(page) { animation-name: slide-out-left; }
html:active-view-transition-type(forward)::view-transition-new(page) { animation-name: slide-in-right; }
html:active-view-transition-type(backward)::view-transition-old(page) { animation-name: slide-out-right; }
html:active-view-transition-type(backward)::view-transition-new(page) { animation-name: slide-in-left; }

::view-transition-group(tab-indicator),
::view-transition-group(rail-indicator) { animation-duration: .45s; animation-timing-function: var(--spring); }
::view-transition-group(*.thumb) { animation-duration: .45s; animation-timing-function: var(--ease); }

@keyframes page-out { to { opacity: 0; transform: scale(.985); } }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes slide-out-left { to { opacity: 0; transform: translateX(-60px); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(80px); } }
@keyframes slide-out-right { to { opacity: 0; transform: translateX(60px); } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-80px); } }

/* 4. Navigation ------------------------------------------------------------ */

.topbar {
    position: fixed;
    top: 0; right: 0; bottom: auto; left: 0;
    z-index: 40;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(8, 9, 12, .7);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    view-transition-name: topbar;
}
.topbar::after {
    /* Filet lumineux bleu → orange sous la barre. */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--grad);
    opacity: .55;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}
.brand:hover { text-decoration: none; }
.brand__logo {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 0 10px rgba(230, 126, 34, .45));
    transition: transform .5s var(--spring);
}
.brand:hover .brand__logo { transform: rotate(-12deg) scale(1.12); }
.brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .01em;
    text-transform: uppercase;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topbar__search {
    display: none;
    position: relative;
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
}
.topbar__search input[type="search"] {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    font: inherit;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.topbar__search input[type="search"]:focus {
    border-color: var(--orange);
    outline: none;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 4px var(--orange-soft), 0 0 30px rgba(230, 126, 34, .25);
}
.topbar__search-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.topbar__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__download span { display: none; }
/* Petit téléphone : place au choix de langue (la recherche reste dans l'onglet Bibliothèque). */
@media (max-width: 419px) {
    .topbar__actions .topbar__search-link { display: none; }
}

@media (min-width: 560px) {
    .topbar__download span { display: inline; }
}
@media (min-width: 768px) {
    .topbar { padding: 0 16px; gap: 16px; }
    .topbar__search { display: block; }
    .topbar__actions .topbar__search-link { display: none; }
    .topbar__actions { margin-left: 0; }
}

.icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    transition: background .2s, color .2s, transform .2s var(--spring);
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.icon-btn:active { transform: scale(.9); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn--danger:hover { color: var(--danger); background: var(--danger-soft); }

.avatar-link { display: inline-flex; border-radius: 50%; transition: transform .3s var(--spring); }
.avatar-link:hover { transform: scale(1.08); }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    background: var(--surface-3);
    color: var(--text);
    font-weight: 800;
    font-size: .9rem;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(230, 126, 34, .6);
}
.avatar--letter { background: var(--grad); color: #fff; }
.avatar--guest .icon { width: 18px; height: 18px; color: var(--muted); }
.avatar--xl { width: 96px; height: 96px; font-size: 2.2rem; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--orange), 0 0 40px var(--orange-glow); }

/* Rail d'icônes (ordinateur) */
.rail { display: none; }
@media (min-width: 1024px) {
    .rail {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        bottom: 0;
        z-index: 30;
        width: var(--rail-w);
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 14px 8px;
        view-transition-name: rail;
    }
}
.rail__link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 4px 11px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: center;
    overflow: hidden;
    transition: background .2s, color .2s;
}
.rail__link .icon { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.rail__link:hover { background: rgba(255, 255, 255, .06); color: var(--text); text-decoration: none; }
.rail__link:hover .icon { transform: translateY(-2px) scale(1.12); }
.rail__link.is-active { color: var(--text); }
.rail__link.is-active .icon { color: var(--orange-light); filter: drop-shadow(0 0 8px var(--orange-glow)); }
.rail__indicator {
    position: absolute;
    left: 0; top: 18%; bottom: 18%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--grad-orange);
    box-shadow: 0 0 14px var(--orange-glow);
    view-transition-name: rail-indicator;
}

/* Barre d'onglets (mobile) */
.tabbar {
    position: fixed;
    top: auto; right: 0; bottom: 0; left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(8, 9, 12, .82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    view-transition-name: tabbar;
}
.tabbar--4 { grid-template-columns: repeat(4, 1fr); }
.tabbar::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: var(--grad);
    opacity: .5;
}
@media (min-width: 1024px) {
    .tabbar { display: none; }
}
.tabbar__link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.tabbar__link .icon { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.tabbar__link:hover { text-decoration: none; color: var(--text); }
.tabbar__link:active .icon { transform: scale(.85); }
.tabbar__link.is-active { color: var(--text); }
.tabbar__link.is-active .icon { color: var(--orange-light); transform: translateY(-2px) scale(1.1); filter: drop-shadow(0 0 8px var(--orange-glow)); }
.tabbar__indicator {
    position: absolute;
    top: 0; left: 50%;
    width: 40px; height: 3px;
    margin-left: -20px;
    border-radius: 0 0 4px 4px;
    background: var(--grad-orange);
    box-shadow: 0 0 16px 2px var(--orange-glow);
    view-transition-name: tab-indicator;
}

/* Tiroir latéral (burger) */
.drawer-backdrop {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 50;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.drawer-backdrop.is-visible { opacity: 1; }

.drawer {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 60;
    width: min(var(--drawer-w), 86vw);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 50% at 0% 0%, rgba(52, 152, 219, .18), transparent 60%),
        radial-gradient(120% 50% at 100% 100%, rgba(230, 126, 34, .16), transparent 60%),
        var(--surface-solid);
    border-right: 1px solid var(--border);
    box-shadow: 30px 0 60px rgba(0, 0, 0, .5);
    transform: translateX(-102%);
    transition: transform .4s var(--spring);
    visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer.is-closing { visibility: visible; transition-timing-function: var(--ease); }

/* Les liens arrivent en cascade à l'ouverture. */
.drawer .drawer__link,
.drawer .drawer__title,
.drawer .lang-switch {
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), background .2s;
}
.drawer.is-open .drawer__link,
.drawer.is-open .drawer__title,
.drawer.is-open .lang-switch {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--i, 0) * 22ms + 60ms), calc(var(--i, 0) * 22ms + 60ms), 0s;
}

.drawer__head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--topbar-h);
    padding: 0 12px;
    flex: none;
}
.drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 24px;
    overscroll-behavior: contain;
}
.drawer__title {
    margin: 18px 12px 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--orange-light);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: .95rem;
    font-weight: 600;
    overflow: hidden;
}
.drawer__link .icon { color: var(--muted); transition: color .2s, transform .3s var(--spring); }
.drawer__link:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.drawer__link:hover .icon { color: var(--orange-light); transform: scale(1.15) rotate(-6deg); }
.drawer__link.is-active { background: linear-gradient(90deg, var(--orange-soft), transparent); }
.drawer__link.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--grad-orange);
    box-shadow: 0 0 10px var(--orange-glow);
}
.drawer__link.is-active .icon { color: var(--orange-light); }

.lang-switch { display: flex; gap: 6px; padding: 4px 12px; }
.lang-switch__btn {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}
.lang-switch__btn:hover { color: var(--text); text-decoration: none; border-color: var(--orange); }
.lang-switch__btn.is-active { background: var(--grad-orange); color: #fff; border-color: transparent; box-shadow: 0 0 16px var(--orange-glow); }

/* Langue dans la barre du haut : FR | EN, toujours visible. */
.lang-pill {
    display: flex;
    flex: none;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, .04);
}
.lang-pill__btn {
    padding: 4px 9px;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
}
.lang-pill__btn:hover { color: var(--text); text-decoration: none; }
.lang-pill__btn.is-active { background: var(--grad-orange); color: #fff; }

/* 5. Boutons & effets ------------------------------------------------------ */

.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    transition: transform .25s var(--spring), box-shadow .25s, background .2s, border-color .2s, filter .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.96); }
.btn--sm { min-height: 38px; padding: 0 15px; font-size: .88rem; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--lg.btn--square { width: 54px; padding: 0; justify-content: center; }
.btn--block { width: 100%; }

/* Le bouton principal est ORANGE : c'est lui qu'on doit voir en premier. */
.btn--primary {
    background: var(--grad-orange);
    color: #fff;
    box-shadow: 0 8px 26px -6px var(--orange-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { box-shadow: 0 14px 36px -6px var(--orange-glow), 0 0 0 4px var(--orange-soft), inset 0 1px 0 rgba(255, 255, 255, .3); }
/* Reflet qui balaie le bouton au survol. */
.btn--primary::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--ease);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--glow { animation: glow-pulse 2.8s ease-in-out infinite; }
@keyframes glow-pulse {
    50% { box-shadow: 0 10px 40px -4px var(--orange-glow), 0 0 0 8px rgba(230, 126, 34, .08), inset 0 1px 0 rgba(255, 255, 255, .25); }
}

.btn--blue {
    background: var(--grad-blue);
    color: #fff;
    box-shadow: 0 8px 26px -6px var(--blue-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--ghost {
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    border-color: var(--border-strong);
    backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft), 0 0 24px rgba(52, 152, 219, .3); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { box-shadow: 0 0 24px rgba(255, 90, 95, .45); }
.btn--twitch { background: var(--twitch); color: #fff; box-shadow: 0 8px 26px -6px rgba(145, 70, 255, .6); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; animation: none; }

.topbar__download { min-width: 38px; padding: 0 11px; }
@media (min-width: 560px) { .topbar__download { padding: 0 15px; } }

/* Onde au clic (créée par app.js). */
.ripple {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .5) 0%, rgba(255, 172, 77, .25) 45%, transparent 70%);
    transform: scale(0);
    animation: ripple .65s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--orange-light);
    font-weight: 800;
    font-size: .92rem;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .3s var(--spring); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(5px); }

.link-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 600;
}
.link-back .icon { transition: transform .3s var(--spring); }
.link-back:hover { color: var(--text); text-decoration: none; }
.link-back:hover .icon { transform: translateX(-4px); }

/* Cœur des favoris */
.fav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    min-width: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(8, 9, 12, .78);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .3s var(--spring), color .2s, box-shadow .2s;
}
.fav-btn .icon { width: 18px; height: 18px; }
.fav-btn:hover { transform: scale(1.12); }
.fav-btn.is-on { color: #ff6b81; box-shadow: 0 0 18px rgba(255, 107, 129, .45); }
.fav-btn.is-on .icon { fill: currentColor; }
.fav-btn.is-pop .icon { animation: pop .5s var(--spring); }
.fav-btn--lg { height: 54px; padding: 0 20px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border-strong); }
.fav-btn--lg .icon { width: 22px; height: 22px; }
.fav-btn--lg:hover { transform: translateY(-2px); }

@keyframes pop {
    30% { transform: scale(1.5) rotate(-12deg); }
    60% { transform: scale(.9); }
    100% { transform: scale(1); }
}

/* Étincelles du cœur (app.js) */
.spark {
    position: fixed;
    z-index: 90;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    pointer-events: none;
    animation: spark .7s var(--ease) forwards;
}
@keyframes spark {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}

/* 6. Formulaires ----------------------------------------------------------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field[hidden] { display: none; }
.field > label, fieldset legend { font-weight: 700; font-size: .92rem; }

input[type="text"], input[type="search"], input[type="password"], input:not([type]),
textarea, .select {
    width: 100%;
    min-height: 46px;
    padding: 10px 15px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .35);
    color: var(--text);
    font: inherit;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, .select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft), 0 0 24px rgba(230, 126, 34, .2); }
.select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffac4d' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 18px;
    cursor: pointer;
}
.select option { background: var(--surface-solid); }
input[type="file"] {
    padding: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .3);
    color: var(--muted);
    font: inherit;
    font-size: .9rem;
    transition: border-color .2s;
}
input[type="file"]:hover { border-color: var(--orange); }
input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 16px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--grad-orange);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
/* Tags d'un overlay (admin) : des pastilles à cocher. */
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-pick { cursor: pointer; }
.tag-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tag-pick span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}
.tag-pick input:checked + span { background: var(--grad-orange); color: #fff; border-color: transparent; }
.tag-pick input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
/* « Basé sur » : la création source (carte d'identité). */
.item__based { margin: -6px 0 18px; color: var(--muted); font-size: .92rem; }
.item__based .icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--orange-light); }
.item__based a { color: var(--text); font-weight: 700; }
.flash > form { margin: 0; flex: none; }
/* Tags libres de l'auteur (#CyberPunk) : la couleur des hashtags. */
.chip.chip--word { color: var(--orange-light); }
/* #hashtags et @mentions d'une description. */
.prose a.hashtag, .prose a.mention { color: var(--orange-light); font-weight: 700; text-decoration: none; }
.prose a.hashtag:hover, .prose a.mention:hover { text-decoration: underline; }

.hint { margin: 0; color: var(--muted); font-size: .85rem; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset legend { margin-bottom: 12px; color: var(--orange-light); }

.form__cols { display: grid; gap: 28px; }
.form__col { display: grid; gap: 18px; align-content: start; }
.form__row { display: flex; flex-wrap: wrap; align-items: end; gap: 18px; }
.form__row > .field { flex: 1 1 220px; }
.form__row > .check { min-height: 46px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.form__preview { width: 320px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }

@media (min-width: 900px) {
    .form__cols { grid-template-columns: 1fr 1fr; }
}

/* 7. Cartes & grilles ------------------------------------------------------ */

.section { margin-top: 56px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head .section__title { margin: 0; }
.section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    letter-spacing: -.01em;
    margin-bottom: 18px;
}
.section__title::before {
    content: "";
    width: 26px;
    height: 6px;
    flex: none;
    border-radius: 6px;
    background: var(--grad);
    box-shadow: 0 0 14px rgba(230, 126, 34, .5);
}

.page-head { margin-bottom: 26px; }
.page-head--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head--row .page-title { margin: 0; }
.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.01em;
    line-height: 1.08;
    margin-bottom: 10px;
    background: var(--grad-text);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 9s linear infinite;
}
.page-title .icon { width: 30px; height: 30px; color: var(--orange); }
.page-lead { color: var(--muted); font-size: 1.05rem; max-width: 65ch; margin: 0; }

@keyframes shimmer { to { background-position: -220% 0; } }

.grid {
    display: grid;
    gap: 22px 18px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

/* Carte : se soulève, s'éclaire là où passe la souris, bordure en dégradé. */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 8px;
    border-radius: calc(var(--radius) + 4px);
    background: rgba(255, 255, 255, .025);
    transition: transform .45s var(--spring), background .3s, box-shadow .3s;
    --mx: 50%;
    --my: 0%;
}
.card::before {
    /* Bordure lumineuse (dégradé visible seulement sur le contour). */
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    padding: 1px;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 172, 77, .9), rgba(52, 152, 219, .5) 40%, rgba(255, 255, 255, .06) 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .35;
    transition: opacity .3s;
    pointer-events: none;
}
.card::after {
    /* Halo qui suit la souris. */
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: inherit;
    background: radial-gradient(320px circle at var(--mx) var(--my), rgba(230, 126, 34, .14), transparent 60%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, .045);
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .8), 0 0 40px -12px var(--orange-glow);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }

.card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-3);
}
.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease);
}
.card:hover .card__media img { transform: scale(1.08); }
.card__media .chip--overlay { position: absolute; left: 8px; top: 8px; z-index: 1; }

.card__placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0f3350, var(--blue) 50%, var(--orange));
    background-size: 200% 200%;
    animation: gradient-flow 8s ease-in-out infinite alternate;
    overflow: hidden;
}
.card__placeholder::after {
    /* Reflet qui passe en boucle, comme un effet de Régis. */
    content: "";
    position: absolute;
    top: -50%; right: -50%; bottom: -50%; left: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
    transform: translateX(-60%);
    animation: sweep 5s ease-in-out infinite;
}
.card__placeholder .icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35));
    transition: transform .6s var(--spring);
}
.card:hover .card__placeholder .icon { transform: scale(1.25) rotate(-8deg); }
.card__placeholder--animation { background-image: linear-gradient(135deg, #3a1d6e, #7a8cff 50%, var(--orange)); }
.card__placeholder--degrade { background-image: linear-gradient(120deg, #ff5f6d, var(--orange-light) 45%, var(--blue)); }
.card__placeholder--masque { background-image: radial-gradient(circle at 30% 30%, #fff 0 16%, var(--blue) 55%, #08090c); }
.card__placeholder--contour,
.card__placeholder--qr { background-image: linear-gradient(135deg, #1a1d26, #3a3f4f 50%, var(--orange-deep)); }
.card__placeholder--style_texte { background-image: linear-gradient(135deg, #0b1f33, #2c5364 50%, var(--orange)); }
.card__placeholder--couleur { background-image: conic-gradient(from 90deg, #ff5a5f, var(--orange), #f5d90a, #34c28a, var(--blue), #7a8cff, #ff5a5f); }
.card__placeholder--theme { background-image: linear-gradient(135deg, #1e1e1e 50%, var(--blue) 50%, var(--orange)); }

@keyframes gradient-flow { to { background-position: 100% 100%; } }
/* Performance : une grille de 30 cartes qui s'animent toutes en boucle fait
   ramer les petits PC (et l'onglet Bibliothèque de Régis). Elles attendent
   le survol. */
.card__placeholder, .card__placeholder::after, .pv--mask .pv__masked { animation-play-state: paused; }
.card:hover .card__placeholder, .card:hover .card__placeholder::after,
.card:hover .pv--mask .pv__masked { animation-play-state: running; }
@keyframes sweep {
    0%, 55% { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

.card__body { padding: 12px 6px 4px; min-width: 0; }
.card__title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card__title a { color: var(--text); }
.card__title a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }
.card:hover .card__title a { color: var(--orange-light); text-decoration: none; }
.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 600;
}
.card__stat { display: inline-flex; align-items: center; gap: 4px; }
.card__stat .icon { width: 15px; height: 15px; color: var(--orange); }
.card__fav { position: absolute; top: 16px; right: 16px; z-index: 2; margin: 0; }
/* « Ajouter à Régis » : posé en bas à droite de l'aperçu, toujours visible. */
.card__media-wrap { position: relative; }
.add-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px 0 9px;
    border-radius: var(--radius-pill);
    background: var(--grad-orange);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    box-shadow: 0 6px 18px -4px var(--orange-glow), inset 0 1px 0 rgba(255, 255, 255, .3);
    overflow: hidden;
    transition: transform .3s var(--spring), box-shadow .2s;
}
.add-btn .icon { width: 17px; height: 17px; stroke-width: 2.6; }
.add-btn:hover { text-decoration: none; transform: scale(1.07); box-shadow: 0 10px 26px -4px var(--orange-glow), 0 0 0 4px var(--orange-soft); }
.item__hint { margin: -12px 0 24px; color: var(--muted); font-size: .85rem; }

/* Puces (filtres, types) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chips--scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 6px var(--gutter);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.chips--scroll::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    /* Sur ordinateur : tout est visible, les filtres passent à la ligne. */
    .chips--scroll {
        flex-wrap: wrap;
        overflow: visible;
        margin: 0;
        padding: 6px 0;
        mask-image: none;
    }
}
.chips--sub { margin-top: 10px; }

.chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .87rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
}
.chip .icon { width: 16px; height: 16px; }
.chip--sm { height: 31px; font-size: .82rem; }
.chip--link { transition: transform .3s var(--spring), background .2s, border-color .2s, box-shadow .2s; }
.chip--link:hover { background: rgba(255, 255, 255, .1); border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.chip--link.is-active {
    background: var(--grad-orange);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px -4px var(--orange-glow);
}
.chip--accent { background: var(--orange-soft); border-color: rgba(230, 126, 34, .35); color: var(--orange-light); }
.chip--overlay { height: 27px; padding: 0 10px; font-size: .74rem; background: rgba(8, 9, 12, .82); border-color: rgba(255, 255, 255, .12); }
.chip--overlay .icon { width: 14px; height: 14px; color: var(--orange-light); }
.chip__count { color: var(--muted); font-size: .78rem; font-weight: 800; }
.chip--link.is-active .chip__count { color: rgba(255, 255, 255, .8); }

.badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--grad-orange);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 18px -2px var(--orange-glow);
}

.kind {
    display: inline-flex;
    flex: none;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.kind--new { background: var(--orange-soft); color: var(--orange-light); }
.kind--improved { background: var(--blue-soft); color: var(--blue-light); }
.kind--fixed { background: rgba(52, 194, 138, .15); color: #5fe0ad; }
.kind--security { background: rgba(145, 70, 255, .18); color: #bb95ff; }
.kind--removed { background: var(--danger-soft); color: var(--danger); }

.panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(12px);
}

/* Bordure en dégradé qui tourne (cartes mises en avant). */
.glow-border {
    position: relative;
    isolation: isolate;
}
.glow-border::before {
    content: "";
    position: absolute;
    top: -1px; right: -1px; bottom: -1px; left: -1px;
    z-index: -1;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--angle), var(--blue), transparent 25%, var(--orange) 50%, transparent 75%, var(--blue));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 6s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }

/* 8. Accueil --------------------------------------------------------------- */

.hero {
    position: relative;
    display: grid;
    gap: 32px;
    padding: 40px 24px;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(90% 90% at 0% 0%, rgba(52, 152, 219, .28), transparent 60%),
        radial-gradient(80% 90% at 100% 100%, rgba(230, 126, 34, .3), transparent 60%),
        rgba(14, 16, 22, .75);
    border: 1px solid var(--border);
    isolation: isolate;
}
.hero::before {
    /* Lignes de lumière qui traversent le fond. */
    content: "";
    position: absolute;
    top: -40%; right: -40%; bottom: -40%; left: -40%;
    z-index: -1;
    background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255, 255, 255, .025) 60px 61px);
}

.hero__mascot {
    position: absolute;
    z-index: -1;
    right: -40px; top: -30px;
    width: 260px;
    opacity: .14;
    animation: float 7s ease-in-out infinite;
    will-change: transform;
}
@keyframes float {
    50% { transform: translateY(-16px) rotate(-5deg); }
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px 14px 6px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: .85rem;
    font-weight: 700;
}
.kicker .icon { width: 16px; height: 16px; color: var(--blue-light); }

.hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 7.6vw, 4.9rem);
    line-height: 1;
    letter-spacing: -.01em;
    text-transform: uppercase;
    margin: 0 0 18px;
}
.hero__title .word {
    display: inline-block;
    background: var(--grad-text);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: word-in .8s var(--spring) both;
    animation-delay: calc(var(--i) * 90ms);
}
.hero__title .word--hot {
    background: var(--grad-orange);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 22px rgba(230, 126, 34, .55));
    animation: word-in .8s var(--spring) both;
    animation-delay: calc(var(--i) * 90ms);
}
@keyframes word-in {
    from { opacity: 0; transform: translateY(.6em) rotate(4deg); filter: blur(6px); }
}

.hero__text { color: #cdd0da; font-size: 1.08rem; max-width: 56ch; animation: fade-up .8s .35s var(--ease) both; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; animation: fade-up .8s .5s var(--ease) both; }
.hero__meta { margin: 16px 0 0; color: var(--muted); font-size: .85rem; animation: fade-up .8s .6s var(--ease) both; }

@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }

@media (min-width: 1024px) {
    .hero { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 64px 56px; gap: 48px; }
    .hero__mascot { width: 360px; right: 34%; top: auto; bottom: -80px; }
}

.release-card {
    position: relative;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(8, 9, 12, .65);
    backdrop-filter: blur(12px);
    animation: fade-up .9s .45s var(--ease) both;
}
.release-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.release-card__title { font-family: var(--font-display); font-size: .98rem; font-weight: 700; margin: 0; }
.release-card__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 11px; }
.release-card__list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; font-weight: 500; }
.release-card__list .kind { margin-top: 1px; }
.release-card__summary { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }

.audiences { display: grid; gap: 18px; }
@media (min-width: 768px) { .audiences { grid-template-columns: 1fr 1fr; } }
.audience {
    position: relative;
    padding: 30px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    isolation: isolate;
    transition: transform .45s var(--spring), border-color .3s;
}
.audience::before {
    content: "";
    position: absolute;
    right: -80px; top: -80px;
    z-index: -1;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 152, 219, .35), transparent 65%);
    transition: transform .6s var(--ease);
}
.audience--creator::before { background: radial-gradient(circle, rgba(230, 126, 34, .4), transparent 65%); }
.audience:hover { transform: translateY(-4px); border-color: rgba(52, 152, 219, .5); }
.audience--creator:hover { border-color: rgba(230, 126, 34, .55); }
.audience:hover::before { transform: scale(1.4); }
.audience h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.audience p { color: #cdd0da; }
.audience__icon {
    display: inline-grid;
    place-items: center;
    width: 54px; height: 54px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: var(--grad-blue);
    color: #fff;
    box-shadow: 0 10px 30px -8px var(--blue-glow);
    transition: transform .5s var(--spring);
}
.audience:hover .audience__icon { transform: rotate(-10deg) scale(1.1); }
.audience__icon .icon { width: 28px; height: 28px; }
.audience--creator .audience__icon { background: var(--grad-orange); box-shadow: 0 10px 30px -8px var(--orange-glow); }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .45s var(--spring), border-color .3s, box-shadow .3s;
}
.feature:hover { transform: translateY(-5px); border-color: rgba(230, 126, 34, .45); box-shadow: 0 20px 40px -20px var(--orange-glow); }
.feature h3 { font-size: 1.02rem; font-weight: 800; margin: 14px 0 6px; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.feature__icon {
    display: inline-grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue-light);
    transition: transform .5s var(--spring), background .3s, color .3s;
}
.feature:nth-child(even) .feature__icon { background: var(--orange-soft); color: var(--orange-light); }
.feature:hover .feature__icon { transform: rotate(-12deg) scale(1.15); }
.feature__icon .icon { width: 24px; height: 24px; }

.news-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color .3s, transform .45s var(--spring), box-shadow .3s;
}
.news-card:hover { border-color: rgba(52, 152, 219, .55); transform: translateY(-5px); box-shadow: 0 20px 40px -20px var(--blue-glow); }
.news-card__media { display: block; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.06); }
.news-card__body { padding: 18px 20px 20px; }
.news-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.news-card__meta .chip { height: 24px; font-size: .72rem; }
.news-card__title { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; }
.news-card__title a { color: var(--text); }
.news-card__title a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.news-card:hover .news-card__title a { color: var(--blue-light); text-decoration: none; }
.news-card__summary { color: var(--muted); font-size: .93rem; margin: 0; }

/* 9. Bibliothèque ---------------------------------------------------------- */

.toolbar { display: grid; gap: 14px; margin-bottom: 18px; }
.search { position: relative; display: flex; gap: 10px; }
.search__icon { position: absolute; left: 15px; top: 13px; color: var(--muted); pointer-events: none; }
.search__input { padding-left: 44px !important; border-radius: var(--radius-pill) !important; }
.search .select { width: auto; flex: none; border-radius: var(--radius-pill); }
@media (max-width: 559px) {
    .search { flex-wrap: wrap; }
    .search .select { width: 100%; }
}

.result-count { color: var(--muted); font-size: .88rem; font-weight: 600; margin-bottom: 14px; }

.item { display: grid; gap: 30px; }
@media (min-width: 960px) {
    .item { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
    .item__media { position: sticky; top: calc(var(--topbar-h) + 20px); }
}
.item__media {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-3);
    box-shadow: 0 30px 70px -30px var(--orange-glow), 0 0 0 1px var(--border);
}
.item__media img { width: 100%; height: 100%; object-fit: cover; }
.item__info .chips { margin-bottom: 14px; }
.item__author { color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.item__author a { color: var(--orange-light); font-weight: 800; }
.item__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.item__actions form { margin: 0; }


.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--border);
    border: 1px solid var(--border);
}
.facts > div { padding: 13px 15px; background: var(--surface-solid); min-width: 0; }
.facts dt { color: var(--muted); font-size: .76rem; font-weight: 700; margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 800; font-size: .92rem; overflow-wrap: anywhere; }

.callout {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(120deg, var(--blue-soft), var(--orange-soft));
    border: 1px solid rgba(255, 255, 255, .1);
}
.callout > .icon { color: var(--orange-light); margin-top: 2px; }
.callout p { margin: 4px 0 0; color: #cdd0da; font-size: .93rem; }

.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pagination__info { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* Aperçus vivants des styles (App\Services\StylePreview) --------------- */

.pv {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    /* Damier discret : on voit la transparence d'un style. */
    background-color: #14161c;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, .04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .04) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, .04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .04) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}
.pv--gradient { transition: filter .4s; }
.card:hover .pv--gradient { filter: saturate(1.2) brightness(1.08); }

.pv--mask .pv__masked {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: var(--grad);
    background-size: 200% 200%;
    animation: gradient-flow 6s ease-in-out infinite alternate;
    animation-play-state: paused;          /* au survol seulement (performance) */
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    mask-mode: luminance;
}
.card:hover .pv--mask .pv__masked { animation-play-state: running; }

.pv__hex {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: rgba(8, 9, 12, .72);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .06em;
}

.pv--theme { padding: 12% 14%; }
.pv__win {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8%;
    padding: 0 8% 8%;
    border: 1px solid;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
    transition: transform .5s var(--spring);
}
.card:hover .pv__win { transform: scale(1.05) rotate(-1.5deg); }
.pv__bar { height: 14%; margin: 0 -9%; }
.pv__line { height: 8%; width: 70%; border-radius: 4px; opacity: .9; }
.pv__line--short { width: 45%; }
.pv__btn { margin-top: auto; align-self: flex-end; width: 32%; height: 16%; border-radius: 6px; }

.pv--text { background: radial-gradient(circle at 50% 40%, #232735, #0d0f14 70%); }
.pv__sample {
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.2vw, 1.7rem);
    line-height: 1.1;
    transition: transform .5s var(--spring);
}
.card:hover .pv__sample { transform: scale(1.08); }

.pv--stroke { background: radial-gradient(circle at 50% 40%, #232735, #0d0f14 70%); }
.pv__shape {
    width: 46%;
    height: 56%;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    transition: transform .5s var(--spring);
}
.card:hover .pv__shape { transform: rotate(-6deg) scale(1.06); }

.pv--qr { background: radial-gradient(circle at 50% 40%, #232735, #0d0f14 70%); }
.pv--qr svg { height: 78%; width: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .45)); transition: transform .5s var(--spring); }
.card:hover .pv--qr svg { transform: scale(1.06) rotate(3deg); }

.pv--anim { background: radial-gradient(circle at 50% 45%, #1d2a3a, #0d0f14 70%); }
.pv__stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.pv__actor { width: 30%; aspect-ratio: 1; display: grid; place-items: center; will-change: transform, opacity; }
.pv__actor img { width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(230, 126, 34, .45)); }

/* Régis 0.3.05 : Texte stylé, chat, tirage au sort, icônes */
.pv--svgtext, .pv--chat, .pv--giveaway, .pv--poll, .pv--message, .pv--drawing { background: radial-gradient(circle at 50% 40%, #232735, #0d0f14 70%); }
.pv--svgtext svg { width: 92%; height: auto; overflow: visible; transition: transform .5s var(--spring); }
.card:hover .pv--svgtext svg { transform: scale(1.06); }
.pv__chat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.25;
    transition: transform .5s var(--spring);
}
.card:hover .pv__chat { transform: translateY(-3px); }
.pv__chat .pv__msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv__chat .pv__msg b { font-weight: 800; }
.pv__badge { display: inline-block; width: .8em; height: .8em; margin-right: 4px; border-radius: 3px; background: #9146ff; vertical-align: -.05em; }
.pv__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 78%;
    padding: 12px 10px 14px;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
    transition: transform .5s var(--spring);
}
.card:hover .pv__card { transform: scale(1.05) rotate(-1.5deg); }
.pv__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(.8rem, 1.6vw, 1.05rem); letter-spacing: .06em; white-space: nowrap; }
.pv__winner { padding: 4px 16px; border-radius: var(--radius-pill); color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pv__bars { display: flex; flex-direction: column; gap: 6px; width: 84%; }
.pv__track { display: block; height: 9px; border-radius: var(--radius-pill); overflow: hidden; }
.pv__fill { display: block; height: 100%; border-radius: inherit; }
.pv--message .pv__msg { display: flex; align-items: center; gap: 10px; width: 84%; padding: 10px 12px; border-left: 4px solid; border-radius: 12px; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); transition: transform .5s var(--spring); }
.card:hover .pv--message .pv__msg { transform: scale(1.05) rotate(-1.5deg); }
.pv__avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-weight: 800; }
.pv__msgbody { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; line-height: 1.25; min-width: 0; }
.pv--drawing svg { height: 70%; width: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .45)); transition: transform .5s var(--spring); }
.card:hover .pv--drawing svg { transform: scale(1.08) rotate(-8deg); }

/* 10. Articles & notes ----------------------------------------------------- */

.article { max-width: 780px; margin: 0 auto; }
.article__meta { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.article__lead { font-size: 1.15rem; color: #cdd0da; }
.article__image { width: 100%; border-radius: var(--radius); margin: 8px 0 24px; aspect-ratio: 16 / 9; object-fit: cover; }

.prose { color: #d6d8e0; font-size: 1.02rem; overflow-wrap: anywhere; }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin: 1.8em 0 .5em; color: var(--text); }
.prose h3 { font-size: 1.02rem; font-weight: 800; margin: 1.3em 0 .4em; color: var(--orange-light); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--orange); }
.prose code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .08); font-size: .9em; }
mark.todo { padding: 0 4px; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-weight: 700; }

.timeline { display: grid; gap: 14px; max-width: 860px; }
.release {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color .3s;
}
.release[open] { border-color: rgba(230, 126, 34, .4); box-shadow: 0 20px 50px -30px var(--orange-glow); }
.release__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}
.release__head::-webkit-details-marker { display: none; }
.release__title { font-weight: 800; font-size: 1.05rem; flex: 1 1 200px; }
.release__date { color: var(--muted); font-size: .88rem; }
.release__chevron { color: var(--orange-light); transition: transform .35s var(--spring); }
.release[open] .release__chevron { transform: rotate(180deg); }
.release__body { padding: 0 20px 20px; animation: fade-up .45s var(--ease); }
.release__summary { color: #cdd0da; }
.release__kind { margin: 16px 0 8px; }
.release__list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #d6d8e0; }
.release__list li::marker { color: var(--orange); }
.release__list ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: .93rem; }

/* 11. Messages & vides ----------------------------------------------------- */

.flashes { display: grid; gap: 10px; margin-bottom: 20px; }
.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    animation: slide-in .5s var(--spring);
}
.flash > span { flex: 1; }
.flash--success { border-color: rgba(52, 194, 138, .5); box-shadow: 0 0 30px -10px rgba(52, 194, 138, .5); }
.flash--success > .icon { color: var(--success); }
.flash--error { border-color: rgba(255, 90, 95, .5); background: var(--danger-soft); }
.flash--error > .icon { color: var(--danger); }
.flash--info { border-color: rgba(52, 152, 219, .5); }
.flash--info > .icon { color: var(--blue-light); }
.flash__close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.flash__close:hover { color: var(--text); }
.flash__close .icon { width: 16px; height: 16px; }
.flash.is-leaving { animation: slide-out .3s var(--ease) forwards; }

@keyframes slide-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
@keyframes slide-out { to { opacity: 0; transform: translateX(30px); } }

.empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px dashed var(--border-strong);
    color: var(--muted);
}
.empty > .icon { color: var(--orange); }
.empty--big { flex-direction: column; text-align: center; padding: 56px 20px; }
.empty--big > .icon { width: 44px; height: 44px; animation: float 5s ease-in-out infinite; }
.empty--big p { margin: 0; }

.error-page { text-align: center; padding: 48px 0; display: grid; justify-items: center; gap: 10px; }
.error-page__code {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(5rem, 22vw, 10rem);
    line-height: 1;
    margin: 0;
    background: var(--grad);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 40px rgba(230, 126, 34, .4));
    animation: shimmer 6s linear infinite, float 6s ease-in-out infinite;
}
.error-page .page-title { justify-content: center; }
.error-page .btn { margin-top: 14px; }
.error-page__detail {
    max-width: 100%;
    margin-top: 24px;
    padding: 16px;
    overflow: auto;
    text-align: left;
    font-size: .8rem;
    background: var(--surface-solid);
    border-radius: var(--radius-sm);
}

/* 12. Profil --------------------------------------------------------------- */

.guest { max-width: 580px; margin: 24px auto; text-align: center; display: grid; justify-items: center; gap: 14px; }
.guest__icon {
    display: grid;
    place-items: center;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 0 60px -10px var(--orange-glow), 0 0 60px -20px var(--blue-glow);
    animation: float 6s ease-in-out infinite;
}
.guest__icon .icon { width: 44px; height: 44px; }
.guest .page-title { justify-content: center; }
.guest__perks { margin-top: 18px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: left; width: 100%; }
.guest__perks p { margin-bottom: 12px; font-weight: 800; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: center; color: #cdd0da; }
.checklist .icon { color: var(--orange-light); }

.profile__head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.profile__head .page-title { margin-bottom: 8px; }
.profile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin: 0; }
.profile__logout { margin-left: auto; }
/* L'administration à côté de « Se déconnecter » (admins, modos). Marges
   plutôt que `gap` : le Chromium de Régis (83) ignore gap en flex. */
/* Poussés à droite par `flex: 1` + `flex-end`, pas par `margin-left: auto` :
   le rattrapage du gap (app.js) fige une marge auto en pixels, et les
   boutons passaient à la ligne dans l'onglet Bibliothèque de Régis. */
.profile__actions { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.profile__actions .profile__logout { margin-left: 10px; }
.devices { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.devices li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); }
.devices li .icon { color: var(--blue-light); }
.devices__name { font-weight: 700; flex: 1; }
.devices__when { color: var(--muted); font-size: .85rem; }
.guest .callout { text-align: left; width: 100%; }
.panel--danger { border-color: rgba(255, 90, 95, .35); }
.panel--danger summary { cursor: pointer; color: var(--danger); font-weight: 800; }
.panel--danger .form { margin-top: 16px; }

/* 13. Admin ---------------------------------------------------------------- */

.auth-card { max-width: 440px; margin: 32px auto; }
.auth-card .page-title { font-size: 1.6rem; margin-bottom: 22px; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.stat {
    display: grid;
    gap: 4px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform .4s var(--spring), border-color .3s;
}
a.stat:hover { border-color: var(--orange); text-decoration: none; transform: translateY(-4px); }
.stat__label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat__value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat__hint { color: var(--faint); font-size: .8rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Bugs signalés depuis Régis */
.bug h2 { font-size: 1rem; margin: 22px 0 8px; color: var(--muted); }
.bug__text { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.bug__log { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; max-height: 420px; overflow: auto; font-size: .8rem; line-height: 1.45;
    white-space: pre-wrap; word-break: break-word; color: var(--muted); margin: 0; }
.stats + .admin-actions, .flash + .stats { margin-top: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--orange-light); font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.table tr:last-child td { border-bottom: 0; }
.table td a { color: var(--text); font-weight: 700; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__title { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.table__title small { display: block; color: var(--muted); font-weight: 500; }
.table__thumb { width: 64px; height: 36px; flex: none; object-fit: cover; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.table__actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.table__actions form { margin: 0; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status--published::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status--hidden::before { background: var(--danger); }
.status--pending::before { background: var(--orange); box-shadow: 0 0 8px var(--orange); }

/* Équipe (admin) : rôles, bannissement ------------------------------------ */
.select--sm { width: auto; min-height: 38px; padding: 6px 36px 6px 12px; font-size: .88rem; background-position: right 10px center; background-size: 16px; }
.team__role { display: flex; align-items: center; gap: 4px; margin: 0; }
.team__twitch { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; color: #a970ff; }
.team__seen { white-space: nowrap; color: var(--muted); }
.team__ban { color: var(--danger) !important; }
.team .badge { height: 22px; margin-left: 6px; padding: 0 8px; font-size: .72rem; vertical-align: 2px; }
.team tr.is-banned .avatar { filter: grayscale(1); opacity: .6; }
.role { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; white-space: nowrap; }
.role::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.role--admin, .select.role--admin { color: var(--orange-light); }
.role--admin::before { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.role--moderator, .select.role--moderator { color: #7cc4f5; }
.role--moderator::before { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.role--banned { color: var(--danger); }
.role--banned::before { background: var(--danger); }
.team__ban-box { display: grid; justify-items: end; gap: 8px; }
.team__ban-box > summary { list-style: none; cursor: pointer; }
.team__ban-box > summary::-webkit-details-marker { display: none; }
.team__ban-box[open] > summary { color: var(--danger); background: var(--danger-soft); }
/* Dans la ligne, pas par-dessus : le tableau défile de côté et rognerait
   une fenêtre flottante. */
.team__ban-form {
    display: grid;
    gap: 10px;
    width: 260px;
    padding: 14px;
    border: 1px solid rgba(255, 90, 95, .35);
    border-radius: var(--radius);
    background: var(--surface-solid);
    white-space: normal;
    text-align: left;
}
.team__ban-form .check { font-size: .86rem; }
.team__help { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.team__help h2 { margin: 0 0 10px; font-size: 1rem; }
.team__help ul { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; color: #cdd0da; font-size: .92rem; }
a.flash { color: var(--text); }
a.flash:hover { text-decoration: none; border-color: var(--orange); }

/* 14. Pied de page ------------------------------------------------------- */

.footer {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-top: 80px;
    padding: 44px 16px 12px;
    text-align: center;
    color: var(--muted);
    font-size: .88rem;
    isolation: isolate;
}
.footer::before {
    /* Filet de lumière bleu -> orange, plus fort au centre. */
    content: "";
    position: absolute;
    left: 10%; right: 10%; top: 0;
    height: 1px;
    background: var(--grad);
    mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
.footer::after {
    /* Halo orange derrière la mascotte. */
    content: "";
    position: absolute;
    z-index: -1;
    top: -40px;
    left: 50%;
    /* Jamais plus large que l'écran : 420px débordait sur téléphone
       (défilement horizontal de toute la page). */
    width: min(420px, 100%);
    height: 220px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(230, 126, 34, .16), transparent 70%);
    pointer-events: none;
}
.footer__brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text);
}
.footer__brand:hover { text-decoration: none; }
.footer__brand img {
    filter: drop-shadow(0 0 18px rgba(230, 126, 34, .45));
    transition: transform .6s var(--spring);
}
.footer__brand:hover img { transform: rotate(-10deg) scale(1.12); }
.footer__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.footer__tagline { margin: -6px 0 0; max-width: 46ch; color: var(--muted); }
.footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.footer__social a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
    overflow: hidden;
    transition: transform .3s var(--spring), border-color .2s, box-shadow .2s;
}
/* Le logo du réseau devant son nom (marge : le Chromium de Régis ignore gap). */
.footer__social a .icon { width: 18px; height: 18px; margin-right: 8px; }
.footer__social a:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--orange); box-shadow: 0 0 20px -4px var(--orange-glow); }
.footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
    max-width: 760px;
}
.footer__links a { color: var(--muted); font-weight: 600; padding: 0 12px; }
.footer__links a + a { border-left: 1px solid var(--border-strong); }
.footer__links a:hover { color: var(--orange-light); text-decoration: none; }
.footer__note { margin: 6px 0 0; color: var(--faint); font-size: .8rem; }

/* 15. Mouvement réduit ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    @view-transition { navigation: none; }
}

/* Affiché DANS Régis (onglet Bibliothèque) : pas de « Télécharger Régis ». */
.in-app .hide-in-app { display: none !important; }
/* … et le moteur de Régis (Chromium 83, souvent sans carte graphique)
   n'a pas à payer le décor : pas de flou derrière les barres, pas de fond
   lumineux, rien qui tourne en boucle. Les animations au survol restent. */
.in-app .bg-aurora { display: none; }
.in-app .topbar, .in-app .tabbar, .in-app .drawer { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(12, 13, 18, .97); }
.in-app .page-title, .in-app .hero::before, .in-app .hero__mascot,
.in-app .glow-border::before, .in-app .btn--glow, .in-app .hero__title .word { animation: none; }

/* 16. Vieux moteurs ---------------------------------------------------------
   L'onglet Bibliothèque de Régis affiche le site avec le moteur de Qt 5.15,
   c'est-à-dire Chrome 83 : pas d'`aspect-ratio` (Chrome 88). Les cadres 16/9
   retrouvent leur hauteur par l'ancienne méthode (padding en %), et leur
   contenu remplit le cadre. `inset` a été écrit en longhands pour la même
   raison ; le `gap` des flexbox est rattrapé par app.js (classe no-flexgap). */
@supports not (aspect-ratio: 1 / 1) {
    .card__media, .item__media, .news-card__media {
        height: 0;
        padding-top: 56.25%;
        position: relative;
    }
    .card__media > :not(.chip--overlay),
    .item__media > *,
    .news-card__media > * {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
    }
    .pv__actor { height: 0; padding-top: 30%; position: relative; }
    .pv__actor > * { position: absolute; top: 0; left: 0; }
    .form__preview, .article__image { height: auto; }
}
