
    /* Réinitialisation des marges et padding pour tous les éléments */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Le body et html prennent toute la hauteur et largeur de la fenêtre */
body, html {
    height: 100vh;
    width: 100%;
    font-family: Arial, sans-serif; /* Ajout de la police pour tout le document */
}

/* Style pour l'en-tête : 10% de la hauteur de la fenêtre, centré */
.header {
    width: 100%;
    height: 10vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

/* Style pour le pied de page : 10% de la hauteur de la fenêtre, centré */
.footer {
    width: 100%;
    height: 10vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 20px;
}

/* Style pour la section principale : 80% de la hauteur de la fenêtre, en flex pour les colonnes */
.body {
    width: 100%;
    height: 80vh;
    display: flex;
    margin : 0px;
    padding : 0px;
}


/* Deuxième colonne (75% de la largeur) : grille */

.script-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background-color: #286b09;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    text-align: center;
}

.script-button:hover {
    background-color: #0056b3;
}

/* NOUVEAUX STYLES (isolés pour éviter les conflits) */
/* Conteneur des boutons dans .c1 */
#boutons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    max-width: 600px;
}

/* Style des boutons dans #boutons */
#boutons button {
    width: 180px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#boutons button:hover:not(:disabled) {
    background-color: #e0e0e0;
}

#boutons button:disabled {
    background-color: #d0d0d0;
    cursor: not-allowed;
}

/* Bouton "Continuer" */
#bouton-continuer {
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

#bouton-continuer:hover {
    background-color: #45a049;
}

/* Styles pour les éléments de description dans .c1 */
.nom {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.citation {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 3px;
}

.description {
    display: block;
    font-size: 11px;
    color: #2a6496;
    font-style: italic;
}

/* Zone de question/résultat */
#question {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

#resultat, #felicitations {
    margin-top: 10px;
    font-weight: bold;
    font-size: 16px;
    min-height: 20px; /* Réduit pour s'adapter à .c1 */
}

/* Style pour les blocs d'équipe */
.equipe {
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    display: inline-block;
    text-align: left;
}

/* Élément caché */
.cache {
    display: none;
}

#conseillers_container {
    margin-top: auto; /* Pousse l'élément vers le bas */
    margin-bottom: 0; /* Colle à la bordure inférieure */
    margin-left: 10pt;
    margin-right: 10pt;
    display: none; /* Masquée au chargement */
}
#titre_zone{
    margin-top: 0; /* Pousse l'élément vers le bas */
    margin-bottom: auto; /* Colle à la bordure inférieure */
    margin-left: 10pt;
    margin-right: 10pt;
}


#titre_zone {
    margin: 10pt;
    margin-bottom: 0; /* Pas d'espace en dessous */
    flex-direction: column;
}

#bouton_QG {
    margin: 10pt;
    margin-top: 10pt; /* Espace de 10pt au-dessus */
}

.text_zone {
    margin: 10pt;
    text-align: center; /* Centre le texte horizontalement */
    flex-grow: 1; /* Prend tout l'espace disponible au milieu */
    align-items: center; /* Centre verticalement le contenu */
    justify-content: center;
}

#bouton_action {
    margin: 10pt;
    margin-bottom: 15pt; /* Espace de 15pt avant conseillers_container */
}

#conseillers_container {
    margin: 10pt;
    margin-top: 0; /* Colle à bouton_action */
}

.button-action, .button-conseillers {
    display: flex;
    justify-content: space-between; /* Aligne les boutons horizontalement */
    gap: 10pt; /* Espace entre les boutons */
}

/* LETTRE STATE0 */
/*  */
.texte0 {
    max-width: 750px;
    margin: 30px auto;
    padding: 60px 50px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px; /* Taille augmentée */
    line-height: 1.9;
    color: #1a120b; /* Encre noire profonde */
    background-color: #f5e7d3; /* Fond jauni (parchemin) */
    border: none;
    border-radius: 0;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    text-align: justify;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    /* Texture de papier vieilli */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(180, 150, 100, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 200, 0.3) 0%, rgba(255, 255, 200, 0.1) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23d4c3a1" stroke-width="0.8" opacity="0.2"/></svg>');
    background-size: 200px 200px;
}

/* Pliure en haut de la lettre */
.texte0::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 12px,
        rgba(26, 18, 11, 0.3) 12px,
        rgba(26, 18, 11, 0.3) 14px
    );
}

