/* =========================================================
   NIGHTFALL — STYLE.CSS
   Design : sombre, lumineux, moderne, responsive
   ========================================================= */


/* =========================================================
   1. VARIABLES
   ========================================================= */

:root {

    --bg: #070912;
    --bg-2: #0b0f1c;
    --card: rgba(17, 22, 38, 0.82);
    --card-solid: #111626;

    --text: #f5f7ff;
    --muted: #9299ad;

    --line: rgba(255, 255, 255, 0.08);

    --primary: #8b5cf6;
    --primary-2: #c084fc;

    --cyan: #22d3ee;
    --gold: #f5c451;
    --green: #35d07f;
    --red: #ff5c7a;

    --shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);

    --radius: 22px;

    --sidebar-width: 250px;
}


/* =========================================================
   MODE CLAIR
   ========================================================= */

body.light {

    --bg: #f3f5fa;
    --bg-2: #e9edf5;

    --card: rgba(255, 255, 255, 0.88);
    --card-solid: #ffffff;

    --text: #171a25;
    --muted: #687084;

    --line: rgba(20, 25, 40, 0.09);

    --shadow:
        0 20px 50px rgba(30, 40, 70, 0.12);
}


/* =========================================================
   2. RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(139, 92, 246, 0.10),
            transparent 28%
        ),

        radial-gradient(
            circle at 90% 80%,
            rgba(34, 211, 238, 0.07),
            transparent 30%
        ),

        var(--bg);

    transition:
        background 0.3s ease,
        color 0.3s ease;

    overflow-x: hidden;
}


button {
    font: inherit;
}


button,
a {
    -webkit-tap-highlight-color: transparent;
}


button {
    border: 0;
    cursor: pointer;
}


p {
    line-height: 1.7;
}


h1,
h2,
h3 {
    line-height: 1.15;
}


/* =========================================================
   3. APPLICATION
   ========================================================= */

.app {
    min-height: 100vh;
}


/* =========================================================
   4. SIDEBAR
   ========================================================= */

.sidebar {

    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    padding: 25px 17px;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            rgba(13, 17, 30, 0.97),
            rgba(7, 9, 18, 0.97)
        );

    border-right: 1px solid var(--line);

    z-index: 100;

    transition: transform 0.3s ease;
}


body.light .sidebar {

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #eef1f7
        );
}


/* =========================================================
   LOGO
   ========================================================= */

.brand {

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 5px 8px 30px;
}


.brand-mark {

    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: white;

    font-size: 21px;
    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--cyan)
        );

    box-shadow:
        0 0 25px rgba(139, 92, 246, 0.35);
}


.brand strong {

    display: block;

    letter-spacing: 1.5px;

    font-size: 15px;
}


