/*
 * Vintage Audio Laser — composants communs Flarum
 * Smileys, émojis, modèles, lightbox, menus, règles, sondages.
 */

.val-smiley-picker,
.val-model-picker,
.val-emoji-picker {
    position: relative;
    display: inline-block;
}

.val-smiley-picker-button.is-open,
.val-model-picker-button.is-open,
.val-emoji-picker-button.is-open {
    background: var(--control-bg);
}

.TextEditor-controls:has(.val-smiley-picker-button.is-open),
.TextEditor-controls:has(.val-model-picker-button.is-open),
.TextEditor-controls:has(.val-emoji-picker-button.is-open) {
    overflow: visible;
}

/* -------------------------
   Émojis — sélecteur du bouton
   ------------------------- */

.val-emoji-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 1200;

    width: 330px;
    max-width: 85vw;
    max-height: 270px;
    overflow-y: auto;

    display: grid;
    grid-template-columns: repeat(8, minmax(34px, 1fr));
    gap: 3px;

    padding: 8px;

    background: var(--body-bg);
    border: 1px solid var(--control-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.val-emoji-item {
    width: 100%;
    height: 38px;
    min-width: 0;

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

    padding: 0;
    border: 0;
    border-radius: var(--border-radius);
    background: transparent;

    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.val-emoji-item:hover,
.val-emoji-item:focus {
    background: var(--control-bg);
    outline: 0;
}

/* -------------------------
   Smileys
   ------------------------- */

.val-smiley-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 1100;

    width: 360px;
    max-width: 85vw;
    max-height: 280px;
    overflow-y: auto;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 4px;

    padding: 8px;

    background: var(--body-bg);
    border: 1px solid var(--control-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.val-smiley-item {
    height: 40px;
    min-width: 40px;

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

    padding: 3px;

    border: 0;
    border-radius: var(--border-radius);
    background: transparent;
    cursor: pointer;
}

.val-smiley-item:hover {
    background: var(--control-bg);
}

.val-smiley-item img {
    display: block;
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
}


/* -------------------------
   Autocomplétion ":" → Smileys VAL
   ------------------------- */

.ComposerBody-emojiDropdownContainer .EmojiDropdown {
    width: 360px !important;
    max-width: 85vw !important;
    max-height: 280px !important;
    overflow-y: auto !important;

    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 4px;

    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box;
    list-style: none;

    background: var(--body-bg);
    border: 1px solid var(--control-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.ComposerBody-emojiDropdownContainer .EmojiDropdown .Dropdown-header {
    grid-column: 1 / -1;
    margin: 0;
    padding: 4px 6px 8px;
}

.ComposerBody-emojiDropdownContainer .EmojiDropdown > li:not(.Dropdown-header) {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.ComposerBody-emojiDropdownContainer .EmojiDropdown > li:not(.Dropdown-header) > button {
    width: 100%;
    height: 40px;
    min-width: 0;
    padding: 3px;
    box-sizing: border-box;
}

/* -------------------------
   Modèles
   ------------------------- */

.val-model-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 1100;

    width: 310px;
    max-width: 85vw;
    max-height: 340px;
    overflow-y: auto;

    padding: 6px;

    white-space: normal;

    background: var(--body-bg);
    border: 1px solid var(--control-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}

.val-model-item {
    display: block;
    width: 100%;

    padding: 8px 10px;

    border: 0;
    border-radius: var(--border-radius);
    background: transparent;

    color: var(--text-color);
    text-align: left;
    font-size: 14px;
    line-height: 1.35;

    cursor: pointer;
}

.val-model-item:hover {
    background: var(--control-bg);
}

.val-model-separator {
    height: 1px;
    margin: 5px 4px;
    background: var(--control-bg);
}

/* Aperçus : comportement équivalent au phpBB (600 px maxi) */
.Post-body .FoFUpload--Upl-Image-Preview-Link {
    display: block;
    max-width: 600px;
}

.Post-body .FoFUpload--Upl-Image-Preview {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
}


/* Menu d'actions d'un post : rester au-dessus du post suivant */
.Post:has(.Dropdown.open) {
    position: relative;
    z-index: calc(var(--zindex-dropdown) + 1);
}

.Post:has(.Dropdown.open) .Post-actions {
    opacity: 1 !important;
}

/* Menu d'actions : fond réellement opaque, quel que soit le thème */
.Post-actions .Dropdown-menu {
    background: var(--body-bg) !important;
    opacity: 1 !important;
}

/* Lightbox VAL */
html.val-lightbox-open {
    overflow: hidden;
}

.val-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;

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

    padding: 30px 70px 24px;

    background: rgba(0, 0, 0, .88);
}

.val-lightbox.is-open {
    display: flex;
}

.val-lightbox-content {
    max-width: 100%;
    max-height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.val-lightbox-image {
    display: block;

    max-width: 92vw;
    max-height: 84vh;

    width: auto;
    height: auto;

    object-fit: contain;
}

.val-lightbox-info {
    width: 100%;
    margin-top: 10px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: #fff;
    font-size: 13px;
}

.val-lightbox-counter {
    white-space: nowrap;
    opacity: .75;
}

.val-lightbox-close,
.val-lightbox-prev,
.val-lightbox-next {
    position: absolute;
    z-index: 1;

    border: 0;
    background: transparent;
    color: #fff;

    cursor: pointer;
}

.val-lightbox-close {
    top: 10px;
    right: 18px;

    font-size: 38px;
    line-height: 1;
}

.val-lightbox-prev,
.val-lightbox-next {
    top: 50%;
    transform: translateY(-50%);

    width: 56px;
    height: 90px;

    font-size: 58px;
    line-height: 1;

    opacity: .75;
}

.val-lightbox-prev:hover,
.val-lightbox-next:hover,
.val-lightbox-close:hover {
    opacity: 1;
}

.val-lightbox-prev {
    left: 6px;
}

.val-lightbox-next {
    right: 6px;
}

@media (max-width: 767px) {
    .val-lightbox {
        padding: 45px 10px 18px;
    }

    .val-lightbox-image {
        max-width: 96vw;
        max-height: 78vh;
    }

    .val-lightbox-prev,
    .val-lightbox-next {
        width: 44px;
        height: 70px;
        font-size: 44px;
    }

    .val-lightbox-info {
        padding: 0 4px;
    }
}

/* =========================================================
   RÈGLES DU FORUM — FoF Pages
   Palette volontairement basée sur les variables Flarum :
   compatible Light / Dark / VAL / Neutre / Laser.
   ========================================================= */

.ValRulesPage {
    max-width: 980px;
    margin: 0 auto;
    color: var(--text-color);
}

.ValRulesPage,
.ValRulesPage * {
    box-sizing: border-box;
}

.ValRules-intro {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
}

.ValRules-toc {
    margin: 0 0 34px;
    padding: 18px 20px;
    background: var(--control-bg);
    border-radius: var(--border-radius);
}

.ValRules-toc h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.ValRules-toc ul {
    margin: 0;
    padding-left: 20px;
}

.ValRules-toc > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    padding-left: 0;
    list-style: none;
}

.ValRules-toc li {
    line-height: 1.4;
}

.ValRules-toc li > ul {
    margin-top: 7px;
}

.ValRules-toc a {
    color: var(--link-color);
    text-decoration: none;
}

.ValRules-toc a:hover,
.ValRules-toc a:focus {
    text-decoration: underline;
}

.ValRules-section,
.ValRules-group,
.ValRules-list > li {
    scroll-margin-top: 90px;
}

.ValRules-section {
    margin: 36px 0 0;
}

.ValRules-section > h2 {
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--control-bg);
    color: var(--heading-color);
    font-size: 22px;
}

.ValRules-group {
    margin: 0 0 30px;
}

.ValRules-group > h3 {
    margin: 0 0 8px;
    color: var(--heading-color);
    font-size: 18px;
}

.ValRules-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: val-rule;
}

.ValRules-list > li {
    counter-increment: val-rule;
    position: relative;
    border-top: 1px solid var(--control-bg);
}

.ValRules-list > li:first-child {
    border-top: 0;
}

.ValRule {
    position: relative;
    padding: 16px 54px 16px 46px;
    line-height: 1.58;
}

.ValRule::before {
    content: counter(val-rule);
    position: absolute;
    left: 0;
    top: 16px;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--control-bg);
    color: var(--control-color);
    font-size: 12px;
    font-weight: 700;
}

.ValRule-body > :first-child {
    margin-top: 0;
}

.ValRule-body > :last-child {
    margin-bottom: 0;
}

.ValRule-body p {
    margin: 0 0 .8em;
}

.ValRule-body ul {
    margin: .8em 0;
    padding-left: 24px;
}

.ValRule-body li + li {
    margin-top: .35em;
}

.ValRule-body code {
    padding: .1em .3em;
    border-radius: 3px;
    background: var(--control-bg);
    color: var(--control-color);
}

.ValRule-code {
    margin: .8em 0;
    padding: 10px 12px;
    overflow-x: auto;
    border-radius: var(--border-radius);
    background: var(--control-bg);
}

.ValRule-code code {
    padding: 0;
    background: transparent;
    color: var(--text-color);
}

.ValRule-label {
    font-weight: 650;
}

.ValRule-example {
    color: var(--muted-color);
}

.ValRule-permalink {
    position: absolute;
    right: 0;
    bottom: 8px;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    color: var(--muted-color);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    opacity: .55;
}

.ValRule-permalink:hover,
.ValRule-permalink:focus {
    background: var(--control-bg);
    color: var(--link-color);
    opacity: 1;
}

@media (max-width: 767px) {
    .ValRules-toc {
        padding: 14px;
    }

    .ValRules-toc > ul {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .ValRules-toc a {
        display: flex;
        min-height: 44px;
        align-items: center;
        padding: 7px 8px;
        border-radius: var(--border-radius);
    }

    .ValRules-toc a:hover,
    .ValRules-toc a:focus {
        background: var(--body-bg);
        text-decoration: none;
    }

    .ValRules-section > h2 {
        font-size: 20px;
    }

    .ValRules-group > h3 {
        font-size: 17px;
    }

    .ValRule {
        padding: 14px 48px 14px 38px;
    }

    .ValRule::before {
        top: 14px;
        width: 26px;
        height: 26px;
    }

    .ValRule-permalink {
        width: 44px;
        height: 44px;
    }
}

/* =========================================================
   SONDAGES — option choisie : bordure, sans barre foncée
   ========================================================= */
.PollBar[data-selected] {
    --poll-option-color: color-mix(
        in srgb,
        var(--muted-color) 22%,
        var(--body-bg) 78%
    ) !important;

    border-color: var(--primary-color) !important;
}

.PollBar[data-selected] .PollAnswer-text,
.PollBar[data-selected] .PollAnswer-text *,
.PollBar[data-selected] .PollAnswer-checkbox {
    color: var(--text-color) !important;
    mix-blend-mode: normal !important;
}

.PollBar[data-selected] .checkmark:after {
    border-color: var(--primary-color) !important;
}

/* =========================================================
   MOBILE — icône de navigation dans le bandeau
   Les contrôles .Page-sidebar sont repositionnés dans le header
   sur mobile mais ne sont pas descendants de .App-header.
   ========================================================= */
@media (max-width: 767px) {
    /*
     * Seuls les contrôles PRINCIPAUX déplacés dans le bandeau mobile
     * doivent avoir leurs icônes blanches.
     *
     * Ne jamais cibler globalement .Page-sidebar : ses menus déroulants
     * et panneaux utilisent des fonds clairs.
     */

    html[data-theme="light-cafe"] .Page-sidebar .App-primaryControl > .Button > .Button-icon:not(.text-colored),
    html[data-theme="light-cafe"] .Page-sidebar .Button.App-primaryControl > .Button-icon:not(.text-colored),

    html[data-theme="light-val"] .Page-sidebar .App-primaryControl > .Button > .Button-icon:not(.text-colored),
    html[data-theme="light-val"] .Page-sidebar .Button.App-primaryControl > .Button-icon:not(.text-colored),

    html[data-theme="light-laser"] .Page-sidebar .App-primaryControl > .Button > .Button-icon:not(.text-colored),
    html[data-theme="light-laser"] .Page-sidebar .Button.App-primaryControl > .Button-icon:not(.text-colored) {
        color: #fff !important;
    }
}

/* =========================================================
   ACTIONS DISCRÈTES — indice visuel hors survol
   Les menus restent très légers au repos, puis redeviennent
   pleinement visibles au survol / focus / ouverture.
   Valable pour les discussions publiques, privées et les posts.
   ========================================================= */

@media (min-width: 768px) {
    .DiscussionListItem-controls {
        opacity: .18;
    }

    .no-touch .Post-actions {
        opacity: .18;
    }
}


/* =========================================================
   Aide Markdown du composeur
   ========================================================= */

.ValMarkdownHelpModal .Modal-content {
    max-width: 720px;
}

.ValMarkdownHelp {
    padding-top: 18px;
    padding-bottom: 22px;
}

.ValMarkdownHelp h3 {
    margin: 1.4em 0 .55em;
    padding-bottom: .35em;
    border-bottom: 1px solid var(--control-bg);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ValMarkdownHelp h3:first-child {
    margin-top: 0;
}

.ValMarkdownHelp pre {
    margin: 0;
    padding: 11px 13px;
    overflow-x: auto;
    border-radius: var(--border-radius);
    background: var(--control-bg);
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ValMarkdownHelp pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.ValMarkdownHelp p {
    margin: .45em 0;
    color: var(--muted-color);
}

.ValMarkdownHelp p + p {
    margin-top: .25em;
}

@media (max-width: 767px) {
    .ValMarkdownHelp {
        padding: 14px 16px 18px;
    }

    .ValMarkdownHelp pre {
        font-size: 12px;
        white-space: pre;
    }
}

/* =========================================================
   Tableaux dans les messages
   ========================================================= */

.Post-body table {
    margin: 1em 0;
    border: 1px solid var(--control-bg);
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.Post-body th,
.Post-body td {
    padding: 8px 12px;
    border-right: 1px solid var(--control-bg);
    border-bottom: 1px solid var(--control-bg);
    vertical-align: top;
}

.Post-body th {
    background: var(--control-bg);
    color: var(--text-color);
    font-weight: 650;
}

.Post-body th:last-child,
.Post-body td:last-child {
    border-right: 0;
}

.Post-body tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   Séparateur horizontal dans les messages
   ========================================================= */

.Post-body hr {
    height: 0;
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid var(--muted-color);
    opacity: .45;
}

/* Actions en bas de l'aide Markdown */

.ValMarkdownHelp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--control-bg);
}

@media (max-width: 767px) {
    .ValMarkdownHelp-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        margin: 18px -16px -18px;
        padding: 12px 16px;
        background: var(--body-bg);
        box-shadow: 0 -6px 14px rgba(0, 0, 0, .08);
    }

    .ValMarkdownHelp-actions .Button {
        flex: 1 1 0;
        text-align: center;
    }
}


/* =========================================================
   APERÇUS DES THÈMES — PARAMÈTRES
   Le clic reste celui du ThemeSwitcher natif Flarum.
   ========================================================= */

.val-theme-preview-card {
    position: relative;
}

.val-theme-preview-host {
    position: relative !important;
    overflow: hidden;
}

.val-theme-preview-art {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    background: #f5f6f7;
}

.val-theme-preview-art > span {
    position: absolute;
    display: block;
    box-sizing: border-box;
}

.val-theme-preview-topbar {
    top: 0;
    left: 0;
    right: 0;
    height: 18%;
    background: #687176;
}

.val-theme-preview-logo {
    top: 5%;
    left: 7%;
    width: 9%;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, .78);
    border-radius: 3px;
}

.val-theme-preview-window {
    top: 18%;
    right: 0;
    bottom: 0;
    left: 0;
    background: #fafafa;
}

.val-theme-preview-sidebar {
    top: 18%;
    bottom: 0;
    left: 0;
    width: 30%;
    background: #eef0f1;
    border-right: 1px solid rgba(0, 0, 0, .06);
}

.val-theme-preview-chip {
    height: 7%;
    border-radius: 2px;
    background: #737b7f;
}

.val-theme-preview-chip-1 {
    top: 42%;
    left: 8%;
    width: 16%;
}

.val-theme-preview-chip-2 {
    top: 42%;
    left: 37%;
    width: 22%;
}

.val-theme-preview-line {
    height: 1.6%;
    border-radius: 999px;
    background: rgba(46, 52, 55, .34);
}

.val-theme-preview-line-1 {
    top: 32%;
    left: 39%;
    width: 36%;
}

.val-theme-preview-line-2 {
    top: 55%;
    left: 45%;
    width: 39%;
}

.val-theme-preview-line-3 {
    top: 67%;
    left: 45%;
    width: 33%;
}

.val-theme-preview-line-4 {
    top: 79%;
    left: 45%;
    width: 27%;
}

.val-theme-preview-dot {
    left: 37%;
    width: 5.5%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #c7cbcd;
}

.val-theme-preview-dot-1 { top: 52%; }
.val-theme-preview-dot-2 { top: 64%; }
.val-theme-preview-dot-3 { top: 76%; }


/* Préférences système : véritable moitié clair / moitié sombre */

.val-theme-preview-art[data-preview-theme="system"] {
    background:
        linear-gradient(
            135deg,
            #1d2226 0 49.7%,
            #f7f8f8 50.3% 100%
        );
}

.val-theme-preview-art[data-preview-theme="system"] .val-theme-preview-topbar {
    background:
        linear-gradient(
            135deg,
            #555e63 0 49.7%,
            #6d7579 50.3% 100%
        );
}

.val-theme-preview-art[data-preview-theme="system"] .val-theme-preview-window {
    background:
        linear-gradient(
            135deg,
            #1a1f22 0 49.7%,
            #fafafa 50.3% 100%
        );
}

.val-theme-preview-art[data-preview-theme="system"] .val-theme-preview-sidebar {
    background:
        linear-gradient(
            135deg,
            #22282c 0 55%,
            #eef0f1 56% 100%
        );
}


/* Mode clair */

.val-theme-preview-art[data-preview-theme="light"] {
    background: #f4f5f6;
}

.val-theme-preview-art[data-preview-theme="light"] .val-theme-preview-topbar {
    background: #697176;
}

.val-theme-preview-art[data-preview-theme="light"] .val-theme-preview-window {
    background: #fbfbfc;
}

.val-theme-preview-art[data-preview-theme="light"] .val-theme-preview-sidebar {
    background: #eef0f2;
}

.val-theme-preview-art[data-preview-theme="light"] .val-theme-preview-chip-2 {
    background: #667278;
}


/* Mode sombre */

.val-theme-preview-art[data-preview-theme="dark"] {
    background: #14191c;
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-topbar {
    background: #596167;
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-window {
    background: #171c1f;
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-sidebar {
    background: #1f2529;
    border-right-color: rgba(255, 255, 255, .05);
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-chip {
    background: #737c82;
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-line {
    background: rgba(235, 239, 241, .27);
}

.val-theme-preview-art[data-preview-theme="dark"] .val-theme-preview-dot {
    background: #3b454b;
}


/* Café : bruns chauds, crème et beige */

.val-theme-preview-art[data-preview-theme="cafe"] {
    background: #eee6dc;
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-topbar {
    background: #70513e;
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-window {
    background: #fbf7f2;
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-sidebar {
    background: #eee1d2;
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-chip {
    background: #8b6f63;
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-line {
    background: rgba(91, 67, 53, .38);
}

.val-theme-preview-art[data-preview-theme="cafe"] .val-theme-preview-dot {
    background: #c9b79e;
}


/* VAL links style */
.Post-body a,
.CommentPost .Post-body a {
    color: #50595e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.Post-body a:hover,
.CommentPost .Post-body a:hover {
    color: #111;
}

/* VAL — forums avec messages non lus */

/* Carte principale */
.TagTile.val-tag-tile-unread {
    position: relative;
}

.TagTile.val-tag-tile-unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    height: 32px;
    width: 4px;
    border-radius: 0 3px 3px 0;
    background: var(--tag-bg);
}

/* Sous-forum */
html[data-theme] body .TagsPage .TagTile-children a.val-tag-child-unread {
    position: relative;
    padding-left: 10px;
    color: var(--tag-bg) !important;
    font-weight: 600 !important;
}

.TagTile-children a.val-tag-child-unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 999px;
    background: var(--tag-bg);
}

/* Anciennes icônes rouges */
.val-unread-icon-main,
.val-unread-icon-child {
    display: none !important;
}


/* VAL — masquer les tags secondaires sur la page d'accueil */
.TagsPage .TagCloud {
    display: none !important;
}


/* VAL — fenêtres de sélection d'étiquettes : description sous le nom */
.TagSelectionModal .SelectTagListItem {
    flex-wrap: wrap;
    align-items: flex-start;
}

.TagSelectionModal .SelectTagListItem-name {
    flex: 1 1 calc(100% - 36px);
    width: auto !important;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
}

.TagSelectionModal .SelectTagListItem-description {
    flex: 0 0 calc(100% - 36px);
    width: auto !important;
    margin-left: 36px;
    margin-top: 3px;
    line-height: 1.35;
}


/* VAL — choix des étiquettes à suivre */
.ChooseTagsToFollowModal table,
.ChooseTagsToFollowModal tbody {
    display: block;
    width: 100%;
}

.ChooseTagsToFollowModal tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name follow"
        "description follow";
    align-items: center;
    width: 100%;
}

.ChooseTagsToFollowModal .TagName {
    grid-area: name;
    min-width: 0;
    padding-bottom: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ChooseTagsToFollowModal .TagDescription {
    grid-area: description;
    min-width: 0;
    padding-top: 0;
    line-height: 1.35;
}

.ChooseTagsToFollowModal .TagFollow {
    grid-area: follow;
    align-self: center;
}


/* Mobile : tags de discussions sur plusieurs lignes */
@media (max-width: 767px) {
    .DiscussionListItem-info .item-tags .TagsLabel {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        align-items: flex-start;
    }

    .DiscussionListItem-info .item-tags .TagLabel {
        display: inline-flex !important;
        width: fit-content !important;
        max-width: 100%;
        white-space: normal;
        flex: 0 0 auto;
    }
}


@media (max-width: 767px) {
    .DiscussionListItem-info .item-tags,
    .DiscussionListItem-info .TagsLabel {
        display: flex !important;
        flex-wrap: wrap;
        width: auto !important;
        max-width: 100%;
        gap: 4px;
    }

    .DiscussionListItem-info .TagsLabel .TagLabel {
        display: inline-flex !important;
        width: auto !important;
        max-width: 100%;
        flex: 0 1 auto !important;
    }
}
