@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

body {
    font-family: 'Playfair Display', serif;
    color: #5e4934; /* Brun terreux */
    text-align: center;
    padding: 30px;
    margin: 0;
    background-image: url("img/ville.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #f5f0e1; /* Beige très clair comme fallback */
}

.perso {
    position: fixed;
    left: 0px;
    bottom: 15px;
    width: 180px;
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.3));
}

#game {
    background: rgba(255, 255, 230, 0.85); /* Blanc cassé transparent */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    margin: 30px auto;
    border: 2px solid #a0522d; /* Sienne brûlée */
}

#game h1 {
    color: #a0522d; /* Sienne brûlée */
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.1);
}

button {
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 8px;
    background-color: #a0522d; 
    color: #5e4934;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

button:hover {
    background-color: #a0522d; /* Sienne brûlée au survol */
    color: #f5f0e1;
    border-color: #f5f0e1;
}

#mazeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    border: none;
    background-color: rgba(0, 0, 0, 0.8);
}

.hidden {
    display: none !important;
}

/* Style de la bulle de dialogue */
.speech-bubble {
    position: fixed;
    bottom: 2%;
    left: 2%;
    right: 2%;
    background-image: url('img/parchemin.webp');
    padding: 15px;
    max-width: 96%;
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: #5e4934; /* Brun terreux */
    z-index: 1000;
    clip-path: polygon(
        /*Bord supérieur*/
        6.25% 0%, 12.5% 6.25%, 18.75% 0%, 25% 6.25%, 31.25% 0%, 37.5% 6.25%, 43.75% 0%, 50% 6.25%, 56.25% 0%, 62.5% 6.25%, 68.75% 0%, 75% 6.25%, 81.25% 0%, 87.5% 6.25%, 93.75% 0%,
        /*Bord droit*/
        100% 10%, 98.44% 30%, 100% 50%, 98.44% 70%, 100% 93.75%,
        /*Bord inférieur*/
        93.75% 100%, 87.5% 93.75%, 81.25% 100%, 75% 93.75%, 68.75% 100%, 62.5% 93.75%, 56.25% 100%, 50% 93.75%, 43.75% 100%, 37.5% 93.75%, 31.25% 100%, 25% 93.75%, 18.75% 100%, 12.5% 93.75%, 6.25% 100%,
        /*Bord gauche*/
        0% 93.75%, 1.56% 70%, 0% 50%, 1.56% 30%, 0% 10%
    );
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #a0522d; /* Sienne brûlée */
}

.speech-text {
    margin: 0;
    font-size: 1em;
    line-height: 1.7;
    color: #5e4934; /* Brun terreux */
    text-align: center;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.1);
}

/* Style du bouton de mode accessible (modifié) */
#accessibilityButton,#langue,#tutorial,#feedback {
    position: fixed;   
    width: 40px;    
    height: 40px;    
    border-radius: 100%; 
    background-color: #a0522d; 
    color: #f5f0e1; 
    font-size: 24px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer;
    z-index: 1001; /* Pour qu'il soit au-dessus des autres éléments */
    transition: background-color 0.3s ease, color 0.3s ease;
}

#accessibilityButton{
    top: 5px;      
    right: 5px;
}

#langue{
    top: 5px;      
    right: 95px;
}

#tutorial{
    top: 5px;      
    right: 50px;
}

#feedback{
    top: 5px;
    left: 5px;
}

#accessibilityButton:hover {
    background-color: #5e4934; /* Couleur au survol */
    color: #d2b48c;
}

/* Style de l'icône à l'intérieur du bouton */
#accessibilityButton::before {
    content: '\1F50A'; /* Icône de haut-parleur (Unicode) */
    font-family: sans-serif; /* Assure une bonne compatibilité des caractères Unicode */
}

#langue>img {
    width: 24px;
    height: 24px;
}

#tutorial::before {
    content: '\1F4D5'; /* Icône de livre simple (Unicode) */
    font-size: 20px; /* Réduit la taille de l'icône */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif; /* Assure une bonne compatibilité des caractères Unicode */
}

#feedback::before{
    content: '\1F4DD'; /* Icône de bloc-notes (Unicode) */
    font-size: 20px;
    font-family: sans-serif;
}




.accessible-mode #accessibilityButton {
    background-color: #ffdd00 !important;
    color: #333 !important;
    box-shadow: 2px 2px 5px rgba(255, 221, 0, 0.3);
}

.accessible-mode #accessibilityButton:hover {
    background-color: #ccaa00 !important;
    color: #444 !important;
}

.accessible-mode #accessibilityButton::before {
    content: '\2600'; /* Garde la même icône ou change-la pour le mode sombre */
}

/* On cache l'ancien bouton texte si tu l'as encore dans ton HTML */
button.accessible-button-text {
    display: none !important;
}

#tutorialPanel {
    position: fixed; /* Pour le positionner par rapport à la fenêtre */
    top: 0;
    right: 0;
    width: 80%; /* Ajuste la largeur selon tes préférences */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fond semi-transparent pour faire ressortir le texte */
    color: white; /* Texte blanc pour une bonne lisibilité sur fond sombre */
    padding: 0px 20px;
    box-sizing: border-box; /* Important pour que le padding n'augmente pas la largeur */
    transform: translateX(100%); /* Cache le panneau initialement à droite */
    transition: transform 0.3s ease-in-out; /* Animation pour l'ouverture et la fermeture */
    z-index: 1011; /* Assure-toi qu'il soit au-dessus des autres éléments */
    overflow-y: auto; /* Permet le défilement si le contenu est trop long */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
  }
  
  #tutorialPanel.open {
    transform: translateX(0); /* Affiche le panneau en le faisant glisser vers la gauche */
  }

  #tutorialPanel h3 {
    margin-top: 0; /* Supprime la marge haute par défaut des titres */
    margin-bottom: 5px;
    color: #eee; /* Légère variation de couleur pour les titres */
  }
  
  #tutorialPanel p {
    line-height: 1.6; /* Améliore la lisibilité du texte */
    margin-bottom: 45px;
  }

  .closeTutorial {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1; /* Aligne la croix verticalement */
  }
  
  .closeTutorial:hover {
    background: none;
  }

  #carte{
    position: fixed;
    top: 20%;
    right: 10%;
    width: 80%;
    display: none;
  }

  .visible{
    display: block;
  }



.formulaire{
    z-index: 1012;
    position: fixed;
    top: 10px;
    left: 30px;
    right: 30px;
    transform: translateX(-110%); 
    transition: transform 0.3s ease-in-out; 
}

.closefeedback{
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    color: black;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1; 
}

.closefeedback:hover {
    background: none;
  }

form {
    background-image: url('img/parchemin.webp');
    /*background: #fff;*/
    color: black;
    padding: 24px;
    border-radius: 10px;
    max-width: 600px;
    margin: auto;
}

label {
    font-weight: bold;
    margin-top: 1em;
    display: block;
}

input[type="text"],
select,
textarea {
    width: 100%;
    font-size: 1em;
    padding: 5px 0px;
    margin-top: 0.2em;
    margin-bottom: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

input[type="range"] {
    width: 100%;
}

.range-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #555;
    margin-top: -0.5em;
    margin-bottom: 1em;
}

.submit {
    padding: 0.8em;
    background-color: #4CAF50;
    color: white;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1em;
}

.submit:hover {
    background-color: #45a049;
}

#confirmationMessage {
    text-align: center;
    margin-top: 1em;
    font-weight: bold;
    color: green;
}