.brand small {

    display: block;

    margin-top: 3px;

    color: #777f96;

    font-size: 10px;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.sidebar nav {

    display: flex;
    flex-direction: column;
    gap: 7px;
}


.nav-btn {

    width: 100%;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 13px 14px;

    border-radius: 13px;

    background: transparent;

    color: var(--muted);

    text-align: left;

    transition:
        0.2s ease;
}


.nav-btn:hover {

    color: var(--text);

    background:
        rgba(139, 92, 246, 0.08);

    transform: translateX(3px);
}


.nav-btn.active {

    color: white;

    background:
        linear-gradient(
            100deg,
            rgba(139, 92, 246, 0.22),
            rgba(34, 211, 238, 0.07)
        );

    box-shadow:
        inset 3px 0 var(--primary);
}


.nav-btn:first-letter {
    font-size: 18px;
}


/* =========================================================
   BAS SIDEBAR
   ========================================================= */

.side-bottom {

    margin-top: auto;

    display: flex;
    flex-direction: column;
    gap: 15px;
}


.theme-btn {

    width: 100%;

    padding: 12px;

    border-radius: 12px;

    background: var(--card);

    border: 1px solid var(--line);

    color: var(--text);

    transition: 0.2s;
}


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


.mini-save {

    padding: 13px;

    border-radius: 14px;

    color: var(--muted);

    background:
        rgba(255, 255, 255, 0.025);

    border: 1px solid var(--line);

    font-size: 12px;

    line-height: 1.7;
}


.mini-save small {
    color: #666e83;
}


/* =========================================================
   5. MAIN
   ========================================================= */

.main {

    min-height: 100vh;

    margin-left: var(--sidebar-width);

    padding: 0 38px 50px;

    max-width: 1700px;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {

    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;

    z-index: 50;

    background:
        linear-gradient(
            180deg,
            var(--bg) 65%,
            transparent
        );
}


.crumb {

    color: var(--muted);

    font-size: 14px;
    font-weight: 600;
}


.top-actions {

    display: flex;
    align-items: center;
    gap: 9px;
}


.score-pill,
.xp-pill {

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 9px 13px;

    border-radius: 30px;

    background: var(--card);

    border: 1px solid var(--line);

    font-size: 12px;
}


.score-pill {
    color: var(--gold);
}


.xp-pill {
    color: var(--cyan);
}


.icon-btn {

    width: 37px;
    height: 37px;

    border-radius: 50%;

    background: var(--card);

    border: 1px solid var(--line);

    color: var(--muted);

    transition: 0.2s;
}


.icon-btn:hover {

    color: var(--text);

    transform: rotate(-25deg);
}


/* =========================================================
   MENU MOBILE
   ========================================================= */

.mobile-menu {

    display: none;

    width: 40px;
    height: 40px;

    margin-right: 10px;

    border-radius: 12px;

    color: var(--text);

    background: var(--card);

    border: 1px solid var(--line);
}


/* =========================================================
   6. PAGES
   ========================================================= */

.page {
    display: none;

    animation:
        pageIn 0.35s ease;
}


.page.active {
    display: block;
}


@keyframes pageIn {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   7. HERO
   ========================================================= */

.hero {

    position: relative;

    min-height: 390px;

    display: flex;
    align-items: center;

    overflow: hidden;

    padding: 55px;

    border-radius: 30px;

    background:

        radial-gradient(
            circle at 80% 30%,
            rgba(139, 92, 246, 0.25),
            transparent 25%
        ),

        radial-gradient(
            circle at 90% 90%,
            rgba(34, 211, 238, 0.14),
            transparent 25%
        ),

        linear-gradient(
            135deg,
            #101426,
            #080b15
        );

    border: 1px solid rgba(255, 255, 255, 0.07);

    box-shadow: var(--shadow);
}


body.light .hero {

    background:

        radial-gradient(
            circle at 80% 30%,
            rgba(139, 92, 246, 0.15),
            transparent 25%
        ),

        linear-gradient(
            135deg,
            #ffffff,
            #e9edf7
        );
}


.hero-glow {

    position: absolute;

    width: 350px;
    height: 350px;

    right: 7%;
    top: -180px;

    border-radius: 50%;

    background:
        rgba(139, 92, 246, 0.18);

    filter: blur(50px);

    pointer-events: none;
}


.hero-copy {

    position: relative;

    max-width: 690px;

    z-index: 2;
}


.eyebrow {

    display: inline-block;

    margin-bottom: 13px;

    color: var(--primary-2);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;
}


.hero h1 {

    font-size:
        clamp(38px, 5vw, 70px);

    letter-spacing: -3px;

    margin-bottom: 20px;
}


.hero h1 span {

    color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--primary-2),
            var(--cyan)
        );

    -webkit-background-clip: text;
    background-clip: text;
}


.hero p {

    max-width: 600px;

    color: #9ca4ba;

    margin-bottom: 28px;

    font-size: 15px;
}


/* =========================================================
   ORBE
   ========================================================= */

.hero-orb {

    position: absolute;

    right: 9%;
    top: 50%;

    transform: translateY(-50%);

    width: 220px;
    height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    border:
        1px solid rgba(139, 92, 246, 0.5);

    box-shadow:

        0 0 30px rgba(139, 92, 246, 0.15),

        inset 0 0 50px
        rgba(139, 92, 246, 0.10);

    animation: floating 5s ease-in-out infinite;
}


@keyframes floating {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(-55%);
    }
}


