/**
 * Main CSS - Quiz Côte d'Ivoire
 * Design inspiré des Éléphants et du drapeau ivoirien
 */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ==================== ROTATION WARNING ==================== */
.rotate-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-green-dark) 0%, var(--bg-primary) 50%, var(--color-orange-dark) 100%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.rotate-content {
    text-align: center;
    padding: 40px;
}

.rotate-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    animation: rotatePhone 2s ease-in-out infinite;
}

@keyframes rotatePhone {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.rotate-content h2 {
    font-size: 24px;
    color: var(--color-orange);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rotate-content p {
    font-size: 16px;
    color: var(--text-secondary);
}

@media (orientation: portrait) {
    .rotate-warning {
        display: flex !important;
    }
    .game-container {
        display: none !important;
    }
}

/* ==================== GAME CONTAINER ==================== */
.game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

/* Pattern de fond */
.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 158, 73, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('../images/wc-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay sombre pour meilleure lisibilité sur tous les écrans */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 61, 29, 0.4) 0%, rgba(0, 40, 20, 0.5) 100%);
    pointer-events: none;
    z-index: 0;
}

/* S'assurer que le contenu est au-dessus de l'overlay */
.screen > * {
    position: relative;
    z-index: 1;
}

/* ==================== LOADER ==================== */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--color-green);
    border-top-color: var(--color-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader p {
    font-size: 18px;
    color: var(--color-orange);
    letter-spacing: 3px;
    font-weight: bold;
}

/* ==================== START SCREEN ==================== */
#start-screen {
    background: 
        linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
        url('../images/wc-background.jpg') center/cover no-repeat;
}

.start-content {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--color-orange);
    box-shadow: var(--shadow-card), var(--shadow-glow-orange);
    max-width: 500px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.elephant-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-title {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-light) 50%, var(--color-white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.game-subtitle {
    font-size: 16px;
    color: var(--color-green);
    margin-bottom: 30px;
    font-weight: 600;
}

.game-info {
    background: rgba(0, 158, 73, 0.1);
    border: 1px solid var(--color-green);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.game-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
    font-weight: 500;
}

.btn-start {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.4);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.6);
}

.btn-start:active {
    transform: translateY(0);
}

/* ==================== STAGES SCREEN ==================== */
#stages-screen {
    background: 
        linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
        url('../images/wc-background.jpg') center/cover no-repeat;
}

.stages-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 35px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 10;
}

.stages-header h1 {
    font-size: 26px;
    color: var(--color-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-score {
    background: var(--bg-card);
    padding: 12px 30px;
    border-radius: 30px;
    border: 2px solid var(--color-green);
    font-size: 18px;
    font-weight: bold;
    color: var(--color-green);
}

/* Bouton Fullscreen */
.btn-fullscreen {
    background: var(--bg-card);
    border: 2px solid var(--color-orange);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-orange);
}

.btn-fullscreen:hover {
    background: var(--color-orange);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

.btn-fullscreen svg {
    width: 22px;
    height: 22px;
}

.fullscreen-icon,
.exit-fullscreen-icon {
    transition: opacity 0.2s ease;
}

/* État fullscreen actif */
.game-container.is-fullscreen .btn-fullscreen .fullscreen-icon {
    display: none !important;
}

.game-container.is-fullscreen .btn-fullscreen .exit-fullscreen-icon {
    display: block !important;
}

.stages-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carte de la Côte d'Ivoire - Version Desktop agrandie */
.civ-map {
    position: relative;
    width: 75vh;
    max-width: 600px;
    aspect-ratio: 1 / 1.15; /* Proportion de la carte CIV */
    margin-top: 10px;
    margin-left: 100px; /* Espace pour la légende à gauche */
}

.map-svg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* Remplir tout le conteneur */
    filter: drop-shadow(0 0 30px rgba(0, 158, 73, 0.4));
}

/* Lignes entre les étapes */
.stage-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.stage-line {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.5;
    stroke-dasharray: 3, 3;
    transition: all 0.5s ease;
}

.stage-line.active {
    stroke: url(#lineGradient);
    stroke-width: 0.8;
    stroke-dasharray: none;
    filter: drop-shadow(0 0 4px rgba(255, 107, 0, 0.6));
}

.stage-line.completed {
    stroke: var(--color-green);
    stroke-width: 0.7;
    stroke-dasharray: none;
    opacity: 0.7;
}

.country-shape {
    transition: all var(--transition-normal);
}

.country-shape:hover {
    filter: brightness(1.15);
}

/* Points d'étapes */
.stages-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Style Pin Map - Version Desktop agrandie */
.stage-point {
    position: absolute;
    transform: translate(-50%, -100%);
    width: 40px;
    height: 50px;
    cursor: not-allowed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all var(--transition-normal);
    opacity: 0.6;
    z-index: 10;
    pointer-events: auto;
    background: none;
    border: none;
}

.stage-point::before {
    content: '';
    position: absolute;
    top: 0;
    width: 34px;
    height: 34px;
    background: #555;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.stage-point::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    filter: blur(3px);
}

.stage-point .stage-number {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    line-height: 1;
    margin-top: 7px;
    transform: rotate(0deg);
}

.stage-point .stage-name {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.85);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Étape disponible - Pin orange clignotant */
.stage-point.available {
    cursor: pointer;
    opacity: 1;
    animation: pinBounce 1s ease infinite;
}

.stage-point.available::before {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.8), 0 3px 10px rgba(0,0,0,0.5);
    animation: pinGlow 1s ease infinite;
}

.stage-point.available .stage-number {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 15px;
}

.stage-point.available .stage-name {
    color: var(--color-orange);
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--color-orange);
}

