/*==================================================
CORPO! 2026
PARTIE 1 - BASE GLOBALE
==================================================*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {

    --primary: #ff3131;
    --primary-light: #ff5757;
    --primary-dark: #e62828;

    --text: #2c3e50;
    --text-light: #666;

    --glass: rgba(255, 255, 255, .90);

    --radius: 28px;

    --shadow:
        0 15px 45px rgba(0, 0, 0, .10);

    --shadow-red:
        0 12px 30px rgba(255, 49, 49, .25);

}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Poppins, sans-serif;
}



body {

    min-height: 100vh;


    background:

        linear-gradient(rgba(255, 255, 255, 0.33),
            rgba(255, 255, 255, 0.159)),

        url("../images/background.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;


    overflow-x: hidden;

}



a {

    text-decoration: none;

}



img {

    max-width: 100%;

    display: block;

}




/*=========================
NAVBAR
=========================*/

.navbar {

    width: 100%;

    height: 78px;


    padding: 0 45px;


    display: flex;


    align-items: center;


    justify-content: space-between;


    background:

        linear-gradient(135deg,
            var(--primary),
            var(--primary-light));


    box-shadow:

        0 5px 25px rgba(255, 49, 49, .25);


    position: sticky;


    top: 0;


    z-index: 999;


}




.logo {


    font-size: 26px !important;


    font-weight: 800;


    color: white;


}




.nav-links {


    display: flex;


    gap: 35px;


}




.nav-links a {


    color: white;


    font-weight: 600;


    opacity: .9;


    transition: .25s;


}




.nav-links a:hover {


    opacity: 1;


    transform: translateY(-2px);


}




.nav-user {


    font-weight: 700;


    color: white;


    font-size: 16px;


}



/*=========================
FOOTER
=========================*/

.footer {


    padding: 20px;


    text-align: center;


    color: #666;


    font-size: 14px;


}




/*=========================
MAIN
=========================*/

.main {


    min-height:


        calc(100vh - 78px);


    padding: 40px 20px;


    display: flex;


    justify-content: center;


    align-items: center;


}



/*=========================
BOX
=========================*/

.box,


.game-panel,


.feedback-box,


.defi-box,


.vote-box,


.defaite-box,


.waiting-box {


    width: 100%;


    max-width: 950px;


    padding: 45px;


    border-radius: 32px;


    background:


        rgba(255, 255, 255, .90);


    backdrop-filter: blur(10px);


    box-shadow:


        var(--shadow);


    animation: fadeUp .5s;


}



.box h1,


.feedback-box h1,


.defi-box h1,


.vote-box h1,


.defaite-box h1 {


    font-size: 42px;


    font-weight: 800;


    color: var(--primary);


    text-align: center;


    margin-bottom: 25px;


}




/*=========================
CHO MESSAGE
=========================*/

