@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

@font-face {
  font-family: 'Inter';
  src: url('fonts/Helvetica-Neue/HelveticaNeueMedium.otf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1c1c28;
  --border: #2a2a3e;
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --accent3: #ff6b6b;
  --text: #e8e8f0;
  --text-muted: rgb(175, 175, 202);
  --mono: 'Space Mono', monospace;
  --sans: 'Inter', sans-serif;
  --fs-hero: clamp(4rem, 15vw, 13rem); 
  --fs-title: clamp(2rem, 8vw, 5rem);
  --fs-body: clamp(0.9rem, 1vw, 1.1rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); overflow-x: hidden; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px;
}
.nav-logo { 
  font-family: 'inter'sans-serif; 
  font-size: 0.8rem; 
  font-weight: bold; 
  color: var(--text-muted); 
  letter-spacing: 0.1em;
 }
 .nav-logo span {
  color: limegreen;
}
.nav-links {  font-family: 'inter'sans-serif; 
  display: flex; 
  gap: 2rem; 
  list-style: none; 
}
.nav-links a { color: var(--text-muted); 
  text-decoration: none; 
  font-size: 0.8rem; font-weight: bold; 
  letter-spacing: 0.05em; 
  transition: color 0.2s; 
}
.nav-links a:hover { 
  color: limegreen; 
}
#hero {
  height: 1000vh; 
  position: relative;
  overflow: visible; 
}

#canvas-3d {
  position: fixed;
  bottom: 0;          
  left: 50%;          
  transform: translateX(-50%); 
  z-index: 1;
  width: auto;         
  height: 100vh;       
  aspect-ratio: 16 / 9; 
  pointer-events: none;
}
.hero-content { 
  position: relative; 
  z-index: 0; 
  text-align: center; 
  pointer-events: none; 
}

#fade-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
}

.hero-tag {
  font-family: 'Inter';
  font-size: clamp(3rem, 15vw, 13rem); 
  font-weight: 900;
  color: rgb(255, 255, 255);
  text-transform: uppercase;
  line-height: 0.9;
  margin-top: 2.9rem; 
  text-align: center;
}
.hero-tag span {
  color: #000; 
  font-weight: 900;
  text-shadow: 
    -1px -1px 0 limegreen,  
     1px -1px 0 limegreen,
    -1px  1px 0 limegreen,
     1px  1px 0 limegreen;
}
.hero-title {
  font-family: var(--sans);
  font-size: 45px;
  margin-right: 60%;
  font-family: 'Inter';
  font-weight: 500; /* Médium */
  line-height: 1.1;
  margin-top: 25vh;
}
.hero-title span { color: #e8e8f0; 
  font-weight: 600; 
}
.hero-sub {
  color: white; 
  font-size: 1.4rem;
  max-width: 480px; 
  margin-top: 25rem;
  text-align: left;
  margin-left: 30px;
}
.hero-sub2 {
  color: white; font-size: 1.4rem;
  max-width: 480px; margin-top: 40rem;
  margin-left: 67%; text-align: left; 
}
.hero-sub2 span {
  color: limegreen;
}
.hero-sub3 {
  color: white; font-size: 1.4rem;
  max-width: 480px; margin-top: 50rem;
  text-align: left; margin-left:30px;
}
.hero-sub3 span {
  color: limegreen;
}
.hero-sub4 {
  color: white; font-size: 1.4rem;
  max-width: 480px; margin-top: 95vh;
  margin-left: 67%; text-align: left;
}
.hero-sub5 {
  color: white; font-size: 1.4rem;
  max-width: 480px; margin-top: 90vh;
  text-align: left;margin-left: 30px;
}
.hero-sub6 {
  color: white; font-size: 1.4rem;
  max-width: 480px; margin-top: 85vh;
  margin-left: 67%; text-align: left;
}
.hero-sub7 {
  color: white; 
  font-size: clamp(3rem, 5vw, 4rem); /* Responsive */
  font-weight: 700;
  max-width: 600px; 
  margin-top: 70vh;
  text-align: left;
  margin-left: 30px;
  position: relative;
  z-index: 11;
}
.scroll-hint {
  position: absolute; 
  top: 82vh; 
  right: 5%; 
  left: auto;
  transform: none;
  z-index: 10; 
  display: flex; 
  flex-direction: column; 
  align-items: center;
  gap: 0.5rem; 
  color: white; 
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  animation: bounce 2s ease-in-out infinite;
}