.hero-orb::before {

    content: "";

    position: absolute;

    inset: 15px;

    border-radius: 50%;

    border: 1px dashed
        rgba(34, 211, 238, 0.35);

    animation:
        rotate 14s linear infinite;
}


@keyframes rotate {

    to {
        transform: rotate(360deg);
    }
}


.orb-inner {

    font-size: 44px;

    font-weight: 900;

    color: white;

    text-shadow:
        0 0 25px var(--primary-2);
}


.hero-orb span {

    font-size: 32px;

    font-weight: 900;

    color: var(--cyan);
}


.hero-orb small {

    color: #777f96;

    font-size: 9px;

    letter-spacing: 2px;
}


/* =========================================================
   8. BOUTONS
   ========================================================= */

.primary {

    padding: 14px 21px;

    border-radius: 13px;

    color: white;

    font-weight: 800;

    background:
        linear-gradient(
            100deg,
            var(--primary),
            #6d5dfc
        );

    box-shadow:
        0 10px 30px
        rgba(139, 92, 246, 0.25);

    transition: 0.2s;
}


.primary:hover {

    transform: translateY(-3px);

    box-shadow:
        0 15px 35px
        rgba(139, 92, 246, 0.35);
}


.primary:active {
    transform: scale(0.97);
}


.ghost {

    padding: 10px 14px;

    border-radius: 11px;

    color: var(--muted);

    background: transparent;

    border: 1px solid var(--line);

    transition: 0.2s;
}


.ghost:hover {

    color: var(--text);

    border-color:
        rgba(139, 92, 246, 0.35);
}


.back {

    margin-bottom: 22px;

    padding: 10px 0;

    background: transparent;

    color: var(--muted);

    transition: 0.2s;
}


.back:hover {
    color: var(--text);
}


/* =========================================================
   9. SECTIONS
   ========================================================= */

.section-head {

    display: flex;
    align-items: end;
    justify-content: space-between;

    margin: 42px 0 20px;
}


.section-head h2,
.page-intro h1 {

    font-size: 30px;

    letter-spacing: -1px;
}


.page-intro {

    padding: 25px 0 28px;
}


.page-intro h1 {
    margin-bottom: 10px;
}


.page-intro p {

    color: var(--muted);

    max-width: 650px;
}


/* =========================================================
   10. GAME CARDS
   ========================================================= */

.game-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 17px;
}


.game-grid.large {

    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


.game-card {

    position: relative;

    min-height: 250px;

    overflow: hidden;

    padding: 23px;

    display: flex;
    flex-direction: column;

    border-radius: var(--radius);

    background: var(--card);

    border: 1px solid var(--line);

    box-shadow: var(--shadow);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}


.game-card:hover {

    transform: translateY(-6px);

    border-color:
        rgba(139, 92, 246, 0.45);
}


.game-card::before {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -70px;
    top: -70px;

    border-radius: 50%;

    background:
        rgba(139, 92, 246, 0.12);

    filter: blur(15px);
}


.game-icon {

    width: 57px;
    height: 57px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    border-radius: 17px;

    font-size: 28px;

    background:
        rgba(139, 92, 246, 0.12);

    border:
        1px solid rgba(139, 92, 246, 0.16);
}


.game-card h3 {

    font-size: 20px;

    margin-bottom: 8px;
}


.game-card p {

    color: var(--muted);

    font-size: 13px;

    margin-bottom: 20px;
}


.game-meta {

    display: flex;

    align-items: center;
    gap: 8px;

    margin-top: auto;
}


.game-tag {

    padding: 6px 9px;

    border-radius: 8px;

    color: var(--cyan);

    background:
        rgba(34, 211, 238, 0.07);

    font-size: 10px;
}


.game-level-count {

    color: var(--muted);

    font-size: 11px;
}


.card-progress {

    height: 4px;

    overflow: hidden;

    margin-top: 15px;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.06);
}


