/* ===========================
   STYLE.CSS - Page d'accueil "Coup de Génie"
   Design moderne, fun et intelligent
   =========================== */

/* ===========================
   PAGE LAYOUT - Sticky Footer
   =========================== */
html, body {
    height: 100%;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    padding: 0;
}

.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    text-align: center;
}

/* ===========================
   HEADER
   =========================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.btn-connexion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.btn-connexion:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-purple);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-connexion i {
    font-size: 1.2rem;
    transition: transform var(--transition-bounce);
}

.btn-connexion:hover i {
    transform: rotate(10deg) scale(1.2);
}

/* ===========================
   MAIN CONTENT - Already defined in PAGE LAYOUT section
   =========================== */

/* ===========================
   HERO SECTION - Logo et titre principal
   =========================== */
.hero-section {
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease;
}

.main-title {
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    margin-bottom: 24px;
    line-height: 1;
    letter-spacing: -4px;
}

.title-word {
    color: var(--primary-purple);
    display: inline-block;
}

.subtitle {
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--text-secondary);
    font-weight: 600;
    animation: fadeIn 1s ease 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ===========================
   GAME DESCRIPTION
   =========================== */
.game-description {
    margin: 60px auto;
    max-width: 800px;
    animation: fadeIn 1s ease 0.5s both;
}

.description-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
    font-weight: 500;
}

/* Features - Cartes animées */
.features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    transition: all var(--transition-bounce);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature:nth-child(1) {
    border-color: rgba(124, 58, 237, 0.4);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.feature:nth-child(2) {
    border-color: rgba(59, 130, 246, 0.4);
    animation: fadeInUp 0.8s ease 0.7s both;
}

.feature:nth-child(3) {
    border-color: rgba(251, 191, 36, 0.4);
    animation: fadeInUp 0.8s ease 0.8s both;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature:nth-child(1):hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-lg);
}

.feature:nth-child(2):hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
}

.feature:nth-child(3):hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-lg);
}

.feature:hover::before {
    opacity: 1;
}

.feature i {
    font-size: 1.4rem;
    transition: transform var(--transition-bounce);
    position: relative;
    z-index: 1;
}

.feature:hover i {
    transform: scale(1.3) rotate(10deg);
}

.feature:nth-child(1) i {
    color: var(--primary-purple);
}

.feature:nth-child(2) i {
    color: var(--primary-blue);
}

.feature:nth-child(3) i {
    color: var(--accent-gold);
}

.feature span {
    position: relative;
    z-index: 1;
}

/* ===========================
   ACTION BUTTONS - Gros boutons ronds
   =========================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 500px;
    margin: 80px auto;
    animation: fadeInUp 1s ease 0.9s both;
}

.btn-play {
    font-size: 1.6rem;
    padding: 28px 60px;
    animation: bounce 2s ease-in-out infinite;
}

.btn-play:hover {
    animation: none;
}

.btn-duel {
    font-size: 1.4rem;
    padding: 24px 50px;
    position: relative;
    overflow: hidden;
}

.btn-duel::before {
    content: '🔥';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: fire 1.5s ease-in-out infinite;
}

@keyframes fire {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-60%) scale(1.2); opacity: 0.8; }
}

.btn-duel:hover::before {
    animation: fire 0.5s ease-in-out infinite;
}

.btn-classement {
    font-size: 1.3rem;
}

/* ===========================
   STATS SECTION - Cartes propres
   =========================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 100px auto 60px;
    animation: fadeIn 1.2s ease 1.1s both;
}

.stat-item {
    padding: 36px 28px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transition: all var(--transition-bounce);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-item:nth-child(1):hover {
    border-color: var(--primary-purple);
}

.stat-item:nth-child(2):hover {
    border-color: var(--primary-blue);
}

.stat-item:nth-child(3):hover {
    border-color: var(--accent-gold);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
    transition: transform var(--transition-bounce);
    position: relative;
    z-index: 1;
}

.stat-item:hover .stat-icon {
    transform: scale(1.3) rotate(10deg);
}

.stat-item:nth-child(1) .stat-icon {
    color: var(--primary-purple);
}

.stat-item:nth-child(2) .stat-icon {
    color: var(--primary-blue);
}

.stat-item:nth-child(3) .stat-icon {
    color: var(--accent-gold);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ===========================
   FOOTER - Full width footer
   =========================== */