.stage-point.available:hover {
    transform: translate(-50%, -100%) scale(1.1);
}

.stage-point.available:hover::before {
    box-shadow: 0 0 25px rgba(255, 107, 0, 1), 0 5px 15px rgba(0,0,0,0.6);
}

@keyframes pinBounce {
    0%, 100% { transform: translate(-50%, -100%) translateY(0); }
    50% { transform: translate(-50%, -100%) translateY(-5px); }
}

@keyframes pinGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 0, 0.6), 0 3px 10px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 0, 1), 0 3px 15px rgba(0,0,0,0.6); }
}

/* Étape terminée - Pin vert */
.stage-point.completed {
    cursor: pointer;
    opacity: 1;
}

.stage-point.completed::before {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    box-shadow: 0 0 10px rgba(0, 158, 73, 0.5), 0 3px 10px rgba(0,0,0,0.4);
}

.stage-point.completed .stage-number {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 12px;
}

.stage-point.completed .stage-name {
    color: var(--color-green-light);
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--color-green);
}

.stage-point.completed:hover {
    transform: translate(-50%, -100%) scale(1.08);
}

.stage-point.completed:hover::before {
    box-shadow: 0 0 18px rgba(0, 158, 73, 0.8), 0 5px 15px rgba(0,0,0,0.5);
}

/* Checkmark pour étape complétée */
.stage-point.completed .stage-number::after {
    content: '✓';
    position: absolute;
    top: -14px;
    right: -14px;
    background: var(--color-green);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* Légende - À GAUCHE de la carte */
.stages-legend {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-card);
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 20;
}

.stages-legend h4 {
    font-size: 12px;
    color: var(--color-orange);
    margin: 0 0 6px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.locked {
    background: var(--color-locked);
    border: 2px solid #444;
}

.legend-dot.available {
    background: var(--color-orange);
    border: 2px solid var(--color-orange-light);
    box-shadow: 0 0 6px rgba(255, 107, 0, 0.5);
}

.legend-dot.completed {
    background: var(--color-green);
    border: 2px solid var(--color-green-light);
}

/* Bouton Suivant - EN BAS À DROITE, plus petit */
.next-stage-container {
    position: absolute;
    bottom: 25px;
    right: 25px;
    z-index: 20;
}

.btn-next-stage-map {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    animation: buttonPulse 2s ease infinite;
}

.btn-next-stage-map:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 0, 0.6);
}

.btn-next-stage-map:active {
    transform: translateY(0);
}

.btn-next-stage-map:disabled {
    background: var(--color-locked);
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(255, 107, 0, 0.7); }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-dot.locked {
    background: var(--color-locked);
    border: 2px solid #333;
}

.legend-dot.available {
    background: var(--color-orange);
    border: 2px solid var(--color-orange-light);
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

.legend-dot.completed {
    background: var(--color-green);
    border: 2px solid var(--color-green-light);
}

/* ==================== QUIZ SCREEN ==================== */
.quiz-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 10;
}

.quiz-header h1 {
    font-size: 20px;
    color: var(--color-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#question-counter {
    background: var(--bg-card);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-green);
    border: 1px solid var(--color-green);
}

.quiz-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
}

.question-box {
    background: var(--bg-card);
    border: 2px solid var(--color-orange);
    border-radius: var(--border-radius-lg);
    padding: 25px 40px;
    margin-bottom: 30px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-glow-orange);
}

#question-text {
    font-size: 20px;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 500;
}

.answers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
}

.answer-btn {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 18px 25px;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-btn:hover:not(:disabled) {
    border-color: var(--color-orange);
    background: rgba(255, 107, 0, 0.1);
    transform: translateY(-2px);
}

.answer-btn .answer-letter {
    background: rgba(255, 255, 255, 0.1);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.answer-btn.correct {
    background: rgba(0, 196, 91, 0.2);
    border-color: var(--color-success);
    animation: correctPulse 0.5s ease;
}

.answer-btn.correct .answer-letter {
    background: var(--color-success);
}

.answer-btn.incorrect {
    background: rgba(255, 68, 68, 0.2);
    border-color: var(--color-error);
    animation: shake 0.5s ease;
}

.answer-btn.incorrect .answer-letter {
    background: var(--color-error);
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.feedback {
    margin-top: 20px;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.feedback.correct {
    background: rgba(0, 196, 91, 0.2);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.feedback.incorrect {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.quiz-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

#timer {
    background: var(--bg-card);
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: bold;
    color: var(--color-orange);
    border: 2px solid var(--color-orange);
    min-width: 100px;
    text-align: center;
}

#timer.warning {
    color: var(--color-error);
    border-color: var(--color-error);
    animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#score {
    background: var(--bg-card);
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: bold;
    color: var(--color-green);
    border: 2px solid var(--color-green);
}

#score::before {
    content: '⭐ ';
}

/* ==================== STAGE COMPLETE SCREEN ==================== */
#stage-complete-screen {
    background: 
        linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
        url('../images/wc-background.jpg') center/cover no-repeat;
}

.stage-complete-content {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--color-orange);
    box-shadow: var(--shadow-card), 0 0 30px rgba(255, 107, 0, 0.3);
    max-width: 500px;
    animation: fadeInUp 0.6s ease;
    z-index: 10;
}

.trophy-icon {
    font-size: 70px;
    margin-bottom: 15px;
    animation: bounce 2s ease infinite;
}

.stage-complete-content h1 {
    font-size: 32px;
    color: var(--color-orange);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.stage-complete-content h2 {
    font-size: 20px;
    color: var(--color-green);
    margin-bottom: 25px;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.star {
    font-size: 40px;
    opacity: 0.3;
    transition: all var(--transition-normal);
}

.star.active {
    opacity: 1;
    animation: starPop 0.5s ease;
}

@keyframes starPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.stage-score {
    background: rgba(0, 158, 73, 0.1);
    border: 1px solid var(--color-green);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
}

.stage-score p {
    font-size: 18px;
    margin: 8px 0;
}

#stage-score {
    color: var(--color-orange);
    font-weight: bold;
    font-size: 24px;
}

#stage-accuracy {
    color: var(--text-secondary);
}

.stage-complete-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-map, .btn-next-stage {
    padding: 15px 30px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    border: none;
}

.btn-map {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--color-orange);
}

