* {
    box-sizing: border-box;
}

/* ------------------------------------------------------------------
   Thème de la console
   ------------------------------------------------------------------ */

:root {
    /* Fond général */
    --app-bg: #00130e;

    /* Surfaces */
    --surface-main: #032a21;
    --surface-soft: #07392e;
    --surface-raised: #0b493a;
    --surface-hover: #105846;

    /* Bordures */
    --border-main: #1b6653;
    --border-soft: #10483a;

    /* Texte */
    --text-primary: #f1f7f5;
    --text-secondary: #b2c7c1;
    --text-muted: #78998f;

    /* Accent principal */
    --accent: #2bd4a0;
    --accent-hover: #43e0b2;
    --accent-dark: #19906d;
    --accent-soft: rgba(43, 212, 160, 0.16);

    /* États */
    --success: #4bd794;
    --success-bg: #11533a;

    --danger: #f17880;
    --danger-bg: #61262c;

    --warning: #f0bd55;
    --warning-bg: #64491c;

    --info: #55bde5;

    --shadow-soft:
            0 12px 35px rgba(0, 0, 0, 0.25);
}

body {
    margin: 0;
    padding: 40px;

    font-family:
            Arial,
            Helvetica,
            sans-serif;

    color: var(--text-primary);

    background:
            radial-gradient(
                    circle at top,
                    #073027 0,
                    var(--app-bg) 38rem
            );
}

main {
    max-width: 1500px;
    margin: 0 auto;
}

h1,
h2 {
    margin-top: 0;
}

section {
    padding: 24px;
    margin-bottom: 32px;

    background: var(--surface-main);

    border: 1px solid var(--border-soft);
    border-radius: 14px;

    box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
}

label,
legend {
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;

    color: var(--text-primary);
    background: var(--app-bg);

    border: 1px solid var(--border-main);
    border-radius: 7px;

    outline: none;

    transition:
            border-color 0.15s ease,
            box-shadow 0.15s ease,
            background-color 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--accent-dark);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);

    box-shadow:
            0 0 0 3px var(--accent-soft);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button {
    padding: 11px 20px;
    margin-top: 18px;

    color: #032219;
    background: var(--accent);

    border: 1px solid var(--accent);
    border-radius: 7px;

    font-weight: 700;

    cursor: pointer;

    transition:
            background-color 0.15s ease,
            border-color 0.15s ease,
            transform 0.15s ease;
}

button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.duration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scope-fieldset {
    margin: 0;
    padding: 16px;
    border: 1px solid #4b5563;
    border-radius: 8px;
}

.scope-fieldset legend {
    padding: 0 8px;
}

.scope-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.scope-option {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    font-weight: normal;

    background: var(--surface-soft);

    border: 1px solid var(--border-main);
    border-radius: 7px;

    cursor: pointer;

    transition:
            background-color 0.15s ease,
            border-color 0.15s ease;
}

.scope-option:hover {
    background: var(--surface-raised);
    border-color: var(--accent-dark);
}

.scope-option input {
    width: auto;
    margin: 0;
}

.success {
    padding: 12px;
    margin-bottom: 16px;
    color: #bbf7d0;
    background: #14532d;
    border-radius: 6px;
}

.errors,
.database-error {
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #fecaca;
    background: #7f1d1d;
    border-radius: 6px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
}

table {
    width: 100%;
    font-size: 0.78rem;
    border-collapse: collapse;
}

th,
td {
    padding: 7px 8px;
    border: 1px solid #374151;
    text-align: left;
    vertical-align: middle;
}

th {
    font-size: 0.75rem;
    white-space: nowrap;
    background: #374151;
}

td {
    line-height: 1.25;
}

.reason-badge,
.scope-badge {
    padding: 3px 6px;
    font-size: 0.72rem;
}

.state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    border-radius: 4px;
}

.state-active {
    color: #d6ffeb;
    background: #13734d;

    border: 1px solid #42dc98;

    box-shadow:
            0 0 0 1px rgba(66, 220, 152, 0.1);
}

.state-ended {
    color: #d7efff;
    background: #17658a;

    border: 1px solid #48b9ec;

    box-shadow:
            0 0 0 1px rgba(72, 185, 236, 0.12);
}

.state-undefined {
    color: #f5d89a;
    background: var(--warning-bg);

    border: 1px solid rgba(231, 183, 92, 0.4);
}

.state-permanent {
    color: #ffc3c8;
    background: var(--danger-bg);

    border: 1px solid rgba(239, 123, 131, 0.45);
}

.scope-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scope-badge {
    display: inline-block;

    padding: 4px 8px;

    color: var(--text-secondary);
    background: var(--surface-raised);

    border: 1px solid var(--border-main);
    border-radius: 999px;

    font-size: 0.85rem;
    white-space: nowrap;
}

/* Canal Général — vert */
.scope-badge[data-scope="general"] {
    color: #bcefd7;
    background: rgba(37, 201, 151, 0.16);
    border-color: rgba(43, 212, 160, 0.4);
}


/* Canal Aide — bleu */
.scope-badge[data-scope="aide"] {
    color: #bce8ff;
    background: rgba(54, 161, 215, 0.18);
    border-color: rgba(78, 188, 238, 0.42);
}


/* Messages privés — violet */
.scope-badge[data-scope="mp"] {
    color: #dfd0ff;
    background: rgba(132, 94, 194, 0.2);
    border-color: rgba(166, 126, 232, 0.44);
}


