/* ==========================================================
   rageux.fr — design system (v6 « peau neuve »)
   Planche de BD de nuit : encre violette, autocollants à contour
   épais et ombre décalée, rouge colère + jaune « BAM ».
   Les variables --ink, --ink-soft, --ink-card, --rage, --rage-dim,
   --ember et --muted restent celles qu'écrasent les thèmes de la
   boutique : ne pas les renommer.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --ink: #18122b;
    --ink-soft: #211a3a;
    --ink-card: #2a2149;
    --rage: #ff4040;
    --rage-dim: #c42a35;
    --ember: #ffd23f;
    --paper: #fbf5ff;
    --muted: #b0a6cc;
    --pop: #ff7ac6;
    --shade: #07040f;
    --line: rgba(251, 245, 255, 0.12);
    --line-strong: rgba(251, 245, 255, 0.24);
    --radius: 12px;
    --stroke: 2px solid var(--shade);
    --lift: 5px 5px 0 var(--shade);
    --lift-sm: 3px 3px 0 var(--shade);
    --font-display: 'Bungee', 'Arial Black', sans-serif;
    --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(255, 64, 64, 0.10), transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(255, 210, 63, 0.08), transparent 45%),
        var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; }

::selection { background: var(--rage); color: var(--ink); }

/* ---------- Navigation ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.brand {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--paper);
}

.brand-dot { color: var(--rage); }

.topbar-links {
    display: flex;
    gap: 22px;
    font-size: 14px;
    font-weight: 600;
}

.topbar-links a {
    text-decoration: none;
    color: var(--muted);
    transition: color 0.15s;
}

.topbar-links a:hover { color: var(--paper); }

.topbar-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--paper);
    font-weight: 600;
}

.topbar-user-link { text-decoration: none; }

.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line-strong);
    transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

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

.btn-ghost { color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); }

.btn-solid { color: var(--ink); background: var(--rage); border-color: var(--rage); }
.btn-solid:hover { background: #ff5c5c; }

/* ---------- Marquee d'alerte (nostalgie assumée, mais discrète) ---------- */
.alert-strip {
    background: var(--ember);
    color: var(--ink);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 7px 10px;
    overflow: hidden;
    white-space: nowrap;
}

.alert-strip span {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 22s linear infinite;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* ---------- Layout générique ---------- */
.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.page-head { text-align: center; margin-bottom: 36px; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rage);
    margin: 0 0 10px;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.page-sub {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

/* ---------- Hero du générateur ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    padding: 44px 0 20px;
}

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.95;
    margin: 0 0 16px;
}

.hero-title .accent { color: var(--rage); }

.hero-copy {
    color: var(--muted);
    font-size: 16px;
    max-width: 46ch;
    margin: 0 0 28px;
}

.rage-button {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0.03em;
    background: var(--rage);
    color: var(--ink);
    border: none;
    border-radius: 999px;
    padding: 18px 34px;
    cursor: pointer;
    box-shadow: 0 12px 28px -10px rgba(255, 64, 64, 0.55);
    transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}

.rage-button:hover {
    transform: translateY(-2px);
    background: #ff5c5c;
    box-shadow: 0 16px 32px -10px rgba(255, 64, 64, 0.65);
}

.rage-button:active { transform: translateY(0); }

.rage-button:disabled { opacity: 0.6; cursor: progress; }

.rage-button.is-shaking { animation: shake 0.32s; }

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 1px); }
    40% { transform: translate(3px, -1px); }
    60% { transform: translate(-2px, 1px); }
    80% { transform: translate(2px, -1px); }
}

.result-card {
    position: relative;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--ink-soft);
    padding: 22px 24px;
    min-height: 34px;
    font-size: 17px;
    font-weight: 600;
    /* Dissuasion anti-capture (ne bloque pas techniquement une capture d'écran,
       gêne juste la copie de texte / le drag d'image, voir script.js) */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.result-card .placeholder {
    color: var(--muted);
    font-weight: 400;
    font-style: italic;
}

.result-card .rage-text { animation: pop 0.25s ease; display: block; }

.rage-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* Filigrane de traçabilité (pseudo + horaire) sur chaque rage générée.
   Objectif : dissuader/tracer un partage de capture d'écran, pas le bloquer
   (techniquement impossible côté web). */
.rage-watermark {
    display: block;
    margin-top: 12px;
    font-size: 11px;
    font-weight: 400;
    font-family: monospace;
    color: var(--muted);
    opacity: 0.6;
    user-select: none;
}

/* Flou temporaire déclenché sur la touche Impr. écran (voir script.js).
   Contournable par tout outil de capture dédié — friction seulement. */
.rage-blur-protect {
    filter: blur(14px);
    transition: filter 0.1s ease;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Jauge de rage (élément signature) ---------- */
.gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.gauge {
    --level: 0;
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: conic-gradient(
        var(--rage) calc(var(--level) * 1%),
        var(--line) 0
    );
    transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: grid;
    place-items: center;
}

.gauge::before {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: var(--ink-soft);
    border: 1px solid var(--line);
}

.gauge-readout {
    position: relative;
    text-align: center;
    font-family: var(--font-mono);
}

.gauge-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--paper);
    display: block;
}

.gauge-caption {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.visitor-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.visitor-counter strong { color: var(--ember); }

.counter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-top: 18px;
}

.counter-link {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--rage);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.counter-link:hover { text-decoration: underline; }

/* ---------- Auth forms ---------- */
.auth-box {
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid var(--line);
    background: var(--ink-soft);
    border-radius: var(--radius);
    padding: 32px;
}

.auth-form { display: flex; flex-direction: column; gap: 6px; }

.auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 14px;
}

.auth-form input {
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 15px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--rage);
}

.auth-submit {
    margin-top: 24px;
    width: 100%;
}

.auth-foot {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}

.auth-foot a { color: var(--rage); text-decoration: none; font-weight: 600; }

