/* ==========================================================================
   Calculation Challenge - Page de jeu (playstyle.css v7 responsive)
   ========================================================================== */

/* 1. Base & Normalisation */
body {
    font-family: Tahoma, Arial, sans-serif;
    background-color: #fffaf0;
    font-size: 14px;
    margin: 0;
}

header {
    text-align: center;
    width: 10%;
}

/* Factorisation des règles communes des inputs */
input, select {
    font-family: Tahoma, Arial, sans-serif;
    color: black;
    text-align: center;
}

input {
    border: 3px solid gray;
}

/* 2. Positionnement des Éléments Fixes */
.logo {
    position: fixed;
    top: 2%;
    left: 2%;
    width: 5%;
    min-width: 45px;
}

#decompte {
    position: fixed;
    top: 2%;
    right: 2%;
    margin: 0;
    line-height: 1;
    font-size: 60px;
    font-weight: bold;
    color: #004422;
    text-align: right;
}

.logo_educmat {
    position: fixed;
    bottom: 3%;
    left: 2%;
    width: 5%;
    min-width: 50px;
}

.outils {
    position: fixed;
    bottom: 3%;
    right: 2%;
    width: 5%;
    min-width: 40px;
}

/* 3. Zone Principale de Jeu (#jeu) */
#jeu {
    width: 100%;
    text-align: center;
    margin-top: 2%;
}

#case_nombre_cible {
    width: 8%;
    min-width: 100px;
    margin: 4% auto;
    padding: 0.7% 1%;
    font-size: 80px;
    background-color: white;
}

/* Grille des 6 cartes de nombres outils (Flexbox avec espacement réélargi) */
#tableau_cases_nombres_outils {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px; /* Espacement aéré sur grand écran */
    width: 100%;
    margin: 0 auto 3% auto;
}

#tableau_cases_nombres_outils input {
    width: 6%;
    min-width: 80px;
    margin: 0 1% 1% 1%;
    padding: 0.5% 0;
    font-size: 50px;
    background-color: white;
}

.tirage {
    width: 12%;
    min-width: 90px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.start {
    width: 90%;
    margin: 20% auto;
}

.orange {
    color: #ff950e;
}

.noir {
    color: black;
}

/* ==========================================================================
   4. Media Queries pour l'Adaptabilité Mobile & Tablette
   ========================================================================== */

@media screen and (max-width: 992px) {
    #decompte {
        font-size: 38px;
    }
    #case_nombre_cible {
        font-size: 48px;
        min-width: 85px;
    }
    #tableau_cases_nombres_outils {
        gap: 12px;
    }
    #tableau_cases_nombres_outils input {
        min-width: 60px;
        font-size: 32px;
    }
}

@media screen and (max-width: 768px) {
    #decompte {
        font-size: 30px;
    }
    #case_nombre_cible {
        font-size: 40px;
        min-width: 70px;
    }
    #tableau_cases_nombres_outils {
        gap: 8px;
    }
    #tableau_cases_nombres_outils input {
        min-width: 48px;
        font-size: 26px;
    }
}

@media screen and (max-width: 480px) {
    #decompte {
        font-size: 24px;
    }
    #case_nombre_cible {
        font-size: 32px;
        min-width: 60px;
    }
    #tableau_cases_nombres_outils {
        gap: 6px;
    }
    #tableau_cases_nombres_outils input {
        min-width: 38px;
        font-size: 20px;
    }
}