.card-progress i {

    display: block;

    width: 0%;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--cyan)
        );

    border-radius: inherit;

    transition: width 0.4s ease;
}


/* =========================================================
   11. DASHBOARD
   ========================================================= */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 17px;

    margin-top: 17px;
}


.dashboard-grid.three {

    grid-template-columns:
        repeat(3, 1fr);
}


.panel {

    padding: 23px;

    border-radius: var(--radius);

    background: var(--card);

    border: 1px solid var(--line);
}


.panel-head {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}


.panel-head h3 {
    font-size: 15px;
}


.panel-head span {

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   PROGRESS BAR
   ========================================================= */

.progress {

    height: 9px;

    overflow: hidden;

    border-radius: 30px;

    background:
        rgba(255, 255, 255, 0.06);
}


.progress i {

    display: block;

    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--cyan)
        );

    transition: width 0.5s ease;
}


/* =========================================================
   STAT ROW
   ========================================================= */

.stat-row {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    margin-top: 23px;
}


.stat-row div {

    padding-right: 15px;

    border-right:
        1px solid var(--line);
}


.stat-row div:last-child {
    border-right: 0;
}


.stat-row b {

    display: block;

    font-size: 22px;
}


.stat-row small {

    color: var(--muted);

    font-size: 10px;
}


/* =========================================================
   TIP
   ========================================================= */

.tip {

    display: flex;

    gap: 15px;

    align-items: flex-start;
}


.tip-icon {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 13px;

    background:
        rgba(245, 196, 81, 0.09);
}


.tip h3 {

    margin-bottom: 7px;

    font-size: 15px;
}


