/* ========================================
   MÉTÉO KOGNITIVE - STYLES
   ======================================== */

/* Titre principal */
.meteo-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.meteo-title-main {
    white-space: nowrap;
}

/* Sur mobile : "du moment" à la ligne */
@media (max-width: 768px) {
    .meteo-title {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    .meteo-title-moment {
        display: block;
    }
}

/* ========================================
   ÉCRAN D'ACCUEIL
   ======================================== */

.meteo-intro {
    text-align: center;
    padding: 3rem 2rem;
}

.meteo-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #666;
    margin-bottom: 2rem;
}

.btn-start {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

/* ========================================
   ÉTAPE DU JEU
   ======================================== */

.meteo-game {
    padding: 0 1rem;
}

.meteo-step-title {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #3b82f6;
    margin-bottom: 2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meteo-game-container {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 2rem;
    margin: 0 auto 2rem;
    max-width: min(90vh * 0.75, 95vw);
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.meteo-instruction {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    padding: 1rem;
    flex: 1;
    align-content: center;
}

.card-item {
    aspect-ratio: 1;
    border: 3px solid rgba(200, 180, 150, 0.8);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: white;
}

.card-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10%;
}

.card-item.flipped {
    background: rgba(200, 180, 150, 0.3);
    opacity: 0.4;
    transform: rotateY(180deg);
}

.card-item.flipped img {
    display: none;
}

.card-item:not(.flipped):hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-show-result {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    margin-top: 1rem;
}

.btn-show-result:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.meteo-hint {
    text-align: center;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: #999;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ========================================
   ÉCRAN DE RÉSULTAT
   ======================================== */

.meteo-result {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#result-card-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.result-actions {
    text-align: center;
    margin-top: 2rem;
}

.screenshot-tip {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.btn-restart-test {
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-restart-test:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* ========================================
   EXPLICATIONS
   ======================================== */

.algorithme-explication {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(200, 180, 150, 0.5);
}

.algorithme-explication summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: #3b82f6;
    padding: 0.5rem;
}

.algorithme-explication p {
    margin: 1rem 0;
    line-height: 1.6;
    color: #333;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .meteo-title {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .meteo-step-title {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .meteo-game-container {
        padding: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.8rem;
    }

    .btn-start,
    .btn-show-result {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .meteo-game-container {
        padding: 1rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.5rem;
    }
}
