/* ==========================================================================
   THE MALETTE — feuille de style
   Direction : salle de négociation, tard le soir. Une mallette sur la table,
   un seul point de lumière, du laiton qui accroche la lumière, du papier
   contractuel. Le vote OUI/NON, c'est le clic du fermoir.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* --- Couleurs --- */
    --ink: #0a0c0f;
    --ink-vignette: #050607;
    --panel: #15191d;
    --panel-raised: #1c2126;
    --panel-inset: #0d1013;

    --brass: #c6a15e;
    --brass-bright: #ecce93;
    --brass-dim: #6b5936;
    --brass-wash: rgba(198, 161, 94, 0.1);

    --paper: #f3ede0;
    --muted: #9a958a;
    --muted-dim: #635f57;
    --line: #262b30;

    --oui: #3f8f5f;
    --oui-bright: #57b378;
    --oui-wash: rgba(63, 143, 95, 0.14);
    --non: #a8433a;
    --non-bright: #cf5c50;
    --non-wash: rgba(168, 67, 58, 0.14);

    /* --- Typo --- */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    /* --- Forme --- */
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-panel: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}

/* --- RESET & FOND --- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--ink);
    background-image:
        radial-gradient(ellipse 900px 600px at 50% -10%, rgba(198, 161, 94, 0.08), transparent 60%),
        radial-gradient(ellipse 1200px 900px at 50% 100%, var(--ink-vignette), transparent 70%);
    color: var(--paper);
    text-align: center;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 76px 20px 40px 20px;
    line-height: 1.5;
    position: relative;
}

/* grain subtil sur toute la page, façon feutre / cuir sous lumière basse */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

body > * {
    position: relative;
    z-index: 1;
}

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

/* scrollbars discrètes, teintées laiton */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--brass-dim) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-thumb {
    background: var(--brass-dim);
    border-radius: 8px;
}

/* focus clavier toujours visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[onclick]:focus-visible {
    outline: 2px solid var(--brass-bright);
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   PANNEAUX — signature visuelle : coins renforcés façon ferrures de mallette
   ========================================================================== */
/* Panneaux autonomes : l'accueil et les modales restent des "plaques" isolées. */
#ecran-accueil,
.modale-contenu {
    background: var(--panel);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 120px);
    width: 100%;
    max-width: 800px;
    padding: 28px 38px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-panel);
    box-sizing: border-box;
    margin-top: 10px;
    position: relative;
    animation: lever-rideau 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* La coque de jeu (#jeu-container) porte désormais seule le fond/l'ombre/les ferrures :
   sidebar et contenu principal vivent ensemble dans UNE seule surface fluide. */
#jeu-container {
    background: var(--panel);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 160px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-panel);
    position: relative;
    overflow: hidden;
}

#ecran-accueil::before,
#ecran-accueil::after,
#jeu-container::before,
#jeu-container::after,
.modale-contenu::before,
.modale-contenu::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.25s;
    z-index: 2;
}

#ecran-accueil::before,
#jeu-container::before,
.modale-contenu::before {
    top: 10px;
    left: 10px;
    border-top: 2px solid var(--brass);
    border-left: 2px solid var(--brass);
    border-radius: 3px 0 0 0;
}

#ecran-accueil::after,
#jeu-container::after,
.modale-contenu::after {
    bottom: 10px;
    right: 10px;
    border-bottom: 2px solid var(--brass);
    border-right: 2px solid var(--brass);
    border-radius: 0 0 3px 0;
}

/* Écrans internes (lobby / rédaction / jeu / résultats) : plus de carte dans la carte,
   juste un fondu-montée fluide à chaque changement d'écran. */
#conteneur-principal > div[id^="ecran-"] {
    width: 100%;
    box-sizing: border-box;
    padding: clamp(24px, 4vw, 40px);
    animation: lever-rideau 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes lever-rideau {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- BARRE DU HAUT --- */
#barre-haut {
    display: flex;
    justify-content: flex-end;
    padding: 16px 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 100;
}

