/* ==========================================================================
   Pliexo (pliexo.ch) — feuille de style (complète Bootstrap 5.3)
   ========================================================================== */

:root {
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --accent: #4f6ef7;
    --accent-rgb: 79, 110, 247;
    --accent-dark: #3b57d6;
    --accent-soft: rgba(var(--accent-rgb), .12);
    --surface: #ffffff;
    --surface-2: #f7f8fb;
    --page-bg: #f3f4f8;
    --border: #e6e8ef;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
    --radius: 1rem;

    --bs-body-bg: var(--page-bg);
    --bs-body-color: #1b1f2a;
    --bs-border-color: var(--border);
    --bs-primary: var(--accent);
    --bs-primary-rgb: var(--accent-rgb);
    --bs-link-color: var(--accent);
    --bs-link-color-rgb: var(--accent-rgb);
    --bs-link-hover-color: var(--accent-dark);
    --bs-link-hover-color-rgb: var(--accent-rgb);
    --bs-secondary-color: #667085;
    --bs-tertiary-bg: var(--surface-2);
}

[data-bs-theme="dark"] {
    --surface: #161a22;
    --surface-2: #1c212b;
    --page-bg: #0f1217;
    --border: #262c38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --bs-body-bg: var(--page-bg);
    --bs-body-color: #e7e9ef;
    --bs-border-color: var(--border);
    --bs-secondary-color: #98a2b3;
    --bs-tertiary-bg: var(--surface-2);
    --bs-light-rgb: 38, 44, 56;
    --bs-light: #262c38;
}