/* Tracker — orange */
.scope-badge[data-scope="tracker"] {
    color: #ffe0ab;
    background: rgba(208, 139, 38, 0.2);
    border-color: rgba(238, 174, 72, 0.44);
}


/* Ensemble du site — rouge/rose */
.scope-badge[data-scope="site"] {
    color: #ffc7cf;
    background: rgba(190, 58, 76, 0.21);
    border-color: rgba(239, 101, 119, 0.46);
}

.empty-value {
    color: #9ca3af;
}

@media (max-width: 900px) {
    body {
        padding: 20px;
    }

    .form-grid,
    .duration-grid,
    .scope-grid {
        grid-template-columns: 1fr;
    }
}
.delete-form {
    margin: 0;
}


.field-help {
    color: #9ca3af;
    font-size: 0.85rem;
}
.reason-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reason-badge {
    display: inline-block;

    padding: 4px 8px;

    color: #b9eadb;
    background: rgba(37, 201, 151, 0.12);

    border: 1px solid rgba(37, 201, 151, 0.3);
    border-radius: 999px;

    font-size: 0.85rem;
    white-space: nowrap;
}

/* Non-respect du staff — violet */
.reason-badge[data-reason="non_respect_staff"] {
    color: #ddd0ff;
    background: rgba(126, 87, 194, 0.22);
    border-color: rgba(167, 139, 250, 0.55);
}


/* Propos discriminatoires / polarisants — rouge */
.reason-badge[
    data-reason="propos_discriminatoires_polarisants"
] {
    color: #ffc7cc;
    background: rgba(190, 55, 65, 0.25);
    border-color: rgba(244, 105, 116, 0.55);
}


/* Insulte caractérisée — rouge orangé */
.reason-badge[data-reason="insulte_caracterisee"] {
    color: #ffd0b3;
    background: rgba(210, 91, 45, 0.23);
    border-color: rgba(245, 137, 87, 0.55);
}


/* Flood — bleu */
.reason-badge[data-reason="flood"] {
    color: #bfe6ff;
    background: rgba(45, 135, 190, 0.23);
    border-color: rgba(82, 181, 235, 0.55);
}


/* Troll / Provocation — orange */
.reason-badge[data-reason="troll_provocation"] {
    color: #ffe2a8;
    background: rgba(211, 145, 32, 0.23);
    border-color: rgba(240, 183, 72, 0.55);
}


/* Spam / HS — jaune */
.reason-badge[data-reason="spam_hs_repete"] {
    color: #f8edb1;
    background: rgba(183, 165, 42, 0.22);
    border-color: rgba(222, 204, 79, 0.5);
}


/* Autre — gris bleuté */
.reason-badge[data-reason="autre"] {
    color: #cfdae1;
    background: rgba(112, 134, 148, 0.2);
    border-color: rgba(150, 169, 181, 0.42);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.form-actions button {
    margin-top: 0;
}

.cancel-button {
    display: inline-block;
    padding: 10px 16px;
    color: #e5e7eb;
    text-decoration: none;
    background: #4b5563;
    border-radius: 6px;
}

.cancel-button:hover {
    background: #6b7280;
}

.empty-filter-result {
    padding: 16px;
    color: #d1d5db;
    text-align: center;
    background: #111827;
    border: 1px dashed #4b5563;
    border-radius: 6px;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
}
.screenshot-button {
    white-space: nowrap;
}
.screenshot-modal[hidden] {
    display: none;
}

.screenshot-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.screenshot-modal-backdrop {
    position: absolute;
    inset: 0;

    background:
            rgba(0, 12, 9, 0.84);

    backdrop-filter: blur(3px);
}

.screenshot-modal-content {
    position: relative;
    z-index: 1;

    width: min(1000px, 100%);
    max-height: 90vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    color: var(--text-primary);
    background: var(--surface-main);

    border: 1px solid var(--border-main);
    border-radius: 0.9rem;

    box-shadow:
            0 28px 80px rgba(0, 0, 0, 0.5);
}

.screenshot-modal-header,
.screenshot-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.screenshot-modal-header {
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-main);
}

.screenshot-modal-footer {
    justify-content: flex-end;

    background: var(--surface-raised);

    border-top: 1px solid var(--border-main);
}

.screenshot-modal-header h2 {
    margin: 0;
}

.screenshot-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 2.25rem;
    height: 2.25rem;

    margin: 0;
    padding: 0;

    color: var(--text-secondary);
    background: var(--surface-soft);

    border: 1px solid var(--border-main);
    border-radius: 0.5rem;

    font-size: 1.45rem;
    line-height: 1;

    cursor: pointer;
}

.screenshot-modal-close:hover {
    color: #ffffff;
    background: var(--danger-bg);
    border-color: var(--danger);
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
}

.screenshot-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.screenshot-gallery-item a {
    display: block;

    overflow: hidden;

    background: var(--app-bg);

    border: 1px solid var(--border-main);
    border-radius: 0.6rem;

    transition:
            border-color 0.15s ease,
            transform 0.15s ease,
            box-shadow 0.15s ease;
}

.screenshot-gallery-item a:hover {
    border-color: var(--accent);

    transform: translateY(-2px);

    box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.25);
}

.screenshot-gallery-item img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: contain;
}

.screenshot-gallery-item figcaption {
    overflow-wrap: anywhere;

    color: var(--text-secondary);

    font-size: 0.8rem;
    line-height: 1.35;
}

body.screenshot-modal-open {
    overflow: hidden;
}