#btn-quitter {
    pointer-events: auto;
    background: transparent;
    color: var(--non-bright);
    border: 1px solid var(--non);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    width: auto;
    transition: all 0.2s;
}

#btn-quitter:hover {
    background: var(--non);
    color: var(--paper);
    border-color: var(--non);
}

/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */
h1 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--paper);
    margin: 0 0 6px 0;
}

h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--paper);
    margin-top: 6px;
    margin-bottom: 16px;
}

h3, h4 {
    font-family: var(--font-body);
    color: var(--paper);
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 15px;
}

p {
    color: var(--muted);
    margin: 8px 0;
}

.etiquette {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.72rem;
    color: var(--brass);
    margin: 0 0 14px 0;
}

.sous-titre {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: -4px;
    margin-bottom: 28px;
}

.trait-laiton {
    width: 46px;
    height: 2px;
    background: var(--brass);
    margin: 0 auto 26px auto;
    border: none;
}

/* ==========================================================================
   CHAMPS DE SAISIE
   ========================================================================== */
input[type="text"],
select {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--panel-inset);
    border: 1.5px solid var(--line);
    color: var(--paper);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 12px;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--muted-dim);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--brass);
}

textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--panel-inset);
    border: 1.5px solid var(--line);
    color: var(--paper);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    outline: none;
    resize: none;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
    background-position: calc(100% - 18px) center, calc(100% - 13px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* curseur (timer de vote) */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--line);
    border-radius: 4px;
    margin: 10px 0 6px 0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brass);
    border: 3px solid var(--panel);
    box-shadow: 0 0 0 1px var(--brass);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brass);
    border: 3px solid var(--panel);
    box-shadow: 0 0 0 1px var(--brass);
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: var(--brass);
}

/* compteurs de caractères */
.compteur-carac {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: right;
    color: var(--muted-dim);
    margin: -6px 0 14px 0;
}

.label-champ {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brass-bright);
    text-align: left;
    margin-bottom: 6px;
}

.label-champ .num {
    font-family: var(--font-mono);
    color: var(--brass-dim);
}

/* Champ + bouton symbole (€) accolés */
.champ-avec-symbole {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.champ-avec-symbole input {
    flex: 1;
    margin-bottom: 0;
}

.champ-avec-symbole--modale {
    margin-bottom: 12px;
}

.champ-avec-symbole--modale input {
    margin-bottom: 0;
}

.btn-symbole {
    width: auto;
    flex-shrink: 0;
    padding: 0 16px;
    margin-top: 0;
    background: var(--panel-inset);
    border: 1.5px solid var(--line);
    color: var(--brass-bright);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-symbole:hover {
    background: var(--brass-wash);
    border-color: var(--brass);
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */
button {
    background: var(--brass);
    color: var(--ink);
    border: none;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}

button:hover {
    background: var(--brass-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(198, 161, 94, 0.55);
}

button:active {
    transform: scale(0.98) translateY(0);
    box-shadow: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- ACCUEIL --- */
#ecran-accueil {
    margin-top: 32px;
    max-width: 460px;
    text-align: center;
}

#ecran-accueil #pseudo {
    text-align: center;
}

.bloc-rejoindre {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed var(--line);
}

.bloc-rejoindre input {
    margin-bottom: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: var(--font-mono);
}

.bloc-rejoindre button {
    width: auto;
    white-space: nowrap;
    background: transparent;
    color: var(--brass);
    border: 1.5px solid var(--brass-dim);
}

.bloc-rejoindre button:hover {
    background: var(--brass-wash);
    border-color: var(--brass);
    color: var(--brass-bright);
}

#btn-creer {
    background: var(--brass);
}

/* ==========================================================================
   LE LOBBY — plaque-code façon combinaison de mallette
   ========================================================================== */
.titre-code {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 600;
}

#affichage-code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.4em;
    padding: 8px 10px 8px 18px;
    background: var(--panel-inset);
    border: 1.5px solid var(--brass-dim);
    border-radius: var(--radius-sm);
    color: var(--brass-bright);
    user-select: all;
    -webkit-user-select: all;
    cursor: pointer;
}

#btn-toggle-code,
.btn-copier {
    width: auto !important;
    padding: 7px 12px !important;
    font-size: 1rem !important;
    background: transparent !important;
    border: 1.5px solid var(--line) !important;
    color: var(--muted) !important;
    margin: 0 !important;
}

.btn-copier {
    font-size: 0.85rem !important;
}

#btn-toggle-code:hover,
.btn-copier:hover {
    border-color: var(--brass) !important;
    color: var(--brass-bright) !important;
    background: var(--brass-wash) !important;
}

#message-copie {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--oui-bright);
    opacity: 0;
    transition: opacity 0.3s;
}

