* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: hsl(130, 75%, 86%);
    --primary-dark: hsl(130, 69%, 65%);
    --primary-light: hsl(130, 75%, 92%);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #ffffff;
    --surface: #f5f5f7;
    --border: #d2d2d7;
    --shadow: rgba(0, 0, 0, 0.1);
    --warning-color: #ff9500;
    --warning-light: #fff3e0;
    
    /* Variables mobile */
    --mobile-padding: 16px;
    --mobile-gap: 12px;
    --touch-target: 44px;
    --mobile-header-height: 60px;
    --mobile-nav-height: 60px;
}

/* RESET ET BASE MOBILE-FIRST */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Optimisations mobile */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Classes d'appareil pour ciblage spécifique */
.device-mobile {
    font-size: 16px; /* Éviter le zoom automatique sur iOS */
}

.device-touch {
    /* Améliorer les zones tactiles */
}

.device-small-mobile {
    --mobile-padding: 12px;
    --mobile-gap: 8px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
}

/* EN-TÊTE MOBILE-FIRST */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 0;
    margin: 12px auto 20px auto;
    width: calc(100% - 24px);
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: var(--mobile-header-height);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 30%, 
        rgba(255, 255, 255, 0.05) 60%, 
        rgba(0, 0, 0, 0.05) 100%);
    border-radius: 30px;
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    position: relative;
    z-index: 1;
    min-height: var(--mobile-header-height);
}

.site-logo {
    max-height: 35px;
    height: auto;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    object-position: center;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-button {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: var(--touch-target);
    min-width: var(--touch-target);
}

.auth-button-icon {
    font-size: 16px;
}

.device-small-mobile .auth-button-text {
    display: none;
}

.auth-button:hover,
.auth-button:active {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Menu utilisateur mobile */
.user-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar-header {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.user-name-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* BOUTON DE VÉRIFICATION EMAIL */
.verify-email-btn {
    background: rgba(255, 196, 8, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(255, 196, 8, 0.8);
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: emailPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 196, 8, 0.3);
}

@keyframes emailPulse {
    0% {
        box-shadow: 0 2px 8px rgba(255, 196, 8, 0.3), 0 0 0 0 rgba(255, 196, 8, 0.7);
    }
    70% {
        box-shadow: 0 2px 8px rgba(255, 196, 8, 0.3), 0 0 0 6px rgba(255, 196, 8, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(255, 196, 8, 0.3), 0 0 0 0 rgba(255, 196, 8, 0);
    }
}

.verify-email-btn:hover,
.verify-email-btn:active {
    background: rgba(255, 196, 8, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 196, 8, 0.4);
}

.verify-icon {
    font-weight: 700;
}

.logout-button {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: var(--touch-target);
}

.device-small-mobile .logout-text {
    display: none;
}

.logout-button:hover,
.logout-button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* SECTIONS PRINCIPALES MOBILE */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 100px; /* Espace pour le menu mobile */
}

.section {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px var(--shadow);
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

/* FORMULAIRES MOBILE */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px; /* Éviter le zoom sur iOS */
    background-color: var(--surface);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--background);
    box-shadow: 0 0 0 3px rgba(131, 131, 131, 0.1);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* BOUTONS MOBILE */
.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch-target);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    width: 100%;
}

.btn-primary:hover,
.btn-primary:active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, hsl(130, 69%, 55%) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* BOUTONS VOIR PLUS */
.view-all-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--surface), var(--border));
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-family: inherit;
}

.view-all-btn:hover,
.view-all-btn:active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.view-all-btn .btn-text {
    font-weight: 600;
}

/* CONTENEUR POUR LES CARTES (maintenant géré par carte.css) */
#profilesList {
    /* Les styles de grille sont maintenant dans carte.css */
    width: 100%;
}

