/* =========================================
   1. BASES ET TYPOGRAPHIE
   ========================================= */
body {
    text-align: center;
    color: #333;
    font-size: 18px;
    background-color: #fdfaf0;
    margin: 0;
    padding: 20px;
    font-family: sans-serif;
}

/* Fonds d'écran thématiques */
body.bg-1 {
    background-image: url('https://www.de-plume-en-plume.fr/uploads/images/sources/8595a4873c7ac5cbfa62adbd746aa0ce8890059a.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.bg-2 {
    background-image: url('https://www.de-plume-en-plume.fr/uploads/images/sources/f89b46b0d271a8227544406e20533cb72332ff8c.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


body.bg-3 {
    background-image: url('https://www.de-plume-en-plume.fr/uploads/images/sources/75390f66872177cd0d724b353d598c76347f1242.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


h1 {
    margin-top: 20px;
    color: #2c3e50;
    font-size: 2.2em;
}

.taille25px {
    font-size: 25px;
}

.taille35px {
    font-size: 35px;
}

#Informations_importantes {
    font-size: 25px;
    color: #d62815;
    font-weight: bold;
}

.nom-perso {
    font-weight: bold;
    color: #2c3e50;
}

/* =========================================
   2. LOGOS (Style par défaut / Ordinateur)
   ========================================= */

/* Logo Accueil : Très grand et centré */
.logo-accueil {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 425px; /* Agrandit sur ordi */
    height: auto;
}

/* Logo Jeu/Infos : Placé en haut à gauche */
.logo-jeu {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 220px; /* Agrandit sur ordi */
    height: auto;
    z-index: 10;
}

/* Logo de la ville de Vivonne */
.logo-ville {
    display: block;
    margin: 40px auto 20px auto;
    max-width: 300px;
    height: auto;
}

/* =========================================
   3. ÉTAPES DU JEU ET FORMULAIRES
   ========================================= */
.etape {
    display: none; 
    background: rgb(243, 236, 203);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    max-width: 800px;
    margin: 20px auto;
}

.active {
    display: block;
}

/* Zone de saisie des réponses */
.zone-reponse {
    margin: 25px 0;
    font-weight: bold;
}

input {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #ccc;
    width: 180px; /* Taille fixe pour laisser de la place à l'info */
    margin: 10px;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: #4CAF50;
}

/* Petit texte d'exemple à côté de l'input */
#info-reponse {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

/* =========================================
   4. BOUTONS
   ========================================= */
button, a.btn-link {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.2s, background-color 0.2s;
}

a.btn-link {
    display: inline-block;
    text-decoration: none;
    color: white;
}

button:hover, a.btn-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-accueil { background-color: #e74c3c !important; }
.btn-retour { background-color: #df9101 !important; }
.btn-début { background-color: #1580c7 !important; }
.btn-quitter { background-color: #6c757d !important; }
.btn-continuer { background-color: #28a745 !important; }

/* =========================================
   5. COMPOSANTS SPÉCIFIQUES (Alerte & Menu)
   ========================================= */
#alerte-ordinateur {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

@media screen and (min-width: 1024px) {
    #alerte-ordinateur { display: flex; }
}

.boite-alerte {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
}

details {
    background-color: white;
    border-radius: 15px;
    padding: 10px;
    max-width: 700px;
    margin: 20px auto;
    cursor: pointer;
}

summary {
    font-weight: bold;
    color: #27ae60;
    padding: 10px;
}

/* =========================================
   6. ADAPTATION MOBILE (Smartphone)
   ========================================= */
@media screen and (max-width: 767px) {
    
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    /* Logos agrandis et centrés sur téléphone */
    .logo-accueil, .logo-jeu {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        margin: 15px auto !important;
        max-width: 280px !important; /* Bien grand sur tel */
        width: 85% !important;
        display: block !important;
    }

    .logo-ville {
        max-width: 180px !important;
    }

    input {
        width: 90%; /* Prend toute la largeur sur tel */
        margin: 10px 0;
    }

    #info-reponse {
        display: block; /* Passe en dessous sur petit écran */
        margin: 5px 0 15px 0;
    }

    #taille25px {
        font-size: 19px !important;
    }
    
}

.tremble {
    display: inline-block;
    animation: tremble 0.2s infinite;
}

@keyframes tremble {
    0%   { transform: translate(1px, 1px); }
    25%  { transform: translate(-1px, 0px); }
    50%  { transform: translate(1px, -1px); }
    75%  { transform: translate(-1px, 1px); }
    100% { transform: translate(1px, 0px); }
}

/* =========================================
   7. BULLES D'INDICE (💭)
   ========================================= */

/* Conteneur pour aligner la bulle par rapport au nuage */
.conteneur-bulle {
    position: relative;
    display: inline-block;
}

/* Style de l'émoji nuage pour donner envie de cliquer */
.nuage-cliquable {
    cursor: pointer;
    font-size: 1.3em;
    user-select: none;
    transition: transform 0.2s;
}

.nuage-cliquable:hover {
    transform: scale(1.2);
}

/* La petite fenêtre qui apparaît au clic (SUR ORDINATEUR) */
.bulle-texte {
    display: none; /* Cachée par défaut */
    position: absolute;
    bottom: 130%; /* Se place juste au-dessus du nuage */
    left: 50%;
    transform: translateX(-50%);
    
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #ccc;
    z-index: 9999;
    text-align: left;
    font-size: 16px;
    box-sizing: border-box;
    
    /* TAILLE FIXE SUR ORDINATEUR */
    width: 640px; 
    white-space: normal; /* Force les retours à la ligne des balises <p> */
}

/* Reste visible quand elle a la classe active */
.bulle-texte.active {
    display: block !important;
}

/* Petite flèche en bas de la bulle qui pointe vers le nuage */
.bulle-texte::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.98) transparent transparent transparent;
}

/* Le petit bouton fermer (X) */
.bouton-fermer {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.bouton-fermer:hover {
    color: #e74c3c;
}

/* ===================================================
   ADAPTATION POUR LE TÉLÉPHONE (Écrans inférieurs à 750px)
   =================================================== */
@media screen and (max-width: 750px) {
    .bulle-texte {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        
        width: 90vw !important;
        max-width: 90vw !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        
        font-size: 14px !important;
        padding: 15px !important;
    }

    .bulle-texte::after {
        display: none !important;
    }
}

/* Bouton fermer (X) en haut à droite */
.bouton-fermer {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.bouton-fermer:hover {
    color: #e74c3c; /* Devient rouge au survol */
}


/* =========================================
   7bis. CARTE EN PLEIN ÉCRAN
   ========================================= */
.btn-carte {
    background-color: #1580c7;
}

.carte-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000;
}

.carte-modal.active {
    display: block;
}

#carte-plein-ecran {
    width: 100%;
    height: 100%;
}

.carte-fermer {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    width: 80%;
    height: 48px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 24px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.carte-fermer:hover {
    transform: translateX(-50%) scale(1.05);
    filter: brightness(1.1);
}

.marker-numero {
    background: transparent;
    border: none;
}

.marker-numero span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    font-size: 14px;
}

.multicolore {
    display: inline-block;
    animation: multicolore 0.5s infinite;
}

@keyframes multicolore {
    0%   { color: #ff0000; }
    25%  { color: #00ff00; }
    50%  { color: #0000ff; }
    75%  { color: #ffff00; }
    100% { color: #ff00ff; }
}

/* =========================================
   8. BOUTON COPIE GPS
   ========================================= */
.btn-copier-gps {
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

/* =========================================
   9. BOUTON BÊTA (fixe, bas gauche)
   ========================================= */
.btn-beta {
    position: fixed;
    bottom: 15px;
    left: 15px;
    background-color: #7f8c8d;
    color: #ffffff;
    border: 1px solid #616a6b;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 5px;
    opacity: 0;
    z-index: 1000;
}

/* =========================================
   10. CHAMPS DE FORMULAIRES (bug, commentaires)
   ========================================= */
.formulaire-standard {
    max-width: 500px;
    margin: 20px auto;
    text-align: left;
}

.champ-formulaire {
    margin: 12px 0;
    font-weight: bold;
}

.champ-formulaire input,
.champ-formulaire textarea,
.champ-formulaire select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #ccc;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    margin: 6px 0;
}

/* =========================================
   11. NOTIFICATION COPIE GPS
   ========================================= */
.notification-copie {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.5s ease;
}

/* =========================================
   12. ÉCRAN DE VICTOIRE
   ========================================= */
.ecran-victoire {
    padding: 20px;
}

.ecran-victoire__message {
    background: rgb(243, 236, 203);
    padding: 20px;
    border-radius: 15px;
    margin: 20px auto;
    text-align: center;
    max-width: 700px;
}

.ecran-victoire__badge {
    text-align: center;
    margin-top: 20px;
}

.ecran-victoire__badge img {
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
}

.ecran-victoire__commentaire {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 700px;
    text-align: left;
}

/* =========================================
   13. ERREUR DE VÉRIFICATION
   ========================================= */
.echec-aventure {
    background: #f8d7da;
    border: 2px solid #dc3545;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    color: #721c24;
}



/* =========================================
   14. Un très beau tableau 
   ========================================= */

    .tableau-tarifs {
        width: 100%;
        max-width: 600px;
        margin: 20px auto;
        border-collapse: separate;
        border-spacing: 0;
        background-color: #ffffff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .tableau-tarifs thead {
        background: linear-gradient(135deg, #1e3c72, #2a5298);
        color: #ffffff;
    }

    .tableau-tarifs th {
        padding: 14px 16px;
        text-align: left;
        font-size: 1.05rem;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .tableau-tarifs th:last-child, 
    .tableau-tarifs td:last-child {
        text-align: right;
    }

    .tableau-tarifs td {
        padding: 12px 16px;
        border-bottom: 1px solid #eef2f5;
        color: #333333;
        font-size: 0.95rem;
    }

    /* Effet une ligne sur deux */
    .tableau-tarifs tbody tr:nth-child(even) {
        background-color: #f8fafc;
    }

    /* Effet au survol */
    .tableau-tarifs tbody tr:hover {
        background-color: #f1f5f9;
        transition: background-color 0.2s ease;
    }

    /* Enlever la bordure sur la dernière ligne */
    .tableau-tarifs tbody tr:last-child td {
        border-bottom: none;
    }



    /* =========================================
   15. BOUTON à propos (fixe, bas droite)
   ========================================= */
.btn-propos {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #3a428b;
    color: #ffffff;
    border: 1px solid #2e5bbd;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 5px;
    opacity: 0.6;
    z-index: 1000;
    margin-top: 15px; /* Pousse le bouton vers le BAS, loin du texte */
}



 /* =========================================
   16. BOUTON à gris (désactivé)
   ========================================= */

/* Style du bouton désactivé */
.btn-grise {
    background-color: #cccccc !important;
    color: #666666 !important;
    border: 2px solid #999999 !important;
    cursor: not-allowed; /* Affiche un curseur "interdit" au survol */
    opacity: 0.7;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
}

/* Style du chrono à côté */
.texte-chrono {
    font-weight: bold;
    color: #d90429;
    margin-left: 10px;
    font-size: 0.95em;
}

 /* =========================================
        Cases à cocher personnalisées
   ========================================= */


input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    background-color: white;
}

input[type="checkbox"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

input[type="checkbox"]:hover {
    border-color: #4CAF50;
    transform: scale(1.1);
}


/* =========================================
   LISTE DES COMMENTAIRES (STYLE CLAUDE + VAGABONDER)
   ========================================= */

.commentaires-contenu {
    max-width: 640px;
    margin: 30px auto 0;
    padding: 0 15px 20px;
}

.commentaires-titre {
    text-align: center;
    color: var(--couleur-principale, #2c3e50);
    margin: 20px 0 15px;
}

/* La carte de commentaire de Claude aux couleurs de ton site */
.commentaire {
    background: #ffffff;
    border-left: 5px solid var(--couleur-principale, #e0a96d); /* Bordure latérale */
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.commentaire-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.commentaire-entete strong {
    color: var(--couleur-principale, #2c3e50);
    font-size: 1.05em;
}

/* Pseudo avec émoticône boussole/aventure */
.commentaire-entete strong::before {
    content: "🧭 ";
}

/* Badge de date style badge d'aventure */
.commentaire-date {
    background: #fdf6ec;
    color: #c07d3e;
    font-size: 0.75em;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
}

.commentaire-message {
    margin: 0;
    color: #444;
    line-height: 1.5;
}

.commentaire-vide {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 30px 0;
}

.btn-commentaires {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 2px solid var(--couleur-principale, #2c3e50);
    color: var(--couleur-principale, #2c3e50);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-commentaires:hover {
    background-color: var(--couleur-principale, #2c3e50);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.commentaires-contenu {
    max-width: 640px;
    margin: 30px auto 0;
    padding: 0 15px 80px; /* 80px d'espace libre tout en bas */
}

/* =========================================
   MODALE & COMMENTAIRES — FOND & COULEURS
   ========================================= */

/* 1. La modale prend l'image de fond numéro 2 et permet de défiler */
#commentaires-modal {
    background-image: url('https://www.de-plume-en-plume.fr/uploads/images/sources/f89b46b0d271a8227544406e20533cb72332ff8c.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #fdfaf0;
    overflow-y: auto; /* Permet de scroller si la liste de commentaires est longue */
}

/* 2. Le fond derrière le texte des commentaires prend le beige/parchemin de Vagabonder */
.commentaire {
    background: rgb(243, 236, 203); /* Le même fond que tes cartes d'étapes */
    border-left: 5px solid #2c3e50;  /* Bordure sombre rappelant ton titre/thème */
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.commentaire-entete strong {
    color: #2c3e50;
}

.commentaire-date {
    background: rgba(255, 255, 255, 0.7);
    color: #2c3e50;
    font-size: 0.75em;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
}

.commentaire-message {
    margin: 0;
    color: #2c3e50;
    line-height: 1.5;
}

/* Note du développeur façon réponse YouTube (sans italique) */
.commentaire-reponse-dev {
    margin-top: 10px;
    margin-left: 20px;
    padding-left: 10px;
    border-left: 2px solid var(--couleur-principale, #2c3e50);
    font-size: 0.9em;
    color: #555;
    font-style: normal; /* Texte droit, sans italique */
}

.commentaire-reponse-dev strong {
    color: var(--couleur-principale, #2c3e50);
}