/* La barre verticale */
.scroll-hint::after {
  content: ''; 
  width: 2px; 
  height: 40px;
  background: linear-gradient(to bottom, white, transparent);
}


@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}


@media (max-width: 768px) {
  .scroll-hint {
    top: 94vh; 
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    z-index: 20; 
    color: white;
  }
}
/* SECTIONS COMMUNES */
section { padding: 4rem; max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex; margin-top: 50px;
  margin-bottom: 2rem; margin-left: auto;
  padding-bottom: 2.5rem;
}
.section-title { font-size: 5rem; font-weight: 800; letter-spacing: 0.05em; margin-top: -4rem; font-size: var(--fs-title);}

/* QUIZ */

#quiz-section {
  position: relative; z-index: 4; background: #0a0a0f;
  pointer-events: auto; max-width: 100%; padding: 100px; height: 125vh;
}
#quiz-section > * {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: -7rem;
  padding-left: 2rem;
  padding-right: 2rem;
  text-align: center;
}
#quiz-section .section-title {
  position: relative;
  margin-bottom: 9rem;
  font-size: 80px;
  display: block;
  width: 100%; 
  white-space: nowrap;
  text-align: center;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.1;
}
.ref-link {
  color: #4a9eff;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}
.ref-link:hover {
  color: limegreen;
}

.ref-highlight {
  border-color: limegreen !important;
  box-shadow: 0 0 0 2px limegreen;
  transition: box-shadow 0.3s;
}
.terme {
  position: relative;
  color: limegreen;
  text-decoration: underline dotted;
  cursor: help;
}

/* L'infobulle */
.terme::after {
  content: attr(data-def);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c28;
  color: #e8e8f0;
  border: 1px solid limegreen;
  padding: 0.8rem;
  font-size: 0.8rem;
  width: 220px;
  border-radius: 8px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}


.terme:hover::after, 
.terme.active::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .terme::after {
    width: 180px; /* Plus étroit pour mobile */
    bottom: 120%;
  }
}
.quiz-card {
  background: white;
  border: 1px solid var(--border); 
  padding: 2rem;
  position: relative; 
  overflow: hidden; 
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 600px;
  max-width: 600px;
}
.quiz-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;   
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #eee; 
  border-radius: 4px;
  overflow: hidden;
  order: unset; 
}
.progress-bar-wrap {
  order: 2;
  width: 100%;
  height: 8px;
  background: var(--border);
  overflow: hidden;
}
.progress-bar-fill { 
  height: 70%; 
  background: whitesmoke; 
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  width: 0%;
}
.progress-label {
  font-family: 'Inter';
  font-size: 1rem;
  gap: 1rem;
  margin-top: 0rem;
  font-weight: 700;
  color: black;
  text-align: center;
}
.question-text { font-size: 1.1rem; 
  font-weight: 500; 
  line-height: 1.5; 
  align-content: center;
  text-align: center;
  padding: 2rem;
  min-height: 4rem; 
  color: #0a0a0f; 
  font-family: 'inter'; 
  font-size: clamp(1.15rem, 2.5vw, 1rem);
  line-height: 1.4;
}
.quiz-buttons {display: block; 
  padding: 0px;
  align-content: center;
}
#btn-neutre {
    margin-top: 5px;
    display: inline-block; 
}
.btn-vf { 
  border-radius: 6px;
  flex: 1; 
  padding: 0.7rem; 
  border: 1px solid var(--border); 
  background: var(--surface); 
  color: var(--text); 
  font-family: 'inter'; 
  font-size: 1rem; 
  font-weight: 500; 
  cursor: pointer; 
  transition: all 0.2s;
  letter-spacing: 0.02em; 
  width: 250px;
  padding: clamp(0.8rem, 2vw, 0.8rem);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}