.notice {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 0 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.notice-erreur { background: rgba(255, 64, 64, 0.12); border: 1px solid var(--rage); color: #ffb3a2; }
.notice-ok { background: rgba(255, 210, 63, 0.12); border: 1px solid var(--ember); color: #ffe08a; }

.notice-banner {
    max-width: 960px;
    margin: 20px auto 0;
}

/* ---------- Historique ---------- */
.rage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--ink-soft);
    /* Dissuasion légère : chaque ligne affiche déjà pseudo + horaire (traçabilité native) */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.rage-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.rage-list li:last-child { border-bottom: none; }

.rage-list-text { font-size: 15px; }

.rage-list-auteur { color: var(--ember); font-size: 12px; font-weight: 600; margin-left: 6px; }

.rage-list-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.pagination-info {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

/* ---------- Classement ---------- */
.leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    flex-wrap: wrap;
}

.leaderboard-podium {
    border-color: rgba(255, 210, 63, 0.4);
    background: linear-gradient(90deg, rgba(255, 210, 63, 0.08), transparent 60%);
}

.leaderboard-rank {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--muted);
    width: 44px;
    flex-shrink: 0;
}

.leaderboard-podium .leaderboard-rank { color: var(--ember); }

.leaderboard-pseudo {
    font-weight: 700;
    flex: 1;
    min-width: 120px;
}

.leaderboard-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------- Badges ---------- */
.badge-role {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-role-membre { background: var(--line); color: var(--muted); }
.badge-role-moderateur { background: rgba(255, 210, 63, 0.18); color: var(--ember); }
.badge-role-admin { background: rgba(255, 64, 64, 0.18); color: var(--rage); }

.badge-grade {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid var(--line-strong);
}

.grade-0 { color: var(--muted); }
.grade-1 { color: #c9d6ff; border-color: rgba(201, 214, 255, 0.4); }
.grade-2 { color: #8fd694; border-color: rgba(143, 214, 148, 0.4); }
.grade-3 { color: var(--ember); border-color: rgba(255, 210, 63, 0.4); }
.grade-4 { color: var(--rage); border-color: rgba(255, 64, 64, 0.4); }
.grade-5 { color: #fff; background: linear-gradient(90deg, var(--rage), var(--ember)); border: none; }

/* ---------- Admin ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

@media (max-width: 640px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
    border: 1px solid var(--line);
    background: var(--ink-soft);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--rage);
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.panel {
    border: 1px solid var(--line);
    background: var(--ink-soft);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 28px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 20px;
    margin: 0 0 18px;
    letter-spacing: 0.02em;
}

.panel-danger { border-color: rgba(255, 64, 64, 0.4); }
.panel-danger .panel-title { color: var(--rage); }

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row .add-input { flex: 1; min-width: 180px; }

.link-button {
    display: inline-block;
    text-decoration: none;
}

.profile-role-line {
    margin: 0 0 16px;
    font-size: 14px;
}

.table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-strong);
}

.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table-muted { color: var(--muted); font-size: 13px; }

.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

.mini-select {
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
}

.mini-btn {
    background: var(--line);
    color: var(--paper);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.mini-btn:hover { background: var(--line-strong); }

.mini-btn-danger { background: rgba(255, 64, 64, 0.16); color: #ffb3a2; }
.mini-btn-danger:hover { background: rgba(255, 64, 64, 0.28); }

.mini-btn-danger-solid { background: var(--rage); color: var(--ink); }
.mini-btn-danger-solid:hover { background: #ff5c5c; }

.mod-list { list-style: none; margin: 0; padding: 0; }

.mod-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.mod-list li:last-child { border-bottom: none; }

.mod-text { font-size: 14px; }
.mod-text em { color: var(--ember); font-style: normal; font-size: 12px; }

/* ---------- Sous-navigation admin ---------- */
.admin-subnav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
}

.admin-tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.admin-tab:hover { color: var(--paper); }

.admin-tab-active {
    color: var(--rage);
    border-bottom-color: var(--rage);
}

/* ---------- Chips de catégories (admin_mots.php) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}

.chip:hover { color: var(--paper); border-color: var(--paper); }

.chip-active {
    background: var(--rage);
    color: var(--ink);
    border-color: var(--rage);
    font-weight: 600;
}

.chip-count {
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0.75;
}

/* ---------- Formulaires d'ajout inline ---------- */
.inline-add-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.add-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 14px;
}

.add-input-small { flex: 0 0 220px; min-width: 160px; }

.add-input:focus { outline: none; border-color: var(--rage); }

.edit-input {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 13px;
    width: 100%;
    max-width: 420px;
}

.edit-input:focus { outline: none; border-color: var(--rage); background: var(--ink); }

.hint {
    font-size: 12px;
    color: var(--muted);
    margin: 14px 0 0;
}

.hint code {
    font-family: var(--font-mono);
    background: var(--line);
    padding: 1px 5px;
    border-radius: 4px;
}

.panel-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
}

.mini-btn-primary { background: var(--rage); color: var(--ink); }
.mini-btn-primary:hover { background: #ff5c5c; }

/* ---------- Liste de templates ---------- */
.template-list { list-style: none; margin: 0; padding: 0; }

.template-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.template-row:last-child { border-bottom: none; }

.template-main { display: flex; flex-direction: column; gap: 4px; min-width: 260px; flex: 1; }

.template-pattern {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ember);
    word-break: break-word;
}

.template-preview {
    font-size: 13px;
    color: var(--muted);
}

.template-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Recherche et en-tête de panel avec actions ---------- */
.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.panel-title-row .panel-title { margin: 0; }

.search-form { display: flex; gap: 8px; align-items: center; }

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--ink);
    color: var(--paper);
    font-size: 13px;
    min-width: 200px;
}

.search-input:focus { outline: none; border-color: var(--rage); }

/* ---------- Statut banni ---------- */
.badge-banni {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 64, 64, 0.22);
    color: #ffb3a2;
}

/* ---------- Menu d'actions déroulant (table utilisateurs) ---------- */
.actions-menu { position: relative; }

.actions-menu summary {
    list-style: none;
    cursor: pointer;
}

.actions-menu summary::-webkit-details-marker { display: none; }

.actions-menu-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--ink-card);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 14px;
    margin-top: 8px;
    min-width: 280px;
}

.actions-menu-row { flex-wrap: wrap; }

/* ---------- Formulaire de paramètres ---------- */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 560px;
}

.settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.settings-toggle input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--rage);
    flex-shrink: 0;
}

.settings-toggle strong { font-size: 14px; }

.settings-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.page-sub-center { text-align: center; }