.cho-message {


    padding: 18px;


    border-radius: 20px;


    background:


        linear-gradient(135deg,
            #fff4f4,
            #fffafa);


    border:


        1px solid rgba(255, 49, 49, .15);


    margin-bottom: 25px;


}




.cho-message strong {


    color: var(--primary);


}




/*=========================
BADGES
=========================*/

.badge,


.corpo-badge {


    display: inline-flex;


    align-items: center;


    gap: 8px;


    padding: 10px 18px;


    border-radius: 999px;


    font-size: 14px;


    font-weight: 700;


    background:


        linear-gradient(135deg,
            var(--primary),
            var(--primary-light));


    color: white;


    box-shadow:


        var(--shadow-red);


}




/*=========================
BUTTONS
=========================*/

.btn {


    width: 100%;


    padding: 18px;


    border: none;


    border-radius: 18px;


    cursor: pointer;


    font-size: 16px;


    font-weight: 700;


    color: white;


    background:


        linear-gradient(135deg,
            var(--primary),
            var(--primary-light));


    box-shadow:


        var(--shadow-red);


    transition: .25s;


}




.btn:hover {


    transform: translateY(-3px);


}




.btn:active {


    transform: scale(.98);


}




.btn-secondary {


    background:


        linear-gradient(135deg,
            #2c3e50,
            #34495e);


}




.btn-success {


    background:


        linear-gradient(135deg,
            #27ae60,
            #39d77f);


}




.btn-warning {


    background:


        linear-gradient(135deg,
            #f39c12,
            #ffbe55);


}




.btn-danger {


    background:


        linear-gradient(135deg,
            #e74c3c,
            #ff6767);


}



/*=========================
INPUTS
=========================*/

input,


textarea {


    width: 100%;


    padding: 18px;


    border-radius: 16px;


    border: 2px solid #ececec;


    font-size: 15px;


    outline: none;


    transition: .25s;


}




input:focus,


textarea:focus {


    border-color: var(--primary);


    box-shadow:


        0 0 20px rgba(255, 49, 49, .15);


}

.private-checkbox {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 18px;

    font-size: 18px;
    font-weight: 700;

    color: #2c3e50;

    cursor: pointer;
}

.private-checkbox input[type="checkbox"] {
    width: 28px;
    height: 28px;

    accent-color: #ff3131;

    cursor: pointer;

    flex-shrink: 0;
}

.private-checkbox span {
    line-height: 1;
}


/*=========================
TIMER
=========================*/

.timer,


.corpo-timer {


    font-size: 30px;


    font-weight: 800;


    text-align: center;


    color: var(--primary);


    margin-top: 15px;


    font-variant-numeric: tabular-nums;


}




/*=========================
ANIMATIONS
=========================*/

@keyframes fadeUp {


    from {


        opacity: 0;


        transform: translateY(25px);


    }


    to {


        opacity: 1;


        transform: translateY(0);


    }


}



@keyframes pulse {


    0%,
    100% {


        transform: scale(1);


    }


    50% {


        transform: scale(1.05);


    }


}




/*=========================
RESPONSIVE
=========================*/

@media(max-width:768px) {


    .nav-links {


        display: none;


    }



    .logo {


        font-size: 24px;


    }



    .navbar {


        padding: 0 15px;


    }



    .box,


    .feedback-box,


    .defi-box,


    .vote-box,


    .defaite-box {


        padding: 30px;


    }



    .box h1 {


        font-size: 32px;


    }



}

/*=========================================
AUTH + LOBBY PAGES
=========================================*/

/* ===== Containers spécifiques ===== */

.auth-container,
.lobby-container,
.create-container,
.join-container {

    width: 100%;
    max-width: 700px;

    background: rgba(255, 255, 255, .90);
    backdrop-filter: blur(12px);

    border-radius: 32px;
    padding: 45px;

    box-shadow: 0 15px 45px rgba(0, 0, 0, .10);

    animation: fadeUp .6s;
}

/* ===== TITRES ===== */

.auth-container h1,
.lobby-container h1,
.create-container h1,
.join-container h1 {

    font-size: 40px;
    font-weight: 800;
    color: #ff3131;
    text-align: center;
    margin-bottom: 20px;
}

/* ===== TEXTES ===== */

.auth-container p,
.lobby-container p {

    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* ===== INPUTS SPECIAL ===== */

.auth-container input,
.create-container input,
.join-container input {

    width: 100%;
    padding: 16px 18px;

    border-radius: 16px;
    border: 2px solid #eee;

    font-size: 15px;

    transition: .25s;
}

.auth-container input:focus,
.create-container input:focus,
.join-container input:focus {

    border-color: #ff3131;
    box-shadow: 0 0 18px rgba(255, 49, 49, .20);
}

/* ===== LOBBY LIST PLAYERS ===== */

.lobby-players {

    margin-top: 25px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lobby-player {

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    border-radius: 16px;

    background: white;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .05);

    transition: .25s;
}

.lobby-player:hover {
    transform: translateX(5px);
}

.lobby-player img {

    width: 42px;
    height: 42px;
    border-radius: 50%;

    object-fit: cover;

    border: 2px solid #ff3131;
}

/* ===== ROLE DISCOVERY ===== */

.role-card {

    text-align: center;

    padding: 40px;

    border-radius: 28px;

    background: linear-gradient(135deg, #fff, #ffeaea);

    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);

    animation: fadeUp .6s;
}

.role-title {

    font-size: 34px;
    font-weight: 800;

    color: #ff3131;

    margin-bottom: 15px;
}

.role-description {

    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* ===== BADGES ===== */

.role-badge {

    display: inline-block;
    padding: 10px 18px;

    border-radius: 999px;

    font-weight: 700;
    font-size: 13px;

    background: #ffe2e2;
    color: #ff3131;

    margin-top: 15px;
}

/* ===== BUTTON START LOBBY ===== */

.start-btn {

    background: linear-gradient(135deg, #ff3131, #ff5b5b);
    color: white;

    padding: 18px;

    border-radius: 18px;

    font-weight: 700;

    border: none;

    width: 100%;

    cursor: pointer;

    transition: .3s;

    margin-top: 20px;
}

.start-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(255, 49, 49, .35);
}

/* =========================================
   PARTIE 3 — GAME PHASES (MEETING / FEEDBACK / DEFI / VOTE)
   ========================================= */


/* ===== CONTAINERS COMMUNS ===== */

.meeting-page,
.feedback-container,
.defi-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: calc(100vh - 78px);
}

.meeting-box,
.feedback-box,
.defi-box {
    width: 100%;
    max-width: 950px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    animation: fadeUp .5s ease;
}


/* ===== TITRES ===== */

.meeting-box h1,
.feedback-box h1,
.defi-box h1 {
    font-size: 40px;
    font-weight: 800;
    color: #ff3131;
    text-align: center;
    margin-bottom: 20px;
}


/* ===== BADGE CONTEXTE ===== */

.context-badge,
.defi-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    background: linear-gradient(135deg, #ff3131, #ff6b6b);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 49, 49, 0.25);
    margin-bottom: 15px;
}


/* ===== CHO MESSAGE ===== */

.cho-message {
    background: linear-gradient(135deg, #fff3f3, #ffeaea);
    border: 2px solid rgba(255, 49, 49, 0.25);
    padding: 16px 18px;
    border-radius: 16px;
    font-size: 15px;
    color: #b10000;
    font-weight: 600;
    margin-bottom: 20px;
}


/* ===== TIMER ===== */

.feedback-timer,
.timer-defi {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #ff3131;
    margin: 15px 0;
    font-variant-numeric: tabular-nums;
}

.timer-warning {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}


/* ===== CHAT BOX ===== */

.chat-box {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
}

.chat-messages {
    height: 260px;
    overflow-y: auto;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* messages */
.chat-msg {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    max-width: 75%;
    animation: fadeUp .2s ease;
}

.chat-msg.me {
    margin-left: auto;
    background: linear-gradient(135deg, #ff3131, #ff5b5b);
    color: white;
}

.chat-msg.other {
    background: #f1f1f1;
    color: #333;
}

.chat-msg.system {
    background: #fff3f3;
    color: #ff3131;
    border: 1px solid rgba(255, 49, 49, 0.2);
    max-width: 100%;
    text-align: center;
}


/* ===== INPUT CHAT ===== */

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid #eee;
    outline: none;
    transition: .2s;
}

.chat-input-area input:focus {
    border-color: #ff3131;
    box-shadow: 0 0 12px rgba(255, 49, 49, 0.2);
}

.chat-send-btn {
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ff3131, #ff5b5b);
    box-shadow: 0 10px 25px rgba(255, 49, 49, 0.25);
    transition: .2s;
}

.chat-send-btn:hover {
    transform: translateY(-3px);
}


/* ===== QCM ===== */

.qcm-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.qcm-option {
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #ff3131;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;
}

.qcm-option:hover {
    background: #fff0f0;
}

.qcm-option.selected {
    background: linear-gradient(135deg, #ff3131, #ff6b6b);
    color: white;
}


/* ===== VOTE ===== */

.vote-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-reste,
.btn-elimine {
    padding: 16px 28px;
    border-radius: 18px;
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    color: white;
    transition: .2s;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.btn-reste {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
}

.btn-elimine {
    background: linear-gradient(135deg, #ff3131, #ff6b6b);
}

.btn-reste:hover,
.btn-elimine:hover {
    transform: translateY(-3px);
}


/* ===== WAITING ===== */

.waiting-msg {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 15px;
}


/* ===== INFO BOX ===== */

.info-reveal {
    background: #fff3f3;
    border: 2px solid rgba(255, 49, 49, 0.3);
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    color: #b10000;
    text-align: center;
}


/* ===== ANIMATIONS ===== */

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================
   PARTIE 4 — POLISH FINAL / OVERRIDES
   ========================================= */

/* ===== GLOBAL IMPROVEMENTS ===== */

body {
    color: #2c3e50;
}

/* smooth scroll partout */
html {
    scroll-behavior: smooth;
}

/* selection text */
::selection {
    background: #ff3131;
    color: white;
}

/* =========================================
   BACKGROUND VARIANTS (MEETING / FEEDBACK)
   ========================================= */

/* Meeting dynamique (dégradé corporate moderne) */
.meeting-page {
    background: transparent !important;
}

/* Feedback ambiance débat */
.feedback-container {
    background:
        linear-gradient(135deg, rgba(255, 49, 49, 0.05), rgba(255, 255, 255, 0.6)),
        radial-gradient(circle at top, rgba(255, 49, 49, 0.10), transparent 50%);
}

/* Défi ambiance urgence */
.defi-container {
    background:
        radial-gradient(circle at top, rgba(255, 49, 49, 0.18), transparent 45%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7));
}

/* =========================================
   NAVBAR IMPROVEMENT (glass effect modern)
   ========================================= */

.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* =========================================
   BOX HOVER LIFT (ultra moderne UI feel)
   ========================================= */

.box:hover,
.feedback-box:hover,
.defi-box:hover,
.vote-box:hover,
.defaite-box:hover {
    transform: translateY(-3px);
    transition: 0.3s ease;
}

/* =========================================
   CHAT SCROLLBAR (clean UI)
   ========================================= */

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 49, 49, 0.4);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================
   BUTTON ENHANCEMENT (ALL BUTTONS)
   ========================================= */

.btn,
.chat-send-btn,
.start-btn,
.btn-reste,
.btn-elimine {
    position: relative;
    overflow: hidden;
}

/* effet shine */
.btn::after,
.chat-send-btn::after,
.start-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.btn:hover::after,
.chat-send-btn:hover::after,
.start-btn:hover::after {
    left: 100%;
}

/* =========================================
   DEFIS QCM FIX + MODERN LOOK
   ========================================= */

.qcm-option {
    transition: 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qcm-option:hover {
    transform: translateY(-2px);
}

.qcm-option.selected {
    box-shadow: 0 10px 25px rgba(255, 49, 49, 0.25);
}

/* =========================================
   TIMER PULSE IMPORTANT STATE
   ========================================= */

.timer-defi,
.feedback-timer {
    letter-spacing: 1px;
}

.timer-warning {
    color: #ff3131;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
}

/* =========================================
   VOTE BUTTON ENHANCED FEEL
   ========================================= */

.btn-reste,
.btn-elimine {
    min-width: 180px;
}

.btn-reste:hover {
    box-shadow: 0 15px 35px rgba(46, 204, 113, 0.3);
}

.btn-elimine:hover {
    box-shadow: 0 15px 35px rgba(255, 49, 49, 0.35);
}

/* =========================================
   FEEDBACK BADGE IMPROVED
   ========================================= */

.context-badge {
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =========================================
   CHAT MESSAGE IMPROVEMENT
   ========================================= */

.chat-msg {
    line-height: 1.4;
}

/* message system glow */
.chat-msg.system {
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.08);
}

/* =========================================
   LOADING / WAIT STATES
   ========================================= */

.waiting-msg {
    animation: pulse 2s infinite;
}

/* =========================================
   FOOTER MODERN FIX
   ========================================= */

.footer {
    margin-top: 40px;
    opacity: 0.7;
}

/* =========================================
   SMALL DEVICE FIX FINAL
   ========================================= */

@media (max-width: 500px) {

    .btn-reste,
    .btn-elimine {
        width: 100%;
    }

    .chat-box {
        max-width: 100%;
    }

    .box h1,
    .feedback-box h1,
    .defi-box h1 {
        font-size: 28px;
    }
}

/* =========================================
   PARTIE 5 — RESULTAT DÉFI
   ========================================= */

.resultat-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 78px);
    background:
        radial-gradient(circle at top, rgba(255, 49, 49, 0.12), transparent 55%),
        radial-gradient(circle at bottom, rgba(44, 62, 80, 0.08), transparent 60%);
}

.resultat-box {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    animation: fadeUp .5s ease;
    text-align: center;
}

/* TITRE */
.resultat-box h1 {
    font-size: 42px;
    font-weight: 800;
    color: #ff3131;
    margin-bottom: 20px;
}

/* IMAGE JOUEUR */
.resultat-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ff3131;
    margin: 15px auto;
    box-shadow: 0 10px 30px rgba(255, 49, 49, 0.25);
}

/* NOM JOUEUR */
#eliminatedName {
    font-size: 26px;
    font-weight: 800;
    color: #2c3e50;
    margin-top: 10px;
}

/* CHO MESSAGE (override léger propre) */
.resultat-box .cho-message {
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
}

/* TEXTE RÉSULTAT */
#resultText {
    font-size: 22px;
    font-weight: 800;
    margin-top: 20px;
}

.result-success {
    color: #27ae60;
    text-shadow: 0 0 10px rgba(39, 174, 96, 0.2);
}

.result-fail {
    color: #ff3131;
    text-shadow: 0 0 10px rgba(255, 49, 49, 0.25);
}

/* RAPPEL DÉFI */
.defi-rappel {
    background: linear-gradient(135deg, #fff3f3, #ffeaea);
    border: 2px solid rgba(255, 49, 49, 0.2);
    padding: 14px 18px;
    border-radius: 16px;
    margin: 20px auto;
    max-width: 420px;
    font-style: italic;
    color: #b10000;
    font-size: 14px;
}

/* ZONES ETATS */
#zoneWaiting {
    margin-top: 20px;
}

#zoneResult {
    margin-top: 20px;
}

/* BOUTON CONTINUER */
#btnNextStep {
    margin-top: 25px;
}

/* TIMER SUITE */
.auto-timer {
    margin-top: 12px;
    font-style: italic;
    color: #888;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .resultat-box {
        padding: 25px;
    }

    .resultat-box h1 {
        font-size: 30px;
    }

    #resultText {
        font-size: 18px;
    }
}

/* =========================================
   PARTIE 6 — VICTOIRE / DÉFAITE
   ========================================= */

/* ===== CONTAINERS ===== */

.victoire-container,
.defaite-container {

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 40px 20px;

    min-height: calc(100vh - 78px);

    /* on garde le background image global */
}

/* petit effet ambiance différente */
.victoire-container {
    background:
        radial-gradient(circle at top, rgba(39, 174, 96, 0.12), transparent 55%),
        radial-gradient(circle at bottom, rgba(255, 49, 49, 0.08), transparent 60%);
}

.defaite-container {
    background:
        radial-gradient(circle at top, rgba(255, 49, 49, 0.18), transparent 55%),
        radial-gradient(circle at bottom, rgba(44, 62, 80, 0.08), transparent 60%);
}


/* ===== BOX ===== */

.victoire-box,
.defaite-box {

    width: 100%;
    max-width: 900px;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);

    border-radius: 28px;

    padding: 40px;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);

    text-align: center;

    animation: fadeUp .5s ease;
}