.btn-map:hover {
    background: rgba(255, 107, 0, 0.2);
}

.btn-next-stage {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 158, 73, 0.4);
}

.btn-next-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 158, 73, 0.6);
}

.btn-next-stage:disabled {
    background: var(--color-locked);
    cursor: not-allowed;
    box-shadow: none;
}

/* ==================== FINAL SCREEN ==================== */
#final-screen {
    background: 
        linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
        url('../images/wc-background.jpg') center/cover no-repeat;
}

.final-content {
    text-align: center;
    padding: 50px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--color-orange);
    box-shadow: var(--shadow-card), var(--shadow-glow-orange);
    max-width: 550px;
    animation: fadeInUp 0.6s ease;
    z-index: 10;
}

.champion-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.final-content h1 {
    font-size: 36px;
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.final-content h2 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: var(--color-orange);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-restart {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.4);
}

.btn-restart:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.6);
}

/* ==================== CONFETTI ==================== */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ==================== RESPONSIVE DESKTOP ==================== */
@media (max-height: 600px) and (min-width: 769px) {
    .stages-header {
        padding: 10px 20px;
    }
    
    .stages-header h1 {
        font-size: 18px;
    }
    
    .civ-map {
        max-width: 380px;
        aspect-ratio: 1 / 1.15;
        margin-top: 15px;
    }
    
    .stage-point {
        width: 26px;
        height: 32px;
    }
    
    .stage-point::before {
        width: 24px;
        height: 24px;
    }
    
    .stage-point .stage-number {
        font-size: 10px;
    }
    
    .stage-point .stage-name {
        font-size: 7px;
        bottom: -14px;
    }
}