/* Thèmes d'accent classiques (boutique) */
[data-accent="ocean"]     { --accent: #0ea5e9; --accent-rgb: 14, 165, 233; --accent-dark: #0284c7; }
[data-accent="forest"]    { --accent: #16a34a; --accent-rgb: 22, 163, 74;  --accent-dark: #15803d; }
[data-accent="sunset"]    { --accent: #f97316; --accent-rgb: 249, 115, 22; --accent-dark: #ea580c; }
[data-accent="berry"]     { --accent: #8b5cf6; --accent-rgb: 139, 92, 246; --accent-dark: #7c3aed; }
[data-accent="rose"]      { --accent: #ec4899; --accent-rgb: 236, 72, 153; --accent-dark: #db2777; }

/* Thèmes spéciaux illustrés & animés (Noël, Étoiles, Planètes, Aurore) */
[data-accent="christmas"] { --accent: #dc2626; --accent-rgb: 220, 38, 38;  --accent-dark: #b91c1c; --page-bg: #faf6f0; --surface: rgba(255, 255, 255, .93); --surface-2: #f4eee6; --border: #e6ddd2; }
[data-bs-theme="dark"][data-accent="christmas"] { --page-bg: #0b1511; --surface: rgba(19, 32, 26, .9); --surface-2: rgba(26, 43, 35, .9); --border: #254234; }

[data-accent="starlight"] { --accent: #d97706; --accent-rgb: 217, 119, 6;  --accent-dark: #b45309; --page-bg: #f3f4fb; --surface: rgba(255, 255, 255, .92); --surface-2: #eaecf8; --border: #dce0f2; }
[data-bs-theme="dark"][data-accent="starlight"] { --accent: #eab308; --accent-rgb: 234, 179, 8; --accent-dark: #ca8a04; --page-bg: #070b19; --surface: rgba(14, 20, 40, .88); --surface-2: rgba(21, 29, 56, .88); --border: #23315c; }

[data-accent="cosmos"]    { --accent: #7c5cff; --accent-rgb: 124, 92, 255; --accent-dark: #603ce6; --page-bg: #eef0fc; --surface: rgba(255, 255, 255, .91); --surface-2: #e6e9fa; --border: #d7dcf5; }
[data-bs-theme="dark"][data-accent="cosmos"]    { --page-bg: #070915; --surface: rgba(16, 20, 40, .87); --surface-2: rgba(24, 30, 58, .87); --border: #28325c; }

[data-accent="aurora"]    { --accent: #0d9488; --accent-rgb: 13, 148, 136; --accent-dark: #0f766e; --page-bg: #eef9f7; --surface: rgba(255, 255, 255, .91); --surface-2: #e3f4f1; --border: #cde8e3; }
[data-bs-theme="dark"][data-accent="aurora"]    { --accent: #14b8a6; --accent-rgb: 20, 184, 166; --accent-dark: #0d9488; --page-bg: #061217; --surface: rgba(13, 28, 35, .88); --surface-2: rgba(19, 39, 48, .88); --border: #1e404e; }

html[data-accent="christmas"],
html[data-accent="starlight"],
html[data-accent="cosmos"],
html[data-accent="aurora"] {
    background-color: var(--page-bg);
}
html[data-accent="christmas"] body,
html[data-accent="starlight"] body,
html[data-accent="cosmos"] body,
html[data-accent="aurora"] body {
    background: transparent;
    position: relative;
    isolation: isolate;
}
html[data-accent="christmas"] body::before,
html[data-accent="christmas"] body::after,
html[data-accent="starlight"] body::before,
html[data-accent="starlight"] body::after,
html[data-accent="cosmos"] body::before,
html[data-accent="cosmos"] body::after,
html[data-accent="aurora"] body::before,
html[data-accent="aurora"] body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* --- 1. Féerie de Noël : sapin, houx, or & flocons de neige --- */
html[data-accent="christmas"] .brand-mark {
    background: linear-gradient(135deg, #dc2626, #15803d);
    box-shadow: 0 6px 16px -5px rgba(220, 38, 38, .65);
}
html[data-accent="christmas"] .app-nav,
html[data-accent="christmas"] .public-nav {
    border-bottom: 2px solid transparent;
    background-image:
        linear-gradient(color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface) 90%, transparent)),
        repeating-linear-gradient(90deg, #dc2626 0 18px, #f59e0b 18px 26px, #15803d 26px 44px, #f59e0b 44px 52px);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
}
html[data-accent="christmas"] .cadence-modal .cm-band {
    background: repeating-linear-gradient(90deg, #dc2626 0 20px, #f59e0b 20px 30px, #15803d 30px 50px, #f59e0b 50px 60px);
}
html[data-accent="christmas"] body::before {
    background:
        radial-gradient(46rem 28rem at 8% 0%, rgba(220, 38, 38, .12), transparent 65%),
        radial-gradient(46rem 30rem at 92% 100%, rgba(21, 128, 61, .15), transparent 65%),
        radial-gradient(30rem 20rem at 85% 12%, rgba(245, 158, 11, .11), transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='%23f59e0b' stroke-opacity='.28' stroke-width='1.5'%3E%3Cpath d='M710 70v28M696 84h28M700 74l20 20M720 74l-20 20'/%3E%3Cpath d='M95 480v24M83 492h24M87 484l16 16M103 484l-16 16'/%3E%3C/g%3E%3Cg fill='%2315803d' fill-opacity='.12'%3E%3Cpolygon points='740,595 768,535 754,535 775,490 762,490 780,450 798,490 785,490 806,535 792,535 820,595'/%3E%3Cpolygon points='-10,595 16,542 4,542 22,502 10,502 26,466 42,502 30,502 48,542 36,542 62,595'/%3E%3C/g%3E%3Ccircle cx='780' cy='446' r='4' fill='%23fbbf24' fill-opacity='.55'/%3E%3Ccircle cx='26' cy='462' r='3.5' fill='%23fbbf24' fill-opacity='.5'/%3E%3C/svg%3E") center / cover no-repeat;
}
html[data-accent="christmas"] body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='%2394a3b8' fill-opacity='.35'%3E%3Ccircle cx='34' cy='42' r='2.4'/%3E%3Ccircle cx='148' cy='26' r='1.8'/%3E%3Ccircle cx='268' cy='68' r='2.8'/%3E%3Ccircle cx='88' cy='134' r='2'/%3E%3Ccircle cx='216' cy='158' r='2.5'/%3E%3Ccircle cx='44' cy='238' r='1.9'/%3E%3Ccircle cx='172' cy='264' r='2.7'/%3E%3Ccircle cx='292' cy='242' r='1.8'/%3E%3C/g%3E%3Cg stroke='%23dc2626' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M116 74v10M111 79h10M244 290v10M239 295h10'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 320px 320px;
    animation: pliexoSnow 26s linear infinite;
}
html[data-bs-theme="dark"][data-accent="christmas"] body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='%23ffffff' fill-opacity='.38'%3E%3Ccircle cx='34' cy='42' r='2.4'/%3E%3Ccircle cx='148' cy='26' r='1.7'/%3E%3Ccircle cx='268' cy='68' r='2.8'/%3E%3Ccircle cx='88' cy='134' r='2'/%3E%3Ccircle cx='216' cy='158' r='2.5'/%3E%3Ccircle cx='44' cy='238' r='1.9'/%3E%3Ccircle cx='172' cy='264' r='2.7'/%3E%3Ccircle cx='292' cy='242' r='1.8'/%3E%3C/g%3E%3Cg stroke='%23fbbf24' stroke-opacity='.32' stroke-width='1.2'%3E%3Cpath d='M116 74v10M111 79h10M244 290v10M239 295h10'/%3E%3C/g%3E%3C/svg%3E");
}
@keyframes pliexoSnow {
    from { background-position: 0 0; }
    to   { background-position: 80px 320px; }
}

/* --- 2. Nuit Étoilée : constellations, étoiles dorées & voie lactée --- */
html[data-accent="starlight"] .brand-mark {
    background: linear-gradient(135deg, #f59e0b, #6366f1);
    box-shadow: 0 6px 16px -5px rgba(234, 179, 8, .6);
}
html[data-accent="starlight"] body::before {
    background:
        radial-gradient(52rem 28rem at 20% 10%, rgba(99, 102, 241, .16), transparent 65%),
        radial-gradient(44rem 28rem at 85% 82%, rgba(234, 179, 8, .13), transparent 65%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 700'%3E%3Cg stroke='%236366f1' stroke-opacity='.24' stroke-width='1.1' fill='none'%3E%3Cpolyline points='110,120 175,95 235,138 290,108 335,162'/%3E%3Cpolyline points='740,490 805,455 865,488 915,432'/%3E%3Cpolyline points='760,115 820,145 880,105'/%3E%3C/g%3E%3Cg fill='%23eab308' fill-opacity='.65'%3E%3Ccircle cx='110' cy='120' r='3'/%3E%3Ccircle cx='175' cy='95' r='2.5'/%3E%3Ccircle cx='235' cy='138' r='3.4'/%3E%3Ccircle cx='290' cy='108' r='2.4'/%3E%3Ccircle cx='335' cy='162' r='2.8'/%3E%3Ccircle cx='740' cy='490' r='2.8'/%3E%3Ccircle cx='805' cy='455' r='3.4'/%3E%3Ccircle cx='865' cy='488' r='2.4'/%3E%3Ccircle cx='915' cy='432' r='3'/%3E%3Ccircle cx='760' cy='115' r='2.6'/%3E%3Ccircle cx='820' cy='145' r='3'/%3E%3Ccircle cx='880' cy='105' r='2.5'/%3E%3Cpath d='M895 168l4 11 11 4-11 4-4 11-4-11-11-4 11-4z'/%3E%3Cpath d='M130 520l3 9 9 3-9 3-3 9-3-9-9-3 9-3z'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}
html[data-accent="starlight"] body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='%23eab308' fill-opacity='.45'%3E%3Ccircle cx='28' cy='38' r='1.6'/%3E%3Ccircle cx='144' cy='22' r='2.1'/%3E%3Ccircle cx='226' cy='76' r='1.4'/%3E%3Ccircle cx='72' cy='148' r='1.9'/%3E%3Ccircle cx='192' cy='186' r='2.2'/%3E%3Ccircle cx='38' cy='228' r='1.5'/%3E%3C/g%3E%3Cg fill='%23818cf8' fill-opacity='.45'%3E%3Ccircle cx='94' cy='66' r='1.5'/%3E%3Ccircle cx='212' cy='132' r='1.8'/%3E%3Ccircle cx='126' cy='234' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 260px 260px;
    animation: pliexoTwinkle 4.5s ease-in-out infinite alternate;
}
@keyframes pliexoTwinkle {
    from { opacity: .45; }
    to   { opacity: 1; }
}

/* --- 3. Planètes & Nébuleuse : planète à anneaux, lune & orbites --- */
html[data-accent="cosmos"] .brand-mark {
    background: linear-gradient(135deg, #38bdf8, #7c5cff, #ec4899);
    box-shadow: 0 6px 18px -5px rgba(124, 92, 255, .75);
}
html[data-accent="cosmos"] body::before {
    background:
        radial-gradient(50rem 32rem at 88% 14%, rgba(124, 92, 255, .2), transparent 65%),
        radial-gradient(42rem 28rem at 10% 88%, rgba(56, 189, 248, .17), transparent 65%),
        radial-gradient(34rem 24rem at 55% 45%, rgba(236, 72, 153, .08), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Cdefs%3E%3ClinearGradient id='pl1' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%2338bdf8'/%3E%3Cstop offset='55%25' stop-color='%237c5cff'/%3E%3Cstop offset='100%25' stop-color='%23312e81'/%3E%3C/linearGradient%3E%3ClinearGradient id='pl2' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23f472b6'/%3E%3Cstop offset='100%25' stop-color='%237c3aed'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='1030' cy='155' r='165' fill='none' stroke='%23818cf8' stroke-opacity='.14' stroke-dasharray='5 7'/%3E%3Cg opacity='.42'%3E%3Cellipse cx='1030' cy='155' rx='118' ry='30' transform='rotate(-22 1030 155)' fill='none' stroke='%23c084fc' stroke-width='9' stroke-opacity='.55'/%3E%3Ccircle cx='1030' cy='155' r='54' fill='url(%23pl1)'/%3E%3Cpath d='M952 186a118 30 -22 0 0 156 -62' fill='none' stroke='%2338bdf8' stroke-width='5' stroke-opacity='.75'/%3E%3C/g%3E%3Cg opacity='.36'%3E%3Ccircle cx='125' cy='650' r='34' fill='url(%23pl2)'/%3E%3Ccircle cx='114' cy='640' r='5' fill='%23ffffff' fill-opacity='.22'/%3E%3Ccircle cx='136' cy='662' r='3.5' fill='%23ffffff' fill-opacity='.18'/%3E%3Ccircle cx='182' cy='612' r='9' fill='%2338bdf8' fill-opacity='.65'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}
html[data-accent="cosmos"] body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='%23a5b4fc' fill-opacity='.42'%3E%3Ccircle cx='42' cy='58' r='1.6'/%3E%3Ccircle cx='188' cy='34' r='2'/%3E%3Ccircle cx='262' cy='124' r='1.4'/%3E%3Ccircle cx='96' cy='194' r='1.8'/%3E%3Ccircle cx='224' cy='248' r='2.1'/%3E%3C/g%3E%3Cg fill='%2338bdf8' fill-opacity='.45'%3E%3Ccircle cx='134' cy='96' r='1.5'/%3E%3Ccircle cx='34' cy='256' r='1.7'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 300px 300px;
    animation: pliexoCosmosFloat 18s ease-in-out infinite alternate;
}
@keyframes pliexoCosmosFloat {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-12px, 10px, 0); }
}

/* --- 4. Aurore Boréale : voiles polaires émeraude, cyan & violet --- */
html[data-accent="aurora"] .brand-mark {
    background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6);
    box-shadow: 0 6px 18px -5px rgba(20, 184, 166, .7);
}
html[data-accent="aurora"] body::before {
    background:
        radial-gradient(60rem 22rem at 22% -5%, rgba(16, 185, 129, .24), transparent 70%),
        radial-gradient(55rem 24rem at 78% 0%, rgba(139, 92, 246, .2), transparent 70%),
        radial-gradient(50rem 20rem at 50% 8%, rgba(6, 182, 212, .18), transparent 70%);
    animation: pliexoAurora 14s ease-in-out infinite alternate;
}
html[data-accent="aurora"] body::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'%3E%3Cg fill='%232dd4bf' fill-opacity='.35'%3E%3Ccircle cx='36' cy='44' r='1.6'/%3E%3Ccircle cx='168' cy='28' r='1.9'/%3E%3Ccircle cx='242' cy='96' r='1.4'/%3E%3Ccircle cx='84' cy='176' r='1.7'/%3E%3Ccircle cx='206' cy='228' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 280px 280px;
}
@keyframes pliexoAurora {
    from { transform: scale(1) translateY(0); opacity: .85; }
    to   { transform: scale(1.06) translateY(10px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    html[data-accent="christmas"] body::after,
    html[data-accent="starlight"] body::after,
    html[data-accent="cosmos"] body::after,
    html[data-accent="aurora"] body::before {
        animation: none !important;
    }
}

html { height: 100%; }
body {
    min-height: 100%;
    font-family: var(--font-sans);
    background: var(--bs-body-bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}
body.has-nav { padding-bottom: 76px; }
@media (min-width: 992px) { body.has-nav { padding-bottom: 0; } }

.min-w-0 { min-width: 0; }

/* Bootstrap : couleur primaire pilotée par l'accent */
.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-bg: var(--accent-dark);
    --bs-btn-active-border-color: var(--accent-dark);
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
    box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .55);
}
.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-bg: var(--accent);
    --bs-btn-active-border-color: var(--accent);
}
.text-primary { color: var(--accent) !important; }
.progress-bar { background-color: var(--accent); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--accent-rgb), .6); box-shadow: 0 0 0 .25rem rgba(var(--accent-rgb), .18); }
.form-check-input:checked, .btn-check:checked + .btn-outline-secondary { background-color: var(--accent); border-color: var(--accent); color: #fff; }
.form-range::-webkit-slider-thumb { background: var(--accent); }
.form-range::-moz-range-thumb { background: var(--accent); }
.btn { border-radius: .65rem; font-weight: 500; }
.btn-lg { border-radius: .8rem; }
.form-control, .form-select, .input-group-text { border-radius: .65rem; border-color: var(--border); background-color: var(--surface); }
.input-group > .form-control:not(:first-child), .input-group > .form-select:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input-group-text:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.card {
    --bs-card-bg: var(--surface);
    --bs-card-border-color: var(--border);
    --bs-card-border-radius: var(--radius);
    --bs-card-inner-border-radius: calc(var(--radius) - 1px);
    --bs-card-cap-bg: transparent;
    box-shadow: var(--shadow);
}
.card-header { border-bottom-color: var(--border); padding: .9rem 1.25rem; }
.list-group-item { background: transparent; border-color: var(--border); }
.dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--border); --bs-dropdown-border-radius: .8rem; --bs-dropdown-link-hover-bg: var(--surface-2); padding: .4rem; }
.dropdown-item { border-radius: .5rem; }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.badge.text-bg-light { background-color: var(--surface-2) !important; color: var(--bs-secondary-color) !important; border: 1px solid var(--border); }
.progress { background-color: var(--surface-2); border-radius: 99px; }
.progress-thin { height: 8px; }
.progress-thin .progress-bar { border-radius: 99px; transition: width .6s ease; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.app-nav {
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .55rem 0;
}
.brand-mark {
    width: 34px; height: 34px;
    display: inline-grid; place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8b5cf6));
    box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .7);
    font-size: .95rem;
}
.brand-mark-lg { width: 60px; height: 60px; border-radius: 18px; font-size: 1.6rem; display: grid; }
.main-nav { gap: .25rem; }
.main-nav .nav-link {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem .9rem;
    border-radius: .7rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}
.main-nav .nav-link:hover { background: var(--surface-2); color: var(--bs-body-color); }
.main-nav .nav-link.active { background: var(--accent-soft); color: var(--accent); }

.pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .7rem;
    border-radius: 99px;
    font-size: .82rem; font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--bs-body-color);
    text-decoration: none;
    white-space: nowrap;
}
.pill-xp i { color: #f59e0b; }
.pill-streak i { color: #9aa3b2; }
.pill-streak.is-hot i { color: #f97316; }
.pill-timer { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-variant-numeric: tabular-nums; }
.pill-timer.is-break { background: rgba(34, 197, 94, .14); color: #16a34a; }

.avatar-btn { padding: .2rem .4rem .2rem .2rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); }
.avatar {
    width: 34px; height: 34px;
    display: inline-grid; place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-size: .95rem;
    flex-shrink: 0;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.4rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 2.2rem; box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), .8); }

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020;
    display: flex; justify-content: space-around;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .35rem 0; border-radius: .7rem;
    font-size: .68rem; font-weight: 600;
    color: var(--bs-secondary-color); text-decoration: none;
}
.bottom-nav-item i { font-size: 1.1rem; }
.bottom-nav-item.active { color: var(--accent); }

/* --------------------------------------------------------------------------
   Authentification
   -------------------------------------------------------------------------- */
body.no-nav { display: flex; flex-direction: column; min-height: 100vh; }
.no-nav .app-main { flex: 1 1 auto; display: flex; align-items: center; }
.no-nav .app-main > .container-xl { width: 100%; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; border-radius: 1.25rem; }
body.no-nav:not(.is-landing) {
    background:
        radial-gradient(50rem 28rem at 0% 0%, rgba(var(--accent-rgb), .14), transparent 60%),
        radial-gradient(40rem 24rem at 100% 100%, rgba(139, 92, 246, .12), transparent 60%),
        var(--page-bg);
}

/* --------------------------------------------------------------------------
   Pages publiques : en-tête, pied de page, accueil Pliexo (pliexo.ch)
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
.public-nav {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
    padding: .65rem 0;
}
.brand-domain {
    font-size: .68rem; font-weight: 700; letter-spacing: .02em;
    padding: .18rem .55rem; border-radius: 99px;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), .22);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.public-nav .navbar-nav .nav-link { font-weight: 500; color: var(--bs-secondary-color); padding: .45rem .9rem; border-radius: .7rem; }
.public-nav .navbar-nav .nav-link:hover { color: var(--bs-body-color); background: var(--surface-2); }
.public-nav .navbar-toggler { border: 1px solid var(--border); border-radius: .6rem; color: var(--bs-body-color); padding: .35rem .65rem; }
.public-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem var(--accent-soft); }
.btn-icon-round {
    width: 40px; height: 40px; padding: 0;
    display: inline-grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--bs-body-color);
}
.btn-icon-round-sm { width: 34px; height: 34px; font-size: .85rem; }
.btn-icon-round:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn-outline-secondary { --bs-btn-color: var(--bs-body-color); --bs-btn-border-color: var(--border); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--bs-body-color); --bs-btn-hover-border-color: var(--border); --bs-btn-active-bg: var(--surface-2); --bs-btn-active-color: var(--bs-body-color); }

.public-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2.75rem 0 1.75rem; }
.public-footer-grid { border-bottom: 1px solid var(--border); }
.footer-heading { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-body-color); margin-bottom: .75rem; }
.footer-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .28rem .68rem; border-radius: 99px;
    font-size: .75rem; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--bs-secondary-color);
}
.public-footer a { color: var(--bs-secondary-color); text-decoration: none; transition: color .15s; }
.public-footer a:hover { color: var(--accent); }
body.is-landing .app-main { display: block; }

.hero { position: relative; overflow: hidden; padding: 3.5rem 0 3rem; scroll-margin-top: 80px; }
@media (min-width: 992px) { .hero { padding: 5.25rem 0 4.5rem; } }
.hero-grid-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(var(--accent-rgb), .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--accent-rgb), .06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .55; pointer-events: none; }
.hero-blob-1 { width: 44rem; height: 44rem; left: -16rem; top: -20rem; background: rgba(var(--accent-rgb), .32); }
.hero-blob-2 { width: 36rem; height: 36rem; right: -12rem; bottom: -18rem; background: rgba(139, 92, 246, .24); }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .38rem .9rem; border-radius: 99px;
    background: var(--surface); color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), .25);
    box-shadow: var(--shadow);
    font-size: .74rem; font-weight: 700; letter-spacing: .04em;
    margin-bottom: 1.25rem;
}
.eyebrow-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .18);
}
.hero-title { font-size: clamp(2.25rem, 4.8vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.07; margin-bottom: 1.25rem; }
.text-gradient {
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 42%, #8b5cf6));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.1rem; color: var(--bs-secondary-color); max-width: 34rem; margin-bottom: 1.75rem; line-height: 1.6; }
.hero-trust-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .75rem; border-radius: 99px;
    font-size: .78rem; font-weight: 600;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid var(--border);
    color: var(--bs-secondary-color);
}

/* Aperçu d'interface Pliexo dans le Hero */
.pliexo-showcase { position: relative; padding-bottom: 1.5rem; }
@media (min-width: 992px) { .pliexo-showcase { margin-left: .75rem; } }
.pliexo-window {
    border-radius: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 28px 60px -24px rgba(16, 24, 40, .26);
    overflow: hidden;
}
[data-bs-theme="dark"] .pliexo-window { box-shadow: 0 28px 60px -20px rgba(0, 0, 0, .65); }
.pliexo-window-bar {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .75rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.window-dots { display: flex; gap: .38rem; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.window-dots span:nth-child(1) { background: #f87171; }
.window-dots span:nth-child(2) { background: #fbbf24; }
.window-dots span:nth-child(3) { background: #34d399; }
.window-url {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .22rem .75rem; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: .74rem; font-weight: 600; color: var(--bs-secondary-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.window-url i { color: #16a34a; font-size: .68rem; }
.window-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: 99px;
    font-size: .72rem; font-weight: 700;
    background: var(--surface); border: 1px solid var(--border);
}
.window-pill.xp i { color: #f59e0b; }
.window-pill.streak i { color: #f97316; }
.pliexo-window-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.showcase-timer-box {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; border-radius: 1.05rem;
    background: var(--surface-2); border: 1px solid var(--border);
}
.showcase-ring {
    width: 78px; height: 78px; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--accent) 0 72%, rgba(var(--accent-rgb), .14) 72% 100%);
    display: grid; place-items: center;
}
.showcase-ring-inner {
    width: 62px; height: 62px; border-radius: 50%;
    background: var(--surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    line-height: 1.1;
}
.showcase-time { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.showcase-phase { font-size: .58rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.text-bg-primary-soft {
    background: var(--accent-soft); color: var(--accent);
    font-weight: 600; font-size: .72rem;
}
.showcase-goals {
    padding: .95rem 1rem; border-radius: 1.05rem;
    border: 1px solid var(--border); background: var(--surface);
    display: flex; flex-direction: column; gap: .5rem;
}
.showcase-goal {
    display: flex; align-items: center; gap: .65rem;
    padding: .45rem .6rem; border-radius: .7rem;
    font-size: .84rem; background: var(--surface-2);
}
.showcase-goal.is-done .goal-text { text-decoration: line-through; color: var(--bs-secondary-color); }
.showcase-goal.is-active { background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), .24); font-weight: 600; }
.goal-dot {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--border);
    display: inline-grid; place-items: center; font-size: .62rem;
}
.showcase-goal.is-done .goal-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.showcase-goal.is-active .goal-dot { border-color: var(--accent); }
.goal-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-xp { font-size: .74rem; font-weight: 700; color: #16a34a; white-space: nowrap; }
.pliexo-floating-badge {
    position: absolute; right: 1rem; bottom: 0;
    display: flex; align-items: center; gap: .7rem;
    padding: .65rem .95rem; border-radius: 1rem;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 16px 34px -12px rgba(16, 24, 40, .24);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.strip { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .strip { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
.strip-item { padding: 1.05rem 1.25rem; border-radius: 1.1rem; background: color-mix(in srgb, var(--surface) 84%, transparent); border: 1px solid var(--border); backdrop-filter: blur(8px); }
.strip-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: .2rem; }

/* Grille Bento & sections de la frontpage */
.landing-section { padding: 4rem 0; scroll-margin-top: 80px; }
@media (min-width: 992px) { .landing-section { padding: 5rem 0; } }
.section-eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-title { font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 800; letter-spacing: -.03em; }
.bento-card, .feature-card {
    display: flex; flex-direction: column;
    height: 100%; padding: 1.6rem; border-radius: 1.35rem;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease;
}
.bento-card:hover, .feature-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .42); }
.bento-card-featured {
    background:
        radial-gradient(32rem 18rem at 100% 0%, rgba(var(--accent-rgb), .1), transparent 70%),
        var(--surface);
}
.bento-card-accent {
    background:
        radial-gradient(26rem 18rem at 0% 100%, rgba(139, 92, 246, .11), transparent 70%),
        var(--surface);
}
.bento-card-security {
    background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--accent)), var(--surface));
}
.feature-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; margin-bottom: 1rem; }
.bento-tag {
    display: inline-flex; align-items: center;
    padding: .25rem .7rem; border-radius: 99px;
    font-size: .72rem; font-weight: 700;
    background: var(--accent-soft); color: var(--accent);
    white-space: nowrap;
}
.bento-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem; border-radius: .65rem;
    font-size: .76rem; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--bs-secondary-color);
}
.cycle-track {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    padding: .75rem .9rem; border-radius: .9rem;
    background: var(--surface-2); border: 1px solid var(--border);
}
.cycle-step { padding: .22rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.cycle-step.work { background: var(--accent-soft); color: var(--accent); }
.cycle-step.break { background: rgba(22, 163, 74, .14); color: #16a34a; }
.cycle-step.long { background: rgba(139, 92, 246, .14); color: #8b5cf6; }

.pliexo-media-stack { position: relative; padding-bottom: 1.5rem; }
.stack-img-main {
    width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 1.6rem; border: 1px solid var(--border);
    box-shadow: 0 28px 56px -28px rgba(16, 24, 40, .45);
}
.stack-img-secondary {
    position: absolute; right: -1rem; bottom: 0; width: 44%;
    padding: .35rem; border-radius: 1.2rem;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 18px 36px -14px rgba(16, 24, 40, .35);
}
.stack-img-secondary img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .9rem; display: block; }
[data-bs-theme="dark"] .stack-img-main, [data-bs-theme="dark"] .stack-img-secondary img { filter: brightness(.88) saturate(.92); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 1rem; padding: 1rem 0; }
.step + .step { border-top: 1px solid var(--border); }
.step-num {
    counter-increment: step; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 8px 18px -8px rgba(var(--accent-rgb), .8);
}
.step-num::before { content: counter(step); }
.cta-band {
    border-radius: 1.75rem; padding: 3.25rem 1.5rem; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 48%, #7c3aed));
    box-shadow: 0 30px 60px -30px rgba(var(--accent-rgb), .8);
}
.cta-domain-pill {
    display: inline-flex; align-items: center;
    padding: .3rem .85rem; border-radius: 99px;
    font-size: .76rem; font-weight: 700; letter-spacing: .04em;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
}
.cta-band .btn-light { color: var(--accent); font-weight: 600; }
.cta-band .btn-outline-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .6); --bs-btn-hover-bg: rgba(255, 255, 255, .15); --bs-btn-hover-border-color: #fff; }

/* --------------------------------------------------------------------------
   Tableau de bord
   -------------------------------------------------------------------------- */
.wave { display: inline-block; animation: wave 2.4s ease-in-out 1; transform-origin: 70% 70%; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(14deg); } 80% { transform: rotate(-4deg); } }

.stat-card .card-body { padding: 1.1rem 1.25rem; }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.stat-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 12px; font-size: 1.05rem;
    background: var(--accent-soft); color: var(--accent);
}
.stat-icon.streak { background: rgba(249, 115, 22, .14); color: #f97316; }
.stat-icon.goal { background: rgba(14, 165, 233, .14); color: #0ea5e9; }
.stat-icon.goal.done { background: rgba(34, 197, 94, .16); color: #16a34a; }
.stat-icon.hw { background: rgba(139, 92, 246, .14); color: #8b5cf6; }
.stat-card.is-hot { border-color: rgba(249, 115, 22, .35); }

.empty-state { text-align: center; padding: 2rem 1rem; color: var(--bs-secondary-color); }
.empty-state > i { font-size: 2rem; color: var(--accent); opacity: .7; display: block; margin-bottom: .75rem; }

.xp-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 10px; font-size: .85rem;
    background: rgba(34, 197, 94, .14); color: #16a34a;
}
.xp-icon.neg { background: rgba(239, 68, 68, .12); color: #ef4444; }
.xp-icon.muted { background: var(--surface-2); color: var(--bs-secondary-color); }

/* Heatmap */
.heatmap-wrap { font-size: .7rem; color: var(--bs-secondary-color); }
.heatmap-months { display: flex; gap: 3px; margin-bottom: .25rem; }
.heatmap-months span { flex: 1 1 0; min-width: 0; overflow: visible; white-space: nowrap; }
.heatmap { display: flex; gap: 3px; }
.heatmap-week { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell {
    display: block; aspect-ratio: 1; width: 100%; max-width: 22px; margin-inline: auto;
    border-radius: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.heatmap-cell.l1 { background: rgba(var(--accent-rgb), .28); border-color: transparent; }
.heatmap-cell.l2 { background: rgba(var(--accent-rgb), .5); border-color: transparent; }
.heatmap-cell.l3 { background: rgba(var(--accent-rgb), .75); border-color: transparent; }
.heatmap-cell.l4 { background: var(--accent); border-color: transparent; }
.heatmap-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: .5rem; }
.heatmap-legend .heatmap-cell { width: 11px; height: 11px; }
.heatmap-legend span:first-child { margin-right: .25rem; }
.heatmap-legend span:last-child { margin-left: .25rem; }

/* --------------------------------------------------------------------------
   Devoirs
   -------------------------------------------------------------------------- */
.group-title { font-size: .95rem; font-weight: 700; margin-bottom: .6rem; display: flex; align-items: center; }
details > summary.group-title { cursor: pointer; list-style: none; }
details > summary.group-title::before { content: "\f054"; font: var(--fa-font-solid); font-size: .7rem; margin-right: .5rem; transition: transform .15s; }
details[open] > summary.group-title::before { transform: rotate(90deg); }

.chip-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.filter-chip {
    --chip: var(--accent);
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .8rem; border-radius: 99px;
    font-size: .82rem; font-weight: 600; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--bs-body-color); text-decoration: none;
}
.filter-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip); }
.filter-chip .count { font-size: .7rem; background: var(--surface-2); border-radius: 99px; padding: 0 .4rem; color: var(--bs-secondary-color); }
.filter-chip.active { background: var(--bs-body-color); color: var(--surface); border-color: transparent; }
.filter-chip.active .count { background: rgba(255, 255, 255, .2); color: inherit; }

.hw-list { display: flex; flex-direction: column; }
.hw-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .7rem .6rem;
    border-radius: .8rem;
    transition: background .12s;
}
.hw-item + .hw-item { border-top: 1px solid var(--border); }
.hw-item:hover { background: var(--surface-2); }
.hw-item.is-done .hw-title { text-decoration: line-through; color: var(--bs-secondary-color); }
.hw-check { flex-shrink: 0; padding-top: .1rem; }
.check-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid #c3c9d6;
    background: transparent;
    color: transparent;
    display: grid; place-items: center;
    font-size: .7rem;
    transition: all .15s;
}
.check-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.check-btn.checked { background: #22c55e; border-color: #22c55e; color: #fff; }
.check-btn.checked:hover { background: #f59e0b; border-color: #f59e0b; }
.hw-body { flex: 1 1 auto; min-width: 0; }
.hw-title { font-weight: 600; }
.hw-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .2rem; font-size: .8rem; color: var(--bs-secondary-color); }
.hw-meta .xp-hint { color: #d97706; font-weight: 600; }
.hw-notes { font-size: .85rem; color: var(--bs-secondary-color); margin-top: .35rem; white-space: pre-line; }
.hw-img-btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .25rem .65rem .25rem .25rem;
    border-radius: .65rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--bs-body-color);
    font-size: .78rem; font-weight: 500;
    max-width: 100%;
    transition: border-color .15s, background .15s;
}
.hw-img-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.hw-img-btn img { width: 36px; height: 36px; object-fit: cover; border-radius: .45rem; flex-shrink: 0; }
.hw-img-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.group-file-icon {
    width: 44px; height: 44px; border-radius: .75rem;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    font-size: 1.2rem;
}
.group-file-thumb {
    width: 44px; height: 44px; padding: 0; border-radius: .75rem;
    border: 1px solid var(--border); background: var(--surface-2);
    overflow: hidden; flex-shrink: 0;
}
.group-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-actions { display: flex; align-items: center; gap: .1rem; flex-shrink: 0; }
.subject-chip {
    --chip: var(--accent);
    display: inline-flex; align-items: center;
    padding: .1rem .55rem; border-radius: 99px;
    font-size: .72rem; font-weight: 700;
    color: var(--chip);
    background: color-mix(in srgb, var(--chip) 14%, transparent);
}
.btn-icon {
    --bs-btn-padding-x: .5rem; --bs-btn-padding-y: .35rem;
    --bs-btn-color: var(--bs-secondary-color);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: var(--surface-2);
    --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent;
    border-radius: .55rem;
}
.color-palette { display: flex; gap: .45rem; flex-wrap: wrap; }
.color-swatch {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--chip); cursor: pointer;
    border: 3px solid transparent;
    box-shadow: 0 0 0 1px var(--border);
    transition: transform .1s;
}
.btn-check:checked + .color-swatch { border-color: var(--surface); box-shadow: 0 0 0 2px var(--chip); transform: scale(1.1); }

/* --------------------------------------------------------------------------
   Concentration
   -------------------------------------------------------------------------- */
.focus-card { border-radius: 1.5rem; }
.focus-phase .badge { font-size: .8rem; padding: .45rem .9rem; font-weight: 600; }
.focus-phase[data-phase="work"] .badge { background: var(--accent-soft) !important; color: var(--accent) !important; border-color: transparent; }
.focus-phase[data-phase="work"] .badge i { animation: pulse 1.6s ease-in-out infinite; }
.focus-phase[data-phase="paused"] .badge { background: rgba(245, 158, 11, .16) !important; color: #b45309 !important; }
.focus-phase[data-phase="break"] .badge { background: rgba(34, 197, 94, .16) !important; color: #15803d !important; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.ring-wrap { position: relative; width: min(280px, 70vw); margin-inline: auto; }
.ring { width: 100%; height: auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg {
    fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round;
    transition: stroke-dashoffset .5s linear, stroke .3s;
}
.focus-phase[data-phase="break"] ~ .ring-wrap .ring-fg, .ring-fg.is-break { stroke: #22c55e; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time { font-size: clamp(2.6rem, 10vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.ring-sub { font-size: .85rem; margin-top: .4rem; }
.cycle-dots { display: flex; justify-content: center; gap: .5rem; }
.cycle-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.cycle-dot.done { background: var(--accent); border-color: transparent; }
.cycle-dot.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tips-card { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface) 85%, var(--accent))); }

/* Réglage rapide des durées à côté du chrono */
.duration-steppers { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1rem; }
.stepper {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .4rem .3rem .8rem; border-radius: 99px;
    background: var(--surface-2); border: 1px solid var(--border);
}
.stepper-label { font-size: .78rem; font-weight: 600; color: var(--bs-secondary-color); margin-right: .25rem; white-space: nowrap; }
.stepper-btn {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--bs-body-color); font-size: .75rem;
    display: grid; place-items: center; transition: background .12s, color .12s, transform .1s;
}
.stepper-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper-btn:active:not(:disabled) { transform: scale(.92); }
.stepper-btn:disabled { opacity: .35; cursor: not-allowed; }
.stepper-value { min-width: 3.4rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; letter-spacing: -.02em; }
.stepper-value small { font-size: .7rem; font-weight: 600; color: var(--bs-secondary-color); margin-left: .15rem; }
.duration-steppers.is-locked .stepper { opacity: .6; }
.stepper-status { flex-basis: 100%; min-height: 1.1em; }
.stepper-status.is-saved { color: #16a34a; }
.stepper-status.is-error { color: #ef4444; }

.break-modal .modal-content { border-radius: 1.5rem; }
.break-icon { width: 72px; height: 72px; margin-inline: auto; display: grid; place-items: center; border-radius: 22px; font-size: 2rem; color: #15803d; background: rgba(34, 197, 94, .16); }
.break-time { font-size: 3.5rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.break-reward:empty { display: none; }
.break-reward { color: #d97706; font-weight: 600; }

/* --------------------------------------------------------------------------
   Boutique
   -------------------------------------------------------------------------- */
.balance-card { padding: .6rem 1.1rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.balance-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.inv-chip {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .9rem; border-radius: .9rem;
    background: var(--surface); border: 1px solid var(--border);
    font-size: .85rem; min-width: 0;
}
.inv-chip i { width: 1.2rem; text-align: center; color: var(--accent); }
.inv-chip .swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--chip); flex-shrink: 0; }
.shop-card { border-radius: 1.1rem; transition: transform .15s, box-shadow .15s; }
.shop-card:hover { transform: translateY(-2px); }
.shop-card.is-equipped { border-color: rgba(34, 197, 94, .5); }
.shop-card.is-locked { background: color-mix(in srgb, var(--surface) 70%, var(--page-bg)); box-shadow: none; }
.shop-card.is-locked .theme-preview { filter: grayscale(.55); opacity: .7; }
.shop-subtitle { display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); margin-bottom: .75rem; }
.shop-subtitle .text-none { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.theme-preview {
    --pv-accent: var(--accent); --pv-line: #ffffff;
    position: relative; height: 78px; border-radius: .85rem; overflow: hidden;
    background: #f3f4f8; border: 1px solid #e6e8ef;
}
.theme-preview[data-pv-mode="dark"] { --pv-line: #262c38; background: #0f1217; border-color: #262c38; }
.theme-preview::before {
    content: ""; position: absolute; left: 11px; top: 11px; width: 34px; height: 34px; border-radius: 10px;
    background: var(--pv-accent); box-shadow: 0 8px 14px -6px var(--pv-accent);
}
.theme-preview::after {
    content: ""; position: absolute; left: 56px; right: 12px; top: 14px; height: 8px; border-radius: 99px;
    background: var(--pv-line);
    box-shadow: 0 14px 0 0 var(--pv-line), 0 28px 0 0 var(--pv-accent);
}
.pv-special-tag {
    position: absolute; left: .55rem; bottom: .45rem; z-index: 2;
    font-size: .62rem; font-weight: 700; letter-spacing: .03em;
    padding: .12rem .48rem; border-radius: 99px;
    background: rgba(15, 18, 25, .72); color: #fff;
    backdrop-filter: blur(4px);
}
.shop-card.is-special-theme { border-color: rgba(var(--accent-rgb), .24); }
.theme-preview[data-pv-theme="christmas"] {
    background:
        repeating-linear-gradient(90deg, #dc2626 0 10px, #f59e0b 10px 15px, #15803d 15px 25px, #f59e0b 25px 30px) top / 100% 4px no-repeat,
        radial-gradient(circle at 82% 28%, rgba(245, 158, 11, .35) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 62%, rgba(255, 255, 255, .85) 0 2px, transparent 3px),
        radial-gradient(circle at 90% 68%, rgba(255, 255, 255, .75) 0 1.8px, transparent 2.8px),
        linear-gradient(135deg, #13251d, #1f1416);
    border-color: #2b4a3b; --pv-line: rgba(255, 255, 255, .2);
}
.theme-preview[data-pv-theme="christmas"]::before { background: linear-gradient(135deg, #dc2626, #15803d); }
.theme-preview[data-pv-theme="starlight"] {
    background:
        radial-gradient(circle at 84% 26%, #fde047 0 2.2px, transparent 3.2px),
        radial-gradient(circle at 68% 22%, #fff 0 1.4px, transparent 2.4px),
        radial-gradient(circle at 92% 62%, #fbbf24 0 1.8px, transparent 2.8px),
        radial-gradient(circle at 75% 70%, #a5b4fc 0 1.5px, transparent 2.5px),
        linear-gradient(135deg, #090d24, #1e1b4b);
    border-color: #2e3668; --pv-line: rgba(255, 255, 255, .18);
}
.theme-preview[data-pv-theme="starlight"]::before { background: linear-gradient(135deg, #f59e0b, #6366f1); }
.theme-preview[data-pv-theme="cosmos"] {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cellipse cx='56' cy='28' rx='20' ry='6' transform='rotate(-22 56 28)' fill='none' stroke='%23c084fc' stroke-width='2.5'/%3E%3Ccircle cx='56' cy='28' r='9' fill='%2338bdf8'/%3E%3C/svg%3E") right 4px top 2px / 64px 64px no-repeat,
        radial-gradient(5rem 4rem at 85% 25%, rgba(124, 92, 255, .45), transparent 70%),
        linear-gradient(135deg, #090b1a, #1c1638);
    border-color: #322c63; --pv-line: rgba(255, 255, 255, .18);
}
.theme-preview[data-pv-theme="cosmos"]::before { background: linear-gradient(135deg, #38bdf8, #7c5cff, #ec4899); }
.theme-preview[data-pv-theme="aurora"] {
    background:
        radial-gradient(7rem 3rem at 30% 0%, rgba(16, 185, 129, .55), transparent 70%),
        radial-gradient(7rem 3rem at 85% 10%, rgba(139, 92, 246, .5), transparent 70%),
        linear-gradient(135deg, #06151c, #0f2933);
    border-color: #1f4e5c; --pv-line: rgba(255, 255, 255, .18);
}
.theme-preview[data-pv-theme="aurora"]::before { background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6); }
.lock-badge {
    position: absolute; top: .7rem; right: .7rem;
    font-size: .68rem; font-weight: 700; padding: .2rem .5rem; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--border); color: var(--bs-secondary-color);
    box-shadow: var(--shadow);
}
.lock-badge.is-open { color: #16a34a; border-color: rgba(34, 197, 94, .4); }
.shop-icon {
    --chip: var(--accent);
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 14px; font-size: 1.25rem;
    color: var(--chip);
    background: color-mix(in srgb, var(--chip) 14%, transparent);
}

/* --------------------------------------------------------------------------
   Profil
   -------------------------------------------------------------------------- */
.profile-card { border-radius: 1.25rem; }
.mini-stat {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem .9rem; border-radius: .9rem;
    background: var(--surface); border: 1px solid var(--border);
    height: 100%;
}
.mini-stat i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.xp-table td { border-color: var(--border); padding-top: .5rem; padding-bottom: .5rem; }

/* --------------------------------------------------------------------------
   Modales Cadence (confirmation, formulaires) : habillage selon le thème
   -------------------------------------------------------------------------- */
.cadence-modal .modal-content { overflow: hidden; border-radius: 1.4rem; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); }
.cadence-modal .cm-band {
    height: 6px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #8b5cf6), var(--accent));
    background-size: 200% 100%;
    animation: band 6s linear infinite;
}
@keyframes band { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
.cadence-modal .cm-icon {
    width: 60px; height: 60px; margin: 0 auto 1rem;
    display: grid; place-items: center;
    border-radius: 20px; font-size: 1.5rem;
    background: var(--accent-soft); color: var(--accent);
    box-shadow: 0 10px 24px -12px rgba(var(--accent-rgb), .9);
}
.cadence-modal .modal-content[data-variant="danger"] .cm-band { background: linear-gradient(90deg, #ef4444, #f97316, #ef4444); background-size: 200% 100%; }
.cadence-modal .modal-content[data-variant="danger"] .cm-icon { background: rgba(239, 68, 68, .14); color: #ef4444; box-shadow: 0 10px 24px -12px rgba(239, 68, 68, .9); }
.cadence-modal .modal-content[data-variant="warning"] .cm-band { background: linear-gradient(90deg, #f59e0b, #f97316, #f59e0b); background-size: 200% 100%; }
.cadence-modal .modal-content[data-variant="warning"] .cm-icon { background: rgba(245, 158, 11, .16); color: #d97706; box-shadow: 0 10px 24px -12px rgba(245, 158, 11, .9); }
.cadence-modal .btn-warning { --bs-btn-color: #fff; --bs-btn-bg: #d97706; --bs-btn-border-color: #d97706; --bs-btn-hover-bg: #b45309; --bs-btn-hover-border-color: #b45309; --bs-btn-hover-color: #fff; }
.modal-backdrop { --bs-backdrop-bg: color-mix(in srgb, var(--accent) 35%, #0b0e14); --bs-backdrop-opacity: .55; }
.modal .btn-close { filter: var(--bs-btn-close-white-filter, none); }
[data-bs-theme="dark"] .modal .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* --------------------------------------------------------------------------
   Sécurité : jauge de mot de passe, pot de miel, 2FA, sessions
   -------------------------------------------------------------------------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.strength-bars { display: flex; gap: 4px; margin-bottom: .3rem; }
.strength-bars span { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); transition: background .2s; }
.strength[data-score="1"] .strength-bars span.on { background: #ef4444; border-color: transparent; }
.strength[data-score="2"] .strength-bars span.on { background: #f59e0b; border-color: transparent; }
.strength[data-score="3"] .strength-bars span.on { background: #22c55e; border-color: transparent; }
.strength[data-score="4"] .strength-bars span.on { background: var(--accent); border-color: transparent; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .25em; font-weight: 700; }
.qr-box { width: 196px; height: 196px; padding: 8px; background: #fff; border-radius: 1rem; border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; }
.qr-box img, .qr-box canvas { display: block; }
.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; max-width: 24rem; margin-inline: auto; }
.code-grid .code-badge { display: block; text-align: center; padding: .5rem; }
.session-row .stat-icon { width: 36px; height: 36px; font-size: .95rem; }
@media print { .app-nav, .bottom-nav, .btn, .public-nav, .public-footer { display: none !important; } }

/* --------------------------------------------------------------------------
   Classes
   -------------------------------------------------------------------------- */
.class-card { border-radius: 1.25rem; }
.code-badge { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .12em; padding: .15rem .55rem; border-radius: .5rem; background: var(--accent-soft); color: var(--accent); font-size: .85rem; }
.member-row { padding: .6rem 1rem; }
.member-row.is-voted { background: var(--accent-soft); }
.vote-bar { height: 5px; border-radius: 99px; background: var(--surface-2); margin-top: .3rem; overflow: hidden; }
.vote-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s; }
.class-hw .subject-chip { --chip: var(--accent); }
.hw-item.is-flagged { opacity: .55; }
.hw-item.is-flagged .hw-title { text-decoration: line-through; text-decoration-color: #f59e0b; text-decoration-thickness: 2px; }
.hw-item.is-flagged:hover, .hw-item.is-removed:hover { opacity: .9; }
.hw-item.is-removed { opacity: .4; filter: grayscale(.8); }
.hw-item.is-removed .hw-title { text-decoration: line-through; }
.report-badge { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 700; background: rgba(245, 158, 11, .16); color: #b45309; }
.report-badge.is-removed { background: var(--surface-2); color: var(--bs-secondary-color); }
.hw-actions .btn-sm { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Tableau modifiable des objectifs de révision (page Focus)
   -------------------------------------------------------------------------- */
.revision-table th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
    font-weight: 700;
    border-color: var(--border);
    padding: .55rem .65rem;
    background: var(--surface-2);
}
.revision-table td {
    border-color: var(--border);
    padding: .45rem .65rem;
    background: transparent;
}
.rev-row {
    transition: background-color .15s;
}
.rev-row:hover td {
    background: rgba(var(--accent-rgb), .04);
}
.rev-row.is-targeted td {
    background: var(--accent-soft);
}
.rev-row.is-targeted td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}
.rev-row.is-done .rev-cell-input {
    text-decoration: line-through;
    color: var(--bs-secondary-color);
    opacity: .72;
}
.rev-circle-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bs-secondary-color);
    background: transparent;
    color: transparent;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-size: .72rem;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background-color .15s, color .15s;
}
.rev-circle-check:hover {
    border-color: #22c55e;
    color: rgba(34, 197, 94, .55);
    transform: scale(1.08);
}
.rev-circle-check.is-checked {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}
.rev-circle-check.is-checked:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.rev-circle-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px dashed var(--bs-secondary-color);
    color: var(--bs-secondary-color);
    display: inline-grid;
    place-items: center;
    font-size: .68rem;
    opacity: .65;
}
.rev-cell-input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: .45rem;
    background: transparent;
    color: var(--bs-body-color);
    font-size: .88rem;
    font-weight: 500;
    padding: .28rem .5rem;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.rev-cell-input:hover {
    border-color: var(--border);
    background: var(--surface-2);
}
.rev-cell-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.rev-cell-select {
    width: 100%;
    border: 1px solid transparent;
    border-radius: .45rem;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: .78rem;
    padding: .24rem .4rem;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.rev-cell-select:hover, .rev-cell-select:focus {
    outline: none;
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--bs-body-color);
}
.rev-new-row td {
    background: rgba(var(--accent-rgb), .03);
    border-top: 1.5px dashed var(--border);
}

/* --------------------------------------------------------------------------
   Messagerie (chat des classes et des groupes)
   -------------------------------------------------------------------------- */
.chat-messages {
    max-height: 360px;
    min-height: 180px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    scroll-behavior: smooth;
}
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    max-width: 85%;
}
.chat-msg.is-me {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-avatar {
    width: 30px;
    height: 30px;
    font-size: .78rem;
    flex-shrink: 0;
}
.chat-bubble {
    padding: .5rem .8rem;
    border-radius: 1rem 1rem 1rem .3rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    min-width: 0;
}
.chat-msg.is-me .chat-bubble {
    border-radius: 1rem 1rem .3rem 1rem;
    background: var(--accent-soft);
    border-color: rgba(var(--accent-rgb), .28);
}
.chat-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .72rem;
    margin-bottom: .15rem;
}
.chat-author {
    font-weight: 700;
    color: var(--bs-body-color);
}
.chat-msg.is-me .chat-author {
    color: var(--accent);
}
.chat-role-badge {
    padding: .05rem .4rem;
    border-radius: 99px;
    font-size: .65rem;
    font-weight: 700;
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}
.chat-time {
    color: var(--bs-secondary-color);
}
.chat-del-btn {
    border: 0;
    background: transparent;
    padding: 0 .2rem;
    color: var(--bs-secondary-color);
    font-size: .72rem;
    line-height: 1;
    opacity: .6;
    transition: opacity .15s, color .15s;
}
.chat-del-btn:hover {
    opacity: 1;
    color: #ef4444;
}
.chat-text {
    font-size: .88rem;
    line-height: 1.4;
    word-break: break-word;
}
.chat-input {
    resize: none;
    max-height: 110px;
}
.chat-send-btn {
    min-width: 42px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Administration
   -------------------------------------------------------------------------- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: .9rem; background: var(--surface-2); border: 1px solid var(--border); }
.admin-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: .7rem; font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color); text-decoration: none; }
.admin-tab:hover { color: var(--bs-body-color); }
.admin-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.admin-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 700; border-color: var(--border); white-space: nowrap; }
.admin-table td { border-color: var(--border); vertical-align: middle; }
.admin-table > :not(caption) > * > * { background: transparent; }
.admin-scroll { max-height: 24rem; overflow: auto; }
.admin-dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .85rem; }
.admin-dl dt { color: var(--bs-secondary-color); font-weight: 600; }
.admin-dl dd { margin: 0; }
.log-level { display: inline-block; min-width: 4.6rem; text-align: center; padding: .1rem .4rem; border-radius: 99px; font-size: .68rem; font-weight: 700; text-transform: uppercase; background: var(--surface-2); color: var(--bs-secondary-color); }
.log-level.log-warning { background: rgba(245, 158, 11, .16); color: #b45309; }
.log-level.log-error { background: rgba(239, 68, 68, .14); color: #dc2626; }
.log-level.log-info { background: rgba(14, 165, 233, .14); color: #0284c7; }
.log-table td { padding-top: .3rem; padding-bottom: .3rem; }
.stat-link { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.stat-link:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .5); color: inherit; }
.stat-arrow { color: var(--accent); opacity: 0; transition: opacity .15s, transform .15s; }
.stat-link:hover .stat-arrow { opacity: 1; transform: translateX(2px); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: .25rem; }
.bar { flex: 1 1 0; min-width: 0; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .8; transition: opacity .15s; }
.bar.empty { background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; }
.bar.today { opacity: 1; box-shadow: 0 0 0 2px var(--accent-soft); }
.bar:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toast { --bs-toast-bg: var(--surface); --bs-toast-border-color: var(--border); border-radius: .9rem; box-shadow: var(--shadow); }
.toast .toast-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: .95rem; flex-shrink: 0; }
.toast-success .toast-icon { background: rgba(34, 197, 94, .16); color: #16a34a; }
.toast-danger .toast-icon { background: rgba(239, 68, 68, .14); color: #ef4444; }
.toast-warning .toast-icon { background: rgba(245, 158, 11, .16); color: #d97706; }
.toast-info .toast-icon { background: rgba(14, 165, 233, .16); color: #0284c7; }
.toast-xp .toast-icon { background: rgba(245, 158, 11, .18); color: #d97706; }
.toast-level .toast-icon { background: rgba(139, 92, 246, .18); color: #7c3aed; }
.toast-streak .toast-icon { background: rgba(249, 115, 22, .18); color: #ea580c; }
.toast-unlock .toast-icon { background: var(--accent-soft); color: var(--accent); }
.toast-level { border-color: rgba(139, 92, 246, .5); }
.toast-unlock { border-color: rgba(var(--accent-rgb), .5); }

@media (max-width: 575.98px) {
    .stat-value { font-size: 1.3rem; }
    .hw-item { padding: .6rem .3rem; }
    .hw-actions .dropdown { margin-right: -.25rem; }
}