/* ===== TITRES ===== */

.victoire-box h1,
.defaite-box h1 {

    font-size: 44px;
    font-weight: 800;

    margin-bottom: 20px;

    color: var(--primary);
}

/* override dynamique JS */
.defaite-box h1 {
    color: #ff3131;
}

.victoire-box h1 {
    color: #27ae60;
}


/* ===== CHO MESSAGE ===== */

.victoire-box .cho-message,
.defaite-box .cho-message {

    margin: 20px auto;
    max-width: 520px;

    text-align: center;
}


/* ===== IMAGE RESULTAT ===== */

.victoire-img,
.defaite-img {

    width: 160px;
    height: 160px;

    border-radius: 50%;

    object-fit: cover;

    margin: 20px auto;

    border: 4px solid #ff3131;

    box-shadow: 0 15px 40px rgba(255, 49, 49, 0.25);

    animation: pulse 2.5s infinite;
}


/* victoire override vert léger */
.victoire-img {
    border-color: #27ae60;
    box-shadow: 0 15px 40px rgba(39, 174, 96, 0.25);
}


/* ===== TEXTE RESULT ===== */

.victoire-text,
.defaite-text {

    font-size: 18px;
    font-weight: 600;

    margin-top: 15px;

    color: #2c3e50;

    line-height: 1.5;
}