.tip p {

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   12. STORY HEADER
   ========================================================= */

.story-header {

    padding: 28px;

    margin-bottom: 20px;

    border-radius: 25px;

    background:
        linear-gradient(
            120deg,
            rgba(139, 92, 246, 0.13),
            rgba(34, 211, 238, 0.05)
        );

    border: 1px solid var(--line);
}


.story-header-content {

    display: flex;

    align-items: center;

    gap: 18px;
}


.story-big-icon {

    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 20px;

    font-size: 35px;

    background:
        rgba(139, 92, 246, 0.12);
}


.story-header h1 {

    margin-bottom: 7px;

    font-size: 28px;
}


.story-header p {

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   13. CHAPTER TABS
   ========================================================= */

.chapter-tabs {

    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding-bottom: 8px;

    margin-bottom: 20px;

    scrollbar-width: thin;
}


.chapter-tab {

    flex-shrink: 0;

    padding: 10px 13px;

    border-radius: 11px;

    background: var(--card);

    border: 1px solid var(--line);

    color: var(--muted);

    font-size: 11px;

    transition: 0.2s;
}


.chapter-tab:hover {
    color: var(--text);
}


.chapter-tab.active {

    color: white;

    background:
        linear-gradient(
            100deg,
            var(--primary),
            #6957db
        );

    border-color: transparent;
}


/* =========================================================
   14. LEVEL GRID
   ========================================================= */

.level-grid {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}


.level-card {

    min-height: 130px;

    position: relative;

    padding: 17px;

    border-radius: 17px;

    background: var(--card);

    border: 1px solid var(--line);

    transition: 0.2s;

    cursor: pointer;
}


.level-card:hover:not(.locked) {

    transform: translateY(-4px);

    border-color:
        rgba(139, 92, 246, 0.4);
}


.level-number {

    color: var(--primary-2);

    font-size: 11px;

    font-weight: 800;
}


.level-card h3 {

    margin-top: 10px;

    font-size: 14px;
}


.level-card small {

    position: absolute;

    bottom: 14px;
    left: 17px;

    color: var(--muted);

    font-size: 10px;
}


.level-card.completed {

    border-color:
        rgba(53, 208, 127, 0.3);

    background:
        linear-gradient(
            145deg,
            rgba(53, 208, 127, 0.08),
            var(--card)
        );
}


.level-card.completed .level-number {
    color: var(--green);
}


.level-card.completed::after {

    content: "✓";

    position: absolute;

    top: 12px;
    right: 13px;

    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: white;

    background: var(--green);

    font-size: 12px;
}


.level-card.locked {

    opacity: 0.42;

    cursor: not-allowed;
}


.lock-icon {

    position: absolute;

    right: 13px;
    top: 14px;

    font-size: 14px;
}


/* =========================================================
   15. ÉCRAN DE JEU
   ========================================================= */

.level-wrapper {

    max-width: 950px;

    margin: 0 auto;
}


.level-top {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}


.level-label {

    color: var(--primary-2);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;
}


.level-rewards {

    display: flex;

    gap: 8px;
}


.reward {

    padding: 7px 10px;

    border-radius: 9px;

    background: var(--card);

    border: 1px solid var(--line);

    font-size: 10px;
}


.story-scene {

    position: relative;

    min-height: 270px;

    display: flex;
    align-items: flex-end;

    overflow: hidden;

    padding: 27px;

    border-radius: 25px;

    background:

        radial-gradient(
            circle at 70% 20%,
            rgba(139, 92, 246, 0.16),
            transparent 25%
        ),

        linear-gradient(
            145deg,
            #11172a,
            #070912
        );

    border: 1px solid var(--line);

    margin-bottom: 17px;
}


.story-scene::before {

    content: "";

    position: absolute;

    inset: 0;

    background:

        linear-gradient(
            transparent 60%,
            rgba(0, 0, 0, 0.65)
        );

    pointer-events: none;
}


.scene-decoration {

    position: absolute;

    inset: 0;

    opacity: 0.25;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 80px,
            rgba(255,255,255,0.02) 81px 82px
        );
}


.scene-content {

    position: relative;

    z-index: 2;

    max-width: 700px;
}


.scene-content h1 {

    font-size:
        clamp(27px, 4vw, 43px);

    margin-bottom: 12px;

    letter-spacing: -1px;
}


.scene-content p {

    color: #b0b7c9;

    font-size: 13px;
}


/* =========================================================
   OBJECTIF
   ========================================================= */

.objective {

    padding: 17px 20px;

    margin-bottom: 17px;

    border-radius: 16px;

    background:
        rgba(34, 211, 238, 0.05);

    border:
        1px solid rgba(34, 211, 238, 0.12);
}


.objective strong {

    display: block;

    margin-bottom: 5px;

    color: var(--cyan);

    font-size: 11px;

    letter-spacing: 1px;
}


.objective p {

    font-size: 13px;

    color: var(--text);
}


/* =========================================================
   CHOIX
   ========================================================= */

.choices {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 13px;
}


.choice {

    min-height: 110px;

    padding: 18px;

    text-align: left;

    border-radius: 17px;

    color: var(--text);

    background: var(--card);

    border: 1px solid var(--line);

    transition: 0.25s;
}


.choice:hover {

    transform: translateY(-4px);

    border-color:
        rgba(139, 92, 246, 0.45);

    background:
        rgba(139, 92, 246, 0.07);
}


.choice span {

    display: block;

    margin-bottom: 8px;

    color: var(--primary-2);

    font-size: 10px;

    font-weight: 800;

    text-transform: uppercase;
}


.choice strong {

    display: block;

    margin-bottom: 6px;

    font-size: 14px;
}


.choice small {

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   INDICE
   ========================================================= */

.hint-zone {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 15px;

    padding: 13px 15px;

    border-radius: 13px;

    background:
        rgba(245, 196, 81, 0.045);

    border: 1px solid
        rgba(245, 196, 81, 0.09);
}


.hint-zone p {

    color: var(--muted);

    font-size: 11px;
}


.hint-btn {

    flex-shrink: 0;

    padding: 8px 11px;

    border-radius: 9px;

    color: var(--gold);

    background:
        rgba(245, 196, 81, 0.08);

    border:
        1px solid rgba(245, 196, 81, 0.13);

    font-size: 10px;

    font-weight: 700;
}


/* =========================================================
   16. PROFIL
   ========================================================= */

.profile-card {

    display: flex;

    align-items: center;

    gap: 17px;

    padding: 25px;

    border-radius: 25px;

    background: var(--card);

    border: 1px solid var(--line);
}


.avatar {

    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 21px;

    color: white;

    font-size: 28px;

    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--cyan)
        );

    box-shadow:
        0 0 30px
        rgba(139, 92, 246, 0.25);
}