.existing-screenshots {
    margin-bottom: 1rem;
    padding: 1rem;

    background: var(--surface-soft);

    border: 1px solid var(--border-main);
    border-radius: 0.65rem;
}

.existing-screenshots-title {
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.existing-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.existing-screenshot-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.existing-screenshot-link {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: var(--app-bg);

    border: 1px solid var(--border-main);
    border-radius: 0.6rem;
}

.existing-screenshot-thumbnail {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
}

.existing-screenshot-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.existing-screenshot-details strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.existing-screenshot-details small {
    opacity: 0.75;
}

@media (max-width: 1100px) {
    .existing-screenshots-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .existing-screenshots-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .existing-screenshots-grid {
        grid-template-columns: 1fr;
    }
}

.existing-screenshot-item {
    position: relative;
}

.existing-screenshot-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;

    display: grid;
    place-items: center;

    width: 2rem;
    height: 2rem;
    padding: 0;

    color: #ffb7bc;
    background: rgba(190, 40, 52, 0.82);

    border: 1px solid rgba(239, 82, 94, 0.68);
    border-radius: 50%;

    cursor: pointer;
    z-index: 2;

    transition:
            background-color 0.15s ease,
            border-color 0.15s ease,
            transform 0.15s ease;
}

.existing-screenshot-delete:hover {
    color: #ffffff;

    background: #c82f3c;
    border-color: #ff6975;

    transform: scale(1.06);
}

.existing-screenshot-delete input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.existing-screenshot-delete > span[aria-hidden="true"] {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-0.05rem);
}

.existing-screenshot-delete:has(input:checked) {
    background: rgba(190, 25, 40, 0.98);
    border-color: #ffffff;
    box-shadow:
            0 0 0 3px rgba(190, 25, 40, 0.28);
}

.existing-screenshot-delete:has(input:checked)
> span[aria-hidden="true"] {
    content: "✓";
}

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

.existing-screenshot-delete .delete-icon-checked {
    display: none;
}

.existing-screenshot-delete:has(input:checked)
.delete-icon-unchecked {
    display: none;
}

.existing-screenshot-delete:has(input:checked)
.delete-icon-checked {
    display: block;
}

/*
|--------------------------------------------------------------------------
| Page d’authentification
|--------------------------------------------------------------------------
*/

.auth-page {
    min-height: 100vh;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 2rem 1rem;

    background:
            radial-gradient(
                    circle at center,
                    rgba(37, 201, 151, 0.08) 0,
                    transparent 28rem
            );
}

.auth-card {
    width: 100%;
    max-width: 440px;

    padding: 2rem;

    color: var(--text-primary);
    background: var(--surface-main);

    border: 1px solid var(--border-soft);
    border-radius: 0.9rem;

    box-shadow:
            0 20px 55px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;

    color: var(--text-primary);

    font-size: 1.8rem;
    font-weight: 750;
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 0.5rem;
}

.auth-introduction {
    margin-top: 0;
    margin-bottom: 1.5rem;

    color: var(--text-secondary);

    line-height: 1.45;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
}

.auth-actions button {
    width: 100%;
    margin: 0;

    color: #032219;
    background: var(--accent);

    border-color: var(--accent);

    font-weight: 750;
}

.auth-actions button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

@media (max-width: 520px) {
    .auth-card {
        padding: 1.25rem;
    }
}

/*
|--------------------------------------------------------------------------
| En-tête de la console
|--------------------------------------------------------------------------
*/

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;

    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;

    background: var(--surface-main);

    border: 1px solid var(--border-soft);
    border-radius: 0.85rem;

    box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.console-header-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.console-header-title h1 {
    margin: 0;
}

.console-version {
    padding: 0.2rem 0.55rem;

    color: var(--accent);

    background: var(--accent-soft);

    border: 1px solid var(--accent-dark);
    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
}

.console-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.console-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.console-user-details strong {
    font-size: 0.95rem;
}

.console-user-details span {
    font-size: 0.78rem;
    opacity: 0.72;
}

.logout-form {
    margin: 0;
}

.logout-button {
    padding: 0.55rem 0.85rem;
    margin: 0;

    color: var(--text-secondary);
    background: var(--surface-soft);

    border: 1px solid var(--border-main);
    border-radius: 0.45rem;

    cursor: pointer;
}

.logout-button:hover {
    color: var(--danger);

    background: var(--danger-bg);

    border-color: var(--danger);
}

@media (max-width: 700px) {
    .console-header {
        align-items: stretch;
        flex-direction: column;
    }

    .console-user {
        justify-content: space-between;
    }

    .console-user-details {
        align-items: flex-start;
    }
}

.auth-information {
    margin-bottom: 1.25rem;
    padding: 0.8rem 1rem;

    color: var(--text-secondary);
    background: var(--accent-soft);

    border: 1px solid var(--accent-dark);
    border-radius: 0.55rem;

    line-height: 1.45;
}

/* ------------------------------------------------------------------
   Motifs d’infraction — cases à cocher
   ------------------------------------------------------------------ */

.reason-fieldset {
    margin: 0;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
}

.reason-fieldset legend {
    padding: 0 0.4rem;
    font-weight: 700;
}

.reason-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.reason-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;

    background: var(--surface-soft);

    border: 1px solid var(--border-main);
    border-radius: 0.65rem;

    cursor: pointer;

    transition:
            background-color 0.15s ease,
            border-color 0.15s ease;
}