.titre-section-joueurs {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 600;
}

.titre-section-joueurs .num {
    font-family: var(--font-mono);
    color: var(--brass);
    font-weight: 700;
}

/* --- Paramètres de partie --- */
#parametres-jeu {
    background: var(--panel-inset);
    border: 1px solid var(--line);
    text-align: left;
    border-radius: var(--radius-md);
    padding: 22px;
    margin: 20px auto;
    max-width: 420px;
}

#parametres-jeu h3 {
    margin-top: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

#parametres-jeu label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brass-bright);
}

.valeur-timer {
    color: var(--brass);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-left: 6px;
}

.ligne-checkbox {
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    margin-top: 14px;
    color: var(--brass-bright);
}

.ligne-checkbox input {
    transform: scale(1.2);
    margin-right: 10px;
}

#btn-lancer {
    padding: 13px 20px;
    font-size: 1rem;
    background: var(--oui);
    color: var(--paper);
    border-radius: var(--radius-sm);
    margin-top: 18px;
    max-width: 420px;
}

#btn-lancer:hover {
    background: var(--oui-bright);
}

/* --- Listes joueurs / bannis --- */
ul {
    list-style-type: none;
    padding: 0;
    margin: 12px 0;
    max-height: 220px;
    overflow-y: auto;
}

li {
    background: var(--panel-inset);
    border: 1px solid var(--line);
    padding: 11px 16px;
    margin-bottom: 7px;
    border-radius: 11px;
    font-size: 0.95rem;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

li.joueur-standby {
    opacity: 0.55;
    border-style: dashed;
}

li.joueur-standby b {
    color: var(--muted) !important;
}

li:hover {
    transform: translateX(3px);
    border-color: var(--brass-dim);
    background: #10141a;
}

#classement-final ul {
    max-width: 420px;
    margin: 22px auto;
}

#classement-final li {
    font-size: 1.05rem;
    padding: 13px 18px;
}

#classement-final li.ligne-gagnant {
    border-color: var(--brass);
    background: var(--brass-wash);
    font-weight: 700;
}

#classement-final li.ligne-gagnant b {
    color: var(--brass-bright);
}

#btn-retour-lobby {
    max-width: 320px;
    margin: 10px auto 0 auto;
}

#attente-hote-fin {
    margin-top: 20px;
}

li b {
    font-family: var(--font-mono);
    color: var(--brass);
    font-weight: 700;
}

.btn-admin-group {
    display: flex;
    gap: 5px;
}

.btn-kick,
.btn-ban,
.btn-unban {
    border: none;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 6px;
    cursor: pointer;
    transition: filter 0.15s;
    color: var(--ink);
    width: auto;
    margin-top: 0;
}

.btn-kick {
    background: #d1a24e;
}

.btn-ban {
    background: var(--non-bright);
    color: var(--paper);
}

.btn-unban {
    background: var(--oui-bright);
}

.btn-kick:hover,
.btn-ban:hover,
.btn-unban:hover {
    filter: brightness(1.12);
}

#section-bannis {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    text-align: left;
}

#section-bannis h4 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-dim);
}

/* ==========================================================================
   MISE EN PAGE — sidebar joueurs
   ========================================================================== */
#jeu-container {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
    margin-top: 46px;
}

/* La sidebar n'est plus une boîte : un simple bandeau plus sombre avec un liseré,
   qui respire dans la même surface que le reste du jeu. */
