body {
  font-family: "Lora", sans-serif;
  font-size: 1.1rem;
  background-image: url(../img/fond.jpg);
  background-size: cover;
  position: relative;
  z-index: 1;
  
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/fond.jpg);
  background-size: cover;
  background-position: center;
  filter: blur(5px);
  z-index: -1;
}

footer,
nav {
  background-color: #cccccc;
  font-family: "poppins", sans-serif;
}

nav a:hover {
  color: #1a62ff !important;
  transition: 0.2s linear;
}

ol li,
.complement-shortcuts li {
  font-size: 1.1rem;
  font-weight: bold;
}

p {
  font-size: 1.1rem;
  font-weight: bold;
}

.asideText{
  width: 100%;
}

/* TABLEAUX */
table > tbody > tr > td:nth-child(2) {
  width: 24%;
  text-align: left;
}

table > tbody > tr > td:nth-child(1) {
  text-align: center; /* Centre le texte */
}
table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 900px;
}
tr > th:nth-of-type(1) {
  width: 1%;
}

.score-table {
  width: 50%; /* Réduction de la largeur */
  margin: auto;
}
.score-table th,
.score-table td {
  padding: 8px;
  text-align: center;
}
.score-column {
  width: 120px; /* Ajustement pour accueillir "00:00:000" */
}
.gold td {
  background-color: #ffd700 !important;
  font-weight: bold;
} /* 🥇 Or */
.silver td {
  background-color: #c0c0c0 !important;
  font-weight: bold;
} /* 🥈 Argent */
.bronze td {
  background-color: #cd7f32 !important;
  font-weight: bold;
} /* 🥉 Bronze */

/* EXERCICES */
.editor {
  border: 1px solid #ccc;
  margin-bottom: 20px;
  width: 100%;
  height: 150px;
}

.message {
  color: green;
  font-weight: bold;
  margin-bottom: 20px;
}

.fullscreen-slide {
  height: 100vh;
  width: 70vw;
  scroll-snap-align: start;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}




/* CHRONO */

.chrono {
  position: fixed;
  top: 5% !important;
  left: 50% !important;
  width: 11%;
  padding: 0.6rem;
  background: #f8f9fa;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.chrono p {
  font-size: 1.5rem;
  margin: 0;
}

.chrono button {
  font-size: 0.5rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1,
h2 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
}

.mobile-warning {
  display: none;
  text-align: center;
  padding: 20px;
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 1.2rem;
}
body.dark-mode .mobile-warning {
  color: rgb(255, 255, 255);
}

/* Cibler les téléphones en portrait */
@media screen and (max-width: 767px) and (orientation: portrait) {
  #logo,
  .fullscreen-slide,
  .chrono,
  .editor,
  .exercise-container,
  .navigation-buttons {
    display: none !important;
  }
  .mobile-warning {
    display: block;
  }
}

/* Cibler uniquement les téléphones en paysage */
@media screen and (max-width: 767px) and (orientation: landscape) {
  #logo,
  .fullscreen-slide,
  .chrono,
  .editor,
  .exercise-container,
  .navigation-buttons {
    display: none !important;
  }
  .mobile-warning {
    display: block;
  }
}



/* Espacement et modernisation */
.navbar-nav {
  gap: 20px;
}

/* Liens du menu */
.nav-link {
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s ease-in-out;
}

.nav-link:hover {
  color: #ff4b5c;
}

/* Bonjour et Déconnexion */
.bonjour-container {
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
  min-width: 260px;
}

/* Bouton Déconnexion moderne */
.logout-btn {
  background: #ff4b5c;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  transition: 0.3s ease-in-out;
}

.logout-btn:hover {
  background: #d63447;
  transform: scale(1.05);
}









/* DARK MODE */
body.dark-mode::before {
  background-image: url("../img/fondNoir.png");
}

.dark-mode {
  background-image: url("../img/fondNoir.png");
}

body.dark-mode {
  background-color: #181a1b; /* Bleu nuit */
  color: white;
}
body.dark-mode aside {
  color: black;
}
body.dark-mode footer {
  color: black;
}

body.dark-mode .btn-darkmode {
  background-color: gray;
}

body.dark-mode nav,
body.dark-mode footer {
  background-color: gray;
  color: white;
}

body.dark-mode .navbar-nav a {
  color: white !important;
}

body.dark-mode .navbar-nav a:hover {
  color: #1a62ff !important;
}

body.dark-mode .card-form,
body.dark-mode .card {
  background-color: rgb(194, 194, 194);
}

body.dark-mode .chrono {
  color: white;
  background-color: gray;
}

body.dark-mode .card-body .card-body {
  background: white;
}
body.dark-mode .error404 {
  color: white !important;
}

body.dark-mode .text-muted {
  color: rgb(0, 0, 0) !important;
}
body.dark-mode .show {
  background-color: gray;
}
body.dark-mode #intro-title, #intro-para, #question, #choices, #question-number {
  color: rgb(0, 0, 0);
}

body.dark-mode .card-title{
  color: rgb(0, 0, 0);
}

body.dark-mode #quiz-container{
  background-color: gray;
}

/* Bouton mode sombre avec bascule fluide */
.toggleDarkMode {
  position: relative;
  display: inline-block;
  width: 75px;
  height: 36px;
  background: rgb(0, 0, 0);
  font-size: 1.4rem;
  border-radius: 18px;
  border: 2px solid white;
  cursor: pointer;
  transition: background 0.3s ease-in-out, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
}

/* Icône lune sans fond blanc */
.toggleDarkMode::before {
  content: "🌙";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease-in-out;
  transform: translateY(-50%);
}

.dark-mode .toggleDarkMode {
  background: rgb(0, 0, 0);
  border-color: #ffffff;
}

.dark-mode .toggleDarkMode::before {
  content: "🔆";
  transform: translateX(38px) translateY(-50%);
  background: transparent;
}

/* Alignement vertical du mode sombre avec les liens */
.navbar-nav .toggleDarkMode {
  align-self: center;
}
