/* ------------------------------
   STYLE GLOBAL
--------------------------------*/
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #eef2f7;
  color: #333;
}

/* Wrapper pour gérer le footer (le filigrane en image de fond a été retiré : aspect plus sobre) */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ------------------------------
   MAIN GLOBAL
--------------------------------*/
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0;
}

/* ------------------------------
   PAGE DE CONNEXION (nouvelle version)
--------------------------------*/
.login-container {
  max-width: 420px;
  margin: 60px auto;
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.login-container h2 {
  text-align: center;
  color: #443A31;
  font-size: 24px;
  margin-bottom: 20px;
}

.login-container label {
  font-weight: 600;
  color: #443A31;
}

.login-container input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  margin-bottom: 18px;
}

.login-container button {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: #443A31;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

.login-container button:hover {
  background: #009DE0;
}

.login-container .forgot {
  display: block;
  margin-top: 12px;
  text-align: left;
  color: #443A31;
  font-size: 14px;
  text-decoration: none;
}

.login-container .forgot:hover {
  text-decoration: underline;
}


/* ------------------------------
   HEADER
--------------------------------*/
header {
  background: #443A31;
  color: white;
  padding: 45px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

header h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
}

header p {
  margin-top: 12px;
  font-size: 18px;
  opacity: 0.9;
}

/* ------------------------------
   MENU HORIZONTAL
--------------------------------*/
.menu-horizontal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background: #443A31;
  height: 55px;
  padding: 0 20px;
}

.menu-item {
  position: relative;
  white-space: nowrap;
  height: 55px;
  display: flex;
  align-items: center;
}

