/* ========================================
   MODE APPRENDRE - CSS REFAIT V2
   ======================================== */

/* Wrapper principal avec limite de taille */
.apprendre-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === STYLES PAYS SUR CARTE === */
.country-in-continent {
    fill: #d1d5db;
    stroke: #9ca3af;
    stroke-width: 0.5;
    transition: all 0.5s;
}

.country-out-continent {
    fill: #f3f4f6;
    stroke: #e5e7eb;
    stroke-width: 0.3;
    opacity: 0.2;
}

/* Nouvelle surbrillance plus visible avec animation */
.country-in-continent.highlighted {
    fill: #fbbf24 !important;
    stroke: #f59e0b !important;
    stroke-width: 3 !important;
    animation: countryPulse 1.5s ease-in-out infinite;
}

@keyframes countryPulse {
    0%, 100% {
        fill-opacity: 1;
        stroke-width: 3;
    }
    50% {
        fill-opacity: 0.7;
        stroke-width: 4;
    }
}

.micro-state-dot {
    fill: #d1d5db;
    stroke: #9ca3af;
    stroke-width: 1.5;
    transition: all 0.5s;
}

/* Micro-états aussi avec animation */
.micro-state-dot.highlighted-micro {
    fill: #fbbf24 !important;
    stroke: #f59e0b !important;
    r: 8 !important;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        fill-opacity: 1;
        r: 8;
    }
    50% {
        fill-opacity: 0.7;
        r: 10;
    }
}

/* === ÉCRAN D'ACCUEIL === */
.welcome-screen-learn {
    width: 100%;
    max-width: 700px;
    text-align: center;
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.welcome-content-learn {
    width: 100%;
}

.continent-emoji-large {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.welcome-title-learn {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.welcome-subtitle-learn {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.progress-info-learn {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 2rem;
}

.welcome-buttons-learn {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 480px;
    align-items: center;  /* ← Ajoute cette ligne */
    margin: 2rem auto 0;  /* ← Et celle-ci pour centrer le bloc */
}

/* === ÉCRAN DE PRÉSENTATION === */
.presentation-screen-learn,
.quiz-screen-learn {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.presentation-header-learn,
.quiz-header-learn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.group-badge-learn {
    font-family: 'Space Mono', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.group-progress-learn,
.quiz-progress-learn {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* === CARTE ADAPTATIVE === */
.map-wrapper-learn {
    width: 100%;
    height: 60vh;
    max-height: 700px;
    min-height: 400px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-wrapper-learn svg {
    display: block;
}

/* === LABEL PAYS === */
.country-label-learn {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.country-name-learn {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    color: var(--accent-primary);
    margin: 0;
}

/* === CONTRÔLES === */
.presentation-controls-learn {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* === REPLAY === */

.replay-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 480px;
}

.replay-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-align: center;
}

.replay-blocks-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.replay-block-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}

.replay-block-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.replay-block-count {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
}

/* Espacement entre les boutons principaux */
.welcome-buttons-learn {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 480px;
}


/* === QUIZ === */
.quiz-input-section-learn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.quiz-question-learn {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.country-input-learn {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s;
}

.country-input-learn:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quiz-feedback-learn {
    font-size: 1.125rem;
    font-weight: 600;
    min-height: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.quiz-feedback-learn.success {
    color: #10b981;
    opacity: 1;
}

.quiz-feedback-learn.error {
    color: #ef4444;
    opacity: 1;
}

.quiz-feedback-learn.info {
    color: var(--accent-primary);
    opacity: 1;
}

.quiz-feedback-learn.warning {
    color: #f59e0b;
    opacity: 1;
}

.quiz-buttons-learn {
    display: flex;
    gap: 1rem;
}

/* === RÉSULTATS === */
.results-screen-learn,
.completion-screen-learn {
    width: 100%;
    max-width: 700px;
    text-align: center;
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.results-title-learn,
.completion-title-learn {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.results-stats-learn {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-big-learn {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.stat-value-big-learn {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label-big-learn {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.results-buttons-learn,
.completion-buttons-learn {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.completion-text-learn {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}


/* === PAGE SÉLECTION CONTINENTS === */
.apprendre-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 80px);
}

.apprendre-header {
    text-align: center;
    margin-bottom: 3rem;
}

.apprendre-title {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.apprendre-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

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

.continent-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    position: relative;
}

.continent-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

/* Continent complété */
.continent-card.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: #10b981;
}

.continent-card.completed:hover {
    border-color: #059669;
}

.continent-emoji {
    font-size: 3rem;
    flex-shrink: 0;
}

.continent-info {
    flex: 1;
}

.continent-name {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.continent-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Badge de progression */
.continent-progress-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
}

.continent-card.completed .continent-progress-badge {
    background: #10b981;
}

.continent-arrow {
    font-size: 1.5rem;
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.continent-card:hover .continent-arrow {
    opacity: 1;
}

.continent-card.completed .continent-arrow {
    color: #10b981;
}

.apprendre-footer {
    text-align: center;
    margin-top: 3rem;
}

.footer-hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .apprendre-wrapper {
        padding: 0.5rem;
    }
    
    .welcome-screen-learn,
    .results-screen-learn,
    .completion-screen-learn {
        padding: 2rem 1.5rem;
    }
    
    .continent-emoji-large {
        font-size: 3.5rem;
    }
    
    .welcome-title-learn {
        font-size: 2rem;
    }
    
    .presentation-header-learn,
    .quiz-header-learn {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .country-name-learn {
        font-size: 1.5rem;
    }
    
    .map-wrapper-learn {
        height: 50vh;
        min-height: 300px;
    }
    
    .results-stats-learn {
        grid-template-columns: 1fr;
    }
    
    .continents-selection {
        grid-template-columns: 1fr;
    }
    
    .quiz-buttons-learn {
        flex-direction: column;
        width: 100%;
    }
}
