:root {
    --blue: #0062c4;
    --text-color: #1d1d1f;
    --background-color: #ffffff;
    --border-radius: 8px;
    --spacing-unit: 8px;
    --transition-duration: 0.3s;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --scale-hover: 1.02;
    --scale-active: 0.98;
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Zoom automatique pour appareils mobiles - Version corrigée */
@media (max-width: 768px) {
    /* Ne pas appliquer le zoom ici, il sera géré par JavaScript */
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    /* Ajuster l'en-tête pour éviter les problèmes de collage */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: var(--background-color) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        display: block !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Ajouter un espace en haut du contenu pour compenser l'en-tête fixe */
    body::before {
        content: '';
        display: block;
        height: 80px; /* Hauteur de l'en-tête */
    }
    
    /* Ajuster le conteneur principal */
    .main-content {
        margin-top: 20px;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    /* Ajuster la grille des jeux */
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    /* Ajuster les catégories */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

/* Styles pour la classe mobile-zoomed - Version corrigée */
body.mobile-zoomed {
    /* Pas de zoom sur le body, géré par JavaScript sur html */
    overflow-x: hidden;
}

html.mobile-zoomed {
    /* Zoom appliqué sur html au lieu de body - Niveau 75% */
    transform: scale(0.75);
    transform-origin: top left;
    width: 133.33%;
    height: 133.33vh;
    overflow-x: hidden;
}

/* Ajuster l'en-tête pour le zoom mobile */
html.mobile-zoomed .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--background-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Annuler le zoom pour l'en-tête */
    transform: scale(1);
    transform-origin: top left;
    width: 133.33%; /* Compenser le zoom du parent (75%) */
}

/* Espace pour l'en-tête fixe */
html.mobile-zoomed body::before {
    content: '';
    display: block;
    height: 80px;
}

/* Ajuster le contenu principal */
html.mobile-zoomed .main-content {
    margin-top: 20px;
    padding: 0 15px;
}

/* Optimiser les grilles pour le zoom */
html.mobile-zoomed .game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
}

html.mobile-zoomed .game-icon {
    width: 100%;
    height: auto;
    min-height: 120px;
}

html.mobile-zoomed .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
}

/* Ajuster les modales pour le zoom */
html.mobile-zoomed .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(1);
    z-index: 1001;
}

/* Ajuster les menus déroulants pour le zoom */
html.mobile-zoomed .dropdown-menu,
html.mobile-zoomed .user-dropdown {
    position: absolute;
    z-index: 1001;
    transform: scale(1);
}

/* Ajuster la navigation principale */
html.mobile-zoomed .main-nav {
    transform: scale(1);
}

/* Ajuster le menu mobile */
html.mobile-zoomed .menu-toggle {
    transform: scale(1);
}

/* Dark mode styles */
body.dark-mode {
    --text-color: #ffffff;
    --background-color: #111111;
    background-color: var(--background-color);
    color: var(--text-color);}

body.dark-mode .header {
    background-color: #111111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);}

body.dark-mode .main-nav a {
    color: var(--text-color);}

body.dark-mode .main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.05);}

body.dark-mode .search-container input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);}

body.dark-mode .search-container input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--blue);}

body.dark-mode .modal-content {
    background-color: #222;
    color: var(--text-color);}

body.dark-mode .form-group input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);}

/* Bouton rond avec plus pour candidature */
.btn-apply-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--blue);
    color: white;
    margin-left: 10px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-duration) var(--transition-timing);
}

.btn-apply-round:hover {
    transform: scale(1.1);
    background-color: var(--blue);
}

.btn-apply-round i {
    font-size: 16px;
}

