html, body {
  margin: 0;
  padding: 0;
  overflow: hidden; /* coupe scroll horizontal + vertical */
  width: 100%;
  height: 100%;
}

body.fond-examen-entree {
    background-image: url("../images/fonds/fond_examen_entree.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
}

/* Loup plein écran */
#clef-image {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: calc(100dvh - 80px);
    object-fit: cover;
    display: none; /* géré par JS */
    z-index: 5;    /* derrière header */
    cursor: pointer;
}

/* ============================
   MESSAGE DU LOUP (BESTIAL)
   ============================ */
.bestial-message {
    position: fixed;
    top: 47%;                     /* sous la tête du loup */
    left: 5%;                     /* ancrage gauche */
    max-width: 35%;               /* colonne du loup */
    
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.4;
    letter-spacing: 0.5px;
    
    color: #C1482E;
    text-align: left;
    text-shadow: 2px 2px 4px black;

    z-index: 20;
    pointer-events: none;
}

/* Guillemets rituels — invisibles par défaut */
.bestial-message::before,
.bestial-message::after {
    opacity: 0;
    font-size: 2rem;
    font-weight: bold;
    vertical-align: top;
    transition: opacity 0.3s ease;
}

/* Guillemet ouvrant */
.bestial-message::before {
    content: "❝ ";
}

/* Guillemet fermant */
.bestial-message::after {
    content: " ❞";
}

/* Activation uniquement si le message contient du texte */
.bestial-message:not(:empty)::before,
.bestial-message:not(:empty)::after {
    opacity: 1;
}

.bestial-message:not(:empty) {
    animation: souffle-loup 0.4s ease-out;
}

@keyframes souffle-loup {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bloc questionnaire compact */
.examen-droite {
    width: 40%;
    background: linear-gradient(145deg, #3b2c1a, #5a3e1b);
    color: #f5deb3;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5),
                0 10px 25px rgba(0,0,0,0.7);
    font-family: "Cormorant Garamond", serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-height: fit-content; /* compact */

    margin-top: 50px;          /* descend le bloc sous le header */
    margin-left: auto;         /* force à droite */
    margin-right: clamp(60px, 10vw, 100px);
}

/* Titre */
.examen-droite h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px black;
    letter-spacing: 2px;
}

/* Questions */
.question {
    margin-bottom: 12px;
}
.question p {
    font-size: 1.15rem;
    margin-bottom: 4px;
    font-weight: bold;
}

/* Radios côte à côte */
.question label {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    padding: 4px 8px;
    border: 1px solid rgba(245,235,200,0.5);
    border-radius: 6px;
    background: rgba(245,235,200,0.1);
    cursor: pointer;
    transition: 0.3s;
}
.question label:hover {
    background: rgba(255,200,120,0.3);
    box-shadow: 0 0 10px rgba(255,180,100,0.6);
}
.question input[type="radio"] {
    accent-color: #f1c27d;
    transform: scale(1.3);
    margin-right: 5px;
}

/* Bouton bestial */
.btn-examen {
    display: block;
    margin: 15px auto 0;
    padding: 12px 35px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(145deg, #5a3e1b 0%, #8b5e1a 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5),
                0 5px 15px rgba(0,0,0,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-examen:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6),
                0 6px 18px rgba(0,0,0,0.8);
    background: linear-gradient(145deg, #6b4520 0%, #a0723d 100%);
}

.explorateur-indice {
    position: fixed;
    top: 47%;                     /* sous la tête du loup */
    left: 5%;                     /* ancrage gauche */
    max-width: 35%;
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.4;
    letter-spacing: 0.5px;
    color: #FFFFFF;  
    text-shadow: 1px 1px 3px black; /* toujours utile pour relief */
    z-index: 20;
    pointer-events: none;

    /* léger mouvement pour attirer l'œil */
    animation: flotter 1.8s ease-in-out infinite alternate;
}

@keyframes flotter {
    0% { transform: translateY(-10px); }
    100% { transform: translateY(-14px); }
}

/* Responsive */
@media (max-width: 900px) {
  body.fond-examen-entree {
    background-image: none;
    background: linear-gradient(145deg, #3b2c1a, #5a3e1b);
  }	
	
  .examen-droite {
    position: fixed;
    top: 59px; /* 🔥 laisse place au header */
    left: 0;

    width: 100vw;
    height: calc(100dvh - 80px); /* vrai écran mobile */

    margin: 0;
    border-radius: 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 10px 15px;
    box-sizing: border-box;

    overflow: hidden;
  }
  
  /* Titre */
  .examen-droite h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  /* Questions */
  .question {
    margin-bottom: 10px;
  }
  
  .question p {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }
  
  /* Radios côte à côte */
  .question label {
    margin-right: 4px;
    padding: 3px 5px;
    border: 1px solid rgba(245,235,200,0.5);
    border-radius: 6px;
  }

  /* Bouton */
  button {
    margin: 10px auto 0;
    padding: 8px 25px;
    font-size: 1rem;
    border-radius: 50px;
  }
  
  .bestial-message {
    top: 20%;
    left: 85%;
    bottom: 140px; /* ajuste selon ton layout */
    transform: translateX(-50%);

    text-align: center;

    font-size: 0.85rem;
    padding: 10px 12px;
  }
  
  .explorateur-indice {
    top: 20%;                     /* sous la tête du loup */
    left: 75%;                     /* ancrage gauche */
    font-size: 0.85rem;
  }
}

@media (orientation: portrait) {
  #clef-image {
    object-position: 23% center;
  }
  
  .bestial-message {
    top: 62%;
    left: 50%;
    bottom: 140px; /* ajuste selon ton layout */
    transform: translateX(-50%);

    text-align: center;

    font-size: 1rem;
    padding: 10px 12px;
  }
  
  .explorateur-indice {
    top: 62%;                     /* sous la tête du loup */
    left: 30%;                     /* ancrage gauche */
    font-size: 1rem;
  }
}