.profile-card h2 {

    font-size: 20px;

    margin-bottom: 5px;
}


.profile-card p {

    color: var(--muted);

    font-size: 12px;
}


.profile-score {

    margin-left: auto;

    text-align: right;
}


.profile-score b {

    display: block;

    font-size: 28px;

    color: var(--gold);
}


.profile-score span {

    color: var(--muted);

    font-size: 10px;
}


/* =========================================================
   17. STAT CARDS
   ========================================================= */

.profile-stat {

    padding: 23px;

    border-radius: 20px;

    background: var(--card);

    border: 1px solid var(--line);
}


.profile-stat-icon {

    font-size: 25px;

    margin-bottom: 17px;
}


.profile-stat b {

    display: block;

    font-size: 28px;

    margin-bottom: 5px;
}


.profile-stat span {

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   18. SUCCÈS
   ========================================================= */

.achievement-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}


.achievement {

    position: relative;

    padding: 21px;

    min-height: 150px;

    border-radius: 20px;

    background: var(--card);

    border: 1px solid var(--line);

    transition: 0.2s;
}


.achievement:hover {
    transform: translateY(-3px);
}


.achievement-icon {

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 14px;

    font-size: 22px;

    background:
        rgba(139, 92, 246, 0.10);
}


.achievement h3 {

    font-size: 14px;

    margin-bottom: 6px;
}


.achievement p {

    color: var(--muted);

    font-size: 11px;
}


.achievement.locked {

    filter: grayscale(1);

    opacity: 0.4;
}


.achievement.unlocked {

    border-color:
        rgba(245, 196, 81, 0.25);

    box-shadow:
        0 0 25px
        rgba(245, 196, 81, 0.05);
}


/* =========================================================
   19. TOAST
   ========================================================= */

.toast {

    position: fixed;

    left: 50%;
    bottom: 25px;

    transform:
        translate(-50%, 100px);

    z-index: 1000;

    max-width: calc(100vw - 30px);

    padding: 13px 18px;

    border-radius: 13px;

    color: white;

    background:
        rgba(17, 22, 38, 0.96);

    border:
        1px solid rgba(255,255,255,0.1);

    box-shadow:
        0 15px 40px rgba(0,0,0,0.35);

    font-size: 12px;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;

    opacity: 0;
}


.toast.show {

    transform:
        translate(-50%, 0);

    opacity: 1;
}


/* =========================================================
   20. ÉCRAN DE FIN
   ========================================================= */

.ending {

    text-align: center;

    padding: 45px 25px;

    border-radius: 25px;

    background:
        radial-gradient(
            circle at center,
            rgba(139, 92, 246, 0.12),
            transparent 60%
        ),

        var(--card);

    border: 1px solid var(--line);
}


.ending-icon {

    font-size: 60px;

    margin-bottom: 15px;
}


.ending h1 {

    font-size: 32px;

    margin-bottom: 12px;
}


.ending p {

    max-width: 600px;

    margin: 0 auto 23px;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   21. SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}


::-webkit-scrollbar-track {
    background: transparent;
}