/* ÉTATS GÉNÉRIQUES */
.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.error-state button {
    margin-top: 16px;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

/* ÉTAT "BIENTÔT DISPONIBLE" POUR LE CLASSEMENT */
.coming-soon-state {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.coming-soon-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.coming-soon-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 280px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.feature-item:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.feature-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

/* CLASSEMENT MOBILE */
.leaderboard {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px var(--shadow);
    margin-bottom: 80px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    background-color: var(--surface);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.leaderboard-item:active {
    background-color: var(--primary-light);
    transform: scale(0.98);
}

.leaderboard-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.leaderboard-rank {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    min-width: 50px;
    font-family: monospace;
}

.leaderboard-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-score {
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--background);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* OVERLAY D'AUTHENTIFICATION MOBILE */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.auth-modal {
    background: var(--background);
    padding: 24px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:active {
    color: var(--text-primary);
    background-color: var(--surface);
    transform: scale(0.95);
}

.auth-form {
    text-align: left;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 16px;
    background-color: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-input::placeholder {
    color: var(--text-secondary);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--background);
    box-shadow: 0 0 0 3px rgba(131, 131, 131, 0.1);
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch-target);
}

.auth-btn:active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, hsl(130, 69%, 55%) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.switch-form {
    margin-top: 20px;
    text-align: center;
}

.switch-form p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.switch-form button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.switch-form button:active {
    color: var(--primary-dark);
    background-color: var(--primary-light);
}

/* STYLES POUR LA CASE À COCHER CGU */
.cgu-acceptance {
    margin-bottom: 20px !important;
}

.cgu-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.5;
    font-size: 14px;
    color: var(--text-primary);
}

.cgu-checkbox {
    display: none;
}

.cgu-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background-color: var(--surface);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.cgu-checkbox:checked + .cgu-checkmark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-dark);
}

.cgu-checkbox:checked + .cgu-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 12px;
}

.cgu-text {
    flex: 1;
    line-height: 1.4;
}

.cgu-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cgu-link:hover,
.cgu-link:active {
    color: var(--primary-dark);
}

/* STYLES POUR LA MODAL CGU */
.cgu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.cgu-modal-content {
    background: var(--background);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: cguModalFadeIn 0.3s ease-out;
}

.cgu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    flex-shrink: 0;
}

.cgu-modal-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.cgu-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.cgu-intro {
    background: linear-gradient(135deg, var(--primary-light), rgba(131, 131, 131, 0.1));
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--primary-color);
}

.cgu-intro p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
}

.cgu-section {
    margin-bottom: 24px;
}

.cgu-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cgu-section h3::before {
    margin-right: 8px;
    font-size: 14px;
}

.cgu-section:first-of-type h3::before {
    content: '🎯 ';
}

.cgu-section:nth-of-type(2) h3::before {
    content: '⚙️ ';
}

.cgu-section:nth-of-type(3) h3::before {
    content: '💚 ';
}

.cgu-section:nth-of-type(4) h3::before {
    content: '🤝 ';
}

.cgu-section:nth-of-type(5) h3::before {
    content: '🛡️ ';
}

.cgu-section:nth-of-type(6) h3::before {
    content: '🔒 ';
}

.cgu-section:nth-of-type(7) h3::before {
    content: '📝 ';
}

.cgu-section:nth-of-type(8) h3::before {
    content: '📧 ';
}

.cgu-section h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.cgu-section p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.cgu-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.cgu-section li {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.4;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.cgu-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.cgu-section a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
}

.cgu-section a:hover,
.cgu-section a:active {
    color: var(--primary-dark);
}

.cgu-footer {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid var(--border);
}