body.dark-mode .btn-apply-round {
    background-color: #0077ee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Styles pour le formulaire de candidature */
.application-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-title {
    text-align: center;
    color: var(--blue);
    margin-bottom: 30px;
    position: relative;
}

.title-underline {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--blue);
    margin: 10px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.required-star {
    color: red;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    color: var(--text-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
    outline: none;
}

/* Boutons de motivation */
.motivation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.motivation-btn {
    background-color: #f0f5ff;
    color: var(--blue);
    border: 1px solid #d0e0ff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.motivation-btn:hover {
    background-color: #d0e0ff;
    border-color: var(--blue);
}

.motivation-btn.active {
    background-color: var(--blue);
    color: white;
    border-color: var(--blue);
}

body.dark-mode .motivation-btn {
    background-color: #2a3142;
    color: var(--blue);
    border-color: #3a4155;
}

body.dark-mode .motivation-btn:hover {
    background-color: #3a4155;
    border-color: var(--blue);
}

body.dark-mode .motivation-btn.active {
    background-color: var(--blue);
    color: #1a1a1a;
    border-color: var(--blue);
}

.btn-submit {
    background-color: var(--blue);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin: 30px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 102, 204, 0.4);
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 102, 204, 0.4);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mode sombre pour le formulaire de candidature */
body.dark-mode .application-form {
    background-color: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .form-title {
    color: var(--blue);
}

body.dark-mode .title-underline {
    background-color: var(--blue);
}

body.dark-mode .form-control {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

body.dark-mode .form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(58, 142, 255, 0.25);
}

body.dark-mode .btn-submit {
    background-color: var(--blue);
}

body.dark-mode .btn-submit:hover {
    background-color: var(--blue);
}

body.dark-mode .alert-success {
    background-color: #1e3a2d;
    color: #8fd4a5;
    border-color: #2d5940;
}

body.dark-mode .alert-danger {
    background-color: #3b1e24;
    color: #e09da3;
    border-color: #5c2a32;
}

body.dark-mode .social-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #f0f0f0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;}

.logo {
    margin-left: -150px;
    margin-right: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;}

.logo h1 {
    font-family: var(--font-family-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: -0.5px;}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 17px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all var(--transition-duration) var(--transition-timing);
    letter-spacing: -0.2px;}

.main-nav a:hover {
    background-color: rgba(0, 0, 0, 0.05);}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 50px;}

.search-container input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.05);
    transition: all 0.2s;}

.search-container input:focus {
    outline: none;
    background-color: white;
    border-color: var(--blue);}

.search-container button {
    position: absolute !important;
    left: 5px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    color: #666 !important;
    z-index: 10 !important;
}

.search-container form {
    width: 100%;
    position: relative;
}

/* Styles pour l'autocomplétion */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .autocomplete-results {
    background: #222;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.autocomplete-section {
    padding: 10px 15px;
}

.autocomplete-section h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

body.dark-mode .autocomplete-section h3 {
    color: #aaa;
}

.autocomplete-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.autocomplete-section li {
    margin-bottom: 5px;
}

.autocomplete-section a {
    display: block;
    padding: 8px 10px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.autocomplete-section a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .autocomplete-section a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.view-all-results {
    padding: 10px 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.dark-mode .view-all-results {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.view-all-results a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.user-actions {
    display: flex;
    align-items: center;
    margin-left: auto; /* Pousse tout le bloc vers la droite */
    gap: 16px;}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;}

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

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-timing);
    min-height: 44px;
    min-width: 44px;
    letter-spacing: -0.2px;}

.btn.login {
    background: none;
    border: 1px solid var(--blue);
    color: var(--blue);
    text-decoration: none;}

.btn.signup {
    background-color: var(--blue);
    border: none;
    color: white;
    text-decoration: none;}

.btn:hover {
    transform: scale(var(--scale-hover));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);}

.btn:active {
    transform: scale(var(--scale-active));}

@media (max-width: 768px) {
    .main-nav {
        display: none;}
    
    .menu-toggle {
        display: block;}
    
    .search-container {
        margin: 0 12px;}
    
    .header-container {
        padding: 12px;}
		
	.profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;}
    
    .profile-info {
        width: 100%;}
    
    .profile-stats {
        justify-content: center;}}

main {
    padding: 20px;}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-duration) var(--transition-timing);}

.modal.active {
    display: flex;
    opacity: 1;}

.modal-content {
    background-color: white;
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform var(--transition-duration) var(--transition-timing);}

.modal.active .modal-content {
    transform: translateY(0);}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg) scale(1.1);}

.close-modal:active {
    transform: rotate(90deg) scale(0.95);}

body.dark-mode .close-modal {
    color: #fff;}

body.dark-mode .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);}

.modal h2 {
    font-family: var(--font-family-heading);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.5px;}

