/*
  Mo3dli : rapport d'orientation (rapport*.html, rapport-exemple*.html), en plus de simulateur.css
  (cartes des filières, niveaux, résumé). À l'impression : fond blanc, texte noir, sans menus ni
  filtres, une filière jamais coupée entre deux pages.
  Coder : BEN MAAD ALAA EDDINE
*/
.rapport-etat:empty {
  display: none;
}
.rapport-exemple {
  padding: 10px 14px;
  border: 1px solid #f39c12;
  border-radius: 10px;
  background-color: rgba(243, 156, 18, 0.08);
  color: #d6d9de;
  font-size: 14px;
}
.rapport-exemple strong {
  color: #f39c12;
}
.rapport-profil {
  margin: 0 0 12px;
  color: #d6d9de;
  font-weight: 600;
}
.rapport-imprimer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 8px;
  color: #ababab;
  font-size: 13px;
}
.rapport-imprimer button,
.rapport-plus,
.rapport-filtres__effacer {
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid #1ebba3;
  border-radius: 50px;
  background-color: transparent;
  color: #ffffff;
  font: 600 15px "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.rapport-imprimer button {
  border-width: 4px;
  border-color: #099983;
  background-color: #1ebba3;
}
.rapport-imprimer button:hover,
.rapport-plus:hover,
.rapport-filtres__effacer:hover,
.rapport-imprimer button:focus-visible,
.rapport-plus:focus-visible,
.rapport-filtres__effacer:focus-visible {
  background-color: #099983;
}
.page-content .rapport-lire {
  display: grid;
  gap: 6px;
  padding-inline-start: 20px;
  color: #ababab;
  font-size: 14px;
  line-height: 1.6;
}
.rapport-lire li {
  margin: 0;
}
.rapport-lire strong {
  color: #ffffff;
}

/* Barre des parties du rapport : reste en haut de l'écran */
.rapport-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 0 -16px 14px;
  padding: 8px 12px;
  overflow-x: auto;
  border-bottom: 1px solid #1e2530;
  background-color: #040507;
  scrollbar-width: none;
}
.rapport-nav::-webkit-scrollbar {
  display: none;
}
.page-content .rapport-nav a {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 0 7px;
  border: 1px solid #1e2530;
  border-radius: 999px;
  color: #d6d9de;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none;
}
.page-content .rapport-nav a:hover,
.page-content .rapport-nav a:focus-visible {
  border-color: #1ebba3;
  color: #ffffff;
}
.rapport-ancre {
  scroll-margin-top: 72px;
}

/* Répartition des filières par niveau de chance */
.rapport-barre {
  display: flex;
  gap: 2px;
  height: 14px;
  margin: 4px 0 8px;
  overflow: hidden;
  border-radius: 999px;
}
.rapport-barre span {
  flex-basis: 0;
  min-width: 4px;
}
.rapport-barre__tres-probable {
  background-color: #2ecc71;
}
.rapport-barre__possible {
  background-color: #3498db;
}
.rapport-barre__ambitieux {
  background-color: #f39c12;
}
.rapport-barre__hors-portee {
  background-color: #ff6b81;
}

/* « Comment lire ton rapport » : replié */
.rapport-aide {
  margin: 0 0 22px;
  border: 1px solid #1e2530;
  border-radius: 10px;
}
.rapport-aide summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}
.rapport-aide summary::after {
  content: "▾";
  margin-inline-start: auto;
  color: #1ebba3;
}
.rapport-aide[open] summary::after {
  content: "▴";
}
.rapport-aide .rapport-lire {
  margin: 0;
  padding-block: 0 14px;
  padding-inline: 34px 16px;
}
.rapport-carte__plus {
  color: #d6d9de;
  font-size: 13px;
}
/* Nom arabe dans une ligne française : même taille de lecture que le lieu */
.rapport-carte__plus [lang="ar"] {
  font-size: 14px;
}

/* Comparaison des durées */
.rapport-tableau {
  overflow-x: auto;
  margin: 0 0 20px;
}
.rapport-tableau table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rapport-tableau th,
.rapport-tableau td {
  padding: 4px 10px;
  border-bottom: 1px solid #1e2530;
  text-align: start;
}
.rapport-tableau thead th {
  color: #7d7d7d;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.rapport-tableau td {
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
}
.rapport-tableau tbody th button {
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: #1ebba3;
  font: 600 14px "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  text-align: start;
  text-decoration: underline;
  cursor: pointer;
}