.btn-vf:hover:not(:disabled) { 
  border-color: limegreen; 
  background:limegreen;
  transform: translateY(-2px); 
}
.btn-vf.correct { 
  background: rgba(0,212,170,0.15); 
  border-color: limegreen; 
  color: limegreen; }

  .btn-vf.wrong   { 
  background: rgba(255,107,107,0.15); 
  border-color: #e2210c; 
  color:#e2210c; 
}
#btn-neutre {
 gap: 12px;
}

.btn-vf:disabled { cursor: default; }
.feedback-msg { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 6px;  font-size: clamp(1.15rem, 2.5vw, 1rem); line-height: 1.5; display: none; color: #000; }
.feedback-msg.show { display: block; }
.feedback-msg.ok { background: rgb(255, 255, 255); color: limegreen; border: solid 1px limegreen ; }
.feedback-msg.ko { background: rgb(255, 255, 255); border: solid 1px #e2210c ; color: #e2210c; }
.btn-next { display: none; margin-top: 1.5rem; padding: 0.8rem 2rem; background: black; color: #fff; border-radius: 5px; font-family: 'Inter' sans-serif ; font-size: 1rem; font-weight: 500; cursor: pointer; }
.btn-next:hover { 
  opacity: 0.8; 
  border-color: limegreen;  
  background:limegreen;
  transform: translateY(-2px); 
} 
.btn-next.show  { display: inline-block; }
.quiz-result { text-align: center; padding: 2rem 0; display: none; }
.quiz-result.show { display: block; }
.result-score { font-size: 4rem; font-weight: 600; font-family: 'Inter'; color:black; }
.result-label { color: black; margin-top: 0.5rem; font-size: 1rem; font-family: 'Inter'; }
.btn-restart { margin-top: 2rem; padding: 0.75rem 2rem; background: black; border: 1px solid black; color: rgb(255, 255, 255); font-family: 'Inter'; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.btn-restart:hover { background:  rgb(34, 34, 34) ; color: #fff; }

/* BIBLIOTHÈQUE */
#library { background: #0a0a0f;
  position: relative;
  z-index: 4;
  pointer-events: auto; 
}
#library .section-title {
  font-size: clamp(3rem, 7vw, 80px); /* Il commence à rétrécir dès que l'écran diminue */
  white-space: nowrap; 
  margin-left: -12.78%; 
}
@media (max-width: 800px) {
  #library .section-title {
    white-space: normal; 
    margin-left: 0;
    text-align: center;
  }
}
.lib-controls { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.lib-search { flex: 1; min-width: 200px; padding: 0.75rem 1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--sans); font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.lib-search:focus { border-color: limegreen; }
.lib-search::placeholder { color: var(--text-muted); }
.filter-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.lib-grid {
  display: grid;
  /* Desktop par défaut : 3 colonnes */
  grid-template-columns: repeat(3, 1fr); 
  gap: 2rem;
  width: 100%;
}

/* Tablette : on peut passer à 2 colonnes si tu veux une transition douce */
@media (max-width: 1024px) {
  .lib-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Téléphone (Mobile) : 1 seule colonne */
@media (max-width: 600px) {
  .lib-grid {
    grid-template-columns: 1fr; /* Une seule colonne prend toute la largeur */
    gap: 2rem; /* On remet un peu d'espace entre les cartes verticales */
  }

  .ref-card {
    height: auto; /* On laisse la carte s'adapter au contenu */
    min-height: 350px;
    width: 100%;
  }

  .ref-title {
    font-size: 1.3rem; /* On peut même agrandir un peu le titre ici */
  }
}
.ref-title  { font-size: 1.1rem; font-weight: 400; margin-bottom: 0.4rem; line-height: 1.3; color: white; font-family: 'inter'; }
.ref-type { font-size: 0.8rem; font-family: 'Inter'; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; color:var(--text-muted) ; }
.ref-card:hover { border-color: limegreen; transform: translateY(-1px); }

.tag-btn { padding: 0.1rem 0.8rem; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; font-family: var(--sans); }
.tag-btn:hover, .tag-btn.active { border-color: limegreen; color: limegreen; background: rgba(108,99,255,0.1);transform: translateY(-2px); }

.tag-btn[data-filter="livre"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}

.tag-btn[data-filter="livre"]::before {
  content: "";
  display: inline-block;
  width: 33px;  
  height: 33px;
  margin-top: 2px;
  background-image: url("../images/Fichier 25.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="livre"]:hover::before {
  background-image: url("../images/Fichier 26.svg"); 
}
.tag-btn[data-filter="étude"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}
.tag-btn[data-filter="étude"]:hover::before {
  background-image: url("../images/Fichier 36.svg"); 
}
.tag-btn[data-filter="étude"]::before {
  content: "";
  display: inline-block;
  width: 32px;  
  height: 32px;
  background-image: url("../images/Fichier 37.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 5px;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="article"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}
.tag-btn[data-filter="video"]::before {
  content: "";
  display: inline-block;
  width: 30px;  
  height: 30px;
  background-image: url("../images/Fichier 18.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="video"]:hover::before {
  background-image: url("../images/Fichier 20.svg"); 
}
.tag-btn[data-filter="video"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}

.tag-btn[data-filter="article"]::before {
  content: "";
  display: inline-block;
  width: 30px;  
  height: 30px;
  background-image: url("../images/Fichier 32.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="article"]:hover::before {
  background-image: url("../images/Fichier 31.svg"); 
}
.tag-btn[data-filter="site"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}

.tag-btn[data-filter="site"]::before {
  content: "";
  display: inline-block;
  width: 30px;  
  height: 30px;
  background-image: url("../images/Fichier 10.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="site"]:hover::before {
  background-image: url("../images/Fichier 23.svg"); 
}
.tag-btn[data-filter="all"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;     
}

.tag-btn[data-filter="all"]::before {
  content: "";
  display: inline-block;
  width: 28px;  
  height: 28px;
  background-image: url("../images/Fichier 22.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
  background-size: contain;
  margin-right: 0; 
}
.tag-btn[data-filter="all"]:hover::before {
  background-image: url("../images/Fichier 21.svg"); 
}
.ref-card {
  background: black;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 400px; 
}

.ref-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Zone de superposition (Image vs Texte) */
.card-stack {
  position: relative;
  flex-grow: 1;
  margin-top: 1rem;
}

/* L'image qui recouvre tout au début */
.ref-card-img {
  position: absolute;
  object-fit: cover;
  inset: 0;
  z-index: 2;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.ref-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1c1c28 0%, #2a2a3e 50%, #1c1c28 100%);
}

/* Les infos cachées dessous */
.ref-info-under {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* HOVER : L'image disparaît, le texte apparaît */
.ref-card:hover .ref-card-img {
  opacity: 0;
  pointer-events: none;
}

.ref-card:hover .ref-info-under {
  opacity: 1;
}
#back-to-quiz {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.8rem;
    background-color: limegreen; 
    font-family: 'Inter', sans-serif;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: none; 
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    animation: pulse-border 1.5s infinite; /* Animation de clignotement */
}

#back-to-quiz:hover {
    transform: scale(1.1);
    background-color: limegreen;
}
@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 limegreen; }
    70% { box-shadow: 0 0 0 15px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}
/* Styles des textes */
.ref-author { font-size: 1rem; color: limegreen; margin-bottom: 0.5rem; font-weight: bold; }
.ref-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }
.lib-empty  { text-align: center; color: var(--text-muted); padding: 3rem; display: none; font-family: var(--mono); font-size: 0.85rem; }

/* FOOTER */
footer { border-top: 1px solid var(--border); background: var(--bg); text-align: center; padding: 2rem; color: var(--text-muted); font-size: 1rem; font-family: 'Inter'; position: relative; z-index: 4 ; }
footer span {
  color: limegreen;
} 


.footer-link {
  color: limegreen; 
  text-decoration: none;
  border-bottom: 1px solid transparent; /* Prépare le trait de soulignement */
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: limegreen; /* Rappel de ton vert au survol */
  border-bottom: 1px solid limegreen;
}


@media (max-width: 1268px) {html { zoom: 0.88; }}
@media (max-width: 768px)  { html { zoom: 0.82; } }
/* Amélioration pour le tactile */
@media (max-width: 1024px) {
  /* On rend le texte un peu plus visible par défaut ou on simplifie l'overlay */
  .ref-card-img {
    transition: opacity 0.2s;
  }
  
  /* Optionnel : on peut choisir d'afficher les infos directement sur mobile 
     pour éviter que l'utilisateur doive cliquer pour voir le titre */
  .ref-card:active .ref-card-img {
    opacity: 0;
  }
}
/* Garde ton hover actuel pour le PC */
@media (min-width: 1025px) {
  .ref-card:hover .ref-card-img { opacity: 0; pointer-events: none; }
  .ref-card:hover .ref-info-under { opacity: 1; }
}

/* Spécifique au Mobile */
@media (max-width: 1024px) {
  .ref-card-img {
    transition: opacity 0.4s ease;
    z-index: 2;
  }
  
  .ref-info-under {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  /* Quand la carte est "activée" au premier clic */
  .ref-card.active .ref-card-img {
    opacity: 0;
    pointer-events: none;
  }

  .ref-card.active .ref-info-under {
    opacity: 1;
  }
}
@media (max-width: 700px) {
  #library .section-title {
    /* On réduit la taille pour que ça respire */
    font-size: clamp(2.5rem, 10vw, 3.5rem); 
    
    /* On autorise le retour à la ligne proprement */
    white-space: normal; 
    
    /* On retire les marges négatives qui décalent tout sur mobile */
    margin-left: 0; 
    margin-top: 2rem;
    margin-bottom: 2rem;
    
    /* On centre pour l'équilibre visuel sur téléphone */
    text-align: center;
    line-height: 1.1;
    width: 100%;
    letter-spacing: normal;
  }

  .section-header {
    /* On s'assure que le conteneur ne force pas de marges bizarres */
    margin-left: 0;
    padding-bottom: 1rem;
    justify-content: center;
    .filter-tags {
    justify-content: center; /* Centre les icônes */
    gap: 0.5rem;
    width: 100%;
  }

  .lib-controls {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  }
}
@media (max-width: 1100px) {
  #library .section-title {
    white-space: normal; 
    margin-left: 0;
    text-align: center;
    width: 100%;
  }
}
/* Uniquement pour les écrans de téléphone et tablette */
@media (max-width: 700px) {
    
    #quiz-section {
        /* On remet 100vh pour que la section occupe tout l'écran noir */
        min-height: 100vh; 
        display: flex;
        flex-direction: column;
        /* On aligne vers le haut (flex-start) au lieu du centre */
        justify-content: flex-start; 
        align-items: center;
        /* Un peu de padding en haut pour le titre */
        padding: 40px ; 
        margin: 0;
        position: relative;
        z-index: 10;
        /* Empêche le scroll de la page entière pendant le quiz */
        overflow: hidden; 
    }

    #quiz-section .section-title {
        font-size: clamp(2.5rem, 10vw, 3rem);
        /* On réduit la marge sous le titre pour remonter la carte */
        margin-top: 50px;
        white-space: normal;
        text-align: center;
    }

    .quiz-card {
        width: 100%;
        max-width: 100%;
        /* On supprime ton margin-top de 50px qui poussait la carte trop bas */
        margin-top: -60px; 
        display: flex;
        max-height: none!important;
        overflow-y: auto; 
        flex-direction: column;
        padding: 1rem !important; 
    }

    .quiz-buttons {
        display: flex !important;
        
        gap: 12px !important; /* Un gap un peu plus serré pour gagner de la place */
        margin-top: 0px;
    }

    .btn-vf {
        width: 100% !important;
        margin: 0 !important;
        display: block;
        height: 45px !important; /* Boutons légèrement moins hauts */
    }
.btn-next {
        /* On plaque le bouton en bas de la carte ou juste en dessous */
        margin-top: 12px !important;
        padding: 10px !important;
    }
    /* Optionnel : si tu as un feedback, on s'assure qu'il ne pousse pas tout dehors */
    #feedback {
        margin-top: 12px;
        line-height: 1.2;
    }



    
}
@media (max-width: 500px) {
  .quiz-buttons {
    flex-direction: column !important; 
  }

  .btn-vf {
    width: 100% !important;
  }
  
  #quiz-section .section-title {
    font-size: 2rem; 
  }
}
@media (max-width: 768px) {
  #canvas-3d {
    width: 125vw !important;  
    height: 125vh !important; 
    bottom: -10px;
    left: 49%;
    transform: translateX(-50%);
    height: 100dvh;
  }
 
  }
@media (max-width: 768px) {
    .hero-sub, .hero-sub2, .hero-sub3, .hero-sub4, .hero-sub5, .hero-sub6 {
      margin-top: 100vh;
        margin-left: 20px !important;
        margin-right: 20px !important;
        max-width: 90%;
        text-align: left;
        font-size: 1.1rem !important;
        background-color: #000;
        padding: 10px;
        border: 1px solid white;
    }
    .hero-content { 
  position: relative; 
  z-index: 10; 
  text-align: center; 
  pointer-events: none; 
}
.hero-title {
  font-family: var(--sans);
  font-size: 22px;
  margin-left: 55%;
  font-family: 'Inter';
  width: 200px;
  font-weight: 500; /* Médium */
  line-height: 1.1;
  margin-top: 5vh;
}
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px;
}
.ref-title {
    font-size: 1.2rem;
  }
.ref-author { font-size: 1.15rem; color: limegreen; margin-bottom: 0.5rem; font-weight: bold; }
.ref-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.4; }
.btn-next { display: none; margin-top: 1.5rem; padding: 0.8rem 2rem; background: black; color: #fff; border-radius: 5px; font-family: 'Inter' sans-serif ; font-size: 1rem; font-weight: 500; cursor: pointer; }
}
@media (min-width: 769px) and (max-width: 1250px) {
  #canvas-3d {
    width: 125vw !important;  
    height: 125vh !important; 
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (max-height: 500px) and (orientation: landscape) {
   

    .hero-content {
        z-index: 0 !important; /* On descend le texte sous le modèle */
    }

  
    
}
@media (max-width: 768px) {
  /* Cible le conteneur direct du texte qui contient le terme */
  #question-text {
    /* Ces propriétés aident à "aplatir" le contexte d'empilement */
    transform: none !important;
    perspective: none !important;
    transform-style: flat !important;
    position: relative;
    z-index: 1; /* Crée un nouveau contexte de base */
  }

  .terme::after {
    /* Garde ton code existant ici... */
    z-index: 99999 !important; /* Force le z-index au maximum */
  }
}
@media (max-width: 768px) {
  /* On autorise les éléments à sortir de la carte blanche */
  .quiz-card, #quiz-body, .quiz-body {
    overflow: visible !important;
  }
}