/* Styles de la page d accueil, partages par les versions FR / EN / ES.
   Extrait de index.html le 2026-07-24. La version francaise conserve son
   CSS en ligne : elle est en production, on n y touche pas. */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

/* --- MODALS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    min-width: 320px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 0, 0, 0.2);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* --- HEADER --- */
header {
    text-align: center;
    width: 100%;
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
}

.logo {
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* --- MAIN CONTENT --- */
.main-content {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    align-items: stretch;
}

.panel {
    flex: 1;
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,0,0,0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.panel:hover {
    transform: translateY(-5px);
}

/* --- HEADINGS --- */
h1 {
    font-size: 2.2rem;
    margin: 0 0 2rem;
    color: #ff0000;
    font-weight: 700;
    text-align: center;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ff0000;
    border-radius: 2px;
}

h2 {
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    color: #ff0000;
    font-weight: 600;
    text-align: center;
}

/* --- MODE SELECTOR --- */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem;
    border: 2px solid rgba(255,0,0,0.25);
    background: rgba(255,0,0,0.08);
    color: #fff;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

/* Fallback pour les icônes si Font Awesome ne charge pas */
.mode-btn i {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

/* Fallbacks pour les icônes */
.mode-btn i::before {
    font-family: 'Font Awesome 5 Free', serif;
    font-weight: 900;
}

#btnGuest i::before {
    content: "👤";
    font-family: serif;
}

#btnRegister i::before {
    content: "➕";
    font-family: serif;
}

#btnLogin i::before {
    content: "🔑";
    font-family: serif;
}

.mode-btn .btn-title {
    font-weight: 600;
    font-size: 1rem;
}

.mode-btn .btn-desc {
    font-size: 0.8rem;
    color: #bbb;
    opacity: 0.8;
}

.mode-btn:hover {
    transform: translateY(-3px);
    background: rgba(255,0,0,0.15);
    border-color: rgba(255,0,0,0.4);
    box-shadow: 0 8px 20px rgba(255,0,0,0.2);
}

.mode-btn:active {
    transform: translateY(-1px);
}

/* --- BACK BUTTON --- */
.back-btn {
    width: 100%;
    background: rgba(100,100,100,0.15);
    border: 2px solid rgba(150,150,150,0.3);
    margin-bottom: 1.8rem;
    flex-direction: row;
    gap: 0.8rem;
}

.back-btn:hover {
    background: rgba(120,120,120,0.2);
    border-color: rgba(180,180,180,0.4);
}

/* --- FORM STYLING --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
      border: 1.5px solid rgba(255,0,0,0.12);  /* léger rouge, subtil */
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    border-radius: 14px;
    background: rgba(30,30,30,0.96); /* en option: pour plus de netteté */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

label {
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.3s ease;
}
.formTitle {
    font-size: 1.18rem;
    font-weight: 600;
    color: #ff0000;
    letter-spacing: 0.03em;
    margin-bottom: 1.2rem;
    text-align: center;
    text-shadow: 0 1px 5px rgba(255,0,0,0.04);
}

/* --- INPUTS FIXES --- */
input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

input::placeholder {
    color: rgba(255,255,255,0.4);
}

input:focus {
    border-color: #ff0000;
    background: rgba(255,0,0,0.05);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,0,0,0.2);
}

/* --- EMAIL FIELD FIX --- */
#registerFields {
    width: 100% !important;
}

#registerFields input {
    width: 100% !important;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

/* --- VALIDATION ERRORS FIX --- */
#loginError {
    display: block !important;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    margin: 1rem 0;
    min-height: 20px;
    transition: all 0.3s ease;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

#loginError:empty {
    display: none !important;
}

/* Messages d'alerte globaux */
.alert, .error-message, .success-message {
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    margin: 1rem 0;
    display: block;
}

.error-message, .alert.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

.success-message, .alert.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #6bcf7f;
}

/* --- CHECKBOX STYLING --- */
.register-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
}

.save-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.save-label {
    font-size: 0.9rem;
    color: #aaa;
    cursor: pointer;
}

.info-text {
    color: #777;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    padding-left: 4px;
    font-style: italic;
}

/* --- SUBMIT BUTTON --- */
button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    font-family: inherit;
}

button[type="submit"]:before {
    content: "🚀";
    font-size: 1rem;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff1a1a, #e60000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,0,0,0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* --- LINKS --- */
a {
    color: #ff0000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff3333;
}

/* --- PASSWORD RESET LINKS --- */
div[style*="text-align: center"] {
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* --- TEXT CONTENT --- */
.text-content {
    color: #ddd;
    font-size: 1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.text-content p {
    margin-bottom: 1.5rem;
}

.highlight {
    color: #ff0000;
    font-weight: 600;
}

.site-name {
    color: #ff0000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- FOOTER --- */
footer {
    padding: 1.5rem;
    background: rgba(17,17,17,0.9);
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,0,0,0.1);
}

footer a {
    color: #ff0000;
    text-decoration: none;
}

footer a:hover {
    color: #ff3333;
}

/* --- RESPONSIVE MOBILE FIXES --- */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }

    .panel {
        padding: 2rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .logo {
        max-width: 150px;
    }

    form {
        max-width: 100%;
    }

    input {
        padding: 0.9rem 1rem;
        font-size: 16px !important; /* Empêche le zoom iOS */
    }

    .mode-btn {
        padding: 1rem;
    }

    .mode-btn i {
        font-size: 1.5rem;
    }

    button[type="submit"] {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Fix spécifique mobile pour les erreurs */
    #loginError {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .panel {
        padding: 1.5rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .modal-content {
        margin: 15% auto;
        padding: 1.5rem;
        min-width: 280px;
        max-width: 90vw;
    }

    .mode-btn {
        padding: 0.9rem;
    }

    input {
        padding: 0.8rem;
    }
}

/* --- BROWSER COMPATIBILITY --- */
@supports not (backdrop-filter: blur(5px)) {
    .modal {
        background-color: rgba(0,0,0,0.9);
    }
    
    .panel {
        background: rgba(15,15,15,0.98);
    }
}

/* --- ACCESSIBILITY --- */
*:focus {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

/* --- JAVASCRIPT ALERT COMPATIBILITY --- */
#alert-container {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2000 !important;
    max-width: 90vw;
}

#alert-container div {
    padding: 10px 20px !important;
    margin-bottom: 10px !important;
    border-radius: 5px !important;
    color: white !important;
    text-align: center !important;
    font-size: 0.9rem !important;
}

/* --- SECTIONS SEO --- */
.seo-section {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem 2rem;
    margin: 0 auto;
}

.seo-section h2 {
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,0,0,0.1);
    border-radius: 16px;
    padding: 1.8rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,0,0,0.3);
}

.feature-card h3 {
    color: #ff0000;
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.feature-card p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.7;
}

.feature-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.6rem;
}

/* --- FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.faq-item {
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.1rem 1.4rem;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.3s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    color: #ff0000;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
}

.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: #ff3333; }

.faq-item .faq-answer {
    padding: 0 1.4rem 1.3rem;
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- FOOTER NAV --- */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.2rem;
    margin-bottom: 0.9rem;
}

.footer-nav a { font-size: 0.88rem; }

.footer-copy {
    color: #888;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .seo-section { padding: 0 1rem 1.5rem; }
    .feature-card { padding: 1.4rem; }
    .faq-item summary { padding: 1rem 1.1rem; font-size: 0.95rem; }
    .faq-item .faq-answer { padding: 0 1.1rem 1.1rem; font-size: 0.9rem; }
    /* Cibles tactiles : minimum 44px (recommandation Apple/Google) */
    .footer-nav { gap: 0.2rem 0.6rem; }
    .footer-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 0.7rem;
    }
}

/* Une seule colonne uniquement sur téléphone ; les tablettes en gardent deux */
@media (max-width: 600px) {
    .feature-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* --- CLASSEMENTS DES JEUX --- */
.classement-jeu h3 { display: flex; align-items: center; gap: .5rem; }

.classement-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.classement-liste li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-size: .92rem;
}

.classement-liste li:last-child { border-bottom: none; }

.classement-rang {
    flex-shrink: 0;
    width: 1.6rem;
    text-align: center;
    font-weight: 700;
    color: #888;
}

.classement-nom {
    flex: 1;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.classement-elo {
    flex-shrink: 0;
    color: #ff0000;
    font-weight: 700;
}

.classement-vide {
    color: #777;
    font-size: .88rem;
    font-style: italic;
    padding: .6rem 0;
}




    