#sidebar-joueurs {
    width: 250px;
    flex-shrink: 0;
    padding: clamp(20px, 3vw, 28px) 22px;
    text-align: left;
    max-height: 82vh;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.05));
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

#sidebar-joueurs h3 {
    margin-top: 0;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

#liste-joueurs-jeu {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

#liste-joueurs-jeu li {
    font-size: 0.86rem;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    flex-wrap: wrap;
    row-gap: 6px;
}

#liste-joueurs-jeu .btn-admin-group {
    width: 100%;
    justify-content: flex-end;
}

#liste-joueurs-jeu li:hover {
    transform: translateX(2px);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

#conteneur-principal {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==========================================================================
   RÉDACTION D'UN DILEMME
   ========================================================================== */
#ecran-redaction h3 {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#ecran-redaction h3 span {
    font-family: var(--font-mono);
    color: var(--brass);
    text-transform: none;
    letter-spacing: normal;
}

.temps-ecriture {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--non-bright);
}

#zone-ecriture h2 {
    margin-bottom: 22px;
}

#btn-envoyer-dilemme {
    background: var(--brass);
}

#zone-attente h2::after {
    content: "…";
    animation: attente-points 1.4s steps(4, end) infinite;
}

@keyframes attente-points {
    0% {
        content: ".";
    }

    33% {
        content: "..";
    }

    66% {
        content: "...";
    }
}

/* ==========================================================================
   ÉCRAN DE JEU — le dilemme, le vote
   ========================================================================== */
#ecran-jeu h3 {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#ecran-jeu h3 span {
    font-family: var(--font-mono);
    color: var(--brass);
    text-transform: none;
    letter-spacing: normal;
}

.ligne-minuteur {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.temps-restant {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--non-bright);
    margin: 0;
}

#btn-pause {
    width: auto;
    padding: 6px 14px;
    font-size: 0.82rem;
    margin: 0;
}

#auteur-dilemme-ligne {
    color: var(--brass);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 18px;
}

#texte-dilemme {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 14px 0 22px 0;
    padding: 26px 30px;
    background: var(--panel-inset);
    color: var(--paper);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--brass);
    text-align: left;
    word-break: break-word;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

#zone-vote {
    display: block;
}

.vote-buttons-container {
    display: flex;
    gap: 12px;
}

#btn-oui,
#btn-non {
    padding: 18px 20px;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    border: 3px solid transparent;
    border-radius: 14px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
}

#btn-oui::before {
    content: "✅";
    font-size: 0.9em;
}

#btn-non::before {
    content: "❌";
    font-size: 0.9em;
}

#btn-oui {
    background: var(--oui);
    color: var(--paper);
}

#btn-oui:hover {
    background: var(--oui-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(63, 143, 95, 0.5);
}

#btn-non {
    background: var(--non);
    color: var(--paper);
}

#btn-non:hover {
    background: var(--non-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(168, 67, 58, 0.5);
}

#bloc-justification {
    margin-top: 22px;
}

#input-justification {
    margin-bottom: 4px;
}

#btn-valider-vote {
    background: var(--brass);
    margin-top: 10px;
}

.attente-votes {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted-dim);
}

.attente-votes .num {
    color: var(--brass);
}

/* ==========================================================================
   RÉSULTATS
   ========================================================================== */
#auteur-dilemme-resultat {
    margin-bottom: 6px;
}

#texte-dilemme-resultat {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 8px 0;
    padding: 20px 24px;
    background: var(--panel-inset);
    color: var(--paper);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--brass);
    text-align: left;
    word-break: break-word;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.grille-resultats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 26px;
    gap: 16px;
}

.bloc-resultat {
    padding: 20px;
    border-radius: 14px;
    min-width: 0;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.bloc-resultat:hover {
    transform: translateY(-3px);
    border-color: var(--brass-dim);
}

.bloc-resultat h3 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0;
}

#bloc-oui {
    background: var(--oui-wash);
}

#bloc-oui h3 {
    color: var(--oui-bright);
}

#bloc-non {
    background: var(--non-wash);
}

#bloc-non h3 {
    color: var(--non-bright);
}