.reason-option:hover {
    background: var(--surface-raised);
    border-color: var(--accent);
}

.reason-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.reason-option span {
    line-height: 1.3;
}

.reason-fieldset .field-help {
    display: block;
    margin-top: 0.8rem;
}

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

/* ------------------------------------------------------------------
   Zones d’application — hiérarchie
   ------------------------------------------------------------------ */

.scope-hierarchy {
    display: grid;
    gap: 0.7rem;
}

/*
 * Niveau principal :
 * Site et Tracker.
 */

.scope-option-primary {
    font-weight: 750;

    background:
            rgba(0, 92, 69, 0.30);

    border-color:
            rgba(16, 185, 129, 0.42);
}

.scope-option-primary:hover {
    background:
            rgba(0, 112, 82, 0.34);

    border-color:
            rgba(52, 211, 153, 0.58);
}

/*
 * Sous-niveaux rattachés au Site.
 */

.scope-children {
    position: relative;

    display: grid;
    gap: 0.55rem;

    margin-left: 1.35rem;
    padding-left: 1rem;

    border-left:
            2px solid rgba(52, 211, 153, 0.25);
}

.scope-children .scope-option {
    position: relative;

    min-height: 2.55rem;

    background:
            rgba(0, 65, 51, 0.20);
}

/*
 * Marqueurs visuels de hiérarchie.
 */

.scope-children .scope-option::before {
    content: "";

    position: absolute;
    left: -1.05rem;

    width: 0.8rem;
    height: 1px;

    background:
            rgba(52, 211, 153, 0.28);
}

/*
 * État désactivé lorsque "Site" est sélectionné.
 */

.scope-option-disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.scope-option-disabled input {
    cursor: not-allowed;
}

.scope-fieldset .field-help {
    display: block;
    margin-top: 0.9rem;
}

[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------------
   Historique v2.3 — structure provisoire
   ------------------------------------------------------------------
*/

.history-section {
    width: 100%;
    margin: 2rem 0;
}

.history-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.history-header h2 {
    margin: 0;
}

.history-count {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    opacity: 0.65;
}

.history-section .table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.9rem;
}

.history-section table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
}

.history-section th,
.history-section td {
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
}

.history-date,
.history-user,
.history-sanction {
    white-space: nowrap;
}

.history-date strong,
.history-user strong,
.history-sanction strong {
    display: block;
}

.history-secondary,
.history-duration,
.history-remaining {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    opacity: 0.68;
}

.history-reasons,
.history-scopes {
    max-width: 15rem;
}

.history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.history-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;

    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;

    margin: 0;
    padding: 0;

    color: var(--text-secondary);
    background: var(--surface-raised);

    border: 1px solid var(--border-main);
    border-radius: 0.45rem;

    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    transition:
            color 0.15s ease,
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease,
            transform 0.15s ease;
}

.history-icon-button:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-color: var(--accent-dark);

    transform: translateY(-1px);
}

.history-delete-button {
    color: #ffb7bc !important;
    background: rgba(190, 40, 52, 0.22) !important;
    border-color: rgba(239, 82, 94, 0.62) !important;
}

.history-delete-button:hover {
    color: #ffffff !important;
    background: #c82f3c !important;
    border-color: #ff6975 !important;

    box-shadow:
            0 0 0 2px rgba(255, 80, 95, 0.13);
}

.history-actions button.history-icon-button {
    width: 2rem;
    height: 2rem;

    min-width: 2rem;
    min-height: 2rem;

    margin: 0;
    padding: 0;

    color: var(--text-secondary);
    background: var(--surface-raised);

    border: 1px solid var(--border-main);
    border-radius: 0.45rem;
}

.history-actions button.history-icon-button:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-color: var(--accent-dark);

    transform: translateY(-1px);
}

.history-control label {
    color: var(--text-muted);
}

.history-control select {
    background: var(--app-bg);

    border-color: var(--border-main);
}

.history-action-count {
    position: absolute;

    top: -0.32rem;
    right: -0.32rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;

    color: #ffffff;
    background: #238bc0;

    border: 1px solid var(--surface-main);
    border-radius: 999px;

    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
}

.history-state-column {
    width: 3rem;
    text-align: center;
}

.history-actions-column {
    width: 8rem;
    text-align: right;
}

.history-heading {
    flex: 0 0 auto;
}

.history-controls {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.6rem;
    margin: 0;
}

.history-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-control label {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.65;
}

.history-control select {
    min-width: 8.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
}

#history-status {
    min-width: 11rem;
}

#history-sort {
    min-width: 9rem;
}

#history-direction {
    min-width: 8rem;
}

/* ------------------------------------------------------------------
   Historique v2.3 — identité visuelle
   ------------------------------------------------------------------ */

.history-section {
    background: var(--surface-main);
    border-color: var(--border-soft);
}

.history-section .table-wrapper {
    background: var(--surface-soft);

    border: 1px solid var(--border-soft);
    border-radius: 0.9rem;
}

.history-section table {
    background: transparent;
}

.history-section th {
    color: #c6dcd5;

    background: #0b4a3b;

    border-color: #176350;

    font-weight: 700;
}

.history-section td {
    border-color: var(--border-soft);
}

.history-section tbody tr {
    background: var(--surface-soft);

    transition:
            background-color 0.15s ease;
}

.history-section tbody tr:hover {
    background: var(--surface-hover);
}

.history-secondary,
.history-duration,
.history-remaining,
.history-count {
    color: var(--text-secondary);
}