.inline-accent { color: var(--rage); text-decoration: none; }
.inline-accent:hover { text-decoration: underline; }

.hint-spaced { margin-bottom: 20px; }

.purge-form { margin-bottom: 25px; }

.add-input-auto { width: auto; }

.panel-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 20px 0;
}

.danger-label {
    color: var(--rage);
    display: block;
    margin-bottom: 5px;
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 40px 24px;
    border-top: 1px solid var(--line);
    margin-top: 40px;
}

.site-footer a { color: var(--rage); text-decoration: none; }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Modale d'avertissement de contenu ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 5, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-overlay.is-open { display: flex; }

.modal-content {
    background: var(--ink-card);
    color: var(--paper);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--line-strong);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}

.modal-content h3 {
    margin: 0 0 6px;
    color: var(--rage);
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.02em;
}

.modal-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    margin: 14px 0;
}

.btn-confirm {
    background: var(--rage);
    color: var(--ink);
    border: none;
    padding: 13px 26px;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.02em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
    margin-top: 8px;
}

.btn-confirm:hover { background: #ff5c5c; transform: translateY(-1px); }

/* ---------- Pages légales (CGU, mentions...) ---------- */
.legal-container {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.7;
    color: var(--muted);
}

.legal-container h2 {
    color: var(--paper);
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.01em;
    margin-top: 32px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.legal-container h2:first-child { margin-top: 0; }

.legal-container p { margin: 12px 0; }
.legal-container a { color: var(--rage); }
.legal-container strong { color: var(--paper); }

.legal-back {
    display: inline-block;
    margin-top: 30px;
    color: var(--rage);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* ---------- Journal d'audit ---------- */
.audit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 16px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    flex-wrap: wrap;
}

.audit-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.audit-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 9px;
    border-radius: 4px;
    white-space: nowrap;
    background: var(--line-strong);
    color: var(--paper);
}

.audit-tag-danger { background: rgba(255, 64, 64, 0.22); color: #ffb3a2; }
.audit-tag-warning { background: rgba(255, 210, 63, 0.22); color: var(--ember); }
.audit-tag-success { background: rgba(143, 214, 148, 0.2); color: #8fd694; }
.audit-tag-info { background: var(--line-strong); color: var(--muted); }

.audit-details { color: var(--muted); font-size: 13px; }

.audit-author {
    color: var(--ember);
    font-size: 12px;
    font-style: normal;
}

.audit-date {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .audit-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .audit-date { align-self: flex-end; }
}

/* --- Sélecteur de langue --- */
.lang-switch { display: inline-flex; gap: 2px; align-items: center; margin-right: 8px; }
.lang-link {
    font-size: 16px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.lang-link:hover { opacity: 1; background: var(--ink-soft); }
.lang-link-active { opacity: 1; background: var(--ink-soft); }



/* ==========================================================
   v3 — refonte visuelle, rage du jour encadrée, composants admin
   ========================================================== */

html { scroll-behavior: smooth; color-scheme: dark; }

/* Barre de défilement discrète aux couleurs du site */
* { scrollbar-width: thin; scrollbar-color: var(--rage-dim) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rage-dim); border-radius: 10px; border: 2px solid var(--ink); }
::-webkit-scrollbar-track { background: transparent; }

/* Focus clavier visible partout (accessibilité) */
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }

/* Barre du haut collée, avec flou */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(24, 18, 43, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Titre d'accueil : l'accent devient un dégradé braise */
.hero-title .accent {
    background: linear-gradient(100deg, var(--ember), var(--rage) 55%, #ff7a59);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Bouton principal : dégradé + halo */
.rage-button {
    background: linear-gradient(135deg, #ff6a4a, var(--rage) 55%, #e63e20);
    box-shadow: 0 14px 32px -12px rgba(255, 64, 64, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.rage-button:hover { box-shadow: 0 18px 40px -10px rgba(255, 64, 64, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

/* Carte de résultat : filet d'accent à gauche, fond légèrement dégradé */
.result-card {
    background: linear-gradient(135deg, var(--ink-card), var(--ink-soft));
    border-left: 4px solid var(--rage);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.result-card .rage-text { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45; }

/* Boutons secondaires : relief au survol */
.mini-btn { transition: background 0.15s, transform 0.12s, color 0.15s; }
.mini-btn:hover { transform: translateY(-1px); }
.mini-btn-primary { background: var(--rage); color: var(--ink); }
.mini-btn-primary:hover { background: #ff5c5c; }

/* Notifications : entrée douce */
.notice { animation: notice-in 0.25s ease; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Rage du jour : cadre ---------- */
.daily-frame {
    position: relative;
    margin-top: 28px;
    padding: 2px;                      /* épaisseur du cadre dégradé */
    border-radius: 20px;
    background: linear-gradient(120deg, var(--ember), var(--rage) 35%, var(--rage-dim) 65%, var(--ember));
    background-size: 220% 220%;
    animation: daily-shimmer 9s ease-in-out infinite;
    box-shadow: 0 20px 50px -24px rgba(255, 64, 64, 0.7), 0 0 0 1px rgba(255, 210, 63, 0.12);
}
@keyframes daily-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.daily-inner {
    position: relative;
    border-radius: 18px;
    padding: 20px 22px 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 210, 63, 0.12), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(255, 64, 64, 0.10), transparent 55%),
        var(--ink-card);
}
/* Liseré intérieur en pointillés façon ticket */
.daily-inner::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px dashed rgba(255, 210, 63, 0.26);
    border-radius: 13px;
    pointer-events: none;
}
.daily-inner > * { position: relative; }

.daily-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.daily-badge {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--ink);
    background: linear-gradient(135deg, var(--ember), #ffd35a);
    padding: 5px 14px 4px;
    border-radius: 999px;
    box-shadow: 0 6px 16px -8px rgba(255, 210, 63, 0.9);
}
.daily-date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

.daily-quote { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0 16px; }
.daily-mark { font-size: 30px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(255, 64, 64, 0.5)); }
.daily-quote p { margin: 0; font-size: clamp(17px, 2.3vw, 21px); font-weight: 600; line-height: 1.45; }

.daily-meter { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.daily-meter-track { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.daily-meter-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ember), var(--rage)); }
.daily-meter-value { color: var(--paper); font-weight: 700; min-width: 38px; text-align: right; }

.daily-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.daily-sub { margin: 0; font-size: 12px; color: var(--muted); }
.daily-countdown { display: inline-block; margin-left: 6px; }
.daily-countdown strong { color: var(--ember); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.daily-actions { display: flex; gap: 8px; }

/* ---------- Tableaux & grilles admin ---------- */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-card { transition: transform 0.15s, border-color 0.15s; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
a.stat-card-link { text-decoration: none; color: inherit; }
a.stat-card-link:hover { border-color: var(--rage); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table tbody tr:nth-child(even) { background: rgba(245, 236, 224, 0.025); }
.admin-table tbody tr:hover { background: rgba(255, 64, 64, 0.07); }
.admin-table code { font-family: var(--font-mono); font-size: 12.5px; }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: inline-block; margin-right: 4px; }
.input-narrow { width: 92px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }

.admin-subnav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.admin-subnav::-webkit-scrollbar { display: none; }
.admin-tab { white-space: nowrap; }

.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.filter-actions { display: flex; gap: 8px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

/* Aperçu du générateur */
.preview-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.preview-list li { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--rage); border-radius: 10px; background: var(--ink-soft); font-weight: 500; }
.preview-list li.preview-bad { border-left-color: var(--ember); background: rgba(255, 210, 63, 0.08); }

/* Histogrammes (CSS pur) */
.bar-chart { display: flex; align-items: stretch; gap: 6px; height: 190px; padding-top: 6px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-value { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); height: 14px; line-height: 14px; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--rage), var(--rage-dim)); transition: filter 0.15s; }
.bar-col:hover .bar { filter: brightness(1.25); }
.bar-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); height: 14px; line-height: 14px; white-space: nowrap; }

/* Clés API */
.key-reveal {
    margin: 0 0 28px;
    padding: 20px 22px;
    border: 1px solid var(--ember);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 210, 63, 0.14), rgba(255, 64, 64, 0.08));
    box-shadow: 0 16px 40px -24px rgba(255, 210, 63, 0.8);
}
.key-reveal-title { margin: 0 0 12px; font-weight: 700; color: #ffe08a; }
.key-reveal-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.key-reveal-row code {
    flex: 1; min-width: 240px; padding: 12px 14px; border-radius: 10px;
    background: rgba(0, 0, 0, 0.35); border: 1px dashed var(--ember);
    font-family: var(--font-mono); font-size: 14px; word-break: break-all; user-select: all;
}
.badge-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-on   { background: rgba(110, 200, 120, 0.16); color: #a6e3ae; }
.badge-off  { background: rgba(245, 236, 224, 0.10); color: var(--muted); }
.badge-warn { background: rgba(255, 210, 63, 0.16); color: #ffe08a; }

.api-code {
    margin: 12px 0; padding: 14px 16px; overflow-x: auto;
    background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px;
    font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; white-space: pre; color: #f3e3cf;
}

/* Documentation API */
.version-pill { font-family: var(--font-mono); font-size: 14px; vertical-align: middle; padding: 3px 10px; border-radius: 999px; background: var(--rage); color: var(--ink); }
.doc-layout { display: grid; gap: 22px; }
.doc-section { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-soft); }
.doc-section h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; font-size: 24px; }
.doc-section h3 { margin: 22px 0 8px; font-size: 16px; }
.doc-section code { font-family: var(--font-mono); font-size: 13px; background: rgba(0, 0, 0, 0.3); padding: 1px 6px; border-radius: 6px; }
.doc-section pre code { background: none; padding: 0; }
.doc-section ul { padding-left: 20px; }
.method { display: inline-block; font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(110, 200, 120, 0.18); color: #a6e3ae; margin-right: 6px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .daily-inner { padding: 18px 16px 16px; }
    .daily-foot { flex-direction: column; align-items: flex-start; }
    .daily-countdown { display: block; margin: 4px 0 0; }
    .bar-chart { gap: 3px; }
    .bar-value { display: none; }
    .doc-section { padding: 18px 16px; }
}

/* Respect de « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .daily-frame { animation: none; }
    .notice, .mini-btn, .stat-card, .bar { animation: none !important; transition: none !important; }
}

/* ===== v4 : signalements, navigation admin groupée, journal ===== */
.report-box { margin-top: 6px; font-size: .85rem; }
.report-btn { cursor: pointer; color: var(--muted); list-style: none; display: inline-block; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; }
.report-btn:hover { color: var(--ember); border-color: var(--ember); }
.report-box[open] .report-btn { color: var(--ember); }
.report-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.report-label { flex-basis: 100%; color: var(--muted); }
.report-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.report-item { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; }
.report-phrase { margin: 0 0 6px; font-weight: 600; }
.report-comment { margin: 2px 0; color: var(--muted); font-style: italic; }
.report-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.admin-subnav-groups { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.admin-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-group-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--rage); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.journal-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 14px; }
.btn-secondary { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; }
.settings-check { display: block; margin: 6px 0; }

/* ===== v5 : votes, hall of fame, duel, succès, annonces ===== */
.rage-card { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rage-card .rage-list-text { flex: 1 1 320px; }
.vote-bar { display: flex; align-items: center; gap: 6px; margin: 0; }
.vote-btn { background: var(--line); color: var(--paper); border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; text-decoration: none; transition: background .15s, transform .12s; }
.vote-btn:hover { background: var(--line-strong); transform: translateY(-1px); }
.vote-on { border-color: var(--ember); color: var(--ember); }
.vote-score { min-width: 28px; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--ember); }
.report-row { list-style: none; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
.top-list { counter-reset: rang; }
.top-list .rage-card { position: relative; padding-left: 44px; }
.top-list .rage-card::before { counter-increment: rang; content: counter(rang); position: absolute; left: 0; top: 10px; width: 30px; text-align: center; font-family: var(--font-display); font-size: 22px; color: var(--rage); }
.rage-solo .rage-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.target-field { display: block; margin: 0 0 14px; max-width: 360px; }
.target-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.duel-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.duel-card { background: var(--ink-card); color: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 14px; justify-content: space-between; font: inherit; transition: border-color .15s, transform .12s; }
.duel-card:hover { border-color: var(--rage); transform: translateY(-2px); }
.duel-quote { font-size: 17px; line-height: 1.4; }
.duel-pick { color: var(--ember); font-weight: 700; }
.duel-vs { align-self: center; font-family: var(--font-display); font-size: 28px; color: var(--rage); }
@media (max-width: 720px) { .duel-grid { grid-template-columns: 1fr; } .duel-vs { justify-self: center; } }
.badge-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.badge-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--ink-card); }
.achv-on { border-color: var(--ember); }
.achv-off { opacity: .6; }
.badge-ico { font-size: 26px; }
.badge-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.badge-bar span { display: block; height: 100%; background: var(--rage); }
.achv-on .badge-bar span { background: var(--ember); }
.annonce-plan { text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.annonce-info { background: rgba(255, 210, 63, 0.16); color: #ffe08a; border-bottom: 1px solid var(--ember); }
.annonce-alerte { background: rgba(255, 64, 64, 0.2); color: #ffb3a2; border-bottom: 1px solid var(--rage); }

/* ===== v5.1 : accessibilité, navigation, clés membres ===== */
html { scroll-behavior: smooth; }
::selection { background: var(--rage); color: var(--paper); }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 1000; background: var(--ember); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 10px; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(24, 18, 43, 0.92); backdrop-filter: blur(8px); }
.topbar-links a.is-current { color: var(--paper); box-shadow: 0 2px 0 var(--rage); padding-bottom: 2px; }
.topbar-links { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 760px) {
    .topbar { padding: 12px 14px; gap: 10px; position: static; }
    .topbar-links { gap: 14px; order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .topbar-links a { white-space: nowrap; }
    .rage-card .vote-bar { width: 100%; }
    .journal-filters > * { flex: 1 1 100%; }
    .admin-subnav-groups { gap: 10px 14px; }
}
.key-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.key-line code { word-break: break-all; padding: 8px 12px; background: var(--ink-soft); border: 1px dashed var(--ember); border-radius: 8px; color: #ffe08a; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.mini-btn:disabled, .rage-button:disabled, .vote-btn:disabled { opacity: .5; cursor: not-allowed; }
.notice { animation: noticeIn .25s ease-out; }
@keyframes noticeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .notice { animation: none; } }

/* ===== Réseau social (v5.2) ===== */
.avatar { border-radius: 50%; object-fit: cover; background: var(--ink-card); border: 2px solid var(--line-strong); vertical-align: middle; flex: none; }
.avatar-nav { width: 26px; height: 26px; margin-right: 6px; border-width: 1px; }
.avatar-xl { width: 112px; height: 112px; }
.notif-bell { position: relative; }
.post-list, .comment-list, .notif-list, .member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.post { background: var(--ink-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-author { font-weight: 700; color: var(--paper); text-decoration: none; }
.post-author:hover { color: var(--ember); }
.post-date { color: var(--muted); font-size: 0.8rem; margin-left: auto; }
.post-body { margin: 0 0 12px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.post-rage { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--rage); background: rgba(255, 64, 64, 0.08); border-radius: 0 10px 10px 0; font-style: italic; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-count { color: var(--muted); font-size: 0.85rem; }
.post-more { display: inline-block; margin-top: 8px; color: var(--ember); font-size: 0.85rem; }
.comment-list { margin-top: 12px; gap: 8px; }
.comment { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; background: rgba(245, 236, 224, 0.04); border-radius: 10px; font-size: 0.92rem; }
.comment-author { font-weight: 700; color: var(--paper); text-decoration: none; }
.comment-text { overflow-wrap: anywhere; flex: 1; }
.comment-del { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input[type="text"], .comment-form input:not([type]) { flex: 1; min-width: 0; }
.composer { background: var(--ink-card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; display: grid; gap: 10px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.search-bar { display: flex; gap: 8px; margin: 0 0 18px; }
.search-bar input { flex: 1; min-width: 0; }
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; background: var(--ink-card); border: 1px solid var(--line); border-top: 4px solid var(--pc, var(--rage)); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.profile-avatar { flex: none; }
.profile-info { flex: 1; min-width: 220px; }
.profile-name { font-family: var(--font-display); font-size: 2rem; margin: 0; }
.profile-bio { color: var(--paper); margin: 6px 0 10px; overflow-wrap: anywhere; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 8px 0; color: var(--muted); }
.profile-stats strong { color: var(--paper); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile-edit-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.8rem; color: var(--muted); }
.chip-hot { border-color: var(--ember); color: var(--ember); }
.mention, .hashtag { color: var(--ember); text-decoration: none; }
.mention:hover, .hashtag:hover { text-decoration: underline; }
.member-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ink-card); border: 1px solid var(--line); border-radius: 12px; }
.notif { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink-card); border: 1px solid var(--line); border-radius: 12px; }
.notif-new { border-color: var(--rage); box-shadow: inset 3px 0 0 var(--rage); }
.swatches, .preset-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.swatch, .preset { position: relative; cursor: pointer; }
.swatch input, .preset input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 2px solid transparent; }
.swatch input:checked + span, .swatch input:focus-visible + span { border-color: var(--paper); box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--c); }
.preset { width: 56px; height: 56px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 1.6rem; border: 2px solid transparent; }
.preset:has(input:checked), .preset:has(input:focus-visible) { border-color: var(--paper); box-shadow: 0 0 0 3px var(--rage); }
.leaderboard-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
@media (max-width: 560px) { .profile-head { padding: 16px; } .avatar-xl { width: 88px; height: 88px; } .post { padding: 12px; } }

/* ===== Ambiance ===== */
html.braise body { animation: braise-pulse 1.2s ease-in-out 5; }
@keyframes braise-pulse { 0%, 100% { filter: none; } 50% { filter: saturate(1.5) sepia(0.35) hue-rotate(-12deg) brightness(1.08); } }
.braise-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 9999; background: var(--ink-card); color: var(--ember); border: 1px solid var(--rage); border-radius: 999px; padding: 10px 20px; box-shadow: 0 8px 30px rgba(255, 64, 64, 0.4); font-weight: 700; }
.braise-goutte { position: fixed; top: -50px; z-index: 9998; pointer-events: none; animation: braise-chute linear forwards; }
@keyframes braise-chute { to { transform: translateY(115vh) rotate(40deg); opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { html.braise body { animation: none; } .braise-goutte { display: none; } }

/* ===== Application mobile / PWA (v5.3) ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tabbar { display: none; }
.pwa-banner { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 12px; background: var(--ink-card); border: 1px solid var(--rage); border-radius: 16px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); max-width: 520px; margin: 0 auto; }
.pwa-banner img { border-radius: 10px; flex: none; }
.pwa-banner p { margin: 0; font-size: 0.88rem; color: var(--muted); flex: 1; line-height: 1.35; }
.pwa-banner strong { color: var(--paper); }
.pwa-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pwa-install, .pwa-later { font: inherit; font-weight: 700; border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; border: 1px solid var(--line-strong); }
.pwa-install { background: var(--rage); color: var(--ink); border-color: var(--rage); }
.pwa-later { background: transparent; color: var(--muted); }
.pwa-toast { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 9999; padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; background: var(--ink-card); border: 1px solid var(--line-strong); }
.pwa-toast-off { color: var(--ember); border-color: var(--ember); }
.pwa-toast-on { color: #22c55e; border-color: #22c55e; }
@media (min-width: 769px) { .pwa-banner { bottom: 20px; left: auto; right: 20px; } }
@media (max-width: 768px) {
    body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(24, 18, 43, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line-strong); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 50px; color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 600; border-radius: 12px; }
    .tabbar a.is-current { color: var(--paper); background: rgba(255, 64, 64, 0.14); }
    .tab-ico { position: relative; font-size: 1.35rem; line-height: 1; }
    .tab-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabbar .tab-badge { position: absolute; top: -6px; right: -12px; }
    /* champs lisibles sans zoom automatique iOS, cibles tactiles confortables */
    input, select, textarea { font-size: 16px; }
    .btn, .rage-button, .mini-btn, .admin-tab { min-height: 44px; }
    html, body { max-width: 100%; overflow-x: clip; }
    .topbar { flex-wrap: wrap; }
    .topbar-auth { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 10px; order: 2; }
    .topbar-auth .btn { padding: 8px 12px; min-height: 40px; font-size: 0.85rem; white-space: nowrap; }
    .notif-bell { display: none; }
    .lang-switch { gap: 4px; margin-right: 0; }
    .lang-link { min-width: 34px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
    .mini-btn { padding-left: 14px; padding-right: 14px; }
    .topbar { padding-top: calc(12px + env(safe-area-inset-top)); }
    .topbar-links { scrollbar-width: none; }
    .topbar-links::-webkit-scrollbar { display: none; }
    /* menu admin : une ligne défilante par groupe, étiquette en tête */
    .admin-subnav-groups { flex-direction: column; flex-wrap: nowrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
    .admin-group { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .admin-group::-webkit-scrollbar { display: none; }
    .admin-group > * { flex: none; white-space: nowrap; }
    .admin-group-title { min-width: 84px; }
    .panel { overflow-x: auto; }
    .page-title { word-break: break-word; }
}
html.pwa .site-footer { padding-bottom: 8px; }
html.pwa body { overscroll-behavior-y: none; user-select: none; -webkit-user-select: none; }
html.pwa input, html.pwa textarea, html.pwa .post-body, html.pwa .rage-text, html.pwa .comment-text { user-select: text; -webkit-user-select: text; }
@media (prefers-reduced-motion: reduce) { .pwa-banner { transition: none; } }

/* ===== v5.4 — pièces, boutique, cadres ===== */
.coin-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 210, 63, 0.12); border: 1px solid rgba(255, 210, 63, 0.45); color: var(--ember); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.coin-chip:hover { background: rgba(255, 210, 63, 0.22); }
.wallet-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.wallet-solde { margin: 4px 0 0; font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--ember); }
.wallet-daily { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.shop-cat { margin: 26px 0 12px; }
.shop-grid, .pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 8px; }
.shop-card, .pack-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); background: var(--ink-soft); border-radius: var(--radius); }
.shop-card h3, .pack-card h3 { margin: 0; font-size: 16px; }
.shop-card .hint { margin: 0; }
.shop-owned { border-color: rgba(255, 210, 63, 0.5); }
.shop-preview { display: flex; align-items: center; justify-content: center; min-height: 84px; background: var(--ink-card); border-radius: 10px; padding: 8px; }
.shop-preview .avatar { width: 72px; height: 72px; }
.shop-big { font-size: 44px; line-height: 1; }
.shop-title-demo { font-style: italic; color: var(--ember); text-align: center; }
.shop-swatches { display: inline-flex; gap: 6px; }
.shop-swatches i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: block; }
.shop-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.shop-prix { font-weight: 700; color: var(--ember); }
.shop-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.pack-card { text-align: center; align-items: center; }
.pack-best { border-color: var(--rage); box-shadow: 0 0 0 1px var(--rage) inset; }
.pack-tag { position: absolute; top: -10px; background: var(--rage); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pack-total { margin: 0; font-family: var(--font-display); font-size: 34px; color: var(--ember); }
.pack-prix { margin: 0; font-size: 22px; font-weight: 800; }
.consent-box { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 8px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ink-soft); font-size: 14px; }
.consent-box input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.tx-plus { color: #86efac; font-weight: 700; }
.tx-moins { color: #fca5a5; font-weight: 700; }
.pseudo-badge { margin-left: 4px; font-size: .95em; }
.profile-titre { margin: 0; font-style: italic; color: var(--ember); }
.tip-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tip-form .add-input { width: 90px; flex: none; }
.une-box { border-color: rgba(255, 210, 63, 0.5); }
.post-une { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--ink); background: var(--ember); }
.stat-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; }
.stat-bars span { flex: 1; min-width: 4px; background: var(--rage); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.stat-bars span.is-zero { background: var(--line-strong); opacity: 1; }

/* Cadres d'avatar (liste fermée, appliqués par avatar_html) */
.avatar.cadre-braise { border-color: #ff4d2e; box-shadow: 0 0 0 2px #ffb703, 0 0 14px 2px rgba(255, 64, 64, .65); }
.avatar.cadre-glace { border-color: #bae6fd; box-shadow: 0 0 0 2px #38bdf8, 0 0 14px 2px rgba(56, 189, 248, .55); }
.avatar.cadre-neon { border-color: #f0abfc; box-shadow: 0 0 0 2px #a855f7, 0 0 16px 3px rgba(217, 70, 239, .7); }
.avatar.cadre-or { border-color: #fde68a; box-shadow: 0 0 0 2px #d4a017, 0 0 12px 2px rgba(250, 204, 21, .6); }
.avatar.cadre-arcenciel { border: 3px solid transparent; background: linear-gradient(var(--ink-card), var(--ink-card)) padding-box, conic-gradient(#ff4d2e, #ffb703, #22c55e, #38bdf8, #a78bfa, #f472b6, #ff4d2e) border-box; animation: cadre-tourne 6s linear infinite; }
@keyframes cadre-tourne { to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .avatar.cadre-arcenciel { animation: none; } }
@media (max-width: 560px) { .shop-grid, .pack-grid { grid-template-columns: 1fr 1fr; } .wallet-solde { font-size: 36px; } .shop-card, .pack-card { padding: 12px; } }


/* ==========================================================
   v6 — peau neuve
   Couche finale : elle redéfinit l'allure des éléments communs.
   Tout passe par les variables, donc les thèmes achetés en
   boutique (nuit, forêt, violet, sang) continuent de s'appliquer.
   ========================================================== */

body {
    background-color: var(--ink);
    background-image: radial-gradient(rgba(251, 245, 255, 0.06) 1px, transparent 1.4px);
    background-size: 18px 18px;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ember); color: var(--shade); }

:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }

h1, h2, h3, .page-title, .hero-title, .brand { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.25; }

/* ---------- Barre du haut ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 24px;
    gap: 12px 20px;
    background: var(--ink-soft);
    border-bottom: 3px solid var(--shade);
}

.brand { font-size: 22px; line-height: 1; display: inline-flex; align-items: center; gap: 6px; }
.brand-dot {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    color: var(--shade);
    background: var(--ember);
    border: var(--stroke);
    border-radius: 6px;
    padding: 2px 6px;
    transform: rotate(-6deg);
    box-shadow: 2px 2px 0 var(--shade);
}

.topbar-links { gap: 4px; flex-wrap: wrap; font-size: 15px; font-weight: 700; }
.topbar-links a { padding: 6px 10px; border-radius: 8px; color: var(--muted); border: 2px solid transparent; }
.topbar-links a:hover { color: var(--paper); background: var(--ink-card); }
.topbar-links a.is-current {
    color: var(--shade);
    background: var(--ember);
    border-color: var(--shade);
    box-shadow: 2px 2px 0 var(--shade);
}
.topbar-links a.is-current::after { display: none; }

/* ---------- Boutons : on appuie vraiment dessus ---------- */
.btn {
    border-radius: 10px;
    border: var(--stroke);
    box-shadow: var(--lift-sm);
    font-size: 14px;
    padding: 8px 16px;
    transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shade); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shade); }
.btn-ghost { background: var(--ink-card); color: var(--paper); }
.btn-ghost:hover { border-color: var(--shade); background: var(--ink-soft); }
.btn-solid { background: var(--rage); color: var(--shade); border-color: var(--shade); }

.rage-button {
    font-size: 22px;
    border-radius: 14px;
    border: 3px solid var(--shade);
    padding: 16px 30px;
    color: var(--shade);
    background: var(--rage);
    box-shadow: 6px 6px 0 var(--shade);
    transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.rage-button:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shade); background: var(--rage); filter: brightness(1.08); }
.rage-button:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--shade); }

/* ---------- Titres de page ---------- */
.page { max-width: 1000px; }
.page-head { text-align: left; margin-bottom: 32px; }
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--shade);
    background: var(--ember);
    padding: 2px 10px;
    border-radius: 6px;
    transform: rotate(-2deg);
    margin-bottom: 12px;
}
.page-title { font-size: clamp(32px, 5vw, 50px); line-height: 1.05; text-shadow: 4px 4px 0 var(--shade); margin-bottom: 10px; }
.page-sub { font-size: 17px; max-width: 60ch; }
.hero-title { font-size: clamp(38px, 6.4vw, 66px); line-height: 1.02; text-shadow: 5px 5px 0 var(--shade); }
.hero-title .accent { color: var(--ember); }
.hero-copy { font-size: 18px; color: var(--paper); opacity: 0.85; }

/* ---------- Surfaces : autocollants à contour épais ---------- */
.actions-menu-content, .auth-box, .badge-card, .composer, .consent-box, .doc-section, .duel-card,
.leaderboard-row, .member-list li, .modal-content, .notif, .pack-card, .panel, .post, .preview-list li,
.profile-head, .pwa-toast, .rage-list, .shop-card, .stat-card {
    background: var(--ink-card);
    border: var(--stroke);
    box-shadow: var(--lift);
    border-radius: var(--radius);
}
.leaderboard-row, .member-list li, .preview-list li, .notif { box-shadow: var(--lift-sm); }
.leaderboard-podium { background: var(--ink-card); border-color: var(--shade); box-shadow: 5px 5px 0 var(--ember); }
.stat-card strong, .stat-value { font-family: var(--font-display); font-weight: 400; }

/* La rage générée : le seul élément qui penche */
.result-card {
    background: var(--paper);
    color: var(--shade);
    border: 3px solid var(--shade);
    border-left-width: 3px;
    border-radius: 14px;
    box-shadow: 7px 7px 0 var(--rage);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    transform: rotate(-1deg);
}
.result-card::before { display: none; }
.result-card .placeholder { color: #6d6488; }
.result-card .rage-watermark { color: #6d6488; opacity: 1; }
.result-card .rage-actions .btn-ghost { background: #fff; color: var(--shade); }

/* Manomètre */
.gauge {
    border: 3px solid var(--shade);
    box-shadow: 6px 6px 0 var(--shade);
    background:
        repeating-conic-gradient(from -2deg, var(--shade) 0 1.2deg, transparent 1.2deg 18deg),
        conic-gradient(var(--rage) calc(var(--level) * 1%), var(--ink-soft) 0);
}
.gauge::before { background: var(--ink-card); border: 3px solid var(--shade); box-shadow: none; inset: 18px; }
.gauge-readout { font-family: var(--font-display); }
.gauge-value { font-size: 44px; font-weight: 400; }
.gauge-caption { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }

.visitor-counter, .counter-link, .pagination-info, .rage-list-date, .leaderboard-count { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; }
.visitor-counter strong { font-variant-numeric: tabular-nums; }
.counter-link { color: var(--pop); }

/* ---------- Formulaires ---------- */
.add-input, .audit-item, .auth-form input, .mini-select, .search-input, input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea {
    background: var(--ink);
    color: var(--paper);
    border: var(--stroke);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 16px;
}
.auth-form input:focus, .add-input:focus, .search-input:focus, select:focus, textarea:focus, input:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 3px 3px 0 var(--ember);
}
.auth-form label { color: var(--paper); font-size: 14px; }

.notice { border-radius: 10px; border: var(--stroke); box-shadow: var(--lift-sm); font-weight: 700; }
.notice-erreur { background: var(--rage); color: var(--shade); }
.notice-ok { background: var(--ember); color: var(--shade); }

/* ---------- Listes ---------- */
.rage-list li { border-bottom: 2px dashed var(--line-strong); }
.rage-list-text { font-size: 16px; }
.rage-list-auteur { color: var(--pop); font-size: 14px; }
.leaderboard-rank { font-size: 22px; color: var(--muted); }

/* ---------- Badges ---------- */
.badge-role { border: 2px solid var(--shade); font-size: 11px; letter-spacing: 0.02em; padding: 1px 8px; }
.badge-role-membre { background: var(--ink-soft); color: var(--muted); }
.badge-role-moderateur { background: var(--ember); color: var(--shade); }
.badge-role-admin { background: var(--rage); color: var(--shade); }
.badge-grade { font-family: var(--font-body); font-weight: 700; border-width: 2px; }

/* ---------- Tableaux ---------- */
table th { font-family: var(--font-body); letter-spacing: 0.02em; text-transform: none; font-size: 13px; color: var(--muted); }
table td, table th { border-color: var(--line-strong); }

/* ---------- Bandeau défilant et pied de page ---------- */
.alert-strip { font-family: var(--font-body); font-size: 14px; letter-spacing: 0.02em; text-transform: none; border-bottom: 3px solid var(--shade); color: var(--shade); }
footer, .site-footer { border-top: 3px solid var(--shade); }

/* Accent du titre : jaune plein (un dégradé découpé dans le texte casse l'ombre portée) */
.hero-title .accent { background: none; color: var(--ember); -webkit-text-fill-color: var(--ember); }

/* Rage du jour : un ticket jaune, pas un halo */
.daily-frame { padding: 0; background: none; animation: none; border: 3px solid var(--shade); border-radius: 16px; box-shadow: 7px 7px 0 var(--ember); }
.daily-inner { background: var(--ink-card); border-radius: 13px; }
.daily-inner::before { border-color: var(--line-strong); }
.daily-badge { font-family: var(--font-display); font-weight: 400; color: var(--shade); background: var(--ember); border: 2px solid var(--shade); box-shadow: 2px 2px 0 var(--shade); }
.daily-date, .daily-meter, .daily-countdown strong { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; }
.daily-mark { filter: drop-shadow(2px 2px 0 var(--shade)); }
.daily-quote p { font-weight: 700; }
.daily-meter-track { height: 12px; border: 2px solid var(--shade); background: var(--ink); }
.daily-meter-fill { border-radius: 0; background: var(--rage); }
.daily-sub { font-size: 14px; }

/* Panel d'administration */
.stat-label { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 700; }
.stat-card:hover { transform: none; }
.admin-subnav { border-bottom: none; gap: 10px; }
.admin-group { background: var(--ink-soft); border: var(--stroke); border-radius: 12px; padding: 6px 8px; box-shadow: var(--lift-sm); }
.admin-group-title { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ember); padding: 0 6px; }
.admin-tab { border-bottom: none; margin-bottom: 0; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.admin-tab:hover { color: var(--paper); background: var(--ink-card); }
.admin-tab.admin-tab-active { color: var(--shade); background: var(--ember); border: none; }
.pack-tag { letter-spacing: 0; text-transform: none; border: 2px solid var(--shade); color: var(--shade); }

/* Barre d'onglets mobile (application) */
.tabbar { background: var(--ink-soft); border-top: 3px solid var(--shade); -webkit-backdrop-filter: none; backdrop-filter: none; }
.tabbar a.is-current { color: var(--shade); background: var(--ember); }

@media (prefers-reduced-motion: reduce) {
    .alert-strip span { animation: none; padding-left: 0; }
    .result-card { transform: none; }
    .btn, .rage-button { transition: none; }
}

@media (max-width: 760px) {
    .topbar { position: static; padding: 12px 16px; }
    .page-head { text-align: left; }
    .hero-title { text-shadow: 3px 3px 0 var(--shade); }
    .result-card { transform: none; }
}

/* ---------- Accueil des visiteurs venus de Mysterious (bienvenue.php) ---------- */
.welcome { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
.welcome-joke {
    position: relative;
    background: var(--ember);
    color: var(--shade);
    border: 3px solid var(--shade);
    border-radius: 16px;
    box-shadow: 8px 8px 0 var(--rage);
    padding: 30px 28px 26px;
    font-size: 18px;
    transform: rotate(-1.2deg);
}
.welcome-joke p { margin: 0 0 14px; max-width: 46ch; }
.welcome-joke strong { background: var(--paper); padding: 0 4px; border-radius: 4px; }
.welcome-sign {
    position: absolute;
    top: -26px;
    right: 18px;
    font-size: 44px;
    line-height: 1;
    transform: rotate(12deg);
    filter: drop-shadow(3px 3px 0 var(--shade));
}
.welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.welcome-actions .btn { font-size: 16px; padding: 11px 20px; }
.welcome-joke .btn-ghost { background: var(--paper); color: var(--shade); }
.welcome-concept {
    background: var(--ink-card);
    border: var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--lift);
    padding: 26px 26px 20px;
}
.welcome-concept h2 { margin: 0 0 10px; }
.welcome-concept p { margin: 0 0 14px; }
.welcome-list { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.welcome-list li { padding-left: 22px; position: relative; }
.welcome-list li::before { content: '💢'; position: absolute; left: 0; top: 1px; font-size: 13px; }
.welcome-list strong { color: var(--ember); }
.welcome-note { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) {
    .welcome { grid-template-columns: 1fr; }
    .welcome-joke { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .welcome-joke { transform: none; } }