/* ===== ACTIONS BOTTOM ===== */

.end-actions {

    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 25px;

    align-items: center;
}

.end-actions .btn {

    width: 100%;
    max-width: 320px;

    text-align: center;
}


/* ===== SOCIAL LINKS ===== */

.social-links {

    display: flex;
    justify-content: center;

    gap: 14px;

    margin-top: 18px;

    flex-wrap: wrap;
}

.social-link {

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px 18px;

    border-radius: 12px;

    font-weight: 700;

    font-size: 14px;

    text-decoration: none;

    color: white;

    transition: .25s;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* shop couleur corpo */
.social-link.shop {
    background: linear-gradient(135deg, #ff3131, #ff5b5b);
}

/* linkedin */
.social-link.linkedin {
    background: #0077b5;
}

/* insta */
.social-link.insta {
    background: linear-gradient(45deg,
            #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}


/* ===== SOCIAL TITLE ===== */

.social-title {

    font-size: 13px;

    color: #888;

    margin-top: 16px;
    margin-bottom: 6px;

    font-style: italic;

    text-align: center;
}


/* ===== IDEA BOX ===== */

.idea-box .btn {
    background: linear-gradient(135deg, #2980b9, #3498db);
}


/* ===== HOVER LIFT BOX ===== */

.victoire-box:hover,
.defaite-box:hover {
    transform: translateY(-3px);
    transition: .3s ease;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {

    .victoire-box,
    .defaite-box {
        padding: 25px;
    }

    .victoire-box h1,
    .defaite-box h1 {
        font-size: 30px;
    }

    .victoire-img,
    .defaite-img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {

    .main {
        padding: 20px 15px;
    }

    .box {
        max-width: 100%;
        padding: 45px 30px;
        border-radius: 32px;
    }

    .box h1 {
        font-size: 46px;
    }

    .box p {
        font-size: 18px;
    }

    .box input {
        padding: 20px;
        font-size: 18px;
    }

    .btn {
        padding: 22px;
        font-size: 19px;
    }
}

/* MOBILE ONLY — CREER / REJOINDRE */
@media (max-width: 768px) {

    .create-page,
    .join-page {
        min-height: calc(100vh - 78px) !important;
        padding: 35px 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .create-box,
    .join-box {
        width: 92vw !important;
        max-width: 92vw !important;
        padding: 48px 32px !important;
        border-radius: 38px !important;
    }

    .create-box h1,
    .join-box h1 {
        font-size: 44px !important;
        line-height: 1.08 !important;
        margin-bottom: 30px !important;
    }

    .create-box p,
    .join-box p,
    .join-box h2 {
        font-size: 20px !important;
        line-height: 1.45 !important;
    }

    .create-box input,
    .join-box input {
        padding: 22px !important;
        font-size: 18px !important;
        border-radius: 20px !important;
        margin-bottom: 18px !important;
    }

    .create-box .btn,
    .join-box .btn {
        padding: 24px !important;
        font-size: 20px !important;
        border-radius: 24px !important;
    }

    .private-checkbox {
        font-size: 22px !important;
        margin: 24px 0 !important;
        gap: 16px !important;
    }

    .private-checkbox input[type="checkbox"] {
        width: 36px !important;
        height: 36px !important;
    }

    .public-list {
        margin: 20px 0 !important;
        font-size: 18px !important;
    }

    .public-party {
        padding: 18px !important;
        border-radius: 22px !important;
    }
}

/* ================================
   FIX MOBILE GLOBAL
================================ */

@media (max-width: 768px) {

    .navbar {
        height: 72px !important;
        min-height: 72px !important;

        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 0 16px !important;
    }

    .logo {
        font-size: 34px !important;
        line-height: 1.05 !important;
    }

    .nav-user {
        font-size: 22px !important;
        white-space: nowrap !important;
    }

    .nav-links {
        display: none !important;
    }

    .main {
        padding: 24px 18px !important;
        align-items: flex-start !important;
    }

    .waiting-box {
        width: calc(100vw - 36px) !important;
        max-width: none !important;
        margin: 28px auto 0 !important;
        padding: 42px 28px !important;
        border-radius: 34px !important;
    }

    .waiting-box h2 {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }

    .waiting-box p {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }

    .victoire-box,
    .defaite-box {
        width: calc(100vw - 36px) !important;
        max-width: none !important;
        padding: 34px 24px !important;
        border-radius: 34px !important;
    }

    .victoire-text,
    .defaite-text {
        font-size: 24px !important;
        line-height: 1.35 !important;
    }

    .end-actions .btn,
    .idea-box .btn {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 78px !important;
        padding: 20px !important;
        font-size: 24px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .social-title {
        font-size: 20px !important;
        line-height: 1.35 !important;
    }

    .social-link {
        font-size: 20px !important;
        padding: 16px 20px !important;
        border-radius: 18px !important;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: auto !important;
        min-height: 72px !important;
        padding: 16px 22px !important;
        gap: 14px !important;
    }

    .logo {
        font-size: 24px !important;
        line-height: 1 !important;

        white-space: nowrap !important;
        max-width: none !important;

        flex-shrink: 0;
    }

    .nav-user {
        font-size: 17px !important;
        white-space: nowrap !important;
    }

    .nav-links {
        display: none !important;
    }
}


@media (max-width: 768px) {

    .create-box h1,
    .box h1 {

        font-size: 27px !important;
        line-height: 1.15 !important;

        text-align: center !important;

        margin-left: auto !important;
        margin-right: auto !important;

        width: 100% !important;
    }

    .create-box p,
    .box p,

    .create-box h2,
    .box h2 {

        text-align: center !important;

        font-size: 18px !important;

        line-height: 1.5 !important;
    }

}

/* ===== CHAT / RÉPONSE DÉFI ===== */

#zoneEliminated,
#zoneOthers {
    width: 100%;
    max-width: 720px;
}

.chat-box {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .92);
    border-radius: 24px;
    padding: 16px;
    box-shadow:
        0 12px 35px rgba(0, 0, 0, .10),
        0 0 0 1px rgba(255, 49, 49, .08);
}

.chat-messages {
    height: 230px;
    overflow-y: auto;
    padding: 16px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, #fffafa, #ffffff);
    border: 2px solid rgba(255, 49, 49, .10);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages p {
    width: fit-content;
    max-width: 88%;
    padding: 12px 15px;
    margin: 0;
    border-radius: 16px 16px 16px 5px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
}

.chat-input-area {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    background: #fff3f3;
    border: 2px solid rgba(255, 49, 49, .12);
}

.chat-input-area input {
    width: 100%;
    height: 54px;
    border: none;
    outline: none;
    border-radius: 16px;
    padding: 0 16px;
    background: white;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    box-shadow: inset 0 0 0 2px #f0f0f0;
}

.chat-input-area input:focus {
    box-shadow:
        inset 0 0 0 2px #ff3131,
        0 0 0 4px rgba(255, 49, 49, .12);
}

.chat-send-btn {
    min-height: 54px;
    border: none;
    padding: 0 20px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #ff3131, #ff5c5c);
    box-shadow: 0 10px 25px rgba(255, 49, 49, .28);
    transition: .2s;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
}

#doneBtn {
    margin-top: 14px !important;
    min-height: 58px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #27ae60, #40d77a) !important;
    font-size: 16px !important;
    box-shadow: 0 10px 25px rgba(39, 174, 96, .25) !important;
}

/* ===== MOBILE CHAT DÉFI ===== */

@media(max-width:768px) {

    #zoneEliminated,
    #zoneOthers {
        width: 100% !important;
    }

    .chat-box {
        width: 100% !important;
        padding: 14px !important;
        border-radius: 26px !important;
        margin-top: 4px !important;
    }

    .chat-messages {
        height: 190px !important;
        padding: 14px !important;
        border-radius: 22px !important;
    }

    .chat-messages p {
        font-size: 16px !important;
        line-height: 1.35 !important;
        max-width: 94% !important;
        padding: 12px 14px !important;
    }

    .chat-input-area {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 14px !important;
        border-radius: 24px !important;
        background: linear-gradient(135deg, #fff2f2, #ffffff) !important;
    }

    .chat-input-area input {
        height: 62px !important;
        font-size: 18px !important;
        border-radius: 18px !important;
        text-align: center !important;
    }

    .chat-send-btn {
        width: 100% !important;
        min-height: 62px !important;
        border-radius: 20px !important;
        font-size: 19px !important;
    }

    #doneBtn {
        min-height: 66px !important;
        font-size: 19px !important;
        border-radius: 22px !important;
    }

    #zoneEliminated>p {
        font-size: 15px !important;
        line-height: 1.4 !important;
        background: #fff3f3 !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
        color: #666 !important;
    }
}

/* FIX NAVBAR MOBILE — garde la barre rouge sur toute la largeur */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {

    .navbar {
        width: 100vw !important;
        max-width: 100vw !important;

        height: 72px !important;
        min-height: 72px !important;

        padding: 0 12px !important;
        margin: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;

        overflow: hidden !important;
    }

    .logo {
        font-size: 18px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    .nav-links {
        display: none !important;
    }

    .nav-user {
        margin-left: auto !important;

        display: flex !important;
        align-items: center !important;

        gap: 6px !important;

        font-size: 14px !important;
    }

    #userPseudo {
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    #logoutBtn {
        padding: 7px 10px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }
}