#bloc-abstention {
    background: rgba(154, 149, 138, 0.08);
}

#bloc-abstention h3 {
    color: var(--muted);
}

#liste-oui li,
#liste-non li,
#liste-absents li {
    display: block !important;
    text-align: left !important;
    background: var(--panel-inset) !important;
    border: 1px solid var(--line);
    margin-bottom: 8px !important;
    padding: 10px 12px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.92rem;
}

#liste-oui li b,
#liste-non li b,
#liste-absents li b {
    color: var(--paper);
}

#btn-suivant,
#btn-terminer {
    background: var(--brass);
    max-width: 320px;
    margin: 26px auto 0 auto;
}

/* ==========================================================================
   BOUTONS FLOTTANTS
   ========================================================================== */
#btn-suggest-floating {
    position: fixed;
    bottom: 22px;
    left: 22px;
    background: var(--panel-raised);
    color: var(--brass-bright);
    border: 1.5px solid var(--brass-dim);
    padding: 12px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    width: auto;
    margin: 0;
    transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

#btn-suggest-floating:hover {
    transform: translateY(-2px);
    border-color: var(--brass);
    color: var(--brass-bright);
    background: var(--panel-raised);
}

#btn-aide-points {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--panel-raised);
    color: var(--brass-bright);
    border: 1.5px solid var(--brass-dim);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    transition: transform 0.2s, border-color 0.2s;
}

#btn-aide-points:hover {
    transform: translateY(-2px);
    border-color: var(--brass);
}

/* ==========================================================================
   MODALES
   ========================================================================== */
.modale-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 7, 0.78);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

.modale-contenu {
    max-width: 420px;
    width: 100%;
    padding: 30px;
    text-align: left;
    margin-top: 0;
    animation: lever-rideau 0.25s ease;
}

.modale-fermer {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s;
    background: none;
    width: auto;
    padding: 0;
    font-weight: 400;
}

.modale-fermer:hover {
    color: var(--brass-bright);
    background: none;
}

.modale-contenu h3 {
    margin-top: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--brass-bright);
    padding-right: 20px;
}

.modale-contenu p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 20px;
}

.champ-modale {
    width: 100%;
    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: var(--panel-inset);
    color: var(--paper);
    font-family: var(--font-body);
}

#btn-submit-suggestion {
    width: 100%;
    padding: 12px;
    background: var(--brass);
    margin-top: 6px;
}

.grille-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carte-point {
    background: var(--panel-inset);
    border: 1px solid var(--line);
    padding: 15px;
    border-radius: var(--radius-sm);
}

.carte-point b {
    color: var(--brass-bright);
    font-size: 0.9rem;
}

.carte-point span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
    display: inline-block;
    margin-top: 5px;
}

.btn-fermer-modale {
    margin-top: 20px;
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--line);
    color: var(--muted);
}

.btn-fermer-modale:hover {
    background: var(--brass-wash);
    border-color: var(--brass);
    color: var(--brass-bright);
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 780px) {
    body {
        padding: 66px 12px 90px 12px;
    }

    #jeu-container {
        flex-direction: column;
        margin-top: 30px;
    }

    #sidebar-joueurs {
        width: 100%;
        max-height: 160px;
        border-right: none;
        border-bottom: 1px solid var(--line);
        order: 1;
    }

    #conteneur-principal > div[id^="ecran-"] {
        padding: 22px 20px;
    }

    #ecran-accueil {
        padding: 26px 22px;
    }

    h1 {
        font-size: 2.1rem;
    }

    #texte-dilemme {
        font-size: 1.25rem;
        padding: 20px;
    }

    .grille-resultats {
        grid-template-columns: 1fr;
    }

    .vote-buttons-container {
        flex-direction: column;
    }

    #btn-suggest-floating {
        left: 12px;
        bottom: 12px;
        padding: 10px 16px;
        font-size: 0.82rem;
    }

    #btn-aide-points {
        right: 12px;
        bottom: 12px;
    }

    #affichage-code {
        font-size: 1.05rem;
        letter-spacing: 0.25em;
    }
}
