* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: #787f79;
  color: white;
  text-align: center;
  min-height: 100vh;
}

.quiz-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: -33px;
  padding: 80px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* === TITRE === */
.quiz-title-img {
  width: 400px; /* ajustez selon votre image */
  height: auto;
  display: block;
  margin-top: -14px;
  margin-bottom: 5px;
  opacity: 70%;
}

/* === RÈGLES === */
.regles-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -16px;
}

.regles-btn {
  padding: 10px 17px;
  border-radius: 92px;
  border: 1.6px solid rgba(255,255,255,0);
  background: #C87872;
  color: rgba(255,255,255,0.9);
  font-size: 19px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  cursor: default; /* ← plus cliquable */
  pointer-events: none; /* ← désactive les interactions */
  position: absolute; /* ← sort du flux */
  top: -11px; /* ← ajustez pour le placer au dessus du cadre */
  left: -293px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 100;
}

.regles-text {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);

  width: 977px;
  padding: 50px 24px;

  font-size: 15px;
  line-height: 0.8;
  color: rgba(255,255,255,0.8);
  text-align: center;


  z-index: 10;
}

.regles-text::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  margin-bottom: 16px;
  margin-top: 9px;

  background: rgba(0,0,0,0.2);
  border-radius: 60px;

  transform: perspective(1000px) rotateX(31deg) scaleX(0.93);
}

.regles-text.hidden {
  
  display: none;
}

.highlight-word  {
  font-weight: bold;
  color: #ffdc73; /* choisis ta couleur */
}

.casque {
position: absolute;
pointer-events: none;
width: 427px;
top: 370px;
left: 70px;
z-index: 9999;
}

.exam {
position: absolute;
pointer-events: none;
width: 356px;
top: 277px;
right: 50px;
z-index: 19999;
}

/* === LECTEUR AUDIO === */
.audio-player {
  position: relative;
  background: rgba(255,255,255,0);
  border: 1.9px solid rgba(255, 255, 255, 0.7);
  border-radius: 75px;
  padding: 14px 24px;
  width: 100%;
  max-width: 520px;
  margin-top: 170px;
  text-align: center;
  box-shadow: 0 0px 5px rgba(0,0,0,0.1);
    margin-bottom: 4px;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.player-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 0px;
}

.play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #8d968e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    inset 0 3px 3px rgba(255, 255, 255, 0.3), /* lumière en haut */
    inset 0 -3px 3px rgba(0,0,0,0.09),      /* ombre en bas */
    0 0px 6px rgba(0,0,0,0.17);
  transition: background 0.2s ease, transform 0.15s ease;
  margin-top: -10px;
}

.play-circle:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.1);
}

.play-circle:active {
  transform: scale(1);
}

.track-info {
  flex: 1;
}

.track-title {
  position: absolute;
  background-color: #787f79;
  padding: 7px 11px;
  font-size: 21px;
  font-weight: 600;
  left: 166px;
  top: -20px;
  color: rgba(255,255,255,0.9);
  box-shadow: 
    0 0 10px #787f79,
    0 4px 12px #787f79;
}

.track-sub {
  position: absolute;
  background-color: #787f79;
  padding: 7px 10px;
  font-size: 12px;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  left: 125px;
  top: 75px;
  box-shadow: 
    0 0 10px #787f79,
    0 4px 12px #787f79;
}

.time-display {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  cursor: pointer;
  margin-bottom: 10px;
  flex : 1;
  z-index: 1000;
}


.waveform-bar {
  flex: 1;
  border-radius: 2px;
  background: rgba(255,255,255,0.18);
  min-width: 2px;
}

.waveform-bar.played {
  background: rgb(72, 74, 70);
  opacity: 0.7;
}

.waveform-bar.active {
  background: rgb(71, 75, 69);
  opacity: 1;
}

.progress-track {
  height: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 1px;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.6);
  border-radius: 1px;
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
}

.play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.6px solid rgba(255,255,255,0.5);
  background: #828a84;
  color: white;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn:hover {
  background: #98a19a;
  transform: scale(1.08);
}

#play-icon {
  transform: translate(0px, 0px); /* ← x, y */
}


/* === PHRASE INITIALISATION === */
.quiz-hint {
  position: absolute;
  font-size: 22px;
  font-style: italic;
  font-weight: 450;
  opacity: 0.5;
  margin-top: 456px;
  line-height: 1.4;
}

/* === QUIZ CARD === */
.quiz-question
{
  margin-top: -16px;
  margin-bottom: -6px;
  font-size: 19px;
  font-weight: 650;
  color: rgba(0, 0, 0, 0.65);
}


.quiz-card {
  width: 90%;
  background: #616661;
  border-radius: 226px;
  padding: 39px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 999;
  margin-bottom: 26px;

  opacity: 0;
  visibility: hidden;
  transform: scale(0.94);
  filter: blur(6px);

  transition:
    opacity 0.93s ease,
    transform 0.93s ease,
    filter 0.93s ease;
}

.quiz-card.hidden {
  opacity: 0;
  visibility: hidden;
}

.quiz-card:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  filter: blur(0);
}

/* === PROPOSITIONS === */
.propositions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  align-items: center; /* ← centre les propositions */
}

.proposition {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 29px;
  border: 1.9px solid rgba(255,255,255,0.5);
  background: #787f79;
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  width: 73%;
  justify-content: flex-start;

  transition: transform 0.15s ease;
}

.proposition:hover {
  transform: scale(1.03);
}