::-webkit-scrollbar-thumb {

    border-radius: 20px;

    background:
        rgba(139, 92, 246, 0.35);
}


::-webkit-scrollbar-thumb:hover {

    background:
        rgba(139, 92, 246, 0.55);
}


/* =========================================================
   22. RESPONSIVE TABLETTE
   ========================================================= */

@media (max-width: 1150px) {

    .main {
        padding: 0 25px 40px;
    }


    .game-grid,
    .game-grid.large {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .level-grid {

        grid-template-columns:
            repeat(4, 1fr);
    }


    .hero-orb {

        right: 4%;
        opacity: 0.6;
    }
}


/* =========================================================
   23. RESPONSIVE MOBILE
   ========================================================= */

@media (max-width: 800px) {

    :root {
        --sidebar-width: 250px;
    }


    .sidebar {

        transform:
            translateX(-100%);

        box-shadow:
            20px 0 60px rgba(0,0,0,0.3);
    }


    .sidebar.open {

        transform:
            translateX(0);
    }


    .main {

        margin-left: 0;

        padding:
            0 15px 35px;
    }


    .mobile-menu {

        display: block;
    }


    .topbar {

        height: 68px;
    }


    .crumb {

        margin-right: auto;
    }


    .score-pill,
    .xp-pill {

        padding: 8px 9px;
    }


    .icon-btn {
        display: none;
    }


    .hero {

        min-height: 470px;

        padding: 30px 23px;

        align-items: flex-start;
    }


    .hero h1 {

        font-size: 42px;

        letter-spacing: -2px;
    }


    .hero-orb {

        width: 160px;
        height: 160px;

        top: auto;
        bottom: 25px;
        right: 25px;

        transform: none;

        opacity: 0.8;
    }


    @keyframes floating {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-7px);
        }
    }


    .orb-inner {
        font-size: 30px;
    }


    .hero-orb span {
        font-size: 23px;
    }


    .section-head {

        align-items: flex-start;

        gap: 15px;

        flex-direction: column;
    }


    .game-grid,
    .game-grid.large {

        grid-template-columns:
            1fr;
    }


    .dashboard-grid,
    .dashboard-grid.three {

        grid-template-columns:
            1fr;
    }


    .level-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .choices {

        grid-template-columns:
            1fr;
    }


    .achievement-grid {

        grid-template-columns:
            1fr;
    }


    .story-header-content {

        align-items: flex-start;
    }


    .profile-card {

        flex-wrap: wrap;
    }


    .profile-score {

        width: 100%;

        margin-left: 0;

        padding-top: 15px;

        border-top: 1px solid var(--line);

        text-align: left;
    }


    .stat-row {

        gap: 10px;
    }


    .stat-row div {

        border-right: 0;

        padding: 0;
    }
}


/* =========================================================
   24. PETITS TÉLÉPHONES
   ========================================================= */

@media (max-width: 430px) {

    .main {
        padding-left: 11px;
        padding-right: 11px;
    }


    .top-actions {
        gap: 4px;
    }


    .score-pill,
    .xp-pill {

        font-size: 10px;

        padding:
            7px 8px;
    }


    .hero {

        padding:
            25px 18px;
    }


    .hero h1 {

        font-size: 35px;
    }


    .hero p {

        font-size: 13px;
    }


    .hero-orb {

        width: 135px;
        height: 135px;

        right: 18px;
        bottom: 20px;
    }


    .level-grid {

        gap: 8px;
    }


    .level-card {

        min-height: 120px;

        padding: 13px;
    }


    .level-card small {

        left: 13px;
        bottom: 11px;
    }


    .story-scene {

        min-height: 320px;

        padding: 20px;
    }


    .story-header {

        padding: 20px;
    }


    .story-big-icon {

        width: 57px;
        height: 57px;

        font-size: 27px;
    }


    .story-header h1 {

        font-size: 22px;
    }
}


/* =========================================================
   25. ACCESSIBILITÉ / RÉDUCTION ANIMATION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
    }
}