.menu-item > span {
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.menu-item > span:hover {
  text-decoration: underline;
}

/* ------------------------------
   SOUS-MENU
--------------------------------*/
.submenu {
  display: none;
  position: absolute;
  top: 55px;
  left: 0;
  background: white;
  padding: 10px 0;
  min-width: 220px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

.menu-item.open .submenu {
  display: block;
}

.submenu a,
.submenu span {
  display: block;
  padding: 10px 15px;
  font-size: 15px;
  color: #443A31;
  text-decoration: none;
}

.submenu a:hover {
  background: #e8eef7;
}

/* ------------------------------
   FOOTER
--------------------------------*/
footer {
  text-align: center;
  padding: 15px;
  background: #443A31;
  color: white;
  margin-top: auto;
}

/* ------------------------------
   CROIX DE FERMETURE
--------------------------------*/
.close-wrapper {
  max-width: 1100px;
  margin: 20px auto 0 auto;
  display: flex;
  justify-content: flex-end;
}

.close-btn {
  font-size: 28px;
  color: #443A31;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #009DE0;
}

/* ------------------------------
   CARTE LARGE TRANSPARENTE
--------------------------------*/
.card-large {
  max-width: 1100px;
  margin: 20px auto;
  background: transparent;
  padding: 25px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.15);
}

.card-large h2 {
  font-size: 26px;
  margin-bottom: 20px;
  color: #443A31;
}

.card-large form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-large label {
  font-size: 16px;
  font-weight: 600;
  color: #443A31;
}

.card-large input,
.card-large select {
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.card-large button {
  padding: 12px 24px;
  font-size: 16px;
  background: #443A31;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.card-large button:hover {
  background: #009DE0;
}

/* ------------------------------
   RESPONSIVE MOBILE
--------------------------------*/
@media (max-width: 768px) {

  main {
    max-width: 95%;
  }

  .close-wrapper {
    max-width: 95%;
  }

  .card-large {
    padding: 20px;
  }

  .close-btn {
    font-size: 24px;
  }

  .menu-horizontal {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
    height: auto;
  }

  .menu-item {
    height: auto;
    display: block;
  }

  .menu-item > span {
    background: #443A31;
    padding: 12px;
    border-radius: 6px;
    display: block;
    width: 100%;
  }

  .submenu {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
    margin-top: 0;
    padding: 10px 0;
  }

  .submenu a,
  .submenu span {
    padding: 10px 12px;
    font-size: 15px;
    display: block;
    width: 100%;
  }
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h2 {
  margin: 0;
  font-size: 26px;
  color: #443A31;
}

.close-btn {
  font-size: 28px;
  color: #443A31;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #009DE0;
}
/* ------------------------------
   PAGE DE CONNEXION (fix)
--------------------------------*/
main {
  max-width: 450px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

main h2 {
  color: #443A31;
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

main label {
  font-weight: 600;
  color: #443A31;
  display: block;
  margin-bottom: 10px;
}

main input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  margin-bottom: 18px;
}

main button {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: #443A31;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

main button:hover {
  background: #009DE0;
}

main a {
  color: #443A31;
  font-size: 14px;
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}
/* Correction œil mot de passe – version robuste */
.password-container {
  position: relative;
  width: 100%;
}

.password-container input {
  width: 100%;
  padding-right: 42px !important; /* espace réservé pour l’œil */
  box-sizing: border-box;
}

.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  color: #443A31;
  line-height: 1;
  user-select: none;
}

/* ------------------------------
   MENU RESPONSIVE (ajout du 14/10/2026)
--------------------------------*/
.menu-burger {
  display: none;
}

.bouton-desactive {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Écrans moyens (portables) : menu resserré, sur deux lignes si besoin */
@media (min-width: 1101px) and (max-width: 1699px) {
  .menu-horizontal {
    gap: 6px 24px;
    height: auto;
    min-height: 55px;
    flex-wrap: wrap;
  }

  .menu-item > span {
    font-size: 16px;
  }
}

/* Tablettes et téléphones : un bouton ☰ déplie le menu */
@media (max-width: 1100px) {
  .menu-horizontal {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    padding: 0;
  }

  .menu-burger {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: #443A31;
    color: white;
    border: none;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
  }

  .menu-horizontal .menu-item {
    display: none;
    height: auto;
  }

  .menu-horizontal.menu-ouvert .menu-item {
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .menu-item > span {
    display: block;
    width: auto;
    padding: 14px 20px;
    font-size: 17px;
    background: transparent;
    border-radius: 0;
  }

  .submenu {
    position: static;
    min-width: 0;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0;
    background: #f3f6fb;
  }

  .submenu a,
  .submenu span {
    box-sizing: border-box;
    width: auto;
    padding: 12px 20px 12px 34px;
  }
}



/* ==============================
   PAGE SUIVI DES ÉTUDIANTS (tableau_examinateur.php)
   Toutes les règles sont préfixées .page-suivi pour ne pas
   toucher aux autres pages.
================================ */
.page-suivi {
  font-family: Arial, sans-serif;
  padding: 30px;
}

.page-suivi h1 {
  color: #443A31;
}

.page-suivi .bouton-retour {
  display: inline-block;
  background: #443A31;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  margin-bottom: 20px;
}

.page-suivi .choix-session {
  display: inline-block;
}

.page-suivi .choix-session label {
  font-size: 18px;
  font-weight: bold;
  margin-right: 10px;
}

.page-suivi .choix-session select {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px;
}

.page-suivi .nb-etudiants {
  margin-left: 15px;
  font-size: 18px;
}

/* Permet de faire défiler le tableau sur petit écran */
.page-suivi .tableau-defilant {
  overflow-x: auto;
}

.page-suivi table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  table-layout: fixed;
}

.page-suivi th,
.page-suivi td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Largeurs fixes des colonnes */
.page-suivi th:nth-child(1), .page-suivi td:nth-child(1) { width: 18%; } /* Nom */
.page-suivi th:nth-child(2), .page-suivi td:nth-child(2) { width: 18%; } /* Prénom */
.page-suivi th:nth-child(3), .page-suivi td:nth-child(3) { width: 22%; } /* État */
.page-suivi th:nth-child(4), .page-suivi td:nth-child(4) { width: 14%; } /* Progression */
.page-suivi th:nth-child(5), .page-suivi td:nth-child(5) { width: 28%; text-align: center; } /* Action */

.page-suivi th {
  background: #443A31;
  color: white;
}

/* Couleurs des états */
.page-suivi .etat-en-cours { color: #1565c0; font-weight: bold; }
.page-suivi .etat-bloque { color: #c62828; font-weight: bold; }
.page-suivi .etat-termine { color: #2e7d32; font-weight: bold; }
.page-suivi .etat-pas-commence { color: #757575; }

/* Formulaire de déblocage */
.page-suivi .form-debloquer {
  display: inline;
}

.page-suivi .form-debloquer input[type="number"] {
  width: 120px;
  padding: 5px;
  margin-right: 5px;
}

.page-suivi button {
  padding: 6px 12px;
  background: #443A31;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.page-suivi button:hover {
  background: #009DE0;
}


/* ==============================
   MODIFIER / SUPPRIMER UNE MATIÈRE (modifier_matiere.php)
================================ */
.liste-edition {
  margin-top: 20px;
}

.ligne-edition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 0;
  border-bottom: 1px solid #dde3ec;
}

.ligne-edition .form-renommer {
  display: flex;
  flex: 1 1 280px;
  gap: 8px;
  margin: 0;
}

.ligne-edition .form-renommer input[type="text"] {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: 0;
}

.ligne-edition .form-renommer input[readonly] {
  background: #f0f2f5;
  color: #666;
}

.ligne-edition .form-supprimer {
  margin: 0;
}

.ligne-edition button {
  padding: 8px 14px;
  background: #443A31;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.ligne-edition button:hover {
  background: #009DE0;
}

.ligne-edition .btn-supprimer {
  background: #c62828;
}

.ligne-edition .btn-supprimer:hover {
  background: #8e1c1c;
}

.info-themes {
  color: #555;
  min-width: 70px;
}

.badge-protege {
  color: #757575;
  font-size: 14px;
}

.aide-edition {
  margin-top: 20px;
  font-size: 14px;
  color: #555;
}


/* ==============================
   TYPES DE QCM (ajouter_matiere.php / modifier_matiere.php)
================================ */
.titre-type {
  margin: 28px 0 0;
  color: #443A31;
  font-size: 18px;
  border-bottom: 2px solid #009DE0;
  padding-bottom: 6px;
}

.card-large .choix-type {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
}

.ligne-edition .form-renommer {
  flex-wrap: wrap;
}

.ligne-edition .form-renommer select {
  flex: 0 1 190px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
}

.ligne-edition .form-renommer select:disabled {
  background: #f0f2f5;
  color: #666;
}


/* Choix du type de QCM en haut de modifier_matiere.php */
.selecteur-type {
  margin-top: 20px;
}

.selecteur-type label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.selecteur-type .choix-type {
  max-width: 420px;
}


/* Espacement des deux listes (type de QCM, matière) des pages thèmes */
.selecteur-type .champ {
  margin-bottom: 14px;
}


/* ==============================
   FORMULAIRE DE QUESTION (ajouter_question.php)
================================ */
.form-question {
  margin-top: 20px;
}

.form-question label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

.form-question input[type="text"],
.card-large .zone-texte {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: inherit;
}

.form-question button {
  margin-top: 25px;
  padding: 12px 24px;
  background: #443A31;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-transform: uppercase;
  cursor: pointer;
}

.form-question button:hover {
  background: #009DE0;
}


/* ==============================
   LISTE DES QUESTIONS (modifier_question.php)
================================ */
.card-large .lien-bouton,
.lien-bouton {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  background: #443A31;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.lien-bouton:hover {
  background: #009DE0;
}

.defile-x {
  overflow-x: auto;
  margin-top: 15px;
}

.table-questions {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}

.table-questions th,
.table-questions td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.table-questions th {
  background: #443A31;
  color: white;
}

.table-questions td.action {
  white-space: nowrap;
}

.table-questions .lien-modifier {
  display: inline-block;
  background: #009DE0;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.table-questions .lien-modifier:hover {
  background: #007bb5;
}

.table-questions .form-ligne {
  display: inline;
  margin: 0;
}

.table-questions .btn-icone {
  background: #c62828;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
}

.table-questions .btn-icone:hover {
  background: #8e1c1c;
}


/* ==============================
   IMPORT DES CANDIDATS (import_candidats.php)
================================ */
.form-import {
  margin-top: 20px;
}

.form-import label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

.form-import input[type="file"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: white;
}

.form-import button {
  margin-top: 25px;
  padding: 12px 24px;
  background: #443A31;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-transform: uppercase;
  cursor: pointer;
}

.form-import button:hover {
  background: #009DE0;
}

.rapport-import {
  margin-top: 15px;
  padding: 12px 16px;
  background: #fff6e5;
  border: 1px solid #f0c36d;
  border-radius: 6px;
  font-size: 14px;
}

.rapport-import ul {
  margin: 8px 0 0;
  padding-left: 20px;
}


/* ==============================
   LISTE DES CANDIDATS (afficher_candidats.php)
================================ */
.table-candidats {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}

.table-candidats th,
.table-candidats td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.table-candidats th {
  background: #443A31;
  color: white;
  cursor: pointer;
  white-space: nowrap;
}

.table-candidats th:hover {
  background: #004080;
}

.table-candidats th.sorted-asc::after {
  content: " ↑";
}

.table-candidats th.sorted-desc::after {
  content: " ↓";
}


/* ==============================
   RECHERCHE ET COPIE D'UN CANDIDAT
   (afficher_candidats.php / copie_candidat.php)
================================ */
.recherche-dossier {
  margin-top: 20px;
}

.recherche-dossier label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.recherche-dossier .ligne-recherche {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.recherche-dossier input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.recherche-dossier button {
  padding: 10px 20px;
  background: #443A31;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.recherche-dossier button:hover {
  background: #009DE0;
}

.recherche-dossier .lien-effacer {
  color: #443A31;
}

.table-candidats a {
  color: #443A31;
  font-weight: bold;
}

.fiche-candidat {
  margin-top: 10px;
  padding: 12px 16px;
  background: #f3f6fb;
  border-radius: 6px;
}

.fiche-candidat p {
  margin: 4px 0;
}

.fiche-candidat .nom-candidat {
  font-size: 22px;
  font-weight: bold;
  color: #443A31;
}

.score-copie {
  margin-top: 15px;
  padding: 12px 16px;
  background: #eef7ee;
  border: 1px solid #b7dbb7;
  border-radius: 6px;
}

.score-copie .score-total {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: bold;
}

.score-copie .score-total span {
  font-size: 14px;
  font-weight: normal;
  color: #555;
}

.score-copie ul {
  margin: 0;
  padding-left: 20px;
}

.question-copie {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-left-width: 6px;
  border-radius: 6px;
  background: white;
  page-break-inside: avoid;
}

.question-copie.copie-juste { border-left-color: #2e7d32; }
.question-copie.copie-fausse { border-left-color: #c62828; }
.question-copie.copie-vide { border-left-color: #9e9e9e; }

.question-copie .entete-question {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 6px;
}

.question-copie .theme-question {
  color: #666;
  font-size: 14px;
}

.question-copie .verdict {
  margin-left: auto;
  font-weight: bold;
}

.question-copie .intitule-copie {
  margin: 6px 0 10px;
  font-weight: bold;
}

.choix-copie {
  list-style: none;
  margin: 0;
  padding: 0;
}

.choix-copie li {
  padding: 6px 10px;
  margin-bottom: 4px;
  border: 1px solid #e3e3e3;
  border-radius: 5px;
}

.choix-copie li.choix-bonne {
  background: #e6f4e6;
  border-color: #8bc48b;
}

.choix-copie li.choix-candidat:not(.choix-bonne) {
  background: #fdeaea;
  border-color: #e39a9a;
}

.choix-copie .etiquette {
  margin-left: 10px;
  font-size: 13px;
  color: #444;
}

@media print {
  .no-print,
  nav.menu-horizontal,
  .menu-burger {
    display: none !important;
  }
}

button.lien-bouton {
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

/* ==============================
   LISTE DE PRÉSENCE (liste_presence.php)
================================ */
.liste-presence {
  margin-top: 20px;
}

.liste-presence h3 {
  margin: 0 0 6px;
  color: #443A31;
}

.liste-presence .entete-presence {
  margin: 0 0 10px;
  line-height: 1.8;
}

.table-presence {
  width: 100%;
  border-collapse: collapse;
}

.table-presence th,
.table-presence td {
  border: 1px solid #999;
  padding: 6px 8px;
  text-align: left;
}

.table-presence th {
  background: #443A31;
  color: white;
}

.table-presence tbody tr {
  height: 34px;
  page-break-inside: avoid;
}

.table-presence td:last-child {
  width: 30%;
}

@media print {
  .liste-presence {
    page-break-after: always;
  }

  .liste-presence:last-child {
    page-break-after: auto;
  }

  .table-presence th {
    background: #ddd !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
  }
}

/* ==============================
   STATISTIQUES (statistiques.php)
================================ */
.page-stats .chiffres-cles {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

.page-stats .chiffre {
  flex: 1 1 180px;
  padding: 12px 16px;
  background: #f3f6fb;
  border-radius: 8px;
}

.page-stats .chiffre .valeur {
  font-size: 28px;
  font-weight: bold;
  color: #443A31;
}

.page-stats .chiffre .libelle {
  font-size: 14px;
  color: #555;
}

.page-stats .table-stats {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.page-stats .table-stats th,
.page-stats .table-stats td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.page-stats .table-stats th {
  background: #443A31;
  color: white;
}

.page-stats .bad { color: #cc0000; font-weight: bold; }
.page-stats .medium { color: #e69500; font-weight: bold; }
.page-stats .good { color: #009900; font-weight: bold; }

/* Fonds par matière (3 teintes) et alternance par thème */
.page-stats tr.m0.p0 { background: #eef3fb; }
.page-stats tr.m0.p1 { background: #f7f9fd; }
.page-stats tr.m1.p0 { background: #e9f7ef; }
.page-stats tr.m1.p1 { background: #f4fbf7; }
.page-stats tr.m2.p0 { background: #f4ecfa; }
.page-stats tr.m2.p1 { background: #faf6fd; }

.page-stats .table-stats-questions {
  min-width: 1000px;
  font-size: 14px;
}

.page-stats .table-stats-questions .question { font-weight: 600; }
.page-stats .table-stats-questions .reponses { font-size: 13px; line-height: 1.4; }
.page-stats .table-stats-questions .bonne-reponse { color: #006600; font-weight: bold; }
.page-stats .table-stats-questions td.taux { text-align: center; }

/* ==============================
   MON COMPTE (mon_compte.php)
================================ */
.form-compte {
  max-width: 480px;
}

.form-compte label {
  display: block;
  margin: 15px 0 5px;
  font-weight: bold;
}

.form-compte input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form-compte button {
  margin-top: 20px;
  padding: 12px 24px;
  background: #443A31;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.form-compte button:hover {
  background: #009DE0;
}

/* ==============================
   COMPOSER UN QCM (étape 2)
================================ */
.page-composer .total-global {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 15px 0;
  padding: 10px 14px;
  background: #f3f6fb;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
}

.page-composer .ok { color: #2e7d32; font-weight: bold; }
.page-composer .ko { color: #c62828; font-weight: bold; }

.page-composer .table-composer {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.page-composer .table-composer th,
.page-composer .table-composer td {
  padding: 8px;
  border: 1px solid #ccc;
  text-align: center;
}

.page-composer .table-composer th {
  background: #e0e6ef;
}

.page-composer .table-composer td.nom-theme {
  text-align: left;
}

.page-composer .table-composer input[type="number"] {
  width: 70px;
  padding: 4px;
}

.page-composer .cellule-niveau {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-composer .cellule-niveau .dispo {
  font-size: 12px;
  color: #666;
}

.page-composer .total-theme {
  font-weight: bold;
}

.page-composer .total-matiere {
  margin: 6px 0 20px;
  text-align: right;
}

.page-composer .bouton-composer {
  margin-top: 10px;
  padding: 12px 24px;
  background: #443A31;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.page-composer .bouton-composer:hover {
  background: #009DE0;
}

.page-composer .portee-generation {
  margin: 15px 0;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.page-composer .portee-generation legend {
  font-weight: bold;
  padding: 0 6px;
}

.page-composer .portee-generation label {
  display: block;
  margin: 8px 0;
}

.page-composer .portee-generation .sous-option {
  margin-left: 24px;
  font-size: 14px;
  color: #555;
}

/* ===== Composer le modèle : étape 1 (liste des matières) ===== */
.page-composer .liste-matieres label {
  display: block;
  margin: 8px 0;
}

.page-composer .liste-matieres input[type="checkbox"] {
  margin-right: 8px;
}

/* =====================================================
   CHARTE GRAPHIQUE IUT DE BORDEAUX
   Cyan #009DE0 · Marron #443A31 · Titres Brix Slab · Texte Arial
   (ce bloc doit rester en fin de fichier)
===================================================== */
:root {
  --iut-cyan: #009DE0;
  --iut-marron: #443A31;
  --iut-police-titres: 'Brix Slab', 'Rockwell', 'Roboto Slab', Georgia, serif;
}

/* Titres : police à empattements */
h1, h2, h3,
header h1,
.card-header h2,
.titre-type,
.submenu-title,
.login-container h2 {
  font-family: var(--iut-police-titres);
}

/* En-tête : aplat cyan au bord oblique, texte blanc */
header {
  background: var(--iut-cyan);
  color: #fff;
  box-shadow: none;
  padding: 40px 20px 60px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), 0 100%);
}

header p {
  opacity: 1;
}

/* Barre de menu et pied de page : marron de la charte */
.menu-horizontal,
footer {
  background: var(--iut-marron);
}

/* Survol des menus : cyan */
.submenu a:hover {
  background: #e6f5fc;
  color: var(--iut-marron);
}

/* Messages : liseré cyan à gauche */
.message {
  border-left: 5px solid var(--iut-cyan);
}

@media print {
  header,
  .menu-horizontal,
  footer {
    clip-path: none;
  }
}
/* Suivi des candidats : le tableau est dans la carte, sans marge supplémentaire */
.card-large .page-suivi {
  padding: 0;
}
/* ==============================
   LISTE DES CANDIDATS : page plus large, toutes les colonnes visibles
================================ */
.page-liste .card-large {
  width: 96%;
  max-width: 1500px;
}

.page-liste .table-candidats {
  min-width: 0;
  font-size: 13px;
}

.page-liste .table-candidats th,
.page-liste .table-candidats td {
  padding: 6px 8px;
}

.page-liste .table-candidats td {
  word-break: break-word;
}

.table-candidats th:hover {
  background: #009DE0;
}


/* ============================================================
   PAGES DE L'ORAL (préparation, jurys, saisie, résultats, planning)
   Bloc UNIQUE à coller à la FIN de style.css.
   S'il existe déjà des blocs « oral » collés auparavant, supprimez-les
   et gardez seulement celui-ci.
   ============================================================ */

/* ---------- Page « notes possibles » (preparer_oral.php) ---------- */
.page-oral-prep .table-notes-oral { width: 100%; border-collapse: collapse; margin-top: 10px; }
.page-oral-prep .table-notes-oral th,
.page-oral-prep .table-notes-oral td { padding: 6px 8px; border: 1px solid #ddd; vertical-align: top; }
.page-oral-prep .table-notes-oral th { background: #443A31; color: #fff; text-align: left; }
.page-oral-prep .table-notes-oral .col-note { width: 130px; }
.page-oral-prep .table-notes-oral .col-vider { width: 44px; text-align: center; }
.page-oral-prep .table-notes-oral input[type=text] { width: 100%; box-sizing: border-box; padding: 6px; }
.page-oral-prep .table-notes-oral textarea { width: 100%; box-sizing: border-box; padding: 6px; font-family: inherit; resize: vertical; }
.page-oral-prep .actions-oral { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.page-oral-prep .copie-oral { margin-top: 18px; padding-top: 14px; border-top: 1px solid #ddd; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.page-oral-prep .message.erreur { border-left-color: #c0392b; }

/* ---------- Pages jurys / saisie / résultats / planning ---------- */
.page-oral-jury .card-large { width: 96%; max-width: 1400px; }

.page-oral-jury .jury-bloc { border: 1px solid #ddd; border-left: 4px solid #009DE0; border-radius: 4px; padding: 10px 14px; margin: 14px 0; background: #fff; }
.page-oral-jury .jury-bloc summary { cursor: pointer; font-size: 1.05em; }
.page-oral-jury .jury-bloc h3 { margin: 12px 0 6px; font-size: 1em; color: #443A31; }
.page-oral-jury .badge-ouvert { background: #2e7d32; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.8em; margin-left: 8px; }
.page-oral-jury .badge-ferme { background: #888; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.8em; margin-left: 8px; }
.page-oral-jury .jury-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0; }
.page-oral-jury .liste-jury { list-style: none; padding: 0; margin: 4px 0 8px; }
.page-oral-jury .liste-jury li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.page-oral-jury .form-inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.page-oral-jury .form-candidats { margin-top: 12px; }
.page-oral-jury .form-candidats textarea { width: 100%; max-width: 420px; box-sizing: border-box; display: block; margin: 6px 0 8px; padding: 6px; }
.page-oral-jury .gestion-listes { display: flex; flex-wrap: wrap; gap: 30px; }
.page-oral-jury .actions-oral { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.page-oral-jury .lien-bouton { display: inline-block; padding: 8px 14px; background: #009DE0; color: #fff; border-radius: 4px; text-decoration: none; }
.page-oral-jury .aide-notation { background: #e6f5fc; border-radius: 4px; padding: 8px 14px; margin: 8px 0; }
.page-oral-jury .aide-notation ul { margin: 6px 0 0; padding-left: 20px; }
.page-oral-jury .aide-edition { font-size: 14px; }

/* Tableaux */
.page-oral-jury .table-oral { width: 100%; border-collapse: collapse; margin: 6px 0; }
.page-oral-jury .table-oral th, .page-oral-jury .table-oral td { padding: 6px 8px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.page-oral-jury .table-oral th { background: #443A31; color: #fff; }
.page-oral-jury .table-oral .col-note { width: 110px; }
.page-oral-jury .table-oral .col-vider { width: 44px; text-align: center; }
.page-oral-jury .table-oral input[type=text] { width: 100%; box-sizing: border-box; padding: 5px; }

/* Blocs de la page « Jurys » */
.page-oral-jury .bloc-choix,
.page-oral-jury .bloc-jours { border: 1px solid #ddd; border-left: 4px solid #009DE0; border-radius: 4px; background: #fff; padding: 12px 16px 16px; margin: 14px 0; }
.page-oral-jury .bloc-jours { border-left-color: #443A31; }
.page-oral-jury .titre-bloc { font-family: 'Brix Slab', 'Rockwell', 'Roboto Slab', Georgia, serif; font-size: 1.1em; color: #443A31; margin-bottom: 10px; }
.page-oral-jury .grille-choix { display: grid; gap: 18px; align-items: start; }
.page-oral-jury .grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-oral-jury .grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-oral-jury .grille-1 { grid-template-columns: minmax(0, 1fr); }
.page-oral-jury .colonne-choix h4 { margin: 0 0 6px; color: #443A31; }
.page-oral-jury .colonne-choix input[type=text] { width: 100%; box-sizing: border-box; padding: 6px; margin-bottom: 6px; }
.page-oral-jury .colonne-recap { background: #e6f5fc; border-radius: 4px; padding: 10px 14px; max-width: 620px; }
.page-oral-jury .recap-jury { font-size: 14px; }
.page-oral-jury .recap-jury div { margin: 4px 0; }

/* Listes cliquables */
.page-oral-jury .liste-choix { list-style: none; margin: 0; padding: 0; max-height: 230px; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px; background: #fff; font-size: 14px; }
.page-oral-jury .liste-choix li { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #eee; }
.page-oral-jury .liste-choix li:hover { background: #e6f5fc; }
.page-oral-jury .liste-choix li.selectionne { background: #009DE0; color: #fff; font-weight: bold; border-left: 5px solid #443A31; }
.page-oral-jury .liste-choix li.selectionne::before { content: "✓ "; }
.page-oral-jury .liste-choix li.selectionne small { color: #fff; }
.page-oral-jury .liste-choix li.occupe { color: #aaa; background: #f3f3f3; cursor: not-allowed; text-decoration: line-through; }
.page-oral-jury .liste-choix li.vide { color: #888; cursor: default; font-style: italic; background: #fafafa; }
.page-oral-jury .liste-choix li.vide:hover { background: #fafafa; }

/* Calendrier des jours de recrutement */
.page-oral-jury .calendrier { width: 280px; max-width: 100%; margin: 6px 0 4px; }
.page-oral-jury .cal-entete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: bold; color: #443A31; }
.page-oral-jury .cal-entete button { width: auto; min-width: 0; margin: 0; padding: 4px 12px; font-size: 14px; }
.page-oral-jury .cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.page-oral-jury .cal-nom { text-align: center; font-size: 12px; color: #777; padding: 2px 0; }
.page-oral-jury .cal-grille .cal-jour { width: 100%; min-width: 0; margin: 0; padding: 6px 0; background: #fff; color: #443A31; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: normal; box-shadow: none; }
.page-oral-jury .cal-grille .cal-jour:hover { background: #e6f5fc; }
.page-oral-jury .cal-grille .cal-jour.choisi { background: #009DE0; color: #fff; font-weight: bold; border-color: #009DE0; }
.page-oral-jury .cal-grille .cal-jour.existant { background: #443A31; color: #fff; cursor: default; opacity: 0.85; }
.page-oral-jury #formJour > button[type=submit] { width: auto; margin-top: 6px; }
.page-oral-jury .puces-jours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.page-oral-jury .puce-jour { display: inline-flex; align-items: center; gap: 6px; background: #e6f5fc; border: 1px solid #009DE0; border-radius: 16px; padding: 4px 6px 4px 12px; font-weight: bold; }

@media (max-width: 800px) {
    .page-oral-jury .grille-3, .page-oral-jury .grille-2 { grid-template-columns: 1fr; }
}

/* ---------- Jours : bouton d'ajout, calendrier déroulant, croix de suppression ---------- */
.page-oral-jury .panneau-calendrier { margin-top: 14px; padding: 12px; border: 1px solid #ddd; border-radius: 4px; background: #f7fbfe; }
.page-oral-jury .panneau-calendrier[hidden] { display: none; }
.page-oral-jury #boutonJour { margin-top: 10px; }
.page-oral-jury .liste-choix li { position: relative; }
.page-oral-jury .liste-choix li .supp { float: right; color: #c0392b; cursor: pointer; padding: 0 4px; font-weight: bold; }
.page-oral-jury .liste-choix li .supp:hover { background: #c0392b; color: #fff; border-radius: 3px; }

/* ---------- Coefficients par matière (composer_qcm.php) ---------- */
.page-composer .ligne-matiere { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0; }
.page-composer .coef-matiere { font-size: 0.9em; color: #443A31; }
.page-composer .coef-matiere input { width: 70px; padding: 4px 6px; margin-left: 4px; }

/* ===== Pages des candidats : authentification, questions, fin du QCM (charte IUT) ===== */
.page-candidat main { margin: 30px auto 50px; }
.page-candidat main label { font-weight: 600; color: #443A31; }
.page-candidat .message-candidat { margin: 0 0 18px; padding: 10px 14px; background: #f3fafe; border-left: 5px solid #009DE0; color: #443A31; font-weight: 600; }

.page-candidat main.fin-qcm { text-align: center; }
.page-candidat main.fin-qcm p { margin: 12px 0; font-size: 1.1em; color: #443A31; }

.page-candidat main.qcm-etape { max-width: 760px; }
.page-candidat .qcm-minuteur { margin: 0 0 8px; text-align: center; font-weight: 700; font-size: 1.1em; color: #443A31; }
.page-candidat .qcm-minuteur #timer { color: #009DE0; }
.page-candidat .qcm-matiere { margin: 0 0 14px; font-size: 1.2em; }
.page-candidat .progress-bar { width: 100%; height: 12px; margin: 0 0 26px; background: #e3e8ee; border-radius: 6px; overflow: hidden; }
.page-candidat .progress-fill { height: 100%; background: #009DE0; transition: width 0.3s ease; }
.page-candidat .question { margin-bottom: 22px; }
.page-candidat .question h3 { margin: 0 0 14px; font-size: 1.15em; line-height: 1.4; color: #443A31; }
.page-candidat .choix-reponse { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; padding: 10px 12px; border: 1px solid #d5dbe1; border-radius: 8px; font-weight: normal; color: #333; cursor: pointer; }
.page-candidat .choix-reponse:hover { border-color: #009DE0; background: #f3fafe; }
.page-candidat .choix-reponse:has(input:checked) { border-color: #009DE0; background: #e6f5fc; }
.page-candidat .choix-reponse input { flex: none; width: auto; margin: 3px 0 0; }
.page-candidat .btn-group { display: flex; gap: 10px; margin-top: 24px; }
.page-candidat .btn-group button { flex: 1; }
.page-candidat .btn-group .btn-prev { background: #8a7f76; }
.page-candidat .btn-group .btn-prev:hover { background: #443A31; }

/* ===== Import de questions depuis Excel (import_questions.php) ===== */
.page-import-q .resume-import { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.page-import-q .resume-import li { padding: 8px 14px; border: 1px solid #ddd; border-left: 4px solid #009DE0; border-radius: 4px; background: #fff; }
.page-import-q .resume-import li.ok { border-left-color: #2e8b57; }
.page-import-q .resume-import li.ko { border-left-color: #c0392b; }
.page-import-q .table-import { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.page-import-q .table-import th, .page-import-q .table-import td { padding: 6px 8px; border: 1px solid #ddd; vertical-align: top; text-align: left; }
.page-import-q .table-import th { background: #443A31; color: #fff; }
.page-import-q .actions-import { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.page-import-q input[type=file] { width: auto; }

/* ===== Visualiser les QCM (visualiser_qcm.php) ===== */
.page-visualiser .table-visualiser { width: 100%; border-collapse: collapse; margin-top: 14px; }
.page-visualiser .table-visualiser th,
.page-visualiser .table-visualiser td { padding: 8px 10px; border: 1px solid #ddd; text-align: left; }
.page-visualiser .table-visualiser th { background: #443A31; color: #fff; }
.page-visualiser .table-visualiser tr:hover td { background: #f3fafe; }
.page-visualiser .filtre-visualiser { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.page-visualiser .filtre-visualiser input { width: 280px; max-width: 100%; padding: 8px; }
.page-visualiser a.lien-bouton { display: inline-block; padding: 5px 12px; background: #443A31; color: #fff; border-radius: 4px; text-decoration: none; font-size: 14px; }
.page-visualiser a.lien-bouton:hover { background: #009DE0; }

/* ===== Impression des QCM (imprimer_qcm.php, imprimer_qcm_remplis.php) ===== */
.page-impression { margin: 0; padding: 0; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.35; }
.page-impression .barre-impression { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin: 14px 0; }
.page-impression .barre-impression a { color: #443A31; font-weight: bold; text-decoration: underline; }
.page-impression .print-btn { padding: 8px 16px; background: #009DE0; color: #fff; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }
.page-impression .print-btn:hover { background: #443A31; }
.page-impression .impression-erreur { text-align: center; font-weight: bold; color: #443A31; margin-top: 40px; }
.page-impression h1, .page-impression h2, .page-impression h3 { font-family: 'Brix Slab', 'Rockwell', 'Roboto Slab', Georgia, serif; color: #443A31; }
.page-impression h2 { margin: 0 0 16px; font-size: 14px; }
.page-impression .page-qcm { page-break-after: always; }
.page-impression .question { margin-bottom: 12px; page-break-inside: avoid; }
.page-impression .choix { margin-left: 20px; font-style: italic; }
.page-impression .alerte { color: #c0392b; font-weight: bold; }
.page-impression .entete-candidat { max-width: 880px; margin: 20px auto 0; padding: 8px 20px; background: #009DE0; color: #fff; text-align: center; border-radius: 4px; }
.page-impression .entete-candidat h1 { margin: 6px 0; font-size: 14px; color: #fff; }
.page-impression .corps-candidat { max-width: 880px; margin: 0 auto 10px; padding: 10px; }
.page-impression .corps-candidat h2 { font-size: 13px; }
.page-impression .matiere-block { margin-bottom: 10px; padding: 8px; border-left: 4px solid #443A31; border-radius: 3px; background: #f3f5f7; page-break-after: always; }
.page-impression .matiere-block h3 { margin: 4px 0; font-size: 1.3em; }
.page-impression .matiere-block .question { padding: 6px; border-bottom: 1px dashed #bbb; }
.page-impression .matiere-anglais { background: #f3e5f5; border-left-color: #8e24aa; }
.page-impression .matiere-maths { background: #e3f2fd; border-left-color: #1e88e5; }
.page-impression .matiere-francais { background: #fff8e1; border-left-color: #fbc02d; }
.page-impression .score { font-weight: bold; margin-bottom: 6px; }
.page-impression .resultat { margin: 6px 0 0; }
.page-impression .correct { color: green; font-weight: bold; }
.page-impression .incorrect { color: red; font-weight: bold; }
.page-impression .pending { color: orange; font-weight: bold; }
@media print {
  .page-impression { padding: 0; margin: 0; font-size: 9px; }
  .page-impression header, .page-impression footer, .page-impression .menu-horizontal { display: none !important; }
  .page-impression .contenu-impression { margin: 5mm; padding: 0; }
  .page-impression .page-wrapper::before { display: none; }
  .page-impression .barre-impression { display: none !important; }
  .page-impression .entete-candidat { background: none; color: #000; border: 1px solid #000; }
  .page-impression .entete-candidat h1 { color: #000; }
}
.page-impression .choix-session { display: flex; align-items: center; gap: 8px; }
.page-impression .choix-session select { padding: 6px 10px; }
.page-impression .choix-session button { padding: 7px 14px; background: #443A31; color: #fff; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }
.page-impression .choix-session button:hover { background: #009DE0; }

.page-impression .contenu-impression { padding: 0 20px 20px; }
.page-candidat .qcm-compteur { margin: 0 0 4px; text-align: center; font-weight: 700; color: #443A31; }
.page-candidat main { width: 100%; box-sizing: border-box; }

/* ===== Consignes, alertes de la copie, bouton d'accès (candidats) ===== */
.page-candidat main.consignes { max-width: 760px; }
.page-candidat main.consignes ul { margin: 0 0 22px; padding-left: 22px; line-height: 1.6; color: #333; }
.page-candidat .btn-accueil { display: inline-block; padding: 12px 24px; background: #443A31; color: #fff; border-radius: 8px; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.page-candidat .btn-accueil:hover { background: #009DE0; text-decoration: none; }
.alerte-sorties { margin: 8px 0; padding: 6px 10px; border-left: 4px solid #c0392b; background: #fdf1ef; color: #443A31; font-weight: 600; }


/* Graphiques des statistiques */
.page-stats .graphique-stats { position: relative; height: 360px; margin: 10px 0 20px; }

/* Page des consignes (candidats) */
.page-candidat main.consignes { max-width: 760px; }
.page-candidat .consignes-intro { margin: 0 0 20px; color: #443A31; }
.page-candidat .bloc-consigne { margin: 0 0 18px; padding: 14px 18px; background: #f3fafe; border-left: 5px solid #009DE0; border-radius: 4px; }
.page-candidat .bloc-consigne h3 { margin: 0 0 8px; font-size: 1.1em; color: #443A31; }
.page-candidat .bloc-consigne ul { margin: 0; padding-left: 20px; }
.page-candidat .bloc-consigne li { margin: 6px 0; line-height: 1.5; list-style: disc; }
.page-candidat .consignes-fin { margin: 22px 0 12px; text-align: center; font-weight: 600; color: #443A31; }

.page-candidat .lien-retour { margin: 18px 0 0; text-align: center; }
.page-candidat .lien-retour a { color: #009DE0; text-decoration: none; font-weight: 600; }
.page-candidat .lien-retour a:hover { text-decoration: underline; }

/* Pages candidats : pas d'image de fond */
.page-candidat .page-wrapper::before { content: none; background-image: none; }

.page-import-q .choix-apercu div { margin: 2px 0; }
.page-import-q .choix-apercu .bonne { color: #2e8b57; font-weight: bold; }

/* Banque de questions (consultation par thème) */
.page-banque .banque-matiere { margin: 24px 0 8px; color: #443A31; }
.page-banque .banque-theme { margin: 6px 0; border: 1px solid #d5dbe1; border-radius: 6px; background: #fff; }
.page-banque .banque-theme summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: #443A31; }
.page-banque .banque-theme summary:hover { background: #f3fafe; }
.page-banque .banque-nb { font-weight: normal; color: #777; }
.page-banque .table-banque { width: 100%; border-collapse: collapse; font-size: 14px; }
.page-banque .table-banque th { background: #443A31; color: #fff; padding: 6px 8px; text-align: left; }
.page-banque .table-banque td { padding: 6px 8px; border-top: 1px solid #e3e8ee; vertical-align: top; }
.page-banque .q-intitule a { color: #009DE0; font-weight: 600; text-decoration: none; }
.page-banque .q-intitule a:hover { text-decoration: underline; }
.page-banque .verrou { color: #777; cursor: not-allowed; }
.page-banque .q-choix div { margin: 2px 0; }
.page-banque .q-choix .bonne { color: #2e8b57; font-weight: bold; }

/* Sous-menus : titres de groupe repérables, liens en retrait */
.submenu .submenu-title {
  margin: 0;
  padding: 8px 14px 6px;
  font-size: 0.95em;
  color: var(--iut-marron);
  background: #f3f6f8;
  border-top: 1px solid #e3e8ee;
  border-left: 4px solid var(--iut-cyan);
  font-weight: 700;
}
.submenu .submenu-title:first-child { border-top: none; }
.submenu .submenu-group a { padding-left: 26px; }

/* Gestion des comptes : mot de passe provisoire affiché une seule fois */
.mdp-provisoire {
  display: block;
  margin: 10px 0;
  padding: 12px;
  background: #fff;
  border: 2px dashed var(--iut-cyan);
  font-size: 1.4em;
  text-align: center;
  letter-spacing: 2px;
  word-break: break-all;
}
.btn-secondaire {
  padding: 10px 20px;
  background: #fff;
  color: var(--iut-marron, #443A31);
  border: 2px solid var(--iut-cyan);
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.btn-secondaire:hover { background: var(--iut-cyan); color: #fff; }

/* Modèles de QCM : détail d'un modèle */
.table-modele .sous-total td { font-weight: bold; background: #f3fafe; }

/* Banque de questions : boutons Modifier / Supprimer sur chaque ligne */
.page-banque .table-banque td.action { white-space: nowrap; }
.page-banque .table-banque .lien-modifier { display: inline-block; background: #009DE0; color: #fff; padding: 6px 10px; border-radius: 5px; text-decoration: none; font-weight: bold; }
.page-banque .table-banque .lien-modifier:hover { background: #007bb5; text-decoration: none; }
.page-banque .table-banque .form-ligne { display: inline; margin: 0; }
.page-banque .table-banque .btn-icone { background: #c62828; color: #fff; border: none; border-radius: 5px; padding: 6px 10px; cursor: pointer; }
.page-banque .table-banque .btn-icone:hover { background: #8e1c1c; }


/* ---------- Questions liées à un texte (QCM mobilité) ---------- */
.bloc-texte-support { background: #f6fafd; border-left: 4px solid var(--iut-cyan); border-radius: 4px; padding: 12px 16px; margin: 10px 0 14px; }
.bloc-texte-support .texte-consigne { margin: 0 0 8px; font-style: italic; font-weight: 600; color: #1f6f95; }
.bloc-texte-support .texte-titre { margin: 4px 0 6px; font-size: 1.05em; }
.bloc-texte-support .texte-contenu { line-height: 1.5; text-align: left; }
.bloc-texte-support .texte-source { margin: 8px 0 0; font-size: 0.85em; color: #5b6770; font-style: italic; }
.page-banque .ligne-texte td { background: #eef6fb; border-top: 2px solid var(--iut-cyan); }
.page-banque .banque-texte summary { padding: 4px 0; cursor: pointer; font-weight: 600; color: #443A31; }
.page-banque .actions-texte { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.page-banque .liste-textes-vides { padding-left: 20px; }
.page-banque .liste-textes-vides li { margin: 6px 0; }

/* Texte support affiché au candidat */
.texte-support-candidat { margin: 0 0 1rem; border: 1px solid #ccc; border-radius: 6px; padding: 0.5rem 0.8rem; background: #fafafa; }
.texte-support-candidat summary { cursor: pointer; font-weight: bold; }
.titre-textes { margin: 1rem 0 0.3rem; }
@media print { .bloc-texte-support { break-inside: avoid; margin: 0 0 0.6rem; } .texte-support-candidat { border: none; padding: 0; background: none; } }

/* Page de confirmation avant l'envoi définitif du QCM */
.page-candidat .confirmation-fin h2 { margin-top: 0; }
.page-candidat .confirmation-bilan { font-size: 1.1rem; }
.page-candidat .confirmation-alerte { background: #fff4e5; border: 1px solid #e0a040; border-radius: 6px; padding: 10px 14px; margin: 14px 0; }
.page-candidat .confirmation-alerte p { margin: 4px 0; }
.page-candidat .confirmation-avertissement { margin: 18px 0; }
.page-candidat .btn-lien-retour { flex: 1; display: block; text-align: center; background: #8a7f76; color: #fff; text-decoration: none; padding: 12px 10px; border-radius: 6px; }
.page-candidat .btn-lien-retour:hover { background: #443A31; }

/* Disponibilités des enseignants */
.ligne-dispo { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rapport-dispo { list-style: none; padding: 0; margin: 0 0 16px; }
.rapport-dispo li { padding: 6px 10px; margin-bottom: 4px; border-radius: 6px; background: #f4f6f8; }
.rapport-dispo li.dispo-refus { background: #fdecea; }
.rapport-dispo li.dispo-alerte { background: #fff6e0; }

/* ===== Pages des candidats : tiennent dans la hauteur de l'écran (ordinateur), même présentation qu'avant ===== */
@media (min-width: 900px) {
  .page-candidat .page-wrapper { height: 100vh; height: 100dvh; min-height: 0; }
  .page-candidat header { padding: 14px 20px; }
  .page-candidat header h1 { font-size: 26px; }
  .page-candidat header p { margin-top: 4px; font-size: 15px; }
  .page-candidat footer { padding: 8px; font-size: 13px; }
  .page-candidat main { margin: 12px auto; padding: 16px 30px; min-height: 0; overflow: auto; }
  .page-candidat main h2 { margin: 0 0 10px; }

  /* Consignes : un peu plus large, blocs resserrés, toujours l'un sous l'autre */
  .page-candidat main.consignes { max-width: 1000px; }
  .page-candidat .consignes-intro { margin: 0 0 10px; }
  .page-candidat .bloc-consigne { margin: 0 0 10px; padding: 9px 16px; }
  .page-candidat .bloc-consigne h3 { margin: 0 0 4px; }
  .page-candidat .bloc-consigne li { margin: 3px 0; line-height: 1.35; }
  .page-candidat .consignes-fin { margin: 10px 0 8px; }
  .page-candidat .btn-accueil { padding: 10px 22px; }

  /* Accès au QCM */
  .page-candidat main .message-candidat { margin: 0 0 10px; padding: 8px 12px; }
  .page-candidat main .lien-retour { margin: 10px 0 0; }

  /* Questions */
  .page-candidat main.qcm-etape { max-width: 900px; }
  .page-candidat .qcm-compteur { margin: 0 0 2px; }
  .page-candidat .qcm-minuteur { margin: 0 0 4px; }
  .page-candidat .qcm-matiere { margin: 0 0 8px; }
  .page-candidat .progress-bar { margin: 0 0 14px; }
  .page-candidat .question { margin-bottom: 12px; }
  .page-candidat .question h3 { margin: 0 0 10px; }
  .page-candidat .choix-reponse { margin: 6px 0; padding: 8px 12px; }
  .page-candidat .btn-group { margin-top: 14px; }

  /* Confirmation et fin */
  .page-candidat .confirmation-alerte { margin: 8px 0; }
  .page-candidat .confirmation-avertissement { margin: 12px 0; }
  .page-candidat main.fin-qcm p { margin: 8px 0; }

  /* Seulement quand la question a un texte : texte à gauche (défilement), question à droite */
  .page-candidat main.qcm-etape:has(.texte-support-candidat) { max-width: 1150px; display: flex; flex-direction: column; overflow: hidden; }
  .page-candidat main.qcm-etape:has(.texte-support-candidat) > form { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr auto; gap: 0 22px; }
  .page-candidat main.qcm-etape .texte-support-candidat { grid-column: 1; grid-row: 1 / span 2; margin: 0; min-height: 0; overflow-y: auto; }
  .page-candidat main.qcm-etape:has(.texte-support-candidat) .question { grid-column: 2; grid-row: 1; overflow-y: auto; min-height: 0; }
  .page-candidat main.qcm-etape:has(.texte-support-candidat) .btn-group { grid-column: 2; grid-row: 2; margin-top: 4px; }
}
@media (min-width: 900px) and (max-height: 700px) {
  .page-candidat main { margin: 8px auto; padding: 12px 28px; }
  .page-candidat .choix-reponse { padding: 6px 10px; margin: 4px 0; }
  .page-candidat .progress-bar { margin: 0 0 10px; }
}
@media (min-width: 900px) {
  .page-candidat main.consignes ul { margin: 0; }
  .page-candidat .bloc-consigne { font-size: 14.5px; }
  .page-candidat main.consignes h2 { margin: 0 0 6px; }
  .page-candidat .consignes-intro { margin: 0 0 8px; }
}
@media (min-width: 900px) {
  .page-candidat header { padding: 8px 20px 26px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%); }
  .page-candidat header h1 { font-size: 24px; }
  .page-candidat header p { margin-top: 2px; font-size: 14px; }
}
@media (min-width: 900px) {
  .page-candidat main.consignes { max-width: 1100px; }
  .page-candidat .bloc-consigne { font-size: 14px; margin: 0 0 8px; padding: 7px 16px; }
  .page-candidat .bloc-consigne li { margin: 2px 0; line-height: 1.3; }
  .page-candidat main label { margin-bottom: 4px; }
  .page-candidat main input { padding: 8px 12px; margin-bottom: 8px; }
  .page-candidat main button { padding: 10px; }
}

/* ===== Logo RecrutTC (en-tête) ===== */
.logo-recruttc { margin: 0; line-height: 0; font-size: 0; display: flex; justify-content: center; }
.logo-recruttc picture { display: block; }
.logo-recruttc img { display: block; height: 62px; width: auto; max-width: 100%; }
/* Téléphone : le logo complet reste visible, il s'adapte à la largeur de l'écran */
@media (max-width: 600px) { .logo-recruttc img { height: auto; width: min(275px, 88vw); } }
@media (min-width: 900px) { .page-candidat .logo-recruttc img { height: 54px; } }
@media print { .logo-recruttc img { height: 40px; } }

/* En-tête avec logo : plus compact */
body:not(.page-candidat) header:has(.logo-recruttc) { padding: 16px 20px 44px; }
body:not(.page-candidat) header:has(.logo-recruttc) p { margin: 8px 0 0; font-size: 16px; }

/* Lien-bouton (ex. téléchargement d'un modèle Excel) */
.btn-lien { display: inline-block; background: #8a7f76; color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 6px; }
.btn-lien:hover { background: #443A31; }

/* Répartition des candidats : fond alterné à chaque changement d'heure */
.table-candidats tr.bande-0 td { background: #ffffff; }
.table-candidats tr.bande-1 td { background: #e6eef7; }

/* Saisie de l'oral : un bloc repliable par groupe */
.groupe-oral { border: 1px solid #d9d2ca; border-radius: 6px; margin: 10px 0; padding: 6px 12px; background: #fff; }
.groupe-oral > summary { cursor: pointer; padding: 6px 0; }

/* Mes disponibilités (saisie en direct) */
.grille-dispo th, .grille-dispo td { text-align: center; }
.grille-dispo .grille-tranche { text-align: left; white-space: nowrap; }
.grille-dispo .grille-case { padding: 0; }
.grille-dispo .grille-case label { display: block; padding: 12px 18px; cursor: pointer; }
.grille-dispo .grille-case:hover { background: #eef4fb; }
.grille-dispo input[type=checkbox] { width: 22px; height: 22px; cursor: pointer; }
.compteur-dispo { font-weight: bold; padding: 6px 12px; border-radius: 6px; display: inline-block; }
.compteur-dispo.ok { background: #e3f4e6; color: #1e6b2f; }
.compteur-dispo.alerte { background: #fff1d6; color: #8a5a00; }

/* Statistiques par question : une couleur par matière, qui alterne à chaque changement de matière */
.page-stats .table-stats-questions tr.m0.p0 { background: #d6e3f8; }
.page-stats .table-stats-questions tr.m0.p1 { background: #f2f7fd; }
.page-stats .table-stats-questions tr.m1.p0 { background: #ffe8c4; }
.page-stats .table-stats-questions tr.m1.p1 { background: #fff9ee; }
.page-stats .table-stats-questions tr.debut-matiere td { border-top: 3px solid #443A31; }

/* Statistiques par question : une ligne cliquable par matière */
.page-stats details.stats-matiere { border: 1px solid #d3d9e3; border-radius: 6px; margin: 8px 0; overflow: hidden; }
.page-stats details.stats-matiere > summary { cursor: pointer; padding: 12px 16px; font-size: 15px; list-style-position: inside; }
.page-stats details.stats-matiere.m0 > summary { background: #d6e3f8; }
.page-stats details.stats-matiere.m1 > summary { background: #ffe8c4; }
.page-stats details.stats-matiere[open] > summary { border-bottom: 1px solid #d3d9e3; }
.page-stats .stats-matiere-info { margin-left: 12px; font-size: 13px; color: #555; }

/* Suivi des réponses : moins de croix que demandé (rouge), plus de croix que demandé (vert) */
.table-candidats tr.nb-moins td { background: #fde2e2; color: #8a1f1f; }
.table-candidats tr.nb-plus td { background: #dff3e1; color: #1d6b2c; }

/* Bouton « Écrire aux enseignants » (bloc dépliable) : même aspect que les autres boutons (marron, bleu au survol) */
.bloc-relance { margin: 14px 0; }
.bloc-relance > summary {
    display: inline-block; list-style: none; cursor: pointer;
    padding: 12px 24px; font-size: 16px; background: #443A31; color: #fff;
    border: none; border-radius: 6px;
}
.bloc-relance > summary::-webkit-details-marker { display: none; }
.bloc-relance > summary:hover { background: #009DE0; }
.bloc-relance[open] > summary { margin-bottom: 10px; }

/* Salles de l'oral : pastilles compactes et saisie rapide (page « Créer la campagne de recrutement ») */
.chips-salles { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip-salle { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #c9d3dc; border-radius: 999px; padding: 4px 6px 4px 14px; font-size: 14px; color: #443A31; }
.chip-salle .chip-retirer { background: transparent; color: #8a7f76; border: none; padding: 2px 8px; font-size: 13px; border-radius: 999px; cursor: pointer; }
.chip-salle .chip-retirer:hover { background: #fde2e2; color: #8a1f1f; }
.ajout-salle { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ajout-salle input { flex: 1 1 320px; max-width: 520px; }

/* Planning automatique : tableau groupé par jour et créneau */
.table-plan .plan-ligne-jour th { text-align: left; padding: 8px 10px; }
.table-plan .plan-creneau-cell { background: #f1ece6; vertical-align: top; white-space: nowrap; border-right: 2px solid #44382f; }
.table-plan tr.plan-debut-creneau td { border-top: 2px solid #44382f; }
.table-plan tr.plan-alerte td { background: #fdecea; }
.plan-vide { color: #b3261e; font-style: italic; }
.table-plan th { cursor: default; } .table-plan th:hover { background: #443A31; }
.table-plan tr.plan-teinte-a td { background: #ffffff; }
.table-plan tr.plan-teinte-b td { background: #e8eef7; }
.table-plan tr.plan-teinte-a td.plan-creneau-cell { background: #f1ece6; }
.table-plan tr.plan-teinte-b td.plan-creneau-cell { background: #ddd3c8; }
.table-plan tr.plan-alerte td { background: #fdecea; }
.page-oral-jury a.bouton-lien, .page-oral-jury button.bouton-lien { display: inline-block; padding: 8px 14px; background: #443A31; color: #fff; border-radius: 4px; text-decoration: none; font-size: 14px; }
.page-oral-jury a.bouton-lien:hover, .page-oral-jury button.bouton-lien:hover { background: #009DE0; }
.table-plan .edition-ens { display: none; margin-top: 6px; }
.table-plan tr.en-edition .edition-ens { display: block; }
.table-plan .edition-ens form { margin: 2px 0; }

/* Pages des jurys : le tableau défile dans son cadre et n'élargit jamais la page (le menu reste entièrement visible) */
body.page-oral-jury { overflow-x: hidden; }
.page-oral-jury .zone-large { min-width: 0; max-width: 100%; box-sizing: border-box; }
.page-oral-jury .card-large { min-width: 0; max-width: 1400px; box-sizing: border-box; }
.page-oral-jury .defile-x, .page-oral-jury .tableau-defilant { max-width: 100%; overflow-x: auto; }
.page-oral-jury .table-plan { width: 100%; }
.page-oral-jury .table-plan .jury-actions button, .page-oral-jury .table-plan .jury-actions .bouton-lien { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