/* ------------------------------------------------------------------
   Historique v2.3 — densité
   ------------------------------------------------------------------ */

.history-section th {
    padding: 0.65rem 0.7rem;
    font-size: 0.78rem;
}

.history-section td {
    padding: 0.65rem 0.7rem;
    font-size: 0.84rem;
}

.history-date,
.history-user,
.history-sanction {
    line-height: 1.3;
}

.history-secondary,
.history-duration,
.history-remaining {
    line-height: 1.25;
}

.history-reasons .reason-badges,
.history-scopes .scope-badges {
    gap: 0.3rem;
}

.history-reasons .reason-badge,
.history-scopes .scope-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.76rem;
}

.history-reasons {
    width: 24%;
    max-width: 17rem;
}

.history-scopes {
    width: 18%;
    max-width: 13rem;
}

.history-reasons .reason-badges,
.history-scopes .scope-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.history-date {
    width: 8rem;
}

.history-user {
    width: 11rem;
}

.history-sanction {
    width: 12rem;
}

.history-state-column {
    width: 3.5rem;
}

.history-actions-column {
    width: 8.5rem;
}

.history-actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.history-actions .delete-form {
    margin: 0;
}

@media (max-width: 1050px) {
    .history-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .history-controls {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .history-section th,
    .history-section td {
        padding: 0.55rem;
    }
}

/* ------------------------------------------------------------------
   Historique v2.3 — affichage mobile
   ------------------------------------------------------------------ */

@media (max-width: 720px) {

    .history-section {
        margin: 1rem 0;
    }

    .history-controls {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .history-control,
    .history-control select {
        width: 100%;
    }

    #history-status,
    #history-sort,
    #history-direction {
        min-width: 0;
        width: 100%;
    }

    .history-section .table-wrapper {
        overflow: visible;
    }

    .history-section table,
    .history-section tbody {
        display: block;
        width: 100%;
    }

    .history-section thead {
        display: none;
    }

    .history-section tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 0.85rem;
        padding: 0.75rem;
        border-radius: 0.75rem;
    }

    .history-section tbody td {
        display: grid;
        grid-template-columns: 7rem 1fr;
        align-items: start;
        width: 100%;
        max-width: none;
        padding: 0.45rem 0;
        border: 0;
        white-space: normal;
        text-align: left;
    }

    .history-section tbody td::before {
        content: attr(data-label);
        padding-right: 0.75rem;
        font-size: 0.72rem;
        font-weight: 700;
        opacity: 0.55;
    }

    .history-actions {
        justify-content: flex-start;
    }

    .history-state-column,
    .history-actions-column {
        width: 100%;
        text-align: left;
    }
}

.history-section tbody tr:nth-child(even) {
    background: rgba(5, 55, 44, 0.72);
}

.history-section tbody tr:nth-child(odd) {
    background: rgba(4, 48, 39, 0.72);
}

.history-section tbody tr:hover {
    background: var(--surface-hover);
}

.history-sanction strong {
    color: #f3faf7;
    font-weight: 750;
}

/*
|--------------------------------------------------------------------------
| Badges de sanctions dans l'historique
|--------------------------------------------------------------------------
*/

.history-sanction-badge {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    padding: 0.25rem 0.55rem;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
}


/*
 * Avertissement — vert clair
 */

.history-sanction[data-sanction="avertissement"]
.history-sanction-badge {
    color: #b8f3d1;

    background:
            rgba(66, 190, 122, 0.15);

    border-color:
            rgba(115, 214, 162, 0.46);
}


/*
 * Time Out — bleu
 */

.history-sanction[data-sanction="timeout"]
.history-sanction-badge {
    color: #b8e5fa;

    background:
            rgba(65, 159, 207, 0.16);

    border-color:
            rgba(105, 183, 222, 0.48);
}


/*
 * Ban Shout — violet
 */

.history-sanction[data-sanction="ban_shout"]
.history-sanction-badge {
    color: #dfcafa;

    background:
            rgba(139, 93, 194, 0.17);

    border-color:
            rgba(173, 139, 214, 0.48);
}


/*
 * Shadow Ban — jaune
 */

.history-sanction[data-sanction="shadow_ban"]
.history-sanction-badge {
    color: #f6dfa0;

    background:
            rgba(190, 148, 38, 0.16);

    border-color:
            rgba(223, 188, 88, 0.48);
}


/*
 * Bannissement — rouge
 */

.history-sanction[data-sanction="bannissement"]
.history-sanction-badge {
    color: #f7c1c6;

    background:
            rgba(190, 64, 76, 0.17);

    border-color:
            rgba(218, 125, 135, 0.5);
}

.history-user strong,
.history-date strong {
    color: #eef7f3;
}

.history-origin {
    color: var(--text-muted);
}

.history-note-button:hover {
    color: #ffe39a !important;
    background: rgba(190, 145, 38, 0.18) !important;
    border-color: rgba(238, 184, 70, 0.65) !important;
}

.screenshot-button:hover {
    color: #bdeaff !important;
    background: rgba(50, 155, 205, 0.18) !important;
    border-color: rgba(78, 190, 235, 0.65) !important;
}

.history-edit-button {
    color: #84f5c3;
    background: rgba(30, 170, 115, 0.16);
    border-color: rgba(54, 215, 151, 0.5);
}

.history-edit-button:hover {
    color: #d8ffec;
    background: #16a66f;
    border-color: #49edaa;

    box-shadow:
            0 0 0 2px rgba(73, 237, 170, 0.12);
}