.footer {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    border-top: 1px solid rgba(124, 58, 237, 0.15);
    margin-top: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content {
    margin-bottom: 20px;
}

.footer-content p {
    margin-bottom: 15px;
}

.footer i {
    color: var(--error);
    animation: heartbeat 1.5s ease infinite;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-links a {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 4px 8px;
    border-radius: 6px;
}

.footer-links a:hover {
    color: var(--accent-gold-light);
    background: rgba(251, 191, 36, 0.1);
}

.footer-links .separator {
    color: var(--text-secondary);
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===========================
   AUTH MODAL - Design moderne
   =========================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.auth-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 32px;
    padding: 48px;
    max-width: 480px;
    width: 90%;
    backdrop-filter: blur(30px);
    animation: bounceIn 0.5s ease;
    z-index: 1;
    box-shadow: var(--shadow-xl);
}

.auth-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-primary);
    font-size: 1.3rem;
}

.auth-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: var(--error);
    transform: rotate(90deg) scale(1.1);
}

.auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: var(--bg-darker);
    padding: 6px;
    border-radius: 50px;
}

.auth-tab {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: 'Poppins', sans-serif;
}

.auth-tab.active {
    background: var(--primary-purple);
    color: white;
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
    color: var(--primary-purple);
}

.auth-title i {
    margin-right: 12px;
}

.auth-form-group {
    margin-bottom: 24px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-form-group input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all var(--transition-normal);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.auth-submit {
    width: 100%;
    margin-top: 12px;
    border-radius: 16px;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
}

.auth-google {
    width: 100%;
    border-radius: 16px;
}

/* ===========================
   USER MENU
   =========================== */
.user-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.user-menu.show {
    opacity: 1;
    transform: translateY(0);
}

.user-menu-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 12px;
    backdrop-filter: blur(30px);
    box-shadow: var(--shadow-xl), var(--glow-purple);
    min-width: 200px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.user-menu-item:hover {
    background: rgba(124, 58, 237, 0.2);
    transform: translateX(4px);
}

.user-menu-item i {
    font-size: 1.1rem;
    color: var(--primary-purple);
}

/* ===========================
   RESPONSIVE - INDEX PAGE
   =========================== */
@media (max-width: 768px) {
    .header {
        padding: 20px 0;
        margin-bottom: 30px;
    }
    
    .btn-connexion {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .main-content {
        padding: 30px 15px;
    }
    
    .hero-section {
        margin-bottom: 40px;
    }
    
    .game-description {
        margin: 40px auto;
    }
    
    .description-text {
        font-size: 1.3rem;
    }
    
    .features {
        gap: 16px;
    }
    
    .feature {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .action-buttons {
        gap: 20px;
        margin: 60px auto;
    }
    
    .btn-play {
        font-size: 1.4rem;
        padding: 24px 48px;
    }
    
    .stats-section {
        gap: 20px;
        margin: 80px auto 40px;
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 28px 24px;
    }
    
    .auth-modal-content {
        padding: 36px 28px;
    }
}

@media (max-width: 480px) {
    .btn-connexion {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-connexion span {
        display: none;
    }
    
    .features {
        flex-direction: column;
        align-items: stretch;
    }
    
    .feature {
        justify-content: center;
    }
    
    .action-buttons {
        max-width: 100%;
    }
    
    .btn-play {
        font-size: 1.2rem;
        padding: 20px 40px;
    }
    
    .auth-modal-content {
        padding: 28px 20px;
        border-radius: 24px;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
}