/* Modération du tchat (étape 16, tâche 9 c ; brief § 7, maquette D1) : vue « Modération du tchat » du menu général, rubriques, file,
   fiche, durée d'un silence et lecture d'une archive. Verre du menu (aucun fond plein), turquoise #8fd0cb pour l'action et le
   signalement, ambre #e2bc7e pour les surtitres, les pastilles et la sélection, corail pour le silence automatique et « Bannir ».
   Téléphone : la liste puis la fiche (data-pane posé par moderation-admin-ui.mjs) ; à partir de 1200 px, la liste à gauche et la fiche à
   droite (même point de rupture que main.mjs). Cibles de 44 px ; rien d'animé. */

/* Pastilles (chiffre gravé de chat.css, choix du 14/10) : entrée de l'administration (avant son chevron), bouton du menu (coin bas
   droit), rubrique « À contrôler ». */
.halo-preview .moderation-badge { display: inline-flex; flex: none; align-items: center; color: #f0d4a2; background: none; font-size: 11px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgb(0 0 0 / 60%); }
.halo-preview .moderation-badge[hidden] { display: none; }
.halo-preview .general-menu #menu-open-moderation > span:first-child { flex: 1; }
.halo-preview #general-menu-toggle { position: relative; }
.halo-preview .moderation-badge.is-menu { position: absolute; bottom: 4px; right: 5px; font-size: 10px; font-weight: 700; pointer-events: none; }

.halo-preview .moderation { display: grid; gap: 12px; color: #d8e1d4; }
.halo-preview .moderation[hidden] { display: none; }
.halo-preview .moderation[data-pane="list"] .moderation-detail { display: none; }
.halo-preview .moderation:not([data-pane="list"]) .moderation-master { display: none; }
.halo-preview .moderation-note { margin: 0; font-size: 12px; line-height: 1.45; }
.halo-preview .moderation-state { margin: 6px 0; color: #aebfb4; font-size: 12px; line-height: 1.5; }
.halo-preview .moderation-retry { min-height: 44px; margin: 0 0 8px; padding: 0 14px; border: 1px solid rgb(143 208 203 / 60%); border-radius: 6px; color: #a9e2dd; background: rgb(39 78 75 / 28%); font: inherit; font-size: 12px; font-weight: 600; }

/* Rubriques : soulignement ambre sous la rubrique choisie (D1). */
.halo-preview .moderation-tabs { display: flex; margin: 0 0 12px; border-bottom: 1px solid var(--menu-line, rgb(174 208 194 / 22%)); }
.halo-preview .moderation-tab { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 7px; min-height: 44px; margin: 0 0 -1px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #aebfb4; background: transparent; font: inherit; font-size: 12px; white-space: nowrap; }
.halo-preview .moderation-tab:hover { color: #e0e9df; }
.halo-preview .moderation-tab[aria-selected="true"] { color: #ece4d2; border-bottom-color: #e2bc7e; }

/* La file : lignes de 64 px, pastille ronde (corail : silence automatique ; turquoise : signalement), surtitre, heure, extrait cité. */
.halo-preview :is(.moderation-list, .moderation-picks, .moderation-context, .moderation-thread) { margin: 0; padding: 0; list-style: none; }
.halo-preview .moderation-list { display: grid; gap: 8px; }
.halo-preview .moderation-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 64px; margin: 0; padding: 10px 12px; border: 1px solid rgb(184 207 190 / 18%); border-radius: 6px; color: #d8e1d4; background: rgb(14 28 27 / 45%); font: inherit; text-align: left; cursor: pointer; }
.halo-preview .moderation-row:hover { background: rgb(30 50 47 / 55%); }
.halo-preview .moderation-row[aria-current="true"] { border-color: rgb(226 188 126 / 45%); box-shadow: inset 3px 0 #e2bc7e; }
.halo-preview .moderation-row-icon { display: grid; flex: 0 0 38px; place-items: center; height: 38px; border: 1px solid; border-radius: 50%; }
.halo-preview .moderation-row-icon.is-auto { color: #e8836f; border-color: rgb(232 131 111 / 65%); }
.halo-preview .moderation-row-icon.is-report { color: #8fd0cb; border-color: rgb(143 208 203 / 60%); }
.halo-preview .moderation-row-body { display: grid; flex: 1; gap: 3px; min-width: 0; }
.halo-preview .moderation-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.halo-preview .moderation-row-kind { font-size: 10px; font-weight: 650; letter-spacing: 2px; text-transform: uppercase; }
.halo-preview .moderation-row[data-kind="auto"] .moderation-row-kind { color: #f0a491; }
.halo-preview .moderation-row[data-kind="report"] .moderation-row-kind { color: #8fd0cb; }
.halo-preview .moderation-row-time { flex: none; color: #aebfb4; font-size: 11px; font-variant-numeric: tabular-nums; }
.halo-preview .moderation-row-line { color: #e0e9df; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.halo-preview .moderation-row-excerpt { display: -webkit-box; overflow: hidden; color: #c3cfc4; font-size: 12px; font-style: italic; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.halo-preview .moderation-archive-row { flex-direction: column; gap: 3px; }
.halo-preview .moderation-archive-row .moderation-row-excerpt { font-style: normal; color: #aebfb4; }

/* Sanctions : le pseudo, la sanction, « Lever ». */
.halo-preview .moderation[data-tab="sanctions"] .moderation-list { gap: 0; }
.halo-preview .moderation[data-tab="sanctions"] .moderation-list-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid rgb(164 195 178 / 14%); }
.halo-preview .moderation-sanction-words { flex: 1; min-width: 0; }
.halo-preview .moderation-sanction-name { margin: 0; color: #e0e9df; font-size: 13px; overflow-wrap: anywhere; }
.halo-preview .moderation-sanction-what { margin: 2px 0 0; color: #aebfb4; font-size: 11px; }
.halo-preview .moderation-lift { flex: none; min-height: 44px; margin: 0; padding: 0 14px; border: 1px solid rgb(143 208 203 / 60%); border-radius: 6px; color: #a9e2dd; background: rgb(39 78 75 / 28%); font: inherit; font-size: 12px; font-weight: 600; }

/* La fiche : en-tête (lu par le titre du menu au téléphone, montré au grand écran), sections à surtitre ambre souligné. */
.halo-preview :is(.moderation-item, .moderation-archive) { display: grid; gap: 14px; }
.halo-preview .moderation-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.halo-preview .moderation-title { margin: 0; color: #ece4d2; font: 500 17px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.halo-preview .moderation-title:focus { outline: none; }
.halo-preview .moderation-line { margin: 3px 0 0; color: #aebfb4; font-size: 12px; }
.halo-preview .moderation-done { margin: 0; padding: 8px 10px; border-left: 3px solid #e2bc7e; color: #e7d6b4; background: rgb(226 188 126 / 8%); font-size: 12px; }
.halo-preview .moderation-section { min-width: 0; }
.halo-preview .moderation-eyebrow { margin: 0 0 8px; padding: 0 0 6px; border-bottom: 1px solid rgb(226 188 126 / 60%); font-size: 10px; font-weight: 600; line-height: 1.4; }
.halo-preview .moderation-eyebrow-name { color: #e2bc7e; letter-spacing: 2.4px; text-transform: uppercase; }
.halo-preview .moderation-eyebrow-meta { color: #aebfb4; letter-spacing: .3px; }
.halo-preview .moderation-quote { margin: 0; padding: 10px 12px; border: 1px solid rgb(184 207 190 / 20%); border-radius: 6px; color: #e0e9df; background: rgb(10 21 21 / 35%); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.halo-preview .moderation-quote[data-removed="true"] { color: #aebfb4; font-style: italic; }
.halo-preview .moderation-context { display: grid; gap: 2px; padding: 6px; border: 1px solid rgb(184 207 190 / 20%); border-radius: 6px; background: rgb(10 21 21 / 30%); }
.halo-preview .moderation-context-line { padding: 5px 8px; border-radius: 4px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.halo-preview .moderation-context-author { color: #c3cfc4; font-weight: 600; }
.halo-preview .moderation-context-reported { background: rgb(214 224 218 / 9%); }
.halo-preview .moderation-context-reported .moderation-context-author { color: #e2bc7e; }
.halo-preview .moderation-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgb(184 207 190 / 20%); border-radius: 6px; background: rgb(10 21 21 / 30%); }
.halo-preview .moderation-card-icon { display: grid; flex: 0 0 38px; place-items: center; height: 38px; border: 1px solid rgb(143 208 203 / 45%); border-radius: 50%; color: #8fd0cb; }
.halo-preview .moderation-card-words { min-width: 0; }
.halo-preview .moderation-card-text { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.halo-preview .moderation-card-note { margin: 3px 0 0; color: #aebfb4; font-size: 11px; }
.halo-preview .moderation-sanction-now { color: #f0b3a5; }
.halo-preview .moderation-picks { display: grid; gap: 6px; }
.halo-preview .moderation-pick:disabled { opacity: .6; }
.halo-preview .moderation-pick { width: 100%; min-height: 44px; margin: 0; padding: 6px 10px; border: 1px solid rgb(184 207 190 / 18%); border-radius: 6px; color: #d8e1d4; background: transparent; font: inherit; font-size: 12px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.halo-preview .moderation-pick[aria-current="true"] { border-color: rgb(226 188 126 / 45%); box-shadow: inset 3px 0 #e2bc7e; }

/* Les actions (choix de l'utilisateur du 11/10, variante C, parmi trois rendues dans le jeu) : une section « Décision » comme les autres,
   une liste de lignes icône + libellé à la façon du menu d'un message du tchat, les actions graves en corail, en dernier ; rien de collé
   par-dessus la fiche. */
.halo-preview .moderation-act-list { overflow: hidden; border: 1px solid rgb(184 207 190 / 18%); border-radius: 8px; background: rgb(14 28 27 / 55%); }
.halo-preview .moderation-act { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 0; color: #e3ece5; background: transparent; font: inherit; font-size: 13px; text-align: left; touch-action: manipulation; }
.halo-preview .moderation-act[hidden] { display: none; }
.halo-preview .moderation-act svg { flex: 0 0 18px; color: #a9beb3; }
.halo-preview .moderation-act-list > .moderation-act:not([hidden]) ~ .moderation-act { border-top: 1px solid rgb(196 222 207 / 10%); }
.halo-preview .moderation-act:hover:not(:disabled) { background: rgb(214 232 220 / 9%); }
.halo-preview .moderation-act.is-primary { color: #9fdcd6; }
.halo-preview .moderation-act.is-primary svg { color: #8fd0cb; }
.halo-preview .moderation-act.is-danger { color: #f0a492; }
.halo-preview .moderation-act.is-danger svg { color: #e88f7b; }
.halo-preview .moderation-act[data-armed="true"] { background: rgb(150 70 55 / 22%); }
.halo-preview .moderation-act:disabled { opacity: .45; cursor: default; }
/* « Retirer ce message », sous le message d'un silence automatique : un lien corail, pas un bouton en boîte. */
.halo-preview .moderation-inline-danger { width: auto; min-height: 44px; margin: 6px 0 0 -8px; padding: 0 8px; background: transparent; color: #f0a492; font-size: 12.5px; font-weight: 600; }
.halo-preview .moderation-inline-danger:hover:not(:disabled) { background: transparent; color: #f6c0b2; }
.halo-preview .moderation-item-note { margin: 0 0 8px; font-size: 12px; line-height: 1.45; }
/* La durée : « Imposer le silence » plein, « Annuler » discret. */
.halo-preview .moderation-submit { min-height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 8px; color: #10201f; background: #8fd0cb; font: inherit; font-size: 13px; font-weight: 650; text-shadow: none; }
.halo-preview .moderation-submit:hover:not(:disabled) { background: #a7ddd8; }
.halo-preview .moderation-submit:disabled { opacity: .5; cursor: default; }
.halo-preview :is(.moderation-cancel, .moderation-older) { min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; color: #b4c5ba; background: transparent; font: inherit; font-size: 12.5px; }
.halo-preview :is(.moderation-cancel, .moderation-older):hover:not(:disabled) { color: #e0e9dc; background: rgb(188 217 194 / 6%); }
.halo-preview .moderation-older:disabled { opacity: .5; }

/* La durée d'un silence : raccourcis en puces, autre durée (champ et unité), date de fin calculée, bornes du serveur. */
.halo-preview .moderation-duration { display: grid; gap: 10px; padding: 12px; border: 1px solid rgb(226 188 126 / 35%); border-radius: 6px; background: rgb(10 21 21 / 35%); }
.halo-preview .moderation-duration-title { margin: 0; color: #ece4d2; font-size: 13px; font-weight: 600; }
.halo-preview .moderation-duration-title:focus { outline: none; }
.halo-preview .moderation-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.halo-preview .moderation-chip { min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid rgb(184 207 190 / 30%); border-radius: 22px; color: #d8e1d4; background: transparent; font: inherit; font-size: 12px; }
.halo-preview .moderation-chip[aria-checked="true"] { border-color: #e2bc7e; color: #f0e1c5; background: rgb(226 188 126 / 14%); }
.halo-preview .moderation-other { display: flex; gap: 8px; }
.halo-preview .moderation-field { flex: 1; min-width: 0; min-height: 44px; margin: 0; padding: 0 10px; border: 1px solid rgb(184 207 190 / 30%); border-radius: 6px; color: #e0e9df; background: rgb(10 21 21 / 50%); font: inherit; font-size: 16px; }
.halo-preview .moderation-unit { flex: none; min-height: 44px; margin: 0; padding: 0 8px; border: 1px solid rgb(184 207 190 / 30%); border-radius: 6px; color: #e0e9df; background-color: #1c2c29; font: inherit; font-size: 16px; }
.halo-preview .moderation-end { margin: 0; color: #e7d6b4; font-size: 12px; }
.halo-preview .moderation-bounds { margin: 0; color: #f0b3a5; font-size: 12px; line-height: 1.45; }

/* La lecture d'une archive : deux segments, les pages plus anciennes en tête, aucune saisie. */
.halo-preview .moderation-segments { display: flex; overflow: hidden; border: 1px solid rgb(184 207 190 / 24%); border-radius: 6px; }
.halo-preview .moderation-segment { flex: 1; min-height: 44px; margin: 0; border: 0; border-radius: 0; color: #aebfb4; background: transparent; font: inherit; font-size: 12px; }
.halo-preview .moderation-segment[aria-pressed="true"] { color: #f0e1c5; background: rgb(226 188 126 / 14%); box-shadow: inset 0 -2px #e2bc7e; }
.halo-preview .moderation-thread { display: grid; gap: 0; }
.halo-preview .moderation-thread-line { padding: 7px 0; border-bottom: 1px solid rgb(164 195 178 / 12%); }
.halo-preview .moderation-thread-meta { margin: 0; color: #aebfb4; font-size: 11px; }
.halo-preview .moderation-thread-author { color: #c3cfc4; font-weight: 600; }
.halo-preview .moderation-thread-text { margin: 2px 0 0; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.halo-preview .moderation-thread-player { color: #e0e9df; }

.halo-preview .moderation :is(button, input, select):focus-visible { outline: 2px solid #8fd0cb; outline-offset: 2px; }

/* Grand écran : le panneau passe de 352 px à min(880px, 60vw), liste à gauche, fiche à droite, chacune avec son défilement ; pas de
   retour interne ; jamais en combat (main.mjs isWide). :not(.combat-open) l'emporte aussi sur le placement de mobile-hud.css (écran
   tactile large). */
@media (min-width: 1200px) {
  .halo-preview:not(.combat-open) .general-menu-panel[data-view="moderation"] { width: min(880px, 60vw); }
  .halo-preview:not(.combat-open) .general-menu-panel[data-view="moderation"] .general-menu-content { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
  .halo-preview:not(.combat-open) .general-menu-panel[data-view="moderation"] .moderation-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  .halo-preview:not(.combat-open) .moderation { flex: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; min-height: 0; }
  .halo-preview:not(.combat-open) .moderation-note { grid-column: 1 / -1; margin: 12px 18px 0; }
  .halo-preview:not(.combat-open) .moderation-note[hidden] { display: none; }
  .halo-preview:not(.combat-open) .moderation[data-pane] :is(.moderation-master, .moderation-detail) { display: block; grid-row: 2; min-height: 0; padding: 14px 18px 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526a60 transparent; }
  .halo-preview:not(.combat-open) .moderation[data-pane] .moderation-detail { border-left: 1px solid var(--menu-line, rgb(174 208 194 / 22%)); }
  .halo-preview:not(.combat-open) .moderation[data-tab="sanctions"] .moderation-master { grid-column: 1 / -1; }
  .halo-preview:not(.combat-open) .moderation[data-tab="sanctions"][data-pane] .moderation-detail { display: none; }
  .halo-preview:not(.combat-open) .moderation-head { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) { .halo-preview .moderation * { transition: none; animation: none; } }