.form-group {
    margin-bottom: 15px;}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: all var(--transition-duration) var(--transition-timing);
    min-height: 44px;
    font-family: var(--font-family);
    letter-spacing: -0.2px;}

.form-group input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);
    transform: scale(1.01);}

.signup-btn {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background-color: var(--blue);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 500;}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #666;}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);}

.divider span {
    padding: 0 16px;}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-timing);
    min-height: 44px;
    letter-spacing: -0.2px;}

.social-btn:hover {
    transform: scale(var(--scale-hover));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);}

.social-btn:active {
    transform: scale(var(--scale-active));}

.social-btn.apple {
    background-color: #000;
    color: white;
    border: none;}

.social-btn.apple:hover {
    background-color: #333;}

.social-btn.facebook {
    background-color: #1877f2;
    color: white;
    border: none;}

.social-btn.facebook:hover {
    background-color: #166fe5;}

.social-btn i {
    font-size: 18px;}
	
.terms {
    margin-top: 24px;
    font-size: 12px;
    color: #666;
    text-align: center;}

.terms a {
    color: var(--blue);
    text-decoration: none;}

.terms a:hover {
    text-decoration: underline;}

/* Styles améliorés pour le formulaire de connexion */
.login-form {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
    margin: 0 auto;}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: all 0.2s;}

.login-form input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);}

.login-form .btn {
    width: 100%;
    background-color: var(--blue);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;}

.login-form .btn:hover {
    background-color: var(--blue);
    transform: translateY(-1px);}

.forgot-password {
    text-align: right;
    margin-top: 4px;}

.forgot-password a {
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;}

.forgot-password a:hover {
    text-decoration: underline;}

.games-section {
    max-width: 100%;
    margin: 70px auto 40px;
    padding: 0px 30px;}

/* Style spécifique pour la section des jeux dans game3.php */
.game3-games-section {
    width: calc(100% - 700px);
    margin: 0 auto;
    position: relative;
    padding: 0;
}

.game3-games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px 10px;
    justify-items: center;
    margin-bottom: 15px;
}

.game3-games-section .game-icon {
    width: 140px;
    height: 140px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game3-games-section .game-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game3-games-section .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Style pour le mode plein écran de game3.php */
body.fullscreen-mode .game3-games-section {
    width: 100%;
    margin: 0;
    position: absolute;
    top: 1250px;
    left: 0;
    right: 0;
    padding: 0 20px;
}

body.fullscreen-mode .game3-games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px 10px;
    justify-items: center;
    margin-bottom: 15px;
    max-width: calc(100% - 700px);
    margin-left: auto;
    margin-right: auto;
}

body.fullscreen-mode .game3-games-section .game-icon {
    width: 140px;
    height: 140px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.fullscreen-mode .game-container + .games-section {
    position: absolute;
    top: 1500px;
    left: 350px;
    right: 350px;
    width: calc(100% - 700px); /* 350px de chaque côté */
    padding: 20px;
}

body.fullscreen-mode .game-container + .games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Force exactement 6 colonnes */
    gap: 15px;
    width: 100%;
}

body.fullscreen-mode .game-container + .games-section .game-icon {
    width: 100%; /* Utilise toute la largeur de sa cellule */
    aspect-ratio: 1; /* Garde l'aspect carré */
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.fullscreen-mode .game-container + .games-section .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.fullscreen-mode .game-container + .games-section {
    position: absolute;
    top: 1500px;
    left: 350px;
    right: 350px;
    width: calc(100% - 700px);
    padding: 20px;
}

body.fullscreen-mode .game-container + .games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;
}

body.fullscreen-mode .game-container + .games-section .game-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

body.fullscreen-mode .game-container + .games-section .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.fullscreen-mode .game-container + .games-section {
    width: 100%;
    margin: 0;
    position: absolute;
    top: 1500px;
    left: 0;
    right: 0;
    padding: 0 20px;
}

body.fullscreen-mode .game-container + .games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px 10px;
    justify-items: center;
    margin-bottom: 15px;
    max-width: calc(100% - 700px);
    margin-left: auto;
    margin-right: auto;
}

