        /* Impression directe (Ctrl+P de secours) : fond blanc, texte noir, peu d'encre */
        @media print {
            body {
                background: #fff !important;
                color: #000 !important;
                background-image: none !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            body::before, body::after { display: none !important; }
            #btnGenererPrompt, #btnExporterPDF, #btnRoll20, .gestion-donnees-bloc { display: none !important; }
            @page { size: A4; margin: 12mm; }
        }

        /* ============================================================
           FICHE PDF (générée par html2pdf) — tableau simple noir/blanc
           ============================================================ */
        .pdf-sheet { width: 720px; box-sizing: border-box; background: #fff; color: #000; padding: 6px 10px 14px; font-family: Arial, Helvetica, sans-serif; }
        .pdf-sheet, .pdf-sheet * { color: #000 !important; }
        .pdf-sheet h1 { font-size: 19px; margin: 4px 0 2px; text-align: center; text-transform: uppercase; letter-spacing: 1.5px; }
        .pdf-sheet .pdf-sub { text-align: center; font-size: 10px; margin: 0 0 12px; }
        .pdf-sheet h2 { font-size: 13px; margin: 14px 0 5px; padding: 4px 7px; background: #ececec; border: 1px solid #000; text-transform: uppercase; letter-spacing: .5px; }
        .pdf-sheet table { border-collapse: collapse; width: 100%; margin-bottom: 5px; }
        .pdf-sheet th, .pdf-sheet td { border: 1px solid #000; padding: 3px 6px; font-size: 11px; text-align: left; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; }
        .pdf-sheet th { font-weight: bold; background: #f5f5f5; }
        .pdf-sheet .pdf-note { font-size: 10px; font-style: italic; margin: 3px 0 7px; line-height: 1.35; }
        .pdf-sheet .pdf-bg { font-size: 11px; line-height: 1.5; white-space: pre-wrap; border: 1px solid #000; padding: 7px; }
        .pdf-sheet .pdf-box { display: inline-block; width: 12px; height: 12px; line-height: 12px; border: 1px solid #000; text-align: center; font-size: 10px; font-weight: bold; }
        .pdf-block { page-break-inside: avoid; break-inside: avoid; }
        .no-spinners::-webkit-outer-spin-button,
        .no-spinners::-webkit-inner-spin-button {
            -webkit-appearance: none; margin: 0;
        }
        .no-spinners { -moz-appearance: textfield; }

        :root {
            color-scheme: dark;
            --abyss: #02070a;
            --ink: #d7e2df;
            --verdigris: #35c4a5;
            --old-gold: #d6b25e;
        }

        html { overflow-x: clip; }
        body {
            min-height: 100vh;
            overflow-x: clip;
            /* Fond de page : grimoire « tentacouilles » sous un voile sombre (lisibilité). */
            background:
                linear-gradient(180deg, rgba(2, 7, 10, 0.55), rgba(3, 8, 8, 0.72) 50%, rgba(1, 4, 7, 0.86)),
                radial-gradient(ellipse at 14% 0%, rgba(31, 103, 84, 0.22), transparent 40%),
                radial-gradient(ellipse at 86% 8%, rgba(88, 28, 72, 0.20), transparent 38%),
                url('tentacouilles.jpg');
            background-position: center, center, center, center;
            background-size: cover;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-color: #02070a;
            color: var(--ink);
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            background:
                linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
                radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.58) 100%);
            background-size: 42px 42px, 42px 42px, 100% 100%;
            mix-blend-mode: screen;
            opacity: 0.45;
        }

        body::after {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            background: repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 5px);
            opacity: 0.08;
        }

        body > .max-w-6xl {
            position: relative;
            z-index: 1;
        }

        body .bg-slate-900 {
            background:
                linear-gradient(145deg, rgba(13, 22, 25, 0.97), rgba(5, 11, 14, 0.98)) !important;
            border-color: rgba(79, 112, 103, 0.36) !important;
            box-shadow:
                0 24px 55px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(214, 178, 94, 0.07),
                inset 0 0 28px rgba(53, 196, 165, 0.025) !important;
        }

        body .bg-slate-950 {
            background:
                linear-gradient(145deg, rgba(2, 7, 10, 0.96), rgba(7, 13, 14, 0.98)) !important;
            box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.38);
        }

        body .border-slate-800 { border-color: rgba(79, 112, 103, 0.38) !important; }
        body .border-emerald-950 { border-color: rgba(34, 127, 104, 0.54) !important; }
        body .border-emerald-900 { border-color: rgba(53, 196, 165, 0.43) !important; }
        body .border-red-950 { border-color: rgba(143, 37, 37, 0.58) !important; }
        body .border-purple-900 { border-color: rgba(159, 106, 216, 0.42) !important; }
        body .border-orange-800 { border-color: rgba(184, 92, 40, 0.42) !important; }

        h1, h2, h3,
        .text-emerald-400,
        .text-purple-400,
        .text-red-400 {
            text-shadow: none !important;
        }

        h1 {
            color: #c8a3ff !important;
            letter-spacing: 0;
        }

        h2 {
            letter-spacing: 0;
        }

        label {
            letter-spacing: 0.03em;
        }

        input, select, textarea {
            border-color: rgba(115, 139, 131, 0.4) !important;
            box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.42);
            transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
        }

        input:focus, select:focus, textarea:focus {
            border-color: rgba(53, 196, 165, 0.75) !important;
            box-shadow:
                0 0 0 1px rgba(53, 196, 165, 0.3),
                0 0 22px rgba(53, 196, 165, 0.13),
                inset 0 0 16px rgba(0, 0, 0, 0.44);
        }

        select {
            background-color: #02070a !important;
            color: #d7e2df !important;
            scrollbar-color: rgba(53, 196, 165, 0.55) #02070a;
        }

        select option,
        select optgroup {
            background-color: #02070a !important;
            color: #d7e2df !important;
        }

        select option:checked {
            background-color: #123c35 !important;
            color: #f5f0d0 !important;
        }

        button {
            box-shadow:
                0 10px 22px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        body .rounded-xl,
        body .rounded-lg {
            border-radius: 0.5rem !important;
        }

        #statsContainerGrid {
            grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
            gap: 0.85rem !important;
        }

        #statsContainerGrid > div {
            position: relative;
            overflow: hidden;
            min-height: 118px;
            border-color: rgba(214, 178, 94, 0.22) !important;
            box-shadow:
                0 15px 28px rgba(0, 0, 0, 0.32),
                inset 0 0 24px rgba(0, 0, 0, 0.45) !important;
        }

        #statsContainerGrid > div::before {
            content: "";
            position: absolute;
            inset: 0;
            border-left: 2px solid rgba(214, 178, 94, 0.42);
            background: linear-gradient(90deg, rgba(214, 178, 94, 0.06), transparent 42%);
            pointer-events: none;
        }

        #statsContainerGrid > div > div:first-child {
            position: relative;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 0.45rem;
        }

        #statsContainerGrid .stat-input {
            width: 5.5rem !important; /* assez large pour « 100 » + le spinner natif, sans troncature */
        }

        #statsContainerGrid .text-yellow-200 {
            color: var(--old-gold) !important;
        }

        #blocCompetencesStats {
            border-color: rgba(53, 196, 165, 0.32) !important;
            background: linear-gradient(180deg, rgba(53, 196, 165, 0.055), transparent);
            margin-top: 0.2rem;
            padding: 0.95rem;
            border-radius: 0.5rem;
        }

        #panierAfflictions > div,
        #panierList > div,
        #details,
        #afflictionDetailPanel {
            box-shadow:
                0 14px 28px rgba(0, 0, 0, 0.34),
                inset 0 0 22px rgba(0, 0, 0, 0.34);
        }

        #panierAfflictions .grid-cols-3 {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
        @media (min-width: 640px) {
            #panierAfflictions .grid-cols-3 {
                grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
            }
        }

        #btnGenererPrompt, .btn-save-design {
            background: linear-gradient(135deg, #126954, #2bb894) !important;
            border: 1px solid rgba(107, 236, 201, 0.42) !important;
        }

        #btnExporterPDF, .btn-import-design {
            background: linear-gradient(135deg, #2a3033, #11181b) !important;
            border: 1px solid rgba(159, 106, 216, 0.3) !important;
        }

        @media (min-width: 640px) {
            #statsContainerGrid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
        }

        @media (min-width: 1024px) {
            #statsContainerGrid {
                grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
            }
        }

        /* --- Notifications (toasts) --- */
        #toastZone {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            pointer-events: none;
            max-width: min(92vw, 360px);
        }
        .toast {
            pointer-events: auto;
            font-family: ui-monospace, monospace;
            font-size: 0.78rem;
            line-height: 1.3;
            padding: 0.7rem 0.95rem;
            border-radius: 0.6rem;
            color: #eafff7;
            background: linear-gradient(135deg, rgba(13, 22, 25, 0.97), rgba(5, 11, 14, 0.98));
            border: 1px solid rgba(53, 196, 165, 0.45);
            box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(214, 178, 94, 0.08);
            transform: translateX(120%);
            opacity: 0;
            transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 280ms ease;
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
        }
        .toast.show { transform: translateX(0); opacity: 1; }
        .toast.toast-success { border-color: rgba(53, 196, 165, 0.6); }
        .toast.toast-error { border-color: rgba(218, 72, 72, 0.7); color: #ffe3e3; }
        .toast.toast-info { border-color: rgba(159, 106, 216, 0.6); }
        .toast.toast-warning { border-color: rgba(245, 158, 11, 0.65); color: #fef3c7; background: linear-gradient(135deg, rgba(28, 20, 9, 0.97), rgba(16, 11, 5, 0.98)); }
        .toast.toast-warning .toast-ico { color: #fbbf24; }
        .toast .toast-ico { font-size: 0.95rem; line-height: 1; margin-top: 0.05rem; }

        /* --- Aperçu avatar --- */
        #avatarPreviewWrap { margin-top: 0.6rem; }
        .avatar-edition-wrap {
            position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 0.5rem; overflow: hidden;
            border: 1px solid rgba(53, 196, 165, 0.35); box-shadow: inset 0 0 16px rgba(0,0,0,0.5);
        }
        .avatar-jeu-overlay {
            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
            height: 60%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
            border: 2px solid rgba(53, 196, 165, 0.7); box-shadow: 0 4px 14px rgba(0,0,0,0.6);
            opacity: 0; transition: opacity 0.18s ease; pointer-events: none;
        }
        .avatar-jeu-overlay.visible { opacity: 1; }
        #avatarPreview, #avatarPreviewCercle { width: 100%; height: 100%; object-fit: cover; display: block; }
        #avatarPreviewCercle:not([src]), #avatarPreviewCercle[src=""], #avatarPreviewCercle.hidden { display: none !important; }
        #avatarPlaceholder i, #avatarPlaceholder svg { width: 2.5rem !important; height: 2.5rem !important; }

        @media print {
            #toastZone, #avatarPreviewWrap { display: none !important; }
        }

        /* ===== Bandeau d'en-tête "abyssal" — préfixe hdr- ===== */
        .hdr-banner {
            position: relative;
            overflow: hidden;
            border-radius: 0.75rem;
            /* Même fond que les autres sections (.bg-slate-900) */
            border: 1px solid rgba(79, 112, 103, 0.36);
            background: linear-gradient(145deg, rgba(13, 22, 25, 0.97), rgba(5, 11, 14, 0.98));
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
        }
        .hdr-banner::after {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(90% 120% at 50% 110%, rgba(53, 196, 165, 0.09), transparent 60%);
            opacity: 0.35;
            z-index: 1;
        }
        @keyframes hdr-breathe {
            0%, 100% { opacity: 0.35; }
            50%      { opacity: 0.75; }
        }
        .hdr-tentacles {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 0;               /* derrière le texte du bandeau */
            pointer-events: none;     /* ne bloque jamais les clics */
            display: block;
            overflow: visible;
            opacity: 0.2;             /* discret, en filigrane */
        }
        .hdr-tentacle {
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
            filter: url(#hdr-glow);   /* halo teal atmosphérique */
        }
        .hdr-tentacles-group { transform-origin: center; }
        .hdr-sucker { opacity: 0.5; }
        .hdr-content { position: relative; z-index: 2; }
        .hdr-content::before {
            content: "";
            position: absolute;
            inset: -0.75rem -1rem;
            z-index: -1;
            background: radial-gradient(120% 120% at 25% 50%, rgba(2, 7, 10, 0.78), rgba(2, 7, 10, 0.25) 75%, transparent);
            border-radius: 0.5rem;
        }
        .hdr-title {
            color: var(--ink);
            text-shadow: none;
        }
        .hdr-title .hdr-accent { color: var(--verdigris); }
        .hdr-subtitle { color: rgba(215, 226, 223, 0.6); }
        .hdr-subtitle b { color: var(--old-gold); font-weight: 600; }
        .hdr-rule {
            border: 1px solid rgba(214, 178, 94, 0.35);
            background: rgba(2, 7, 10, 0.55);
        }
        .hdr-rule-label { color: var(--old-gold); }
        .hdr-rule-text { color: rgba(215, 226, 223, 0.85); }
        @media (prefers-reduced-motion: reduce) {
            .hdr-banner::after,
            .hdr-tentacles-group,
            .hdr-sucker { animation: none !important; }
            /* fige le morphing SMIL : les tentacules restent visibles mais immobiles */
            .hdr-tentacles animate { display: none; }
        }
        @media print {
            .hdr-tentacles, .hdr-banner::after { display: none !important; }
            .hdr-banner {
                box-shadow: none;
                background: var(--abyss);
                border-color: rgba(53, 196, 165, 0.4);
            }
            .hdr-title, .hdr-subtitle, .hdr-rule-text { text-shadow: none; }
        }

        /* ===== Modale création de compétence (thème Ocade vert) ===== */
        .modale-overlay { position: fixed; inset: 0; background: rgba(2, 7, 10, 0.82); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
        .modale-overlay.hidden { display: none; }
        .modale-box { background: linear-gradient(150deg, rgba(13, 22, 25, 0.98), rgba(4, 10, 12, 0.99)); border: 1px solid rgba(53, 196, 165, 0.42); border-radius: 0.75rem; padding: 0 1.5rem 1.5rem; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,0.65), inset 0 1px 0 rgba(53,196,165,0.12); overflow: hidden; }
        .modale-box::before { content: ""; display: block; height: 4px; margin: 0 -1.5rem 1.25rem; background: linear-gradient(90deg, #126954, #2bb894, #126954); }
        .mc-btn-ok { background: linear-gradient(135deg, #126954, #2bb894); border: 1px solid rgba(107, 236, 201, 0.42); }
        .mc-btn-ok:hover { filter: brightness(1.12); }
        .mc-table th { font-weight: 700; border-bottom: 1px solid #334155; }
        .mc-table td { padding: 3px 4px; border-bottom: 1px solid #1e293b; }
        .mc-table input[type=number], .mc-table input[type=text] { width: 100%; background: #1e293b; border: 1px solid #334155; border-radius: 4px; padding: 3px 5px; color: #fff; outline: none; font-size: 12px; }
        .mc-table .mc-niv-nom { color: #fde68a; font-weight: 700; white-space: nowrap; }

        /* ===== Boutons dé ===== */
        .btn-de { position: relative; }
        

        .btn-de { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #ffffff; transition: transform 0.1s, color 0.1s; background: none; border: none; padding: 2px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
        .btn-de:hover { color: #d1d5db; transform: scale(1.18) rotate(-12deg); }
        .btn-de svg { width: 1.05rem; height: 1.05rem; }

        /* ===== Panneau historique des jets (thème Ocade vert) ===== */
        .panneau-des { position: fixed; bottom: 5rem; right: 1rem; width: 300px; max-width: calc(100vw - 2rem); background: linear-gradient(150deg, rgba(13, 22, 25, 0.98), rgba(4, 10, 12, 0.99)); border: 1px solid rgba(53, 196, 165, 0.42); border-radius: 0.6rem; z-index: 55; box-shadow: 0 16px 40px rgba(0,0,0,0.6); font-family: inherit; }
        .panneau-des-tete { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; cursor: pointer; background: linear-gradient(135deg, rgba(18, 105, 84, 0.6), rgba(43, 184, 148, 0.3)); border-radius: 0.55rem 0.55rem 0 0; user-select: none; color: #eafff7; }
        .panneau-des-tete:hover { filter: brightness(1.15); }
        .panneau-des-corps { padding: 0.5rem 0.75rem 0.75rem; max-height: 45vh; display: flex; flex-direction: column; }
        .panneau-des.reduit { display: none; }   /* réduit = masqué ; le dé flottant (#fabHistoriqueDes) rouvre */
        .panneau-des.reduit .panneau-des-corps { display: none; }
        .panneau-des.reduit #panneauDesToggle { transform: rotate(180deg); display: inline-block; }
        .historique-liste { overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
        .jet-ligne { background: rgba(2, 7, 10, 0.55); border: 1px solid rgba(53, 196, 165, 0.18); border-radius: 5px; padding: 4px 7px; font-size: 11px; line-height: 1.35; }
        .jet-ligne .jet-nom { color: #eafff7; font-weight: 700; }
        .jet-ligne .jet-detail { color: #8fb3aa; font-family: ui-monospace, monospace; }
        /* Mobile/tablette : réduit = pastille flottante (dé) ; ouvert = plein écran */
        @media (max-width: 640px) {
            .panneau-des { left: 0; right: 0; top: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 0; border-left: none; border-right: none; display: flex; flex-direction: column; }
            .panneau-des-corps { max-height: none; flex: 1 1 auto; min-height: 0; padding-bottom: 5rem; }
            .historique-liste { flex: 1 1 auto; }
            .panneau-des.reduit { left: auto; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); top: auto; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(53, 196, 165, 0.5); box-shadow: 0 6px 20px rgba(0,0,0,0.6); }
            .panneau-des.reduit .panneau-des-tete { width: 56px; height: 56px; border-radius: 50%; justify-content: center; padding: 0; }
            .panneau-des.reduit .panneau-des-tete > * { display: none; }
            .panneau-des.reduit .panneau-des-tete::before { content: ""; width: 1.7rem; height: 1.7rem; display: block; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm3 4a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 8 7zm8 0a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 16 7zm-4 4a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm-4 4a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 8 15zm8 0a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm3 4a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 8 7zm8 0a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 16 7zm-4 4a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm-4 4a1.6 1.6 0 1 0 0 3.2A1.6 1.6 0 0 0 8 15zm8 0a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2z'/%3E%3C/svg%3E") center / contain no-repeat; }
        }
        @media print { .panneau-des, .modale-overlay { display: none !important; } }

        /* ===== Barre d'onglets (Création / Mode Jeu) ===== */
        .onglets-barre { position: sticky; top: 0.5rem; z-index: 40; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .35s ease, opacity .35s ease; }
        .onglet-btn { color: rgba(215, 226, 223, 0.55); background: transparent; border: 1px solid transparent; cursor: pointer; }
        .onglet-btn:hover { color: var(--ink); }
        .onglet-actif { color: #eafff7 !important; background: linear-gradient(135deg, rgba(18, 105, 84, 0.65), rgba(43, 184, 148, 0.32)) !important; border-color: rgba(53, 196, 165, 0.5) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important; }
        .onglets-barre.barre-cachee { transform: translateY(-150%); opacity: 0; pointer-events: none; }
        #tabBtnOutils:not(.onglet-actif) svg { color: #f59e0b !important; }   /* engrenage orange quand l'onglet n'est pas actif ; couleur normale une fois dans l'onglet */
        @media print { .onglets-barre { display: none !important; } }

        /* ===== Mode Jeu : identité, cartes de stats, santé ===== */
        .jeu-avatar { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; border: 2px solid rgba(53, 196, 165, 0.45); box-shadow: 0 0 18px rgba(53, 196, 165, 0.18); flex-shrink: 0; }
        .jeu-avatar-vide { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: rgba(2, 7, 10, 0.6); }
        .jeu-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; background: rgba(2, 7, 10, 0.6); border: 1px solid rgba(53, 196, 165, 0.3); color: rgba(215, 226, 223, 0.85); white-space: nowrap; }
        .jeu-stat-card { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: linear-gradient(145deg, rgba(2, 7, 10, 0.96), rgba(7, 13, 14, 0.98)); border: 1px solid rgba(214, 178, 94, 0.22); border-left: 2px solid rgba(214, 178, 94, 0.42); border-radius: 0.6rem; padding: 0.7rem 0.8rem; box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35); }
        .jeu-stat-nom { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: rgba(215, 226, 223, 0.7); font-weight: 700; line-height: 1.1; }
        .jeu-stat-val { font-size: 2.1rem; font-weight: 900; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; line-height: 1.05; margin-top: 0.1rem; }
        .jeu-de-btn { position: relative; flex-shrink: 0; width: 3.2rem; height: 3.2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 0.6rem; background: linear-gradient(135deg, #126954, #2bb894); border: 1px solid rgba(107, 236, 201, 0.5); color: #fff; cursor: pointer; transition: transform 0.1s, filter 0.1s; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
        .jeu-de-libre { min-width: 3rem; padding: 0.45rem 0.7rem; border-radius: 0.5rem; background: linear-gradient(135deg, #126954, #2bb894); border: 1px solid rgba(107, 236, 201, 0.5); color: #fff; font-weight: 800; font-family: ui-monospace, monospace; cursor: pointer; transition: filter 0.1s, transform 0.1s; box-shadow: 0 4px 12px rgba(0,0,0,0.35); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
        .jeu-de-libre:hover { filter: brightness(1.12); }
        .jeu-de-libre:active { transform: scale(0.93); }
        .jeu-de-btn:hover { filter: brightness(1.14); }
        .jeu-de-btn:active { transform: scale(0.91); }
        .jeu-de-btn svg { width: 1.75rem; height: 1.75rem; }
        .jeu-info-box { display: flex; flex-direction: column; gap: 0.1rem; background: rgba(2, 7, 10, 0.6); border: 1px solid rgba(79, 112, 103, 0.32); border-radius: 0.5rem; padding: 0.55rem 0.7rem; min-width: 0; }
        .jeu-info-box.jeu-courage-box { border-color: rgba(147, 51, 234, 0.55); background: rgba(88, 28, 135, 0.2); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3); }
        .jeu-info-box.jeu-resistance-box { border-color: rgba(234, 88, 12, 0.55); background: rgba(124, 45, 18, 0.2); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3); }
        /* Boîtes de saisie de soin manuel : Mental (violet feutré) & Physique (orange feutré) */
        .soin-case-mental { background: rgba(88, 28, 135, 0.28) !important; border-color: rgba(147, 51, 234, 0.55) !important; }
        .soin-case-physique { background: rgba(124, 45, 18, 0.28) !important; border-color: rgba(234, 88, 12, 0.55) !important; }
        .jeu-info-label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: rgba(215, 226, 223, 0.6); }
        .jeu-info-val { font-weight: 900; }
        .jeu-info-num { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

        /* ===== Popup centrale de résultat de jet (flash ~1,5 s) ===== */
        .jet-flash-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; pointer-events: none; background: rgba(2, 7, 10, 0.32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; transition: opacity 160ms ease; padding: 1rem; }
        .jet-flash-overlay.show { opacity: 1; }
        .jet-flash-overlay.has-action { pointer-events: auto; }
        .jet-flash { pointer-events: auto; min-width: 220px; max-width: 86vw; text-align: center; padding: 1.4rem 1.9rem; border-radius: 1rem; background: linear-gradient(150deg, rgba(13, 22, 25, 0.98), rgba(4, 10, 12, 0.99)); border: 1px solid rgba(53, 196, 165, 0.42); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); transform: scale(0.85); transition: transform 220ms cubic-bezier(.2, .9, .25, 1.25); }
        .jet-flash-overlay.show .jet-flash { transform: scale(1); }
        .jet-flash-overlay { visibility: hidden; transition: opacity 160ms ease, visibility 0s linear 160ms; }
        .jet-flash-overlay.show { visibility: visible; transition: opacity 160ms ease, visibility 0s; }
        .jet-flash-overlay:not(.show) .jet-flash { pointer-events: none; }
        .jet-flash .jf-nom { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(215, 226, 223, 0.7); font-weight: 700; }
        .jet-flash .jf-jet { font-size: 3.1rem; font-weight: 900; line-height: 1.05; font-family: ui-monospace, monospace; }
        .jet-flash .jf-detail { font-size: 0.8rem; color: rgba(215, 226, 223, 0.5); font-family: ui-monospace, monospace; margin-top: 0.1rem; }
        .jet-flash .jf-res { font-size: 1.15rem; font-weight: 800; margin-top: 0.35rem; }
        /* Conteneur et dés 3D (1 à 4 dés côte à côte, chacun tournant sur son propre centre) */
        .jet-flash .jf-de, .jf-de-wrapper { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin-bottom: 0.45rem; min-height: 3.2rem; flex-wrap: nowrap; }
        .jf-de-single { display: inline-flex; align-items: center; justify-content: center; line-height: 0; transform-origin: center center; will-change: transform; }
        .jf-de-single svg, .jet-flash .jf-de > svg:only-child { width: 3.1rem; height: 3.1rem; display: inline-block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75)); user-select: none; }
        .jf-de-single.roule { animation: jf-roule 0.9s linear infinite; }
        .jf-de-single.fige { animation: jf-pop 0.28s ease; }
        .jet-flash.roule .jf-de > svg:only-child { animation: jf-roule 0.9s linear infinite; }
        @keyframes jf-roule { 0% { transform: rotate(0) scale(1); } 55% { transform: rotate(230deg) scale(1.18); } 100% { transform: rotate(360deg) scale(1); } }
        .jet-flash.fige .jf-jet { animation: jf-pop 0.28s ease; }
        @keyframes jf-pop { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }

        @media (max-width: 480px) {
            .jet-flash .jf-de, .jf-de-wrapper { gap: 0.4rem; }
            .jf-de-single svg, .jet-flash .jf-de > svg:only-child { width: 2.5rem; height: 2.5rem; }
        }
        @media (prefers-reduced-motion: reduce) { .jet-flash, .jet-flash-overlay { transition: opacity 120ms ease, visibility 0s linear 120ms !important; } .jet-flash-overlay.show { transition: opacity 120ms ease, visibility 0s !important; } .jet-flash { transform: none !important; } }
        @media print { .jet-flash-overlay { display: none !important; } }

        /* ===== Icônes Lucide (alignement avec le texte) ===== */
        .lucide { display: inline-block; vertical-align: -0.125em; }
        .onglet-btn .lucide { width: 1.15rem; height: 1.15rem; }

        /* ===== Mode Jeu : centrage des textes & jaune des stats (consignes 5 & 6) ===== */
        #ongletJeu h2 { text-align: center; }
        .jeu-stat-card { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.5rem; }
        .jeu-stat-nom { color: #fef08a; }            /* jaune identique à l'onglet « Gestion de la fiche » */
        .jeu-stat-val { margin-top: 0; }
        .jeu-info-box { align-items: center; text-align: center; }

        /* Cartes de compétences (mode jeu) */
        .jeu-comp-card { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.5rem; text-align: center; background: linear-gradient(145deg, rgba(2, 7, 10, 0.96), rgba(7, 13, 14, 0.98)); border: 1px solid rgba(214, 178, 94, 0.22); border-left: 2px solid rgba(53, 196, 165, 0.42); border-radius: 0.6rem; padding: 0.7rem 0.8rem; box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35); }
        .jeu-comp-select { background: rgba(2,7,10,0.85); border: 1px solid rgba(53,196,165,0.35); color: #d7e2df; border-radius: 4px; padding: 1px 6px; font-size: 0.72rem; max-width: 10rem; cursor: pointer; }
        /* Paliers de santé chiffrés [courant/max] */
        .sante-palier { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 3px 8px; border-radius: 4px; background: rgba(2,7,10,0.5); border: 1px solid transparent; }
        .sante-jauge { font-family: ui-monospace, monospace; font-weight: bold; color: #cbd5e1; }
        .sante-input { width: 2.6rem; background: rgba(2,7,10,0.85); border: 1px solid rgba(53,196,165,0.4); color: #6beec9; text-align: center; border-radius: 3px; font-family: ui-monospace, monospace; font-weight: bold; padding: 0 2px; }
        /* Objets d'inventaire : 2 lignes max visibles puis défilement vertical */
        .inv-textarea { resize: none; overflow-y: auto; field-sizing: content; min-height: 2.2rem; max-height: 3.6rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; box-sizing: border-box; }
        .inv-item-text-jeu { min-height: 2.2rem; max-height: 3.6rem; overflow-y: auto; line-height: 1.35; word-break: break-word; white-space: pre-wrap; box-sizing: border-box; }
        .inv-item-view { line-height: 1.35; word-break: break-word; white-space: pre-wrap; box-sizing: border-box; }
        .inv-item-text-jeu::-webkit-scrollbar, .inv-textarea::-webkit-scrollbar { width: 4px; }
        .inv-item-text-jeu::-webkit-scrollbar-thumb, .inv-textarea::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
        .inv-item-text-jeu::-webkit-scrollbar-thumb:hover, .inv-textarea::-webkit-scrollbar-thumb:hover { background: #10b981; }
        /* Input quantite dans la ligne d'inventaire (Option A) */
        .inv-qte { -moz-appearance: textfield; }
        .inv-qte::-webkit-inner-spin-button, .inv-qte::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
        /* Peurs profondes et Motivations : 3 lignes max visibles puis défilement vertical */
        .lore-textarea { resize: none; overflow-y: auto; field-sizing: content; min-height: 2.5rem; max-height: 5.2rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; box-sizing: border-box; }
        /* Background : auto-ajustement jusqu'à 30 lignes (~42rem) puis défilement vertical */
        .bg-textarea { resize: none; overflow-y: auto; field-sizing: content; min-height: 10rem; max-height: 42rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; box-sizing: border-box; }
        .sante-palier-actif { background: rgba(53,196,165,0.12); border-color: rgba(53,196,165,0.45); }
        .sante-palier-actif .sante-jauge { color: #6beec9; }
        /* Axe Physique : Cadre & jauge orange feutré */
        .sante-palier-actif.sante-palier-actif-physique,
        #jaugesPhysique .sante-palier-actif {
            background: rgba(249, 115, 22, 0.12) !important;
            border-color: rgba(249, 115, 22, 0.45) !important;
        }
        .sante-palier-actif.sante-palier-actif-physique .sante-jauge,
        #jaugesPhysique .sante-palier-actif .sante-jauge {
            color: #fdba74 !important;
        }
        .sante-input-physique,
        #jaugesPhysique .sante-input {
            border-color: rgba(249, 115, 22, 0.4) !important;
            color: #fdba74 !important;
        }
        /* Axe Mental : Cadre & jauge violet/fuchsia feutré */
        .sante-palier-actif.sante-palier-actif-mental,
        #jaugesMental .sante-palier-actif {
            background: rgba(168, 85, 247, 0.12) !important;
            border-color: rgba(168, 85, 247, 0.45) !important;
        }
        .sante-palier-actif.sante-palier-actif-mental .sante-jauge,
        #jaugesMental .sante-palier-actif .sante-jauge {
            color: #d8b4fe !important;
        }
        .sante-input-mental,
        #jaugesMental .sante-input {
            border-color: rgba(168, 85, 247, 0.4) !important;
            color: #d8b4fe !important;
        }
        .sante-palier-vide { opacity: 0.45; }
        .sante-palier-vide span:first-child { text-decoration: line-through; }
        .sante-final { text-align: center; font-weight: 700; padding: 3px; opacity: 0.45; text-transform: uppercase; letter-spacing: .05em; font-size: 0.7rem; }
        .sante-final-atteint { opacity: 1; color: #f0a3a3; text-shadow: 0 0 10px rgba(218,72,72,0.5); }
        .sante-auto-btn { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: rgba(218,72,72,0.15); border: 1px solid rgba(218,72,72,0.4); color: #f0a3a3; cursor: pointer; transition: filter .15s; }
        .sante-auto-btn:hover { filter: brightness(1.2); }
        /* Popup de dégâts & soins */
        .modale-degats { background: linear-gradient(160deg, #0b1418, #02070a); border: 1px solid rgba(159,106,216,0.4); border-radius: 0.9rem; padding: 1.4rem; max-width: 26rem; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.6); height: fit-content; }
        .modale-degats.type-physique { background: linear-gradient(160deg, #140d08, #040201); border-color: rgba(234, 88, 12, 0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 25px rgba(234, 88, 12, 0.1); }
        .modale-degats.type-choc { background: linear-gradient(160deg, #140f06, #040301); border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 25px rgba(245, 158, 11, 0.1); }
        .modale-soins { background: linear-gradient(160deg, #0b1814, #020a07); border: 1px solid rgba(16, 185, 129, 0.4); border-radius: 0.9rem; padding: 1.4rem; max-width: 28rem; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.6); height: fit-content; }
        /* Masque les flèches haut/bas sur la case de quantité de dés libres uniquement */
        #nbDeLibre::-webkit-outer-spin-button,
        #nbDeLibre::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        #nbDeLibre {
            -moz-appearance: textfield;
            appearance: textfield;
        }
        .soins-pop { animation: jf-pop 0.28s ease; }
        .degats-total { font-size: 1.05rem; text-align: center; }
        .degats-jets { color: #94a3b8; font-size: 0.85rem; }
        .degats-choc { font-size: 1.3rem; font-weight: 900; color: #f0a3a3; text-align: center; margin: 0.6rem 0; text-transform: uppercase; letter-spacing: .08em; animation: degats-pulse 0.5s ease; }
        .degats-fin { color: #ff5555; font-size: 1.6rem; }
        .degats-etat { text-align: center; color: #cbd5e1; margin-top: 0.4rem; }
        @keyframes degats-pulse { 0% { transform: scale(1.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
        .jeu-comp-nom { font-size: 0.8rem; font-weight: 800; color: #fef08a; line-height: 1.15; margin-bottom: 0.35rem; }
        .jeu-comp-meta { font-size: 0.72rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color: rgba(215, 226, 223, 0.7); display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap; }
        .jeu-comp-total { color: #6beec9; font-weight: 800; }

        /* Afflictions actives (affichage minimaliste) */
        .jeu-affliction { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700; padding: 0.22rem 0.72rem; border-radius: 999px; background: rgba(40, 8, 8, 0.6); border: 1px solid rgba(218, 72, 72, 0.4); color: #fca5a5; white-space: nowrap; }
        .jeu-affliction .jeu-aff-stade { color: rgba(192, 132, 252, 0.95); font-weight: 600; }

        /* ===== Bouton dé flottant : ouvre / ferme l'historique des jets ===== */
        .fab-historique-des { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; z-index: 56; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(18, 105, 84, 0.96), rgba(43, 184, 148, 0.82)); border: 1px solid rgba(53, 196, 165, 0.6); color: #eafff7; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); cursor: pointer; transition: filter 0.12s, transform 0.12s; }
        .fab-historique-des:hover { filter: brightness(1.12); }
        .fab-historique-des:active { transform: scale(0.92); }
        .fab-historique-des svg { width: 1.7rem; height: 1.7rem; }
        @media print { .fab-historique-des { display: none !important; } }

        /* ===== Témoin discret d'enregistrement local (Position fixe en bas à gauche) ===== */
        .temoin-sauvegarde {
            position: fixed;
            left: max(1rem, env(safe-area-inset-left));
            bottom: max(1rem, env(safe-area-inset-bottom));
            width: 34px;
            height: 34px;
            border-radius: 50%;
            z-index: 55;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(10, 16, 26, 0.92);
            border: 1px solid rgba(52, 211, 153, 0.45);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(52, 211, 153, 0.2);
            opacity: 0;
            transform: scale(0.85);
            pointer-events: none;
            transition: opacity 0.25s ease, transform 0.25s ease;
        }
        .temoin-sauvegarde.actif {
            opacity: 1;
            transform: scale(1);
        }
        .temoin-sauvegarde svg {
            width: 1.1rem;
            height: 1.1rem;
            stroke-width: 2.5;
        }
        @media print { .temoin-sauvegarde { display: none !important; } }

        /* ===== Mode Jeu sur PC (≥1024px) : dé à droite et plus grand ===== */
        @media (min-width: 1024px) {
            .jeu-stat-card, .jeu-comp-card { flex-direction: row; align-items: center; justify-content: space-between; }
            .jeu-stat-card > div, .jeu-comp-card > div { flex: 1; min-width: 0; }
            .jeu-stat-card .jeu-de-btn, .jeu-comp-card .jeu-de-btn { width: 4.5rem; height: 4.5rem; }
            .jeu-stat-card .jeu-de-btn svg, .jeu-comp-card .jeu-de-btn svg { width: 2.4rem; height: 2.4rem; }
        }
        /* ===== Glisser-déposer du panier de compétences (SortableJS) ===== */
        /* ===== Glisser-déposer SortableJS (Compétences, Afflictions, Inventaires) ===== */
        .drag-handle { touch-action: none; }
        #panierList .sortable-ghost, #panierAfflictions .sortable-ghost { opacity: 0.35; }
        #panierList .sortable-chosen, #panierAfflictions .sortable-chosen { cursor: grabbing; }
        #panierList .sortable-drag, #panierAfflictions .sortable-drag { opacity: 0.95; }
        .sortable-ghost { opacity: 0.35; background: rgba(16, 185, 129, 0.1) !important; border-color: rgba(16, 185, 129, 0.4) !important; }
        .sortable-chosen { cursor: grabbing; }
        .sortable-drag { opacity: 0.95; transform: scale(1.01); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5); }
        /* ===== Modale de création d'affliction (thème rouge) ===== */
        .modale-box-aff { border-color: rgba(218, 72, 72, 0.45); }
        .modale-box-aff::before { background: linear-gradient(90deg, #7c2222, #da4848, #7c2222); }
        .ma-btn-ok { background: linear-gradient(135deg, #7c2222, #da4848); border: 1px solid rgba(248, 113, 113, 0.45); }
        .ma-btn-ok:hover { filter: brightness(1.12); }

        /* ===== Mode Campagne Avancée (Liens, Résilience, Déni) ===== */
        .lien-card {
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(56, 189, 248, 0.3);
            border-radius: 0.5rem;
            padding: 0.65rem 0.75rem;
            transition: border-color 0.2s;
        }
        .lien-card:focus-within {
            border-color: rgba(56, 189, 248, 0.7);
        }
        .btn-projeter-san {
            background: linear-gradient(135deg, rgba(136, 19, 55, 0.85), rgba(190, 24, 93, 0.85));
            border: 1px solid rgba(251, 113, 133, 0.45);
            color: #ffe4e6;
            transition: all 0.15s ease;
        }
        .btn-projeter-san:hover {
            filter: brightness(1.15);
            transform: translateY(-1px);
        }
        .btn-projeter-san:active {
            transform: translateY(0);
        }
        .lien-card-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        @media (max-width: 640px) {
            .lien-card-actions {
                flex-direction: column;
                align-items: stretch;
            }
            .lien-card-actions .btn-projeter-san {
                width: 100%;
                justify-content: center;
                margin-top: 0.25rem;
            }
        }
        .deni-etape-badge {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.68rem;
            font-weight: 700;
            padding: 0.2rem 0.5rem;
            border-radius: 0.375rem;
        }

        .modale-projeter {
            background: linear-gradient(160deg, #07131e, #02060b);
            border: 1px solid rgba(56, 189, 248, 0.45);
            border-radius: 0.9rem;
            padding: 1.4rem;
            max-width: 28rem;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.15);
            height: fit-content;
        }

        .modale-deni {
            background: linear-gradient(160deg, #180d24, #08030f);
            border: 1px solid rgba(168, 85, 247, 0.45);
            border-radius: 0.9rem;
            padding: 1.4rem;
            max-width: 28rem;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.15);
            height: fit-content;
        }

        /* ===== Mécanique de Terreur (Mode Jeu & Édition) ===== */
        .carte-terreur-sidere {
            background: linear-gradient(160deg, rgba(76, 5, 25, 0.5), rgba(15, 23, 42, 0.95)) !important;
            border-color: rgba(244, 63, 94, 0.7) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(244, 63, 94, 0.25) !important;
        }

        /* ===== Bouton RAZ Afflictions & Compétences ===== */
        #btnRazQuotas i, #btnRazQuotas svg {
            width: 0.875rem !important;
            height: 0.875rem !important;
        }

        /* ===== Modale Catalogue d'Objets & Armurerie ===== */
        #modaleCatalogueObjets h3, #modaleResetQuotas h3 {
            text-shadow: none;
        }
        #modaleCatalogueObjets i, #modaleCatalogueObjets svg {
            width: 1rem;
            height: 1rem;
        }

        /* Suppression des flèches/spinner natifs pour le champ quantité du catalogue */
        .catalogue-item-qte::-webkit-inner-spin-button,
        .catalogue-item-qte::-webkit-outer-spin-button {
            -webkit-appearance: none !important;
            margin: 0 !important;
        }
        .catalogue-item-qte {
            -moz-appearance: textfield !important;
            appearance: textfield !important;
        }

        #catalogueListeConteneur {
            scrollbar-width: thin;
            scrollbar-color: rgba(53, 196, 165, 0.4) #02070a;
        }

        #catalogueListeConteneur::-webkit-scrollbar {
            width: 5px;
        }

        #catalogueListeConteneur::-webkit-scrollbar-track {
            background: #020617;
            border-radius: 4px;
        }

        #catalogueListeConteneur::-webkit-scrollbar-thumb {
            background: rgba(53, 196, 165, 0.35);
            border-radius: 4px;
        }

        #catalogueListeConteneur::-webkit-scrollbar-thumb:hover {
            background: rgba(53, 196, 165, 0.7);
        }

        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }
        .no-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        /* Responsive Mobile pour la modale Catalogue */
        @media (max-width: 640px) {
            #modaleCatalogueObjets {
                padding: 0.5rem !important;
            }
            .catalogue-item-actions {
                width: 100%;
                display: flex !important;
                flex-wrap: wrap !important;
                align-items: center;
                gap: 0.5rem;
            }
            .catalogue-qte-wrapper {
                width: 100%;
                justify-content: center;
                height: 36px;
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }
            .catalogue-item-actions > button {
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-height: 36px;
                font-size: 12px;
                white-space: nowrap;
                justify-content: center;
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }
        }

        /* ===== Boutons d'aide contextuelle des règles ( ? ) ===== */
        .btn-help-rule {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.55rem;
            height: 1.55rem;
            min-width: 1.55rem;
            min-height: 1.55rem;
            padding: 0;
            border-radius: 9999px;
            background: rgba(6, 78, 59, 0.4);
            border: 1px solid rgba(16, 185, 129, 0.45);
            color: #34d399;
            cursor: pointer;
            transition: all 0.15s ease-in-out;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
            flex-shrink: 0;
            vertical-align: middle;
        }

        .btn-help-rule:hover {
            background: rgba(16, 185, 129, 0.25);
            border-color: #10b981;
            color: #a7f3d0;
            transform: scale(1.08);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
        }

        .btn-help-rule:active {
            transform: scale(0.95);
        }

        /* Règle 5 Lucide : double ciblage i, svg */
        .btn-help-rule i,
        .btn-help-rule svg {
            width: 0.95rem !important;
            height: 0.95rem !important;
            pointer-events: none !important;
        }

        /* Variantes de couleurs contextuelles pour les boutons d'aide */
        .btn-help-rule-sky {
            background: rgba(12, 74, 110, 0.4) !important;
            border-color: rgba(56, 189, 248, 0.45) !important;
            color: #38bdf8 !important;
        }
        .btn-help-rule-sky:hover {
            background: rgba(14, 165, 233, 0.25) !important;
            border-color: #38bdf8 !important;
            color: #e0f2fe !important;
            box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
        }

        .btn-help-rule-indigo {
            background: rgba(49, 46, 129, 0.4) !important;
            border-color: rgba(99, 102, 241, 0.45) !important;
            color: #a5b4fc !important;
        }
        .btn-help-rule-indigo:hover {
            background: rgba(99, 102, 241, 0.25) !important;
            border-color: #818cf8 !important;
            color: #c7d2fe !important;
            box-shadow: 0 0 10px rgba(99, 102, 241, 0.35) !important;
        }

        .btn-help-rule-purple {
            background: rgba(88, 28, 135, 0.4) !important;
            border-color: rgba(168, 85, 247, 0.45) !important;
            color: #c084fc !important;
        }
        .btn-help-rule-purple:hover {
            background: rgba(168, 85, 247, 0.25) !important;
            border-color: #c084fc !important;
            color: #f3e8ff !important;
            box-shadow: 0 0 10px rgba(168, 85, 247, 0.35) !important;
        }

        .btn-help-rule-rose {
            background: rgba(136, 19, 55, 0.4) !important;
            border-color: rgba(244, 63, 94, 0.45) !important;
            color: #fb7185 !important;
        }
        .btn-help-rule-rose:hover {
            background: rgba(244, 63, 94, 0.25) !important;
            border-color: #fb7185 !important;
            color: #ffe4e6 !important;
            box-shadow: 0 0 10px rgba(244, 63, 94, 0.35) !important;
        }

        /* ===== Modale universelle d'aide contextuelle ===== */
        .modale-aide-card {
            background: linear-gradient(160deg, #0d1e1a, #07100e);
            border: 1px solid rgba(16, 185, 129, 0.45);
            border-radius: 1rem;
            padding: 1.35rem;
            max-width: 32rem;
            width: 94vw;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.15);
            height: fit-content;
            max-height: 88vh;
            display: flex;
            flex-direction: column;
        }

        .aide-badge-section {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.2rem 0.55rem;
            border-radius: 0.375rem;
            font-size: 0.7rem;
            font-family: monospace;
            font-weight: 700;
            background: rgba(6, 78, 59, 0.5);
            border: 1px solid rgba(16, 185, 129, 0.4);
            color: #6ee7b7;
        }

        .aide-box-resume {
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(51, 65, 85, 0.6);
            border-radius: 0.65rem;
            padding: 0.75rem 0.85rem;
        }

        .aide-box-regle {
            background: rgba(6, 78, 59, 0.2);
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 0.65rem;
            padding: 0.75rem 0.85rem;
        }

        .aide-box-conseil {
            background: rgba(30, 27, 75, 0.3);
            border: 1px solid rgba(99, 102, 241, 0.3);
            border-radius: 0.65rem;
            padding: 0.75rem 0.85rem;
        }

        #modaleAideRegle i,
        #modaleAideRegle svg {
            pointer-events: none;
        }

        /* Suppression stricte du flou/halo lumineux (text-shadow) dans toute la modale d'aide */
        #modaleAideRegle,
        #modaleAideRegle h1,
        #modaleAideRegle h2,
        #modaleAideRegle h3,
        #modaleAideRegle #aideTitre,
        #modaleAideRegle * {
            text-shadow: none !important;
        }

        @media (max-width: 640px) {
            .btn-help-rule {
                width: 1.7rem;
                height: 1.7rem;
                min-width: 1.7rem;
                min-height: 1.7rem;
            }
            .modale-aide-card {
                padding: 1rem;
                width: 95vw;
                max-height: 90vh;
            }
        }

        /* Support tactile iPad & Mobile : neutraliser la loupe/sélection système lors de l'appui long */
        button,
        .btn-de,
        .jeu-de-btn,
        .jeu-de-libre,
        .comp-ligne-score,
        [oncontextmenu] {
            -webkit-touch-callout: none !important;
            -webkit-user-select: none !important;
            user-select: none !important;
            touch-action: manipulation;
        }