/* Taches d’encre aléatoires */
.texte0::after {
    content: "";
    position: absolute;
    bottom: 80px;
    right: 100px;
    width: 40px;
    height: 25px;
    background: radial-gradient(ellipse at center, rgba(26, 18, 11, 0.4) 0%, transparent 80%);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* Signature élégante */
.texte0 p:last-child {
    font-family: 'Great Vibes', cursive;
    font-size: 32px; /* Taille augmentée */
    margin-top: 60px;
    text-align: right;
    color: #1a120b;
    font-weight: 400;
    display: inline-block;
}

/* Trait de signature */
.texte0 p:last-child::after {
    content: "";
    display: block;
    width: 250px;
    height: 1px;
    background: linear-gradient(to right, transparent, #1a120b, transparent);
    margin-top: -10px;
    margin-left: auto;
}

/* Lettrine (première lettre agrandie) */
.texte0 p:first-child::first-letter {
    float: left;
    font-size: 48px; /* Taille augmentée */
    font-weight: 600;
    margin-right: 12px;
    margin-top: 6px;
    line-height: 1;
    color: #1a120b;
}


/* VARIABLES PROGRESSION STATE2 */
/*  */
.texte1 {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    border: 3px solid #6d3e00;
    border-radius: 6px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
    font-size: 18px;
    line-height: 1.8;
    align-items: center;

    /* Ajoute ces lignes : */
    width: 90%;
    box-sizing: border-box; /* Inclut le padding et la bordure dans la largeur */
    max-width: 100%; /* Empêche le débordement */
    overflow: auto; /* Gère le contenu trop large */
}


.texte1 p {
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: bold;
    text-decoration: underline;
    font-size: 20px;
}

.texte1 .span {
    display: block;
    text-align: left;
    margin-bottom: 7px;
    margin-right: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #6d3e00;
}

.texte1 #pixels-decouverts,
.texte1 #pixels-totaux,
.texte1 #nombre-morts,
.texte1 #ressources-depensees,
.texte1 #ressources-possedees,
.texte1 #soldats-disponibles,
.texte1 #eclaireurs-disponibles,
.texte1 #taux-exploration {
    font-weight: bold;
    color: #ffcc00;
    font-size: 17px;
}

.perso_img {
    width: 80%; /* 33.33% pour 3 images, moins 20px pour les marges */
    height: 65%;
    box-sizing: border-box;
    display: none;            /* Active le mode flex */
    flex-direction: column;   /* Empile les éléments verticalement */
    align-items: center;      /* Centre horizontalement l'image et le span */
    padding: 5px;
}


/* Style pour les images à l'intérieur */
.perso_img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ou 'contain' selon ton besoin */
    margin: 0px 10px;
    /* border: 1px solid rgb(153, 156, 0); */
}

.texte{
    display: block;
    margin: 20px;
    text-align: center;
    justify-content: center;
    border : 1px solid #6d3e00;
}

#texte-intro {
    display: flex;          /* Utilise flex pour le paragraphe */
    flex-direction: column; /* Affiche les enfants (les lignes) en colonne */
    align-items: center;    /* Centre horizontalement */
    text-align: center;     /* Centre le texte */
    justify-content: center;
    border: 1px solid #6d3e00;
    padding: 15px;

    /* Ajoute ces lignes : */
    font-family: Arial, sans-serif; /* Police (ex: Arial, Times New Roman, etc.) */
    font-size: 20px; /* Taille de la police (en pixels, em, rem, etc.) */
    font-weight: 500;
}

#texte-intro span {
    display: inline;        /* Force les spans à s'afficher en ligne */
    white-space: nowrap;    /* Empêche le retour à la ligne automatique */
}





#conseillers-container {
    display: flex; /* Affiche les enfants en ligne */
    justify-content: center; /* Centre les éléments horizontalement */
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
    height: 50%;
    border : 1px solid #6d3e00;
    overflow: hidden; /* Empêche le débordement */
    width: 100%; /* Prend toute la largeur disponible */
}


.conseiller_img {
    width: calc(33.33%); /* 33.33% pour 3 images, moins 20px pour les marges */
    height: 100%;
    box-sizing: border-box;
    display: flex;            /* Active le mode flex */
    flex-direction: column;   /* Empile les éléments verticalement */
    align-items: center;      /* Centre horizontalement l'image et le span */
    padding: 5px;
}

/* Style pour les images à l'intérieur */
.conseiller_img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ou 'contain' selon ton besoin */
    margin: 0px 10px;
    /* border: 1px solid rgb(153, 156, 0); */
}

.conseiller_img img:hover {
    border: 2px solid rgb(255, 255, 0, 0.5);
    box-shadow: 0 0 5px 5px rgb(255, 255, 0.3); /* Lueur jaune/orange */
}

.conseiller_img span {
    text-align: center;       /* Centre le texte du span */
    margin-top: 8px;          /* Espace entre l'image et le span */
}


#image-mission-container {
    height: 50%;
    border: 1px solid #6d3e00;
    overflow: hidden;
    width: 100%;
}

.mission_img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.mission_img img {
    width: 80%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}










.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.script-button {
    padding: 8px 20px;
    background-color: #1e1e1e; /* Noir légèrement plus clair */
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 2px;
    font-weight: normal;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-family: 'Consolas', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.15s;
}

.script-button:hover {
    background-color: #2a2a2a; /* Survol discret */
}