.screenshot-modal-footer .secondary-button {
    margin: 0;

    color: var(--text-secondary);
    background: var(--surface-soft);

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

.screenshot-modal-footer .secondary-button:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-color: var(--accent-dark);
}

/*
|--------------------------------------------------------------------------
| Niveaux d'avertissement utilisateur
|--------------------------------------------------------------------------
*/

.history-user-main {
    display: flex;
    align-items: center;
    gap: 7px;
}

.history-username {
    transition:
            color 0.15s ease,
            text-shadow 0.15s ease;
}

/*
 * Niveau 1 : jaune
 */

.history-user .history-username.warning-level-1 {
    color: #facc15;

    text-shadow:
            0 0 8px rgba(250, 204, 21, 0.18);
}

/*
 * Niveau 2 : orange
 */

.history-user .history-username.warning-level-2 {
    color: #fb923c;

    text-shadow:
            0 0 8px rgba(251, 146, 60, 0.22);
}

/*
 * Niveau 3 et plus : rouge
 */

.history-user .history-username.warning-level-3 {
    color: #f87171;

    text-shadow:
            0 0 8px rgba(248, 113, 113, 0.28);
}

.user-combobox-username.warning-level-1 {
    color: #facc15;
}

.user-combobox-username.warning-level-2 {
    color: #fb923c;
}

.user-combobox-username.warning-level-3 {
    color: #f87171;
}

#sanctioned_username.warning-level-1 {
    color: #facc15;
}

#sanctioned_username.warning-level-2 {
    color: #fb923c;
}

#sanctioned_username.warning-level-3 {
    color: #f87171;
}

.warning-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 21px;
    height: 21px;

    padding: 0 5px;

    border-radius: 999px;

    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;

    border: 1px solid transparent;
}

/*
 * Badge niveau 1.
 */

.warning-badge-1 {
    color: #1c1700;
    background: #facc15;
    border-color: #fde047;
}

/*
 * Badge niveau 2.
 */

.warning-badge-2 {
    color: #211000;
    background: #fb923c;
    border-color: #fdba74;
}

/*
 * Badge niveau 3+.
 */

.warning-badge-3 {
    color: #ffffff;
    background: #dc2626;
    border-color: #f87171;

    box-shadow:
            0 0 0 1px rgba(248, 113, 113, 0.12);
}

/*
|--------------------------------------------------------------------------
| Sélection d'un utilisateur sanctionné
|--------------------------------------------------------------------------
*/

.user-combobox {
    position: relative;
}

.user-combobox-control {
    position: relative;
    display: flex;
    align-items: stretch;
}

.user-combobox-control input {
    width: 100%;
    padding-right: 2.8rem;
}

.user-combobox-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;

    width: 2.4rem;

    padding: 0;

    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);

    background: rgba(255, 255, 255, 0.04);
    color: inherit;

    cursor: pointer;
}

.user-combobox-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-combobox-options {
    position: absolute;
    z-index: 50;

    top: calc(100% - 1.2rem);
    left: 0;
    right: 0;

    max-height: 17rem;

    overflow-y: auto;

    padding: 0.35rem;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.55rem;

    background: #101820;

    box-shadow:
            0 0.8rem 2rem rgba(0, 0, 0, 0.38);
}

.user-combobox-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;

    width: 100%;

    padding: 0.5rem 0.6rem;

    border: 0;
    border-radius: 0.4rem;

    background: transparent;

    color: inherit;

    text-align: left;

    cursor: pointer;
}

.user-combobox-option:hover,
.user-combobox-option.is-active {
    background: rgba(255, 255, 255, 0.08);
}

.user-combobox-username {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-weight: 700;
}

.user-combobox-help {
    margin-top: 0.35rem;
}

/*
|--------------------------------------------------------------------------
| Administration des comptes
|--------------------------------------------------------------------------
*/

.admin-accounts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 0 14px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;

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

    color: #e8f5ef;

    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;

    transition:
            background 0.15s ease,
            border-color 0.15s ease;
}

.admin-accounts-button:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.28);
}

.admin-accounts-modal[hidden] {
    display: none;
}

.admin-accounts-modal {
    position: fixed;
    z-index: 1000;

    inset: 0;

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

    padding: 24px;
}

.admin-accounts-modal-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.admin-accounts-modal-content {
    position: relative;
    z-index: 1;

    width: min(1100px, 100%);
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    padding: 24px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;

    background: #111c18;

    box-shadow:
            0 24px 70px rgba(0, 0, 0, 0.55);
}

.admin-accounts-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.admin-accounts-modal-header h2 {
    margin: 0 0 5px;
}

.admin-accounts-modal-header p {
    margin: 0;

    color: rgba(255, 255, 255, 0.6);

    font-size: 0.88rem;
}

.admin-accounts-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;

    color: #ffffff;
    text-decoration: none;

    font-size: 1.4rem;
    line-height: 1;

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

.admin-accounts-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-accounts-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(280px, 0.8fr);

    gap: 24px;
}

.admin-accounts-list,
.admin-account-create {
    min-width: 0;

    padding: 18px;

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

    background: rgba(0, 0, 0, 0.16);
}

.admin-accounts-list h3,
.admin-account-create h3 {
    margin-top: 0;
}

.admin-accounts-table-wrapper {
    width: 100%;

    overflow-x: auto;
}

.admin-accounts-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 0.84rem;
}