/* Filtres : un bouton les ouvre sur téléphone ; les filtres actifs restent visibles en pastilles */
.rapport-outils {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
/* Panneau ouvert : collé sous le bouton, même bordure */
.rapport-outils:has(.rapport-filtrer[aria-expanded="true"]) {
  margin-bottom: 0;
}
.rapport-outils:has(.rapport-filtrer[aria-expanded="true"]) + .rapport-filtres {
  border: 2px solid #1ebba3;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.rapport-outils .rapport-compte {
  margin: 0;
}
/* Bouton « Filtrer et trier » (téléphone) : une barre pleine largeur qui se voit comme un bouton */
.rapport-filtrer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  border: 2px solid #1ebba3;
  border-radius: 12px;
  background-color: rgba(30, 187, 163, 0.14);
  box-shadow: 0 3px 0 #099983;
  color: #ffffff;
  font: 15px "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rapport-filtrer:hover,
.rapport-filtrer:focus-visible {
  background-color: rgba(30, 187, 163, 0.26);
}
.rapport-filtrer:active {
  box-shadow: none;
  transform: translateY(3px);
}
.rapport-filtrer__icone {
  flex: none;
  width: 24px;
  height: 24px;
  fill: #1ebba3;
}
.rapport-filtrer__texte {
  display: grid;
  flex: 1;
}
.rapport-filtrer__texte strong {
  font-size: 16px;
}
.rapport-filtrer__texte small {
  color: #ababab;
  font-size: 12.5px;
}
.rapport-filtrer__nb {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: #1ebba3;
  color: #040507;
  font-weight: 700;
  text-align: center;
}
.rapport-filtrer__nb:empty {
  display: none;
}
.rapport-filtrer__fleche {
  color: #1ebba3;
  font-size: 18px;
  transition: transform 0.2s;
}
.rapport-filtrer[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}
.rapport-filtrer[aria-expanded="true"] .rapport-filtrer__fleche {
  transform: rotate(180deg);
}
.rapport-filtres__fermer {
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid #1ebba3;
  border-radius: 50px;
  background-color: #1ebba3;
  color: #ffffff;
  font: 600 15px "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.rapport-actifs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.rapport-actifs:empty {
  display: none;
}
.rapport-actifs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #1ebba3;
  border-radius: 999px;
  background-color: rgba(30, 187, 163, 0.1);
  color: #ffffff;
  font: 14px "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.rapport-actifs button span[aria-hidden] {
  color: #1ebba3;
  font-size: 18px;
}
.rapport-filtres__bas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rapport-filtres {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid #1e2530;
  border-radius: 10px;
}
.rapport-filtres[hidden] {
  display: none;
}
/* L'ordre (textes longs) prend toute la largeur */
.rapport-filtres__grille > .simu__champ:last-child {
  grid-column: 1 / -1;
}
.rapport-filtres legend {
  padding: 0 6px;
  color: #ffffff;
  font-weight: 600;
}
.rapport-filtres__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 14px;
}
.rapport-filtres label {
  display: block;
  margin-bottom: 4px;
  color: #d6d9de;
  font-size: 14px;
}
.rapport-filtres select {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #1e2530;
  border-radius: 8px;
  background-color: #0c0f15;
  color: #ffffff;
  font-size: 15px;
}
.rapport-filtres select:disabled {
  opacity: 0.5;
}
.rapport-filtres select:focus {
  border-color: #1ebba3;
  outline: none;
}
.rapport-filtres .rapport-filtres__choix {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  color: #ffffff;
}
.rapport-filtres__choix input {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: #1ebba3;
}
.rapport-haut {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}
.rapport-compte {
  margin: 0 0 10px;
  color: #d6d9de;
  font-weight: 600;
}
.rapport-plus {
  display: block;
  margin: 0 auto 20px;
}