body.fullscreen-mode .game-container + .games-section .game-icon {
    width: 140px;
    height: 140px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-container + .games-section .game-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-container + .games-section .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

body.fullscreen-mode .game-container + .games-section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.games-section h2 {
    font-family: var(--font-family-heading);
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--blue);
    text-align: center;}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px 80px;
    justify-items: center;
}

.games-grid .game-icon,
.normal-mode-games .game-icon {
    position: relative;
    width: 175px;
    height: 175px;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.games-grid .game-icon .game-name,
.normal-mode-games .game-icon .game-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 10px 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: white;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    
}

body.dark-mode .games-grid .game-icon .game-name,
body.dark-mode .normal-mode-games .game-icon .game-name {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
}

/* Animation d'apparition du nom du jeu sur hover */
.games-grid .game-icon .game-name,
.normal-mode-games .game-icon .game-name {
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px);
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.games-grid .game-icon:hover .game-name,
.normal-mode-games .game-icon:hover .game-name {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.games-grid .game-icon:hover,
.normal-mode-games .game-icon:hover {
    transform: scale(1.05);
    z-index: 2;
}

/* Pour le mode sombre, on conserve simplement la couleur */
body.dark-mode .game-name {
  color: #fff;
}

/* Theme Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 69px;
    height: 40px;
    margin-right: 15px;}

/* Positionnement spécifique pour le switch de thème dans le header */
.theme-switch {
    position: absolute;
    right: 50px; /* Écart de 20px du bord droit */
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    z-index: 1001;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 36px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;}

/* Icônes SVG pour le toggle */
.slider .light-icon,
.slider .dark-icon {
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    transition: transform 0.3s ease;
}

.slider .light-icon {
    background-image: url('../images/light-mode.svg');
    position: absolute;
    left: 8px;
    top: 9px;
}

.slider .dark-icon {
    background-image: url('../images/dark-mode.svg');
    position: absolute;
    right: 8px;
    top: 9px;
}

/* Effet d'agrandissement au clic */
input:checked + .slider .light-icon {
    transform: scale(1.2);
}

input:not(:checked) + .slider .dark-icon {
    transform: scale(1.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 5px;
    bottom: 5px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
    z-index: 2;}

input:checked + .slider {
    background-color:var(--blue);}

input:checked + .slider:before {
    transform: translateX(30px);}

/* Suppression des styles d'icônes précédents */
.icon {
    display: none; /* Masquer les anciennes icônes */
}

/* Game Frame */
#fancade {
    border: 0;
    width: 100%;
    height: 77vh !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);}

/* Game Info Section */
.game-info {
    width: 100%;
    padding: 10px;
    background-color: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;}

/* Conteneur pour le jeu et le bandeau */
.game-container {
    width: calc(100% - 700px);
    margin: 75px auto 20px;
    display: flex;
    flex-direction: column;
    gap: 0;}

/* Style pour le mode plein écran */
body.fullscreen-mode .game-container {
    width: 100%;
    margin: 75px 0 20px;
    position: sticky;
    top: 75px;
    z-index: 1;}

body.fullscreen-mode #fancade {
    height: calc(100vh - 75px);
    position: relative;}

body.fullscreen-mode .game-info {
    position: relative;
    background-color: rgba(255, 255, 255, 0.95);}

/* Ajouter une zone de blocage */
body.fullscreen-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: inherit;
    z-index: 2;}

body.dark-mode .game-info {
    background-color: #222;}

body.dark-mode.fullscreen-mode .game-info {
    background-color: rgba(34, 34, 34, 0.95);}

.game-title {
    display: flex;
    align-items: center;
    gap: 20px;}

.game-title .game-icon {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;}

.game-title h2 {
    margin: 0;
    font-size: 28px;
    color: #333;}
	
body.dark-mode .game-title h2 {
    color: #fff;}

.game-title .creator {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;}

body.dark-mode .game-title .creator {
    color: #aaa;}

.game-title .creator:hover {
    color: var(--blue);
    transform: scale(1.05);}

body.dark-mode .game-title .creator:hover {
    color: var(--blue);}

.game-title .creator:active {
    transform: scale(0.95);}

.game-controls {
    display: flex;
    align-items: center;
    gap: 20px;}

.game-stats {
    display: flex;
    gap: 20px;
    margin-right: 20px;}

.likes, .dislikes {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    cursor: pointer;}

.likes i, .dislikes i {
    color: #666;
    transition: all 0.3s ease;}

.likes i:hover, .dislikes i:hover {
    transform: scale(1.2);}

.likes i.active, .dislikes i.active {
    animation: thumbAnimation 0.5s ease;}

@keyframes thumbAnimation {
    0% {transform: scale(1);}
    50% {transform: scale(1.5);}
    100% {transform: scale(1);}}

.fullscreen-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;}

.fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);}

.fullscreen-btn:active {
    transform: scale(0.95);}

.fullscreen-btn i {
    font-size: 24px;
    color: #666;
    transition: all 0.3s ease;}

.fullscreen-btn:hover i {
    transform: rotate(90deg);}

body.dark-mode .fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);}