.cgu-footer p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.cgu-tagline {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

.cgu-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cgu-accept-btn {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cgu-accept-btn:hover,
.cgu-accept-btn:active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, hsl(130, 69%, 55%) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cgu-close-btn {
    padding: 14px 20px;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cgu-close-btn:hover,
.cgu-close-btn:active {
    background: var(--border);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ÉCRAN DE CONFIRMATION EMAIL */
.email-confirmation-content {
    text-align: center;
    padding: 20px 0;
}

.confirmation-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.confirmation-icon svg {
    width: 64px;
    height: 64px;
    opacity: 0.8;
}

.confirmation-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.confirmation-message {
    margin-bottom: 24px;
    line-height: 1.6;
}

.confirmation-message p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.confirmation-email {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0 16px 0;
    word-break: break-all;
    font-family: monospace;
}

.spam-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dc2626, #ea580c);
    border: none;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0 16px 0;
    font-size: 13px;
    color: #374151;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.spam-warning svg {
    flex-shrink: 0;
}

.spam-warning svg path {
    stroke: #374151;
}

.spam-warning strong {
    color: #1f2937;
    font-weight: 700;
}

.confirmation-instructions {
    background-color: var(--surface);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 16px;
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

.confirmation-instructions strong {
    color: var(--warning-color);
    font-weight: 700;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.resend-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.resend-btn:hover,
.resend-btn:active {
    background-color: var(--surface);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* ÉTATS ET ANIMATIONS */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.submit-section.disabled {
    pointer-events: auto;
    cursor: pointer;
}

.submit-section.disabled * {
    pointer-events: none;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 8px;
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ANIMATION DE CHARGEMENT AMÉLIORÉE */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.auth-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    backdrop-filter: blur(10px);
}

/* NOTIFICATIONS MOBILE */
.notification {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 3000;
    animation: slideInMobile 0.3s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.success {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    border: 1px solid var(--primary-dark);
}

.notification.error {
    background: linear-gradient(135deg, #dc2626, #ea580c);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.25);
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning-color), #ff7b00);
    color: #ffffff;
    border: 1px solid var(--warning-color);
    box-shadow: 0 8px 32px rgba(255, 149, 0, 0.25);
}

@keyframes slideInMobile {
    from {
        transform: translateY(-100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes cguModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.notification:nth-child(2) { top: 80px; }
.notification:nth-child(3) { top: 144px; }
.notification:nth-child(4) { top: 208px; }

.profile-limit-notice {
    display: none !important;
}

/* ADAPTATIONS MOBILE POUR LA MODAL CGU */
@media (max-width: 600px) {
    .cgu-modal {
        padding: 12px;
    }
    
    .cgu-modal-content {
        max-height: 95vh;
    }
    
    .cgu-modal-header {
        padding: 16px 16px 0 16px;
    }
    
    .cgu-modal-title {
        font-size: 18px;
    }
    
    .cgu-modal-body {
        padding: 16px;
    }
    
    .cgu-modal-footer {
        padding: 16px;
        flex-direction: column;
    }
    
    .cgu-intro {
        padding: 16px;
    }
    
    .cgu-section h3 {
        font-size: 15px;
    }
    
    .cgu-footer {
        padding: 16px;
    }
}

/* ADAPTATIONS TABLETTE (768px+) */
@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
    
    .header {
        margin: 16px auto 40px auto;
        width: calc(100% - 32px);
        border-radius: 40px;
    }
    
    .header-content {
        padding: 14px 28px;
    }
    
    .site-logo {
        max-height: 40px;
        max-width: 140px;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        margin-bottom: 60px;
    }
    
    .section {
        padding: 28px;
    }
}

/* ADAPTATIONS DESKTOP (1024px+) */
@media (min-width: 1024px) {
    .header {
        margin: 20px auto 60px auto;
        width: calc(100% - 40px);
        border-radius: 50px;
    }
    
    .header-content {
        padding: 16px 32px;
    }
    
    .site-logo {
        max-height: 45px;
        max-width: 160px;
    }
    
    .auth-button {
        padding: 12px 28px;
        border-radius: 25px;
    }
    
    .auth-button-text {
        display: inline !important;
    }
    
    .section {
        padding: 32px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .leaderboard-item:hover {
        background-color: var(--primary-light);
    }
    
    .leaderboard-item:hover .leaderboard-score {
        transform: scale(1.02);
    }
    
    .verify-email-btn:hover {
        animation: none;
        background: rgba(255, 196, 8, 1);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 196, 8, 0.4);
    }
}

/* ADAPTATIONS MOBILE POUR LE "BIENTÔT DISPONIBLE" */
@media (max-width: 480px) {
    .coming-soon-title {
        font-size: 16px;
    }
    
    .coming-soon-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .coming-soon-features {
        gap: 6px;
        max-width: 260px;
    }
    
    .feature-item {
        padding: 10px 14px;
    }
    
    .feature-text {
        font-size: 12px;
    }
    
    .confirmation-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .confirmation-title {
        font-size: 18px;
    }
    
    .confirmation-email {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .confirmation-instructions {
        padding: 12px;
        font-size: 12px !important;
    }
}

/* OPTIMISATIONS PERFORMANCE MOBILE */
.device-mobile * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.device-mobile input,
.device-mobile textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* Améliorer le scroll sur mobile */
.device-mobile {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Éviter le zoom sur les inputs iOS */
.device-mobile input[type="text"],
.device-mobile input[type="email"],
.device-mobile input[type="password"],
.device-mobile input[type="url"],
.device-mobile select,
.device-mobile textarea {
    font-size: 16px !important;
}

/* OPTIMISATIONS TACTILES */
.device-touch button {
    touch-action: manipulation;
}

.device-touch .btn:active {
    transform: none;
}

/* TAILLES SPÉCIFIQUES PAR APPAREIL */

/* Très petits écrans (iPhone SE, etc.) */
.device-small-mobile {
    font-size: 14px;
}

.device-small-mobile .site-logo {
    max-height: 30px;
    max-width: 100px;
}

.device-small-mobile .section-title {
    font-size: 18px;
}

.device-small-mobile .section {
    padding: 16px;
}

/* GESTION DE L'ORIENTATION */
@media (orientation: landscape) and (max-height: 500px) {
    /* Mode paysage sur mobile */
    .header {
        margin: 8px auto 16px auto;
    }
    
    .section {
        padding: 16px;
    }
    
    .main-content {
        gap: 16px;
        margin-bottom: 70px;
    }
}

/* MODE SOMBRE (si supporté par le système) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f5f5f7;
        --text-secondary: #a1a1a6;
        --background: #1d1d1f;
        --surface: #2c2c2e;
        --border: #38383a;
        --shadow: rgba(0, 0, 0, 0.3);
    }
    
    .header::before {
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.2) 0%, 
            rgba(0, 0, 0, 0.1) 30%, 
            rgba(0, 0, 0, 0.05) 60%, 
            rgba(255, 255, 255, 0.05) 100%);
    }
    
    .auth-button {
        background: rgba(44, 44, 46, 0.95);
        color: var(--text-primary);
        border-color: rgba(56, 56, 58, 0.6);
    }
    
    /* ADAPTATIONS MODE SOMBRE POUR LES CGU */
    .cgu-intro {
        background: linear-gradient(135deg, rgba(131, 131, 131, 0.2), rgba(131, 131, 131, 0.1));
        border-color: rgba(131, 131, 131, 0.3);
    }
    
    /* ADAPTATIONS MODE SOMBRE POUR "BIENTÔT DISPONIBLE" */
    .coming-soon-state {
        background-color: var(--surface);
        border-color: var(--border);
    }
    
    .feature-item {
        background-color: var(--background);
        border-color: var(--border);
    }
    
    .feature-item:hover {
        background-color: rgba(131, 131, 131, 0.2);
        border-color: rgba(131, 131, 131, 0.3);
    }
}

/* AMÉLIORATIONS D'ACCESSIBILITÉ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn:active {
        transform: none !important;
    }
    
    .verify-email-btn {
        animation: none !important;
    }
    
    .cgu-modal-content {
        animation: none;
    }
}

/* Suppression globale des animations de clic pour les boutons */
.btn:active,
.auth-btn:active,
.view-all-btn:active,
.btn-primary:active {
    transform: none !important;
}

/* Focus visible pour navigation clavier */
.btn:focus-visible,
.auth-button:focus-visible,
.verify-email-btn:focus-visible,
.cgu-link:focus-visible,
.cgu-accept-btn:focus-visible,
.cgu-close-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.cgu-checkbox:focus + .cgu-checkmark {
    box-shadow: 0 0 0 3px rgba(131, 131, 131, 0.3);
}

/* AMÉLIORATIONS SPÉCIFIQUES WEBKIT (Safari) */
@supports (-webkit-touch-callout: none) {
    /* Styles spécifiques Safari/iOS */
    .form-input,
    .auth-input {
        -webkit-appearance: none;
        border-radius: 12px;
    }
}

/* GESTION DES ENCOCHES (iPhone X+) */
@supports (padding: max(0px)) {
    .device-mobile .header {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .device-mobile .notification {
        left: max(16px, env(safe-area-inset-left));
        right: max(16px, env(safe-area-inset-right));
        top: max(16px, env(safe-area-inset-top));
    }
    
    .device-mobile .cgu-modal {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Éviter les repaints sur scroll */
.header {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* AMÉLIORATIONS POUR LES CGU */
.cgu-modal {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.cgu-modal-content {
    will-change: transform;
}

/* Style pour la scrollbar dans la modal CGU (WebKit) */
.cgu-modal-body::-webkit-scrollbar {
    width: 8px;
}

.cgu-modal-body::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 4px;
}

.cgu-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.cgu-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}