/* Universités privées : comparaison public / privé (plan B), liste officielle des établissements */
.prive-comps {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}
.prive-comp {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #1e2530;
  border-radius: 10px;
  background-color: #0c0f15;
}
.prive-comp--planb {
  border-color: #9b59b6;
}
.prive-comp__titre {
  color: #ffffff;
  font-size: 16px;
}
.prive-comp__planb {
  margin-inline-start: 6px;
  padding: 1px 10px;
  border-radius: 999px;
  background-color: #9b59b6;
  color: #ffffff;
  font-size: 12px;
  vertical-align: middle;
}
.prive-comp__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.prive-comp__cols > div {
  padding: 8px 10px;
  border-radius: 8px;
  background-color: #11161f;
}
.prive-comp__cols span {
  display: block;
  color: #7d7d7d;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.page-content .prive-comp p {
  margin: 2px 0 0;
  color: #d6d9de;
  font-size: 14px;
  line-height: 1.5;
}
.prive-comp strong {
  color: #ffffff;
}
.page-content .prive-comp .prive-comp__petit {
  color: #ababab;
  font-size: 12.5px;
}
/* Programme d'une université privée qui n'est pas partenaire : même carte, sans le violet */
.simu-partenaire--libre {
  border-color: #1e2530;
  background-color: #0c0f15;
}
.simu-partenaire--libre .simu-partenaire__site {
  border-color: #1ebba3;
}
.prive-filtres {
  margin-bottom: 8px;
}
.page-content .prive-liste {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.prive-et {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #1e2530;
  border-radius: 10px;
  background-color: #0c0f15;
  font-size: 14px;
}
.prive-et__nom {
  color: #ffffff;
  line-height: 1.4;
}
.prive-et__lieu {
  color: #ababab;
  font-size: 13px;
}
.prive-et__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prive-et__badges span {
  padding: 1px 8px;
  border: 1px solid #3498db;
  border-radius: 999px;
  color: #d6d9de;
  font-size: 12.5px;
}
.prive-et__badges .prive-et__ing {
  border-color: #1ebba3;
  color: #1ebba3;
  font-weight: 600;
}
.prive-et__badges .prive-et__partenaire {
  border-color: #9b59b6;
  background-color: #9b59b6;
  color: #ffffff;
  font-weight: 600;
}
.prive-et__badges .prive-et__inconnu {
  border-color: #1e2530;
  color: #7d7d7d;
}
.page-content .prive-et__site {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #1ebba3;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}
.page-content .prive-et__site:hover,
.page-content .prive-et__site:focus-visible {
  background-color: rgba(30, 187, 163, 0.15);
}
.page-content .prive-source {
  color: #7d7d7d;
  font-size: 12.5px;
  line-height: 1.6;
}

@media print {
  @page {
    margin: 14mm 12mm;
  }
  body,
  .article-main,
  .article {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .skip-link,
  .site-header,
  .site-footer,
  .breadcrumb,
  .lang-toggle,
  .simu__beta,
  .rapport-imprimer,
  .rapport-filtres,
  .rapport-nav,
  .rapport-outils,
  .rapport-actifs,
  .rapport-haut,
  .fc-ouvrir,
  .rapport-plus,
  .prive-filtres,
  .prive-et__site {
    display: none !important;
  }
  .prive-comp,
  .prive-comp__cols > div,
  .prive-et {
    background: #ffffff !important;
    border-color: #999999;
    break-inside: avoid;
  }
  .prive-comp__titre,
  .prive-comp strong,
  .prive-et__nom {
    color: #000000 !important;
  }
  .page-content .prive-comp p,
  .prive-et__badges span,
  .prive-et__lieu {
    color: #333333 !important;
  }
  .rapport-tableau tbody th button {
    min-height: 0;
    color: #000000;
    text-decoration: none;
  }
  .article-title,
  .page-content h2,
  .rapport-profil,
  .rapport-compte,
  .rapport-lire strong,
  .simu-carte__titre,
  .fc-score strong,
  .fc-rang,
  .simu-comptes strong,
  .simu-resume .chiffre strong,
  .formula-inline,
  .rapport-tableau td {
    color: #000000 !important;
  }
  .article-meta,
  .simu__aide,
  .rapport-lire,
  .rapport-carte__plus,
  .simu-carte__lieu,
  .fc-petit,
  .fc-score span,
  .note-box,
  .rapport-exemple {
    color: #333333 !important;
  }
  .simu-carte,
  .simu-resume .chiffre,
  .simu-comptes li,
  .rapport-exemple,
  .note-box {
    background: #ffffff !important;
    border-color: #999999;
  }
  /* Plus serré sur papier : 5 à 6 filières par page */
  .simu-cartes {
    gap: 6px;
  }
  .simu-carte {
    gap: 0;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.45;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .simu-carte__titre,
  .simu-carte__score strong {
    font-size: 14px;
  }
  .fc--compact summary,
  .fc-detail {
    padding: 0;
  }
  .fc-score {
    padding: 2px;
    border: 1px solid #cccccc;
    background: #ffffff !important;
  }
  .fc-score--plus strong {
    color: #1e8449 !important;
  }
  .fc-score--moins strong {
    color: #b9770e !important;
  }
  .rapport-barre {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rapport-aide {
    border: 0;
  }
  .rapport-aide summary {
    min-height: 0;
    padding: 0;
    color: #000000;
  }
  .rapport-aide summary::after,
  .rapport-aide[open] summary::after {
    content: none;
  }
  .rapport-aide .rapport-lire {
    padding-inline-start: 18px;
  }
  .note-box {
    break-inside: avoid;
  }
  .fc-rang {
    border: 1px solid #000000;
    background: #ffffff !important;
  }
  .page-content h2 {
    break-after: avoid;
  }
  /* Pas besoin des adresses des liens sur papier */
  .page-content a {
    color: #000000;
    text-decoration: none;
  }
}