body.dark-mode .fullscreen-btn i {
    color: #fff;}

/* Game Description Section */
.game-description-section {
    position: relative;
    top: 1190px;
    width: calc(100% - 700px);
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Section description pour le mode normal uniquement */
.normal-mode-description {
    width: calc(100% - 700px);
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Section description pour le mode plein écran */
body.fullscreen-mode .normal-mode-description {
    width: calc(100% - 700px);
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 1190px;
}

body.dark-mode .normal-mode-description {
    background-color: #222;
}

body.dark-mode.fullscreen-mode .normal-mode-description {
    background-color: #222;
}

.normal-mode-description h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

body.dark-mode .normal-mode-description h3 {
    color: #fff;
}

.normal-mode-description p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

body.dark-mode .normal-mode-description p {
    color: #aaa;
}

/* Game Controls Section */
.controls-section {
    padding: 20px;
    background-color: #f5f5f5;
    width: calc(100% - 700px);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    top: 1000px;
    border-top: none;
    background-color: white;}

body.fullscreen-mode .controls-section,
body.dark-mode.fullscreen-mode .controls-section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    background-color: rgba(245, 245, 245, 0.95);}

body.dark-mode .controls-section,
body.dark-mode.fullscreen-mode .controls-section {
    background-color: #1a1a1a;}

.controls-section h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;}

body.dark-mode .controls-section h3 {
    color: #fff;}

.controls-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;}

.control-key {
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;}

.control-action {
    font-size: 14px;}

body.dark-mode .control-key {
    background-color: #666;}

body.dark-mode .control-action {
    color: #ccc;}

/* Styles du profil créateur */
.creator-profile {
    max-width: 1000px;
    margin: 70px auto 40px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;}

.creator-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    position: relative;}

.creator-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);}

.creator-info {
    flex: 1;
    min-width: 0; /* Empêche le contenu de déborder */}

.creator-name {
    font-size: 32px;
    margin-bottom: 10px;}

.creator-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;}

.stat-value {
    font-weight: bold;
    font-size: 20px;}

.stat-label {
    font-size: 14px;
    color: #666;}

.creator-bio {
    line-height: 1.6;
    margin-bottom: 15px;
    padding-right: 150px; /* Espace pour le bouton */}

.creator-links {
    display: flex;
    gap: 15px;}

.social-link {
    font-size: 30px;
    color: #4A4A4A;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;}

.social-link:hover {
    color: var(--blue);
    animation: pulse 0.8s ease infinite;}

.social-link:active {
    transform: scale(0.95);}

/* Animation pour les logos sociaux */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }}

.creator-links:hover .social-link {
    opacity: 0.7;}

.creator-links .social-link:hover {
    opacity: 1;
    animation: pulse 0.6s ease infinite;}

.subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--blue);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px; /* Fixer une largeur minimale pour éviter le rétrécissement */
    min-height: 44px; /* Suivre les directives Apple pour les zones tactiles */
    position: absolute; /* Positionnement absolu pour éviter de décaler les éléments */
    right: 0;
    top: 0;}

.subscribe-btn:hover {
    background-color: var(--blue);
    transform: translateY(-2px);}

.subscribe-btn .subscribed {
    background-color: #333;}

.creator-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    position: relative;
    font-weight: 500;}

.tab.active {
    color: var(--blue);}

.tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--blue);}

.tab-content {
    display: none;
    min-height: 400px;
    padding: 0px 100px;}

.tab-content.active {
    display: block;}