.admin-accounts-table th,
.admin-accounts-table td {
    padding: 10px 8px;

    border-bottom:
            1px solid rgba(255, 255, 255, 0.08);

    text-align: left;
    vertical-align: middle;
}

.admin-accounts-table th {
    color: rgba(255, 255, 255, 0.58);

    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-account-username {
    display: block;

    margin-top: 2px;

    color: rgba(255, 255, 255, 0.48);

    font-size: 0.76rem;
}

.admin-account-status {
    display: inline-flex;

    padding: 3px 7px;

    border-radius: 999px;

    font-size: 0.72rem;
    font-weight: 800;
}

.admin-account-status.is-active {
    color: #9ff4bf;

    background:
            rgba(39, 174, 96, 0.16);
}

.admin-account-status.is-inactive {
    color: #ff9b9b;

    background:
            rgba(220, 38, 38, 0.16);
}

.admin-account-create form {
    display: grid;
    gap: 14px;
}

.admin-account-create-button {
    width: 100%;

    margin-top: 4px;
}

@media (max-width: 850px) {
    .admin-accounts-layout {
        grid-template-columns: 1fr;
    }
}

.admin-account-actions {
    white-space: nowrap;
}

.admin-account-actions form {
    margin: 0;
}

.admin-account-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding: 4px 9px;

    border: 1px solid transparent;
    border-radius: 6px;

    font-size: 0.73rem;
    font-weight: 800;

    cursor: pointer;
}

.admin-account-action-button.is-disable {
    color: #ffaaaa;

    background: rgba(220, 38, 38, 0.13);
    border-color: rgba(248, 113, 113, 0.28);
}

.admin-account-action-button.is-disable:hover {
    background: rgba(220, 38, 38, 0.22);
}

.admin-account-action-button.is-enable {
    color: #a7f3c0;

    background: rgba(34, 197, 94, 0.13);
    border-color: rgba(74, 222, 128, 0.28);
}

.admin-account-action-button.is-enable:hover {
    background: rgba(34, 197, 94, 0.22);
}

.admin-account-current {
    color: rgba(255, 255, 255, 0.46);

    font-size: 0.74rem;
    font-style: italic;
}

.admin-account-actions-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;
}

.admin-account-action-button.is-password {
    color: #b8d9ff;

    background:
            rgba(59, 130, 246, 0.12);

    border-color:
            rgba(96, 165, 250, 0.26);
}

.admin-account-action-button.is-password:hover {
    background:
            rgba(59, 130, 246, 0.22);
}

.admin-account-action-button.is-cancel {
    color: rgba(255, 255, 255, 0.7);

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

    border-color:
            rgba(255, 255, 255, 0.12);
}

.admin-password-form[hidden] {
    display: none;
}

.admin-password-form {
    display: grid;

    gap: 8px;

    min-width: 220px;

    margin-top: 10px;
    padding: 10px;

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

    border-radius: 7px;

    background:
            rgba(0, 0, 0, 0.18);
}

.admin-password-form label {
    display: grid;

    gap: 4px;

    color:
            rgba(255, 255, 255, 0.65);

    font-size: 0.72rem;
}

.admin-password-form input {
    width: 100%;

    min-height: 34px;

    padding: 6px 8px;
}

.admin-password-form-actions {
    display: flex;

    gap: 6px;

    margin-top: 2px;
}

.admin-account-action-button.is-display-name {
    color: #d6c8ff;

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

    border-color:
            rgba(167, 139, 250, 0.26);
}

.admin-account-action-button.is-display-name:hover {
    background:
            rgba(139, 92, 246, 0.22);
}

.admin-display-name-form[hidden] {
    display: none;
}

.admin-display-name-form {
    display: grid;

    gap: 8px;

    min-width: 220px;

    margin-top: 10px;
    padding: 10px;

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

    border-radius: 7px;

    background:
            rgba(0, 0, 0, 0.18);
}

.admin-display-name-form label {
    display: grid;

    gap: 4px;

    color:
            rgba(255, 255, 255, 0.65);

    font-size: 0.72rem;
}

.admin-display-name-form input {
    width: 100%;

    min-height: 34px;

    padding: 6px 8px;
}

.admin-display-name-form-actions {
    display: flex;

    gap: 6px;

    margin-top: 2px;
}



/*
|--------------------------------------------------------------------------
| Champ d'upload des captures d'écran
|--------------------------------------------------------------------------
*/

input[type="file"] {
    width: 100%;
    padding: 10px;

    color: rgba(255, 255, 255, 0.88);

    background:
            rgba(0, 75, 58, 0.22);

    border:
            1px solid rgba(16, 185, 129, 0.55);

    border-radius: 7px;
}

/*
|--------------------------------------------------------------------------
| Bouton natif "Parcourir..."
|--------------------------------------------------------------------------
*/

input[type="file"]::file-selector-button {
    margin-right: 18px;
    padding: 10px 16px;

    color: #ffffff;

    background: #059669;

    border: 0;
    border-radius: 6px;

    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: #10b981;
}

input[type="file"]::-webkit-file-upload-button {
    margin-right: 18px;
    padding: 10px 16px;

    color: #ffffff;

    background: #059669;

    border: 0;
    border-radius: 6px;

    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| Sélecteur personnalisé de sanction
|--------------------------------------------------------------------------
*/

.sanction-select {
    position: relative;
}

.sanction-select-control {
    position: relative;
}

.sanction-select-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    width: 100%;
    min-height: 42px;

    margin: 0;
    padding: 10px 12px;

    color: var(--text-primary);
    background: var(--app-bg);

    border: 1px solid var(--border-main);
    border-radius: 7px;

    font-size: 1rem;
    font-weight: 400;
    text-align: left;

    cursor: pointer;

    transition:
            border-color 0.15s ease,
            box-shadow 0.15s ease,
            background-color 0.15s ease;
}