.proposition:active {
  transform: scale(1);
}

.proposition label {
  cursor: default;
  line-height: 1.5;
  text-align: center;
  flex: 1;
}

.proposition input[type="radio"] {
  opacity: 1;
  accent-color: #bbff8d;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.proposition input[type="radio"]:disabled,
.proposition[data-locked="true"] {
  opacity: 0.4;
}

.terme {
  color: rgba(255, 170, 170, 0.9);
  text-decoration: underline dotted;
  cursor: help;
  z-index: 10000000000000 !important;
  position: relative;
}

.terme:hover::after {
  content: attr(data-info);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e1e;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 1000000000000000 !important;
  pointer-events: none;
}

/* === BOUTON VALIDER === */
.valider-btn {
  position: fixed;
  padding: 19px 32px;
  border-radius: 12px;
  border: none;
  background: #b30000;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  transition: background 0.2s ease, transform 0.15s ease;
  font-family: "Inter", system-ui, sans-serif;
  bottom: 60px;
  right: 70px;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
}
.valider-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.valider-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.valider-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* === MODAL QUIZ === */
.quiz-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.33);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.33s ease;
  backdrop-filter: blur(0px);
  pointer-events: none;
}

.quiz-modal:not(.hidden) {
  opacity: 1;
  backdrop-filter: blur(3.3px);
  pointer-events: all;
}

.quiz-modal:not(.hidden) .quiz-modal-content {
  transform: scale(1);
  opacity: 1;
}

.quiz-modal-content {
  background: #1e1e1e;
  color: white;
  padding: 40px;
  border-radius: 18px;
  width: 420px;
  max-width: 90%;
  position: relative;
  text-align: center;
  transform: scale(0.93);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.quiz-close-modal {
  position: absolute;
  top: 15px;
  right: 18px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.6;
}

.quiz-close-modal:hover {
  opacity: 1;
}

.back-link {
  position: absolute;
  top: 12px;
  left: 40px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  transition: color 0.2s;
  z-index: 9999999999999;
}
.back-link:hover {
  color: rgb(212, 255, 139);
  opacity: 1;
}

/* MODALS */
.modal {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.33);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999999; /* ← augmenté pour passer au dessus de tout */
    opacity: 0;
    transition: opacity 0.33s ease;
    backdrop-filter: blur(0px);
}

.modal-note {
  margin-top: 13px;
  font-size: 11px;
  color: rgba(2, 44, 0, 0.5);
  line-height: 1.6;
  white-space: nowrap;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
}
.modal-note-main {
  color: rgba(2, 44, 0, 0.85);
  font-weight: 600;
  font-size: 14px;
}
.modal-note-sub {
  color: rgba(2, 44, 0, 0.85);
  font-weight: 500;
  font-size: 12px;
}

/* Cache par défaut */
.hidden {
    opacity: 0;
    pointer-events: none;
}

#fullscreen-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
}

#fullscreen-modal:not(.hidden) {
opacity: 1;
backdrop-filter: blur(6px);
background: rgba(255, 255, 255, 0.55);
}

#fullscreen-modal .modal-content {
background: transparent;
padding: 20px;
width: min(106vh, 100vw);
max-width: 840px;
border-radius: 18px;
transform: scale(0.93);
opacity: 0;
transition: transform 0.93s ease, opacity 0.93s ease;
margin: 15px auto 0;
text-align: center;
}

#fullscreen-modal:not(.hidden) .modal-content {
transform: scale(1);
opacity: 1;
}

#fullscreen-modal .modal-content img {
width: 100%;
height: auto;
border-radius: 10px;
display: block;
}

#fullscreen-modal-body {
transform: translateY(10px);
transition: transform 0.2s ease;
}

#fullscreen-modal:not(.hidden) #fullscreen-modal-body {
transform: translateY(0);
}

/* BOÎTE */
.modal-content {
    background: #1e1e1e;
    color: white;
    padding: 40px;
    border-radius: 18px;
    width: 420px;
    max-width: 90%;
    position: relative;
    text-align: center;
    transform: scale(0.93);
    opacity: 0;
    transition: transform 0.93s ease, opacity 0.93s ease;
}

/* Croix */
.close-modal {
    position: absolute;
    top: 10px;
    right: -280px;
    font-size: 33px;
    cursor: pointer;
    opacity: 0.7;
    color: rgba(0, 0, 0, 0.3); /* ← sombre sur fond blanc */
    font-weight: 700;
}

.close-modal:hover {
    opacity: 1;
    color: rgba(0, 0, 0, 0.7);
}



@keyframes fadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-inscription {
  display: inline-block;
  position: relative;
  top: -13px;
  padding: 12px 28px;
  background: #b30000;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-inscription:hover {
  background: #c40000;
  transform: scale(1.08);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

.btn-inscription:active {
  transform: scale(0.98);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.audio-player-wrapper {
  position: relative;
}

.audio-overlay-image {
  position: absolute;
  top: 197px;
  right: 101px;
  width: 57.1%;
  height: auto;
  z-index: 10000;
  pointer-events: none;
}

/* REPÈRES DE MESURES — dessinés dans la forme d'onde (toutes largeurs) */
.waveform { position: relative; }

.measure-line {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  margin-left: -1px;               /* centre la barre sur sa position */
  background: #dfe1da;
  border-radius: 2px;
  pointer-events: none;              /* ne gêne pas le clic sur la forme d'onde */
}

.measure-num {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #dfe1da;
  pointer-events: none;
  user-select: none;
}