.about-section {
    line-height: 1.7;}

body.dark-mode .stat-label.social-link .creator-bio .tab {
    color: #E5E5EA;}

body.dark-mode .creator-tabs, .tab-content {
    border-bottom-color: #3A3A3C;}

/* Mode responsive pour le profil créateur */
@media (max-width: 768px) {
    .creator-header {
        flex-direction: column;
        text-align: center;}
    
    .creator-info {
        text-align: center;
        padding-right: 0;}
    
    .creator-bio {
        padding-right: 0;}
    
    .subscribe-btn {
        position: relative;
        margin-top: 20px;
        right: auto;
        top: auto;}
    
    .creator-links .creator-tabs  {
        justify-content: center;}
    
    .tab-content {
        padding: 0 20px;}}

/* Animation améliorée pour le bouton de retour */
@keyframes returnButtonPulse {
    0% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
    100% { transform: translateX(0); }}

.return-button {
    position: fixed;
    top: 100px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    background-color: #E5E5EA;
    color: #3A3A3C;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 100;
    height: 44px;
    min-width: 44px;
    letter-spacing: 0.25px;
    text-decoration: none;}

body.dark-mode .return-button {
    background-color: #3A3A3C; /* iOS dark gray color for dark mode */
    color: white;}

.return-button:hover {
    background-color: #D1D1D6; /* Darker shade for light mode on hover */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: returnButtonPulse 0.8s ease;}

body.dark-mode .return-button:hover {
    background-color: #2C2C2E; /* Darker shade for dark mode on hover */
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);}

.return-button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);}

.return-button i {
    font-size: 16px;
    transition: transform 0.3s ease;}

.return-button:hover i {
    transform: translateX(-4px);}

@media (max-width: 768px) {
    .return-button {
        /* Still maintain 44pt height for touch targets */
        padding: 0 12px;
        font-size: 15px;}}

@keyframes socialPulseOnce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }}

/* On surcharge les styles existants en utilisant !important */
.social-link:hover {
    animation: socialPulseOnce 0.8s ease 1 !important;}

.social-link:active {
    animation: none !important;
    transform: scale(0.9) !important;}

/* Désactiver les autres animations des icônes sociales */
.creator-links .social-link:hover {
    animation: socialPulseOnce 0.8s ease 1 !important;}

/* Styles pour le footer */
footer {
    text-align: center;
    background-color: #f5f5f7; /* Couleur claire pour le mode clair */
    color: #666;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    width: 100%;
    position: relative;
    bottom: 0px;
    margin-top: -10px;
    padding: 6px 0;
    z-index: 100;
}

body.dark-mode footer {
    background-color: #1c1c1e; /* Couleur sombre pour le mode sombre */
    color: #999;
    border-top: 1px solid #333;
}

/* Réduire l'espace avant le footer sur la page de profil */
.php-profile footer {
    margin-top: -35px;
}

/* Réduire l'espace avant le footer sur la page settings */
.php-settings footer {
    margin-top: -70px;
}

/* Styles pour le menu déroulant de l'utilisateur */
.user-menu {
    position: relative;}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--blue);
    color: var,(--blue);
    border-radius: var(--border-radius);
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    color: var(--blue);
    transition: all var(--transition-duration) var(--transition-timing);}

.user-profile:hover {
    background-color: rgba(0, 113, 227, 0.1);}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    overflow: hidden;}

body.dark-mode .user-dropdown {
    background-color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    min-height: 44px;}

.user-dropdown a:hover {
    background-color: rgba(0, 0, 0, 0.05);}

body.dark-mode .user-dropdown a {
    color: #fff !important;
}

.user-dropdown i {
    font-size: 16px;
    width: 20px;
    text-align: center;}

/* Messages des formulaires */
.form-message {
    padding: 8px 0;
    font-size: 14px;
    min-height: 20px;
    text-align: center;}

/* Styles pour la page de profil */
.profile-container {
    max-width: 1000px;
    margin: 80px auto 40px;
    padding: 30px;}

.profile-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--blue);
    flex-shrink: 0;}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;}

.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    color: white;
    font-weight: 500;}

.profile-info {
    flex: 1;}

.profile-info h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-color);}

.profile-since {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;}

