html, body {
    margin: 0;
    padding: 0;
    font-family: cursive;
    box-sizing: border-box;
    max-width: 100%;
    }


    .flex-container{            /* containers flexibles pour s'ajuster à la taille écran */
      width: 100%;
      max-width: 1000px;
        margin: 0 auto;        
       height: auto;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
        padding: 20px;        
    }

    .flex-box{                  /* contenus flexibles pour s'ajuster à la taille écran */
        flex: 1 1 30px;           
        min-width: 30px;
        padding: 15px;
      width: 200px;
      height: 200px;
      color:white;
      font-size: 25px;
      text-align: center;
      line-height: 20px;
      border-radius: 20px;
      margin: 10px;
    }

    


    .table-wrapper {                /* pour ajuster les tableaux à l'écran */
    width: 100%;
    overflow-x: auto;   /* scroll horizontal si besoin */
}


   body {
    background-color:#282C34; 
    font-family: Verdana, sans-serif; 
    font-size: 100%;
    display: 'flex'
    }


    h1 {
       color: #fff;                 /* texte blanc */
        background-color: transparent;      /* fond noir */
        border: 2px solid #fff;      /* encadré blanc */
        border-radius: 15px;         /* bords arrondis */
        padding: 10px;               /* espace intérieur */
        margin: 10px;                /* marge extérieure */
        text-align: center;
        font-size: min(4vw, 20px);
        
    }
     h2 {
        color: rgb(255, 255, 255);
        text-align: center;
        font-size: min(4vw, 14px);
    }
    h3 {
        color: rgb(255, 255, 255);
        text-align: center;
        font-size: min(2vw, 20px);
        height: 20px;
    }

    div{
        color: rgb(255, 255, 255);
        text-align: center;
        font-size: 20px;
       
    }
    
    .tableau_general {
        font-family: Arial, Helvetica, sans-serif;
        width: 100%;
        text-align: center;
           border-collapse: collapse;
    background-color: #f0f0f0;

    max-width: 100%;
    table-layout: fixed;
    word-break: break-word;
    
        
      }
      
      .tableau_general tr,
      .tableau_general td {
       padding: 10px;
      background-color: #282C34;
        text-align: center;
        color: rgb(255, 255, 255);
        border: 1px solid white;
  padding: 1rem;
   vertical-align: middle;

        
          
      }

      .tableau_general img {
    max-width: 100%;
    height: auto;
    display: block;
}



    .tableau_interne {
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    max-width: 250px;
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    height: min-content;
    border: 1px;
    border-color: aqua;
    
    
            
    }
    
    .tableau_interne tr,
    .tableau_interne td {
    border: none;
    border-color: aqua;
    padding: 10px; 
    background-color: #000000;
    text-align: left;
    color: rgb(255, 255, 255);
    border: 0;
    font-size: 14px;
    
        
    }

    button {
        background-color: #0407aa; /* Green */
        border: none;
        color: white;
        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        display: inline-block;
        font-size: min(2vw, 20px);
        border-radius: 5px;         /* bords arrondis */
        margin: 10px 5px;
      
        }

    .bouton-texte {
    border: 2px solid #ffffff;
    height: 40px;
    line-height: 40px;
    padding: 0;
    border-radius: 6px;
     background-color: #282C34;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    
    }

    .bouton-validation {
    border: 2px solid #0078d4;
    padding: 3000px 1000 0px;
    border-radius: 6px;
     background-color: #0e179f;
    color: #0078d4;
    font-weight: 600;
    text-decoration: none;
    
    }


    .bouton-plein {
    width: 100%;                 /* pleine largeur */
    padding: 15px;
    background-color: #0078d4;   /* bleu */
    color: #ffffff;
    border: 2px solid #ffffff;   /* bordure blanche */
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    }

    .bouton-plein:hover {
        background-color: #005fa3;
    }

    .bouton-plein:active {
        transform: scale(0.98);
    }


.wrapper {
  display: flex;
  flex-wrap: wrap;          /* Passe en colonne si besoin */
  justify-content: center;  /* Centrage horizontal */
  gap: 1rem;
  padding: 0.7rem;
}


.frame {
  background: #000;
  border: 2px solid white;
  border-radius: 15px;
  padding: 1rem;

  display: flex;
  flex-wrap: wrap;        /* Inputs sur une ligne si possible */
  gap: 1rem;

  width: max-content;
  max-width: 90vw;
  margin: auto;
}

.frame_resultat {
  background: #282C34;
  border: none;
  border-radius: 5px;
  padding: 1rem;

  display: flex;
  flex-wrap: wrap;        /* Inputs sur une ligne si possible */
  gap: 1rem;

  width: max-content;
  max-width: 90vw;
  margin: auto;
}

.frame input {
  width: 90px;
  height: 40px;
  background: #111;
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  padding: 0 0.5rem;
  text-align: center;
}



input[type="submit"],
button[type="submit"] {
  background: black;
  color: white;
  border: 2px solid white;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: 0.2s;

        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        display: inline-block;
        font-size: min(2vw, 20px);
        border-radius: 5px;         /* bords arrondis */
        margin: 10px 5px;
}

/* Désactivé */
input[type="submit"]:disabled,
button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Actif */
input[type="submit"]:not(:disabled):hover,
button[type="submit"]:not(:disabled):hover {
  background: white;
  color: black;
}


/* barre de progression */

.progress-wrapper_barre {
  width: 100%;
  margin-bottom: 0.2rem;
}

.progress-text_barre {
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-align: right;
}

.progress-container_barre {
  width: 100%;
  height: 10px;
  background: transparent;
}

.progress-bar_barre {
  height: 10px;
  width: 0%;
  background: #007bff;
  transition: width 0.3s ease;
}

/**/








@media screen and (max-width: 900px) {
    html, body {
        height: auto !important; /* On laisse la page respirer */
        overflow-y: auto !important; /* On autorise le défilement */
        background-color: #282c34;
        -webkit-text-size-adjust: 100%;
    }

    #main_content {
        display: block !important; /* On repasse en mode bloc standard */
        width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box;
    }

    /* 1. Logos compacts */
    .tableau_general {
        flex-shrink: 0;
        margin-bottom: 5px !important;
    }
    .tableau_general img {
        max-height: 40px !important;
        width: auto !important;
    }

    /* 2. ZONE CENTRALE (Questions et Réponses) */
    #texte {
        flex-grow: 1 !important; /* C'est cette règle qui "mange" l'espace vide */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    /* Taille des boutons de réponse */
    #zone_boutons button, 
    #texte button {
        width: 100% !important;
        margin: 6px 0 !important;
        padding: 10px 10px !important;
        font-size: 22px !important;
        min-height: 30px !important;
        line-height: 1;
        border-radius: 10px !important;
    }

    /* 3. LE BOUTON ENVOYER : Collé à la suite immédiate ou en bas */
    input[type="submit"]#Envoyer {
        display: block !important;
        width: 100% !important;
        font-size: 28px !important; /* Le plus gros texte de la page */
        padding: 25px !important;
        margin: 30px 0 50px 0 !important; /* Marge énorme en bas pour finir la page */
        background-color: #2ecc71 !important; /* Vert Flashy */
        color: white !important;
        border: none !important;
        border-radius: 15px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
        cursor: pointer !important;
        display: none !important; /* Le bouton est invisible au départ */
        
    }

   /* Suppression des éléments qui polluent l'écran mobile */
    .wrapper, .flex-container, .frame, .modele_jauge {
        display: none !important;
    }
}