.sanction-select-toggle:hover {
    background: var(--app-bg);
    border-color: var(--accent-dark);
}

.sanction-select-toggle:focus {
    border-color: var(--accent);

    box-shadow:
            0 0 0 3px var(--accent-soft);

    outline: none;
}

.sanction-select-toggle[aria-expanded="true"] {
    border-color: var(--accent);
}

.sanction-select-current {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    min-width: 0;
}

.sanction-select-chevron {
    flex: 0 0 auto;

    color: var(--text-secondary);

    transition:
            transform 0.15s ease;
}

.sanction-select-toggle[aria-expanded="true"]
.sanction-select-chevron {
    transform: rotate(180deg);
}


/*
|--------------------------------------------------------------------------
| Liste déroulante
|--------------------------------------------------------------------------
*/

.sanction-select-options {
    position: absolute;
    z-index: 80;

    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;

    display: grid;
    gap: 0.25rem;

    padding: 0.4rem;

    background: #07241c;

    border: 1px solid var(--border-main);
    border-radius: 0.65rem;

    box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.42);
}

.sanction-select-options[hidden] {
    display: none;
}

.sanction-select-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;

    width: 100%;

    margin: 0;
    padding: 0.65rem 0.75rem;

    color: var(--text-primary);
    background: transparent;

    border: 1px solid transparent;
    border-radius: 0.5rem;

    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;

    cursor: pointer;
}

.sanction-select-option:hover,
.sanction-select-option.is-active {
    color: var(--text-primary);

    background: var(--surface-raised);

    border-color: var(--border-main);
}

.sanction-select-option.is-selected {
    background: var(--surface-soft);
    border-color: var(--accent-dark);
}

.sanction-select-option-placeholder {
    color: var(--text-muted);
}


/*
|--------------------------------------------------------------------------
| Pastilles de sanctions
|--------------------------------------------------------------------------
*/

.sanction-select-dot,
.sanction-select-current-dot {
    flex: 0 0 auto;

    width: 0.72rem;
    height: 0.72rem;

    border-radius: 50%;

    border: 1px solid transparent;

    box-shadow:
            0 0 0 2px rgba(255, 255, 255, 0.025);
}

/*
|--------------------------------------------------------------------------
| Pastilles de sanctions — palette commune
|--------------------------------------------------------------------------
*/

/*
 * Avertissement — vert clair
 */

.sanction-select-dot-avertissement,
.sanction-select-current-dot[data-sanction="avertissement"] {
    background: #73d6a2;
    border-color: #a6edc5;
}

/*
 * Time Out — bleu
 */

.sanction-select-dot-timeout,
.sanction-select-current-dot[data-sanction="timeout"] {
    background: #69b7de;
    border-color: #a7daf3;
}

/*
 * Ban Shout — violet
 */

.sanction-select-dot-ban_shout,
.sanction-select-current-dot[data-sanction="ban_shout"] {
    background: #ad8bd6;
    border-color: #d2b9ef;
}

/*
 * Shadow Ban — jaune
 */

.sanction-select-dot-shadow_ban,
.sanction-select-current-dot[data-sanction="shadow_ban"] {
    background: #dfbc58;
    border-color: #f1d989;
}

/*
 * Bannissement — rouge
 */

.sanction-select-dot-bannissement,
.sanction-select-current-dot[data-sanction="bannissement"] {
    background: #da7d87;
    border-color: #f0adb4;
}

/*
|--------------------------------------------------------------------------
| Formulaire de modération — structure par blocs
|--------------------------------------------------------------------------
*/

.moderation-form-layout {
    display: grid;
    gap: 1.5rem;
}

.moderation-form-block {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 1.5rem;

    padding: 1.25rem;

    border:
            1px solid rgba(148, 163, 184, 0.24);

    border-radius: 0.8rem;

    background:
            rgba(0, 40, 32, 0.12);
}

.moderation-form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Séparation des colonnes du formulaire
|--------------------------------------------------------------------------
*/

.moderation-form-column-right {
    padding-left: 1.5rem;

    border-left:
            1px solid rgba(148, 163, 184, 0.16);
}

.moderation-form-block .reason-fieldset,
.moderation-form-block .scope-fieldset {
    height: 100%;
}

.moderation-form-column-right .reason-fieldset,
.moderation-form-column-right .scope-fieldset {
    margin: 0;
}

.moderation-form-block-details textarea {
    min-height: 14rem;
    height: 100%;
    resize: vertical;
}

.moderation-form-block-details
.moderation-form-column-left .field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.moderation-form-block-details
.moderation-form-column-left textarea {
    flex: 1;
}

.moderation-form-submit-column .form-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

@media (max-width: 900px) {

    .moderation-form-block {
        grid-template-columns: 1fr;
    }

    .moderation-form-column-right {
        padding-left: 0;
        padding-top: 1.25rem;

        border-left: 0;

        border-top:
                1px solid rgba(148, 163, 184, 0.16);
    }

}

.moderation-form-submit-column {
    min-height: 100%;
}

.moderation-form-submit-column .form-actions {
    margin-top: auto;
    padding-top: 1rem;
}