body.dark-mode .profile-since .profile-stats .stat-label .empty-message{
    color: #aaa;}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;}

.profile-stats .stat {
    display: flex;
    flex-direction: column;}

.profile-stats .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);}

.profile-bio {
    margin-bottom: 30px;
    max-width: 600px;}

.profile-bio h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);}

.profile-bio p {
    line-height: 1.6;
    color: #444;}

body.dark-mode .profile-bio p {
    color: #ddd;}

.profile-actions {
    margin-top: 20px;}

.edit-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--blue);
    color: var(--blue);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-duration) var(--transition-timing);}

.edit-profile:hover {
    background-color: rgba(0, 113, 227, 0.1);
    transform: translateY(-2px);}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;}

body.dark-mode .profile-tabs {
    border-bottom-color: #444;}

.profile-tabs .tab {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    margin-right: 10px;}

.profile-tabs .tab.active {
    color: var(--blue);}

.profile-tabs .tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--blue);}

.tab-content.active {
    display: block;}

.empty-message {
    padding: 40px 0;
    text-align: center;
    color: #666;
    font-style: italic;}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;}

.user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.1);}

.header-profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);}

body.dark-mode .header-profile-pic {
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);}

.other-container {
    max-width: 800px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;}

body.dark-mode .other-container {
    background: #222;
    color: #fff;}

body.dark-mode .other-container h2 {
    color: #fff;}

body.dark-mode .back-to-home {
    color: #fff;}

body.dark-mode .back-to-home:hover {
    color: var(--blue);}

.other-container h1 {
    font-family: var(--font-family-heading);
    font-size: 32px;
    margin-bottom: 32px;
    color: var(--blue);}

.other-container h2 {
    font-family: var(--font-family-heading);
    font-size: 24px;
    margin: 32px 0 16px;
    color: var(--text-color);}

.other-container p {
    margin-bottom: 16px;
    line-height: 1.6;}

.other-container ul {
    margin-bottom: 16px;
    padding-left: 24px;}

.other-container li {
    margin-bottom: 8px;}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    text-decoration: none;
    margin-top: 32px;
    transition: all var(--transition-duration) var(--transition-timing);}

.back-to-home:hover {
    transform: translateX(-4px);}

/* Style pour les icônes de jeux en mode normal */
.normal-mode-games {
    margin: 0 350px;
    padding: 0;
}

.normal-mode-games .games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 jeux par ligne */
    gap: 6px; /* Réduit l'espace entre les jeux */
    width: 100%;
}

.normal-mode-games .game-icon {
    width: 100%; /* Prend toute la largeur de la colonne */
    max-width: 130px; /* Limite la taille max */
    height: 130px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    justify-self: center;
}

/* Style pour le mode plein écran */
body.fullscreen-mode .normal-mode-games {
    margin: 0 350px;
    position: absolute;
    top: 1450px;
    width: calc(100% - 700px);
}

body.fullscreen-mode .normal-mode-games .games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    width: 100%;
}

body.fullscreen-mode .normal-mode-games .game-icon {
    width: 130px;
    height: 130px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    justify-self: center;
}

.game-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    width: 140px;
    height: 140px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

body.dark-mode .game-name {
    color: #fff;
}

/* Styles pour l'administration */
.admin-container {
    max-width: 800px;
    margin: 80px auto;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-container h1 {
    color: var(--text-color);
    margin-bottom: 30px;
}

#import-game-form .form-group {
    margin-bottom: 20px;
}

#import-game-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

#import-game-form input,
#import-game-form textarea,
#import-game-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#import-game-form textarea {
    min-height: 100px;
    resize: vertical;
}

#import-game-form input:focus,
#import-game-form textarea:focus,
#import-game-form select:focus {
    outline: none;
    border-color: var(--blue);
}

/* Dark mode styles for admin */
body.dark-mode .admin-container {
    background: #222;
}