@media (max-height: 500px) and (min-width: 769px) {
    .start-content {
        padding: 20px;
    }
    
    .elephant-icon {
        font-size: 50px;
        margin-bottom: 10px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .game-info {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .btn-start {
        padding: 12px 40px;
        font-size: 16px;
    }
    
    .civ-map {
        max-width: 320px;
        aspect-ratio: 1 / 1.15;
        margin-top: 10px;
    }
    
    .stage-point {
        width: 22px;
        height: 28px;
    }
    
    .stage-point::before {
        width: 20px;
        height: 20px;
    }
    
    .stage-point .stage-number {
        font-size: 9px;
    }
    
    .stage-point .stage-name {
        font-size: 6px;
        bottom: -12px;
        padding: 1px 3px;
    }
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    /* Background mobile pour tous les écrans */
    .screen {
        background-image: url('../images/wc-background.jpg');
    }
    
    #start-screen {
        background: 
            linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
            url('../images/wc-background.jpg') center/cover no-repeat;
    }
    
    #stages-screen {
        background: 
            linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
            url('../images/wc-background.jpg') center/cover no-repeat;
    }
    
    #stage-complete-screen {
        background: 
            linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
            url('../images/wc-background.jpg') center/cover no-repeat;
    }
    
    #final-screen {
        background: 
            linear-gradient(135deg, rgba(13, 27, 13, 0.5) 0%, rgba(26, 46, 26, 0.6) 100%),
            url('../images/wc-background.jpg') center/cover no-repeat;
    }
    
    /* Désactiver le warning de rotation sur mobile */
    .rotate-warning {
        display: none !important;
    }
    
    .game-container {
        display: flex !important;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* S'assurer que la carte garde ses proportions */
    .civ-map {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Conteneur des pins - doit couvrir exactement l'image de la carte */
    .stages-points {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }
    
    .stage-point {
        pointer-events: auto;
    }
    
    /* Lignes SVG - doit couvrir exactement l'image de la carte */
    .stage-lines {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }
    
    /* Écran de démarrage - cadre orange visible des deux côtés */
    #start-screen {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .start-content {
        padding: 25px 20px;
        width: 94%;
        max-width: 400px;
        margin: 0 auto;
        border-width: 3px;
        border-radius: 15px;
    }
    
    .elephant-icon {
        font-size: 50px;
        margin-bottom: 12px;
    }
    
    .game-title {
        font-size: 24px;
        letter-spacing: 1px;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .game-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .game-info {
        padding: 15px 20px;
        margin: 0 auto 20px;
        width: 90%;
    }
    
    .game-info p {
        font-size: 14px;
        margin: 8px 0;
        text-align: center;
    }
    
    .btn-start {
        padding: 15px 40px;
        font-size: 16px;
        letter-spacing: 1px;
        display: block;
        margin: 0 auto;
    }
    
    /* Écran des étapes */
    #stages-screen {
        overflow-y: auto;
    }
    
    /* Header - éléments en colonne, background noir sur toute la largeur */
    .stages-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        position: relative;
        background: rgba(0,0,0,0.95);
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .stages-header h1 {
        font-size: 14px;
        letter-spacing: 0.5px;
        text-align: center;
        margin: 0;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .total-score {
        padding: 5px 14px;
        font-size: 14px;
        border-width: 1px;
    }
    
    .btn-fullscreen {
        width: 36px;
        height: 36px;
        border-width: 1px;
    }
    
    .btn-fullscreen svg {
        width: 18px;
        height: 18px;
    }
    
    .stages-container {
        padding: 15px;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    /* Carte mobile - 100% largeur */
    .civ-map {
        width: 95%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1 / 1.15;
        margin: 10px auto;
        padding: 0;
        order: 0;
    }
    
    .map-svg-img {
        object-fit: fill;
        width: 100%;
        height: 100%;
    }
    
    /* Pins sur mobile - plus grands */
    .stage-point {
        width: 28px;
        height: 36px;
    }
    
    .stage-point::before {
        width: 26px;
        height: 26px;
    }
    
    .stage-point .stage-number {
        font-size: 11px;
        margin-top: 5px;
    }
    
    .stage-point .stage-name {
        font-size: 7px;
        padding: 2px 4px;
        bottom: -14px;
        display: block;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 12px;
    }
    
    /* Animation réduite sur mobile */
    @keyframes pinBounce {
        0%, 100% { transform: translate(-50%, -100%) translateY(0); }
        50% { transform: translate(-50%, -100%) translateY(-4px); }
    }
    
    /* Légende mobile - JUSTE EN BAS de la map */
    .stages-legend {
        position: relative;
        bottom: auto;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        padding: 10px 25px;
        gap: 20px;
        flex-direction: row;
        justify-content: center;
        max-width: 95%;
        background: rgba(0,0,0,0.9);
        border-radius: 25px;
        margin: 15px auto 10px;
        order: 1;
    }
    
    .stages-legend h4 {
        display: none;
    }
    
    .legend-item {
        font-size: 11px;
        gap: 6px;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
    
    /* Bouton Suivant mobile - centré, SOUS la légende avec espace */
    .next-stage-container {
        position: relative;
        width: 100%;
        display: block;
        text-align: center;
        margin-top: 20px;
        padding: 0;
        order: 2;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
    
    .btn-next-stage-map {
        display: inline-block;
        width: auto;
        padding: 14px 28px;
        font-size: 14px;
        letter-spacing: 0.5px;
        border-radius: 25px;
        margin: 0 auto;
    }
    
    /* Quiz screen mobile */
    #quiz-screen {
        overflow-y: auto;
    }
    
    /* Quiz header - éléments aux extrémités mais pas fixé */
    .quiz-header {
        padding: 12px 15px;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(0,0,0,0.95);
        width: 100%;
    }
    
    .quiz-header h1 {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    #question-counter {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .quiz-content {
        padding: 15px;
        max-width: 100%;
    }
    
    .question-box {
        padding: 15px 18px;
        margin-bottom: 15px;
        border-width: 2px;
    }
    
    #question-text {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .answers-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .answer-btn {
        padding: 14px 15px;
        font-size: 14px;
        border-width: 2px;
        gap: 12px;
    }
    
    .answer-btn .answer-letter {
        width: 28px;
        height: 28px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    /* Quiz footer - timer et score aux extrémités (pas fixé) */
    .quiz-footer {
        padding: 15px 20px;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(0,0,0,0.95);
        width: 100%;
        margin-top: 15px;
    }
    
    #timer {
        padding: 8px 18px;
        font-size: 18px;
        min-width: 80px;
        border-width: 2px;
    }
    
    #score {
        padding: 8px 18px;
        font-size: 16px;
        border-width: 2px;
    }
    
    .feedback {
        font-size: 12px;
        padding: 10px 20px;
        margin-top: 10px;
    }
    
    /* Écran fin d'étape mobile */
    #stage-complete {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .stage-complete-content {
        padding: 25px 20px;
        width: 94%;
        max-width: 400px;
        margin: 0 auto;
        border-width: 3px;
        border-radius: 15px;
        border-color: var(--color-orange);
    }
    
    .trophy-icon {
        font-size: 45px;
        margin-bottom: 10px;
    }
    
    .stage-complete-content h1 {
        font-size: 20px;
        margin-bottom: 5px;
        color: var(--color-orange);
    }
    
    .stage-complete-content h2 {
        font-size: 14px;
        margin-bottom: 12px;
        color: var(--color-green);
    }
    
    .stars {
        margin-bottom: 15px;
        gap: 8px;
    }
    
    .star {
        font-size: 28px;
    }
    
    .stage-score {
        padding: 12px;
        margin-bottom: 15px;
        background: rgba(0, 50, 0, 0.5);
        border-radius: 10px;
    }
    
    .stage-score p {
        font-size: 12px;
        margin: 4px 0;
    }
    
    #stage-score {
        font-size: 20px;
        color: var(--color-orange);
    }
    
    .stage-complete-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-map, .btn-next-stage {
        padding: 12px 25px;
        font-size: 11px;
        width: 100%;
    }
    
    /* Écran final mobile */
    #final-screen {
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .final-content {
        padding: 25px 20px;
        width: 94%;
        max-width: 400px;
        margin: 0 auto;
        border-width: 3px;
        border-radius: 15px;
        border-color: var(--color-orange);
    }
    
    .champion-icon {
        font-size: 50px;
        margin-bottom: 12px;
    }
    
    .final-content h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .final-content h2 {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .final-stats {
        gap: 25px;
        margin-bottom: 18px;
    }
    
    .stat-value {
        font-size: 32px;
        color: var(--color-orange);
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .btn-restart {
        padding: 12px 35px;
        font-size: 14px;
    }
}

/* iPhones moyens en portrait (375-414px) - iPhone SE, 11 Pro, 12 mini, 12, 12 Pro */
@media (max-width: 414px) and (orientation: portrait) {
    #start-screen {
        padding: 12px;
    }
    
    .start-content {
        padding: 22px 18px;
        width: 94%;
        max-width: 380px;
        border-width: 3px;
        border-radius: 15px;
    }
    
    .elephant-icon {
        font-size: 45px;
    }
    
    .game-title {
        font-size: 22px;
    }
    
    .game-subtitle {
        font-size: 12px;
    }
    
    .game-info {
        width: 90%;
        padding: 12px 18px;
    }
    
    .game-info p {
        font-size: 13px;
    }
    
    .btn-start {
        padding: 14px 35px;
        font-size: 15px;
    }
    
    .stages-header {
        padding: 8px 12px;
    }
    
    .stages-header h1 {
        font-size: 14px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .total-score {
        padding: 5px 12px;
        font-size: 14px;
    }
    
    .btn-fullscreen {
        width: 34px;
        height: 34px;
    }
    
    .btn-fullscreen svg {
        width: 16px;
        height: 16px;
    }
    
    .stages-container {
        padding: 15px;
        justify-content: center;
    }
    
    .civ-map {
        width: 95%;
        max-width: 380px;
        height: auto;
        aspect-ratio: 1 / 1.15;
        margin: 10px auto;
    }
    
    .stage-point {
        width: 26px;
        height: 34px;
    }
    
    .stage-point::before {
        width: 24px;
        height: 24px;
    }
    
    .stage-point .stage-number {
        font-size: 10px;
        margin-top: 4px;
    }
    
    .stage-point .stage-name {
        font-size: 7px;
        bottom: -13px;
        padding: 2px 4px;
        display: block;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 11px;
    }
    
    .stage-point.completed .stage-number::after {
        width: 12px;
        height: 12px;
        font-size: 7px;
        top: -11px;
        right: -11px;
    }
    
    .stages-legend {
        position: relative;
        top: auto;
        left: auto;
        padding: 10px 22px;
        gap: 18px;
        order: 1;
    }
    
    .stages-legend h4 {
        display: none;
    }
    
    .legend-item {
        font-size: 11px;
        gap: 5px;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
    
    .next-stage-container {
        position: relative;
        bottom: auto;
        right: auto;
        justify-content: center;
        margin-top: 20px;
        order: 2;
    }
    
    .btn-next-stage-map {
        padding: 12px 24px;
        font-size: 13px;
    }
    
    /* Écran final 414px */
    #final-screen {
        padding: 12px;
    }
    
    .final-content {
        padding: 22px 18px;
        width: 94%;
        max-width: 380px;
        border-width: 3px;
        border-radius: 15px;
    }
    
    .champion-icon {
        font-size: 45px;
        margin-bottom: 10px;
    }
    
    .final-content h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .final-content h2 {
        font-size: 12px;
        margin-bottom: 14px;
    }
    
    .final-stats {
        gap: 22px;
        margin-bottom: 16px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .btn-restart {
        padding: 11px 32px;
        font-size: 13px;
    }
}

/* Très petits écrans portrait (iPhone SE, etc.) */
@media (max-width: 380px) and (orientation: portrait) {
    #start-screen {
        padding: 10px;
    }
    
    .start-content {
        padding: 20px 15px;
        width: 94%;
        max-width: 350px;
        border-width: 3px;
        border-radius: 12px;
    }
    
    .elephant-icon {
        font-size: 42px;
    }
    
    .game-title {
        font-size: 20px;
    }
    
    .game-subtitle {
        font-size: 11px;
    }
    
    .game-info {
        width: 90%;
        padding: 12px 15px;
    }
    
    .game-info p {
        font-size: 12px;
    }
    
    .btn-start {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .stages-header {
        padding: 8px 10px;
    }
    
    .stages-header h1 {
        font-size: 14px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .total-score {
        padding: 4px 12px;
        font-size: 14px;
    }
    
    .btn-fullscreen {
        width: 32px;
        height: 32px;
    }
    
    .btn-fullscreen svg {
        width: 15px;
        height: 15px;
    }
    
    .stages-container {
        padding: 12px;
        justify-content: center;
    }
    
    .civ-map {
        width: 95%;
        max-width: 340px;
        height: auto;
        aspect-ratio: 1 / 1.15;
        margin: 10px auto;
    }
    
    .stage-point {
        width: 24px;
        height: 32px;
    }
    
    .stage-point::before {
        width: 22px;
        height: 22px;
    }
    
    .stage-point .stage-number {
        font-size: 10px;
        margin-top: 4px;
    }
    
    .stage-point .stage-name {
        font-size: 6px;
        bottom: -12px;
        padding: 1px 3px;
        display: block;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 11px;
    }
    
    .stage-point.completed .stage-number::after {
        width: 11px;
        height: 11px;
        font-size: 6px;
        top: -10px;
        right: -10px;
    }
    
    .stages-legend {
        position: relative;
        top: auto;
        left: auto;
        padding: 10px 20px;
        gap: 15px;
        order: 1;
    }
    
    .stages-legend h4 {
        display: none;
    }
    
    .legend-item {
        font-size: 10px;
        gap: 5px;
    }
    
    .legend-dot {
        width: 9px;
        height: 9px;
    }
    
    .next-stage-container {
        position: relative;
        bottom: auto;
        right: auto;
        justify-content: center;
        margin-top: 18px;
        order: 2;
    }
    
    .btn-next-stage-map {
        font-size: 12px;
        padding: 11px 22px;
        border-radius: 22px;
    }
    
    .quiz-header {
        padding: 6px 8px;
    }
    
    .quiz-header h1 {
        font-size: 10px;
    }
    
    #question-counter {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    .question-box {
        padding: 10px 12px;
    }
    
    #question-text {
        font-size: 12px;
    }
    
    .answer-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .answer-btn .answer-letter {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .quiz-footer {
        padding: 8px 12px;
    }
    
    #timer {
        padding: 5px 12px;
        font-size: 14px;
        min-width: 60px;
    }
    
    #score {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .feedback {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    #stage-complete {
        padding: 10px;
    }
    
    .stage-complete-content {
        padding: 20px 15px;
        width: 94%;
        max-width: 350px;
        border-width: 3px;
        border-radius: 12px;
    }
    
    .trophy-icon {
        font-size: 38px;
        margin-bottom: 8px;
    }
    
    .stage-complete-content h1 {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .stage-complete-content h2 {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .stars {
        margin-bottom: 12px;
        gap: 6px;
    }
    
    .star {
        font-size: 22px;
    }
    
    .stage-score {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .stage-score p {
        font-size: 11px;
    }
    
    #stage-score {
        font-size: 16px;
    }
    
    .stage-complete-buttons {
        gap: 8px;
    }
    
    .btn-map, .btn-next-stage {
        padding: 10px 18px;
        font-size: 11px;
    }
    
    /* Écran final 380px */
    #final-screen {
        padding: 10px;
    }
    
    .final-content {
        padding: 20px 15px;
        width: 94%;
        max-width: 350px;
        border-width: 3px;
        border-radius: 12px;
    }
    
    .champion-icon {
        font-size: 38px;
        margin-bottom: 8px;
    }
    
    .final-content h1 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .final-content h2 {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .final-stats {
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .btn-restart {
        padding: 10px 28px;
        font-size: 12px;
    }
}

/* Mode paysage sur téléphones Android (Xiaomi, Huawei, Samsung, etc.) */
@media (max-height: 550px) and (orientation: landscape) {
    .game-container {
        overflow: auto;
    }
    
    /* Écran de démarrage en paysage - Android */
    #start-screen {
        padding: 15px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .start-content {
        padding: 25px 35px;
        max-width: 500px;
        width: 85%;
        margin: 0 auto;
    }
    
    .elephant-icon {
        font-size: 45px;
        margin-bottom: 10px;
    }
    
    .game-title {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .game-subtitle {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .game-info {
        padding: 15px 25px;
        margin-bottom: 18px;
    }
    
    .game-info p {
        font-size: 14px;
        margin: 7px 0;
    }
    
    .btn-start {
        padding: 14px 45px;
        font-size: 15px;
    }
}

/* Mode paysage sur petits iPhones (SE, 11 Pro, 12, 12 mini, 12 Pro) */
@media (max-height: 430px) and (orientation: landscape) {
    .game-container {
        overflow: hidden;
    }
    
    /* Écran de démarrage en paysage */
    #start-screen {
        padding: 10px;
    }
    
    .start-content {
        padding: 20px 30px;
        max-width: 450px;
        width: 90%;
        margin: 0 auto;
    }
    
    .elephant-icon {
        font-size: 40px;
        margin-bottom: 8px;
    }
    
    .game-title {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .game-subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .game-info {
        padding: 12px 20px;
        margin-bottom: 15px;
    }
    
    .game-info p {
        font-size: 13px;
        margin: 6px 0;
    }
    
    .btn-start {
        padding: 12px 40px;
        font-size: 14px;
    }
    
    .stages-header {
        padding: 4px 15px;
        flex-direction: row;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: rgba(0,0,0,0.95);
    }
    
    .stages-header h1 {
        font-size: 13px;
        margin: 0;
    }
    
    .total-score {
        padding: 4px 12px;
        font-size: 13px;
    }
    
    .stages-container {
        padding: 35px 10px 10px;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Carte en mode paysage - AGRANDIE et centrée */
    .civ-map {
        width: auto;
        height: calc(100vh - 45px);
        max-height: 380px;
        max-width: none;
        margin: 0 auto;
        margin-left: 110px; /* Espace pour légende */
        margin-right: 130px; /* Espace pour bouton */
        aspect-ratio: 1 / 1.15;
    }
    
    .map-svg-img {
        object-fit: fill;
    }
    
    /* Pins en paysage - taille agrandie */
    .stage-point {
        width: 24px;
        height: 30px;
    }
    
    .stage-point::before {
        width: 22px;
        height: 22px;
    }
    
    .stage-point .stage-number {
        font-size: 10px;
        margin-top: 4px;
    }
    
    .stage-point .stage-name {
        display: none !important;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 11px;
    }
    
    .stage-point.completed .stage-number::after {
        width: 12px;
        height: 12px;
        font-size: 7px;
        top: -10px;
        right: -10px;
        border-width: 1px;
    }
    
    /* Animation réduite */
    @keyframes pinBounce {
        0%, 100% { transform: translate(-50%, -100%) translateY(0); }
        50% { transform: translate(-50%, -100%) translateY(-3px); }
    }
    
    /* Légende à gauche - AGRANDIE et centrée verticalement */
    .stages-legend {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        left: 10px;
        padding: 12px 14px;
        gap: 8px;
        border-radius: 10px;
        background: rgba(0,0,0,0.9);
    }
    
    .stages-legend h4 {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .legend-item {
        font-size: 11px;
        gap: 6px;
    }
    
    .legend-dot {
        width: 12px;
        height: 12px;
    }
    
    /* Bouton en bas à droite - AGRANDI */
    .next-stage-container {
        position: fixed;
        bottom: 15px;
        right: 15px;
    }
    
    .btn-next-stage-map {
        padding: 12px 20px;
        font-size: 13px;
        border-radius: 25px;
        white-space: nowrap;
    }
    
    /* Lignes entre étapes */
    .stage-line {
        stroke-width: 0.5;
    }
}

/* Mode paysage sur très petits iPhones (hauteur < 380px) */
@media (max-height: 380px) and (orientation: landscape) {
    /* Écran de démarrage en paysage - petit */
    #start-screen {
        padding: 8px;
    }
    
    .start-content {
        padding: 15px 25px;
        max-width: 420px;
        width: 90%;
    }
    
    .elephant-icon {
        font-size: 35px;
        margin-bottom: 5px;
    }
    
    .game-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .game-subtitle {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .game-info {
        padding: 10px 18px;
        margin-bottom: 12px;
    }
    
    .game-info p {
        font-size: 12px;
        margin: 5px 0;
    }
    
    .btn-start {
        padding: 10px 35px;
        font-size: 13px;
    }
    
    .stages-container {
        padding: 32px 5px 10px;
    }
    
    .civ-map {
        height: calc(100vh - 45px);
        max-height: 300px;
        max-width: none;
        margin-left: 90px;
        margin-right: 110px;
        aspect-ratio: 1 / 1.15;
    }
    
    .stage-point {
        width: 22px;
        height: 28px;
    }
    
    .stage-point::before {
        width: 20px;
        height: 20px;
    }
    
    .stage-point .stage-number {
        font-size: 10px;
        margin-top: 3px;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 11px;
    }
    
    .stages-legend {
        top: 50%;
        transform: translateY(-50%);
        left: 8px;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .stages-legend h4 {
        font-size: 11px;
    }
    
    .legend-item {
        font-size: 11px;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
    
    .next-stage-container {
        bottom: 12px;
        right: 12px;
    }
    
    .btn-next-stage-map {
        padding: 12px 18px;
        font-size: 13px;
    }
}

/* Écrans très petits portrait (vieux téléphones, 320px) */
@media (max-width: 320px) and (orientation: portrait) {
    #start-screen {
        padding: 8px;
    }
    
    .start-content {
        padding: 18px 12px;
        width: 94%;
        max-width: 300px;
        margin: 0 auto;
        border-width: 2px;
        border-radius: 10px;
    }
    
    .elephant-icon {
        font-size: 38px;
    }
    
    .game-title {
        font-size: 18px;
    }
    
    .game-subtitle {
        font-size: 10px;
    }
    
    .game-info {
        width: 90%;
        padding: 10px 12px;
    }
    
    .game-info p {
        font-size: 11px;
    }
    
    .btn-start {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .stages-header {
        padding: 5px 8px;
    }
    
    .stages-header h1 {
        font-size: 12px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .total-score {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .btn-fullscreen {
        width: 28px;
        height: 28px;
    }
    
    .btn-fullscreen svg {
        width: 14px;
        height: 14px;
    }
    
    .stages-container {
        padding: 5px;
        justify-content: flex-start;
    }
    
    .civ-map {
        width: 95%;
        max-width: 260px;
        height: auto;
        aspect-ratio: 1 / 1.15;
        margin: 5px auto;
    }
    
    .stage-point {
        width: 18px;
        height: 24px;
    }
    
    .stage-point::before {
        width: 16px;
        height: 16px;
    }
    
    .stage-point .stage-number {
        font-size: 8px;
        margin-top: 2px;
    }
    
    .stage-point .stage-name {
        display: none;
    }
    
    .stage-point.available .stage-number,
    .stage-point.completed .stage-number {
        font-size: 9px;
    }
    
    .stage-point.completed .stage-number::after {
        width: 9px;
        height: 9px;
        font-size: 5px;
        top: -8px;
        right: -8px;
        border-width: 1px;
    }
    
    .stages-legend {
        position: relative;
        top: auto;
        left: auto;
        padding: 5px 12px;
        gap: 8px;
        margin: 5px auto;
        order: 1;
    }
    
    .stages-legend h4 {
        display: none;
    }
    
    .legend-item {
        font-size: 8px;
        gap: 3px;
    }
    
    .legend-dot {
        width: 7px;
        height: 7px;
    }
    
    .next-stage-container {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 8px;
        order: 2;
    }
    
    .btn-next-stage-map {
        font-size: 10px;
        padding: 8px 16px;
        border-radius: 18px;
    }
    
    /* Écran stage complete 320px */
    #stage-complete {
        padding: 8px;
    }
    
    .stage-complete-content {
        padding: 18px 12px;
        width: 94%;
        max-width: 300px;
        border-width: 2px;
        border-radius: 10px;
    }
    
    .trophy-icon {
        font-size: 35px;
        margin-bottom: 6px;
    }
    
    .stage-complete-content h1 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .stage-complete-content h2 {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .stars {
        margin-bottom: 10px;
        gap: 5px;
    }
    
    .star {
        font-size: 20px;
    }
    
    .stage-score {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .stage-score p {
        font-size: 10px;
    }
    
    #stage-score {
        font-size: 15px;
    }
    
    .stage-complete-buttons {
        gap: 6px;
    }
    
    .btn-map, .btn-next-stage {
        padding: 8px 15px;
        font-size: 10px;
    }
    
    /* Écran final 320px */
    #final-screen {
        padding: 8px;
    }
    
    .final-content {
        padding: 18px 12px;
        width: 94%;
        max-width: 300px;
        border-width: 2px;
        border-radius: 10px;
    }
    
    .champion-icon {
        font-size: 35px;
        margin-bottom: 6px;
    }
    
    .final-content h1 {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .final-content h2 {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .final-stats {
        gap: 18px;
        margin-bottom: 12px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 8px;
    }
    
    .btn-restart {
        padding: 8px 22px;
        font-size: 11px;
    }
}

/* iPhone 5/SE - Très petite hauteur (568px) */
@media (max-width: 320px) and (max-height: 600px) and (orientation: portrait) {
    #start-screen {
        padding: 6px;
    }
    
    .start-content {
        padding: 15px 10px;
        width: 94%;
        max-width: 290px;
        margin: 0 auto;
        border-width: 2px;
        border-radius: 8px;
    }
    
    .elephant-icon {
        font-size: 32px;
    }
    
    .game-title {
        font-size: 16px;
    }
    
    .game-subtitle {
        font-size: 9px;
        margin-bottom: 10px;
    }
    
    .game-info {
        padding: 8px 10px;
        width: 90%;
        margin-bottom: 10px;
    }
    
    .game-info p {
        font-size: 10px;
        margin: 3px 0;
    }
    
    .btn-start {
        padding: 8px 20px;
        font-size: 11px;
    }
    
    .stages-header {
        padding: 4px 6px;
    }
    
    .stages-header h1 {
        font-size: 11px;
    }
    
    .header-right {
        gap: 5px;
    }
    
    .total-score {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .btn-fullscreen {
        width: 26px;
        height: 26px;
    }
    
    .btn-fullscreen svg {
        width: 12px;
        height: 12px;
    }
    
    .stages-container {
        padding: 3px;
    }
    
    .civ-map {
        width: 92%;
        max-width: 240px;
        margin: 3px auto;
    }
    
    .stage-point {
        width: 16px;
        height: 22px;
    }
    
    .stage-point::before {
        width: 14px;
        height: 14px;
    }
    
    .stage-point .stage-number {
        font-size: 7px;
        margin-top: 2px;
    }
    
    .stages-legend {
        padding: 4px 10px;
        gap: 6px;
        margin: 3px auto;
    }
    
    .legend-item {
        font-size: 7px;
        gap: 2px;
    }
    
    .legend-dot {
        width: 6px;
        height: 6px;
    }
    
    .next-stage-container {
        margin-top: 5px;
    }
    
    .btn-next-stage-map {
        font-size: 9px;
        padding: 6px 14px;
        border-radius: 15px;
    }
    
    .quiz-header {
        padding: 5px 6px;
    }
    
    .quiz-header h1 {
        font-size: 9px;
    }
    
    #question-counter {
        padding: 2px 6px;
        font-size: 8px;
    }
    
    .question-box {
        padding: 8px 10px;
    }
    
    #question-text {
        font-size: 11px;
    }
    
    .answers-container {
        gap: 6px;
    }
    
    .answer-btn {
        padding: 6px 8px;
        font-size: 10px;
        gap: 8px;
    }
    
    .answer-btn .answer-letter {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    .quiz-footer {
        padding: 6px 10px;
    }
    
    #timer {
        padding: 4px 10px;
        font-size: 12px;
        min-width: 55px;
    }
    
    #score {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .feedback {
        font-size: 9px;
        padding: 5px 10px;
    }
    
    #stage-complete {
        padding: 6px;
    }
    
    .stage-complete-content {
        padding: 15px 12px;
        width: 94%;
        max-width: 290px;
        border-width: 2px;
        border-radius: 10px;
    }
    
    .trophy-icon {
        font-size: 30px;
        margin-bottom: 6px;
    }
    
    .stage-complete-content h1 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .stage-complete-content h2 {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .stars {
        gap: 4px;
        margin-bottom: 10px;
    }
    
    .star {
        font-size: 20px;
    }
    
    .stage-score {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .stage-score p {
        font-size: 9px;
        margin: 2px 0;
    }
    
    #stage-score {
        font-size: 14px;
    }
    
    .stage-complete-buttons {
        gap: 6px;
    }
    
    .btn-map, .btn-next-stage {
        padding: 8px 15px;
        font-size: 10px;
    }
    
    /* Écran final iPhone 5/SE */
    #final-screen {
        padding: 6px;
    }
    
    .final-content {
        padding: 15px 10px;
        width: 94%;
        max-width: 290px;
        border-width: 2px;
        border-radius: 8px;
    }
    
    .champion-icon {
        font-size: 30px;
        margin-bottom: 5px;
    }
    
    .final-content h1 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .final-content h2 {
        font-size: 9px;
        margin-bottom: 8px;
    }
    
    .final-stats {
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 7px;
    }
    
    .btn-restart {
        padding: 7px 20px;
        font-size: 10px;
    }
}

