:root {
    /* Thème Prize Paradise - Inspiré de Recipy */
    --primary: #f97316;
    --primary-dark: #ea580c;
    --accent: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px;     /* ⬅️ Hauteur du header (64px) */

}

/* ============= HEADER & NAVIGATION ============= */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    display: flex;              /* Permet de centrer l'image à l'intérieur */
    align-items: center;        /* Centre verticalement */
    justify-content: center;    /* Centre horizontalement si besoin */
    font-size: 2rem;
    line-height: 1;             /* Évite les décalages verticaux */
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.main-nav a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

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

.user-balance {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-logout {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9375rem;
}

.btn-logout:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* ============= MAIN CONTENT ============= */
.main-content {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
}

/* ============= FOOTER - STYLE RECIPY EXACT ============= */
.main-footer {
    background: linear-gradient(to bottom right, #404040, #262626, #171717);
    color: white;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p,
.footer-section a {
    color: rgb(209, 213, 219);
    font-size: 0.9375rem;
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.footer-section a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-section a i {
    font-size: 0.75rem;
    color: rgb(253, 186, 116);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(209, 213, 219);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--gray-500);
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-600);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    display: inline;
    margin: 0;
}

/* ============= COMPONENTS ============= */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-weight: 400;
}

.btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
    background: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============= ALERTS ============= */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.9375rem;
    border-left: 4px solid;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--accent);
    color: #065f46;
}

/* ============= AUTH FORMS ============= */
.auth-card {
    max-width: 450px;
    margin: 3rem auto;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--gray-800);
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    color: var(--gray-900);
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ============= GAME SPECIFIC ============= */
.games-grid {
    display: grid;
    gap: 1rem;
}

.game-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.game-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.game-meta {
    display: flex;
    gap: 1.25rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.player-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.player-card.winner {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
}

.player-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: white;
}

.player-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
}

.player-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.countdown-display {
    text-align: center;
    padding: 3rem 0;
}

.countdown-number {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
}

.game-result {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    margin: 1.5rem 0;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.result-pot {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1rem 0;
}

.chat-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    height: 320px;
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--gray-50);
}

.chat-message {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message-author {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.message-text {
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

.chat-input-container input {
    flex: 1;
}

.chat-input-container .btn {
    padding: 0.75rem 1.5rem;
}

.info-box {
    background: rgb(255, 247, 237);
    border: 1px solid rgb(254, 215, 170);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.info-box h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
    font-weight: 600;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ============= UTILITIES ============= */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .players-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgb(254, 237, 213);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-dark), #c2410c);
}