.script-button:active {
    background-color: #121212;
}

/*  */
/* PREMIERE COLONNE */

.c1 {
    width: 100%;          /* Prend toute la largeur disponible */
    max-width: 30%;       /* Limite à 25% de la largeur du parent */
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    text-align: center;
    box-sizing: border-box; /* Inclut le padding et la bordure dans le calcul de la largeur */
    background-color: rgb(3, 37, 5);
    justify-content: center;
    align-items: center;
    border: 4mm ridge rgb(70, 1, 1); /* 1px = épaisseur, solid = style, black = couleur */
    color: rgb(218, 200, 124);
}

.c1--state1 {
    align-items: stretch;
    justify-content: flex-start;
}




/*  */
/* STATE1 - CHOIX DES CONSEILLERS */

#c1-state1 {
    width: 100%; /* Prend toute la largeur disponible dans .c1 */
    padding: 5px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#c1-state1 h1 {
    font-size: 1.3em;
    color: #333333;
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
}

#c1-state1 #question {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    font-size: 1em;
    color: #555555;
    text-align: center;
}

#c1-state1 #boutons-container {
    width: 100%;
    margin: 5px 0;
}

#c1-state1 #boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: space-between;
    width: 100%;
}

#c1-state1 #boutons button {
    flex: 0 0 calc(33.33% - 8px);
    padding: 5px;
    background-color: #f0f0f0;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    text-align: center;
}

#c1-state1 #boutons button:hover {
    background-color: #e0e0e0;
}

#c1-state1 .button-container {
    width: 100%;
    text-align: center;
    margin-top: 5px;
}

#c1-state1 .script-button {
    display: inline-block;
    padding: 5px 7px;
    background-color: #f0f0f0;
    color: #333333;
    text-decoration: none;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

#c1-state1 .script-button:hover {
    background-color: #e0e0e0;
}

#c1-state1 #resultat {
    width: 100%;
    margin-top: 5px;
    padding: 5px;
    color: #555555;
    text-align: center;
}

#c1-state1 #felicitations {
    display: none;
    width: 100%;
    text-align: center;
    margin-top: 5px;
    padding: 5px;
}

#c1-state1 #felicitations h2 {
    font-size: 1.2em;
    color: #333333;
}

#c1-state1 .cache {
    display: none;
}


/*  */
/* DEUXIEME COLONNE */

.c2 {
    width: 100%;          /* Prend toute la largeur disponible */
    max-width: 70%;       /* Limite à 50% de la largeur du parent */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box; /* Inclut le padding dans le calcul de la largeur */
    border: 4mm ridge #442700; /* 1px = épaisseur, solid = style, black = couleur */
    background-color: rgb(3, 37, 5);
}

.c3 {
    width: 100%;          /* Prend toute la largeur disponible */
    max-width: 35%;       /* Limite à 35% de la largeur du parent */
    display: none;      /* Par défaut, la div est cachée */
    background-color: rgb(3, 37, 5);
    justify-content: center;
    align-items: center;
    border: 4mm ridge rgb(70, 1, 1); /* 1px = épaisseur, solid = style, black = couleur */
    color: rgb(218, 200, 124);
    }

/* Style pour la grille elle-même */
.grille {
    display: grid;
    gap: 0; /* Supprime l'espace entre les pixels pour un rendu plus net */
    background-color: transparent; /* Fond transparent pour éviter les artefacts */
    width: fit-content;
    height: fit-content;
    image-rendering: pixelated; /* Force un rendu "pixelisé" net (pour les navigateurs modernes) */
    image-rendering: -moz-crisp-edges; /* Pour Firefox */
    image-rendering: crisp-edges; /* Standard */
    border: 1px solid #2a2a2a; /* Bordure subtile pour délimiter la grille */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Ombre légère pour le relief */
}

/* Style pour les pixels */
.pixel {
    background-color: #ccc; /* Couleur par défaut (gris clair) */
    cursor: pointer;
    box-sizing: border-box;
    border: none; /* Supprime la bordure pour éviter les lignes parasites */
    transition: transform 0.1s, box-shadow 0.1s; /* Animation subtile au survol */
}

/* Style pour les pixels "vivants" (optionnel) */
.pixel-vivant {
    border: 1px solid rgb(85, 87, 85);
    animation: clignote 1s infinite alternate;
}

/* Animation pour les pixels vivants */
@keyframes clignote {
    from { box-shadow: 0 0 2px rgb(85, 87, 85); }
    to { box-shadow: 0 0 5px rgb(85, 87, 85); }
}

/* Style pour les statistiques dans .texte1 */
#pixels-decouverts, #pixels-totaux,
#nombre-morts, #ressources-depensees,
#ressources-possedees, #soldats-disponibles,
#eclaireurs-disponibles {
    color: #ff9999; /* Rouge plus doux pour les données */
}

.hidden {
    display: none;
}