body.dark-mode #import-game-form input,
body.dark-mode #import-game-form textarea,
body.dark-mode #import-game-form select {
    background: #333;
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Styles pour les pages de récupération et réinitialisation de mot de passe */
.forgot-password-container, .reset-password-container {
    max-width: 500px;
    margin: 80px auto 100px;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .forgot-password-container,
body.dark-mode .reset-password-container {
    background-color: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Titres et textes */
.forgot-password-container h1,
.reset-password-container h1 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

.forgot-password-container p,
.reset-password-container p {
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Messages de formulaire */
.form-message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.form-message.success {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.form-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Ajustement du footer pour les pages de mot de passe */
.forgot-password-page footer,
.reset-password-page footer {
    position: fixed;
    bottom: 0;
    left: 0;
    margin-top: 0;
    padding: 6px 0;
    width: 100%;
}

/* Styles pour la barre de recherche avec croix */
.search-input-wrapper {
    position: relative;
    display: inline-block;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    display: none;
    font-size: 14px;
}

.clear-search:hover {
    color: #333;
}

body.dark-mode .clear-search:hover {
    color: #fff;
}

#search-input:not(:placeholder-shown) + .clear-search {
    display: block;
}

/* Style pour le bouton Add a Game */
.add-game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blue);
    color: white;
    border-radius: 30px;
    padding: 8px 15px;
    margin-left: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: bold;
}

.add-game-btn i {
    margin-right: 5px;
    font-size: 14px;
}

.add-game-btn:hover {
    background-color: var(--blue);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .add-game-btn span {
        display: none;
    }
    
    .add-game-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        padding: 0;
    }
    
    .add-game-btn i {
        margin: 0;
    }
}

/* Styles pour les bulles de catégories */
.category-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .category-bubble {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
  }
  
  .category-bubble:hover {
    background-color: #e0e0e0;
  }
  
  .category-bubble.selected {
    background-color: var(--blue); /* Bleu */
    color: white;
  }
  
  .category-checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
  }
  
  .category-label {
    cursor: pointer;
    user-select: none;
  }
  
  body.dark-mode .category-bubble {
    background-color: #2a2a2a;
    color: #ddd;
  }
  
  body.dark-mode .category-bubble:hover {
    background-color: #333;
  }
  
  body.dark-mode .category-bubble.selected {
    background-color: var(--blue); /* Bleu */
    color: white;
  }

@media (max-width: 1300px) {
  .main-nav {
    display: none !important;
  }
  .menu-toggle {
    display: block !important;
  }
  .dropdown-menu {
    position: absolute;
    left: 150px;
    right: auto;
    top: 100%; /* Juste sous le bouton hamburger */
    margin-top: 0px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 2000;
    padding: 4px 0;
    border: 1px solid #e5e5e5;
    transition: background 0.2s;
  }
  body.dark-mode .dropdown-menu {
    background: #222;
    color: #fff;
    border: 1px solid #333;
  }
  .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #222;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
  }
  .dropdown-menu a:last-child {
    border-bottom: none;
  }
  .dropdown-menu a:hover {
    background: #f0f0f0;
    color: var(--blue);
  }
  body.dark-mode .dropdown-menu a {
    color: #fff;
    border-bottom: 1px solid #333;
  }
  body.dark-mode .dropdown-menu a:hover {
    background: #333;
    color: var(--blue);
  }
  .logo h1 {
    margin-left: 150px;
  }
  .auth-buttons {
    margin-right: 120px;
  }
}

.dropdown-menu {
  display: none;
}

body.dark-mode .menu-toggle i {
  color: #fff;
}

.leaderboard-trophy-btn,
.leaderboard-trophy-btn:visited,
.leaderboard-trophy-btn:active {
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    cursor: pointer;
    transition: none;
}

.trophy-home {
    font-size: 1.5em !important;
    color: #111 !important;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
    position: relative;
    top: 2px;
    transition: color 0.2s, font-size 0.2s;
    text-decoration: none !important;
}

.leaderboard-trophy-btn:hover .trophy-home {
    font-size: 2em !important;
    color: #e6b800 !important;
}

body.dark-mode .trophy-home {
    color: #fff !important;
}
body.dark-mode .leaderboard-trophy-btn:hover .trophy-home {
    color: #ffe066 !important;
}

@media (max-width: 768px) {
  .side-ads, .ad-slot, .left-ads, .right-ads {
    display: none !important;
  }
  .games-section,
  .game-container,
  .game-description-section,
  .normal-mode-description,
  .controls-section {
    width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .normal-mode-games {
    margin: 0 !important;
    padding: 0 !important;
  }
}