/* La page /cours/ (vue des élèves) et /cours/enseignant/ (vue de Guillaume) : maquette validée le 11/11/2026.
   Cartes et panneaux 10 px, boutons en pilule (règle de base.css). Couleurs des cartes reprises de la maquette.
   Depuis le 15/11/2026, chaque carte de module mène à la page du module (/cours/<id>/), plus de panneau ouvert. */
.portail { --carte: #262936; --carte-img: #1f212b; }
.portail > * { max-width: none; }
.portail > .chapo { max-width: 68ch; }
.portail h2 { margin-top: 72px; }

/* Les cours */
.cgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.cc { background: var(--carte); border-radius: 10px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.cc-t { flex: 1; font-size: 20px; line-height: 1.25; font-weight: 650; font-stretch: 86%; }
/* Un cours dont le support n'existe pas encore (vue des élèves : aucune diapo, jamais) */
.cc-n { font-size: 15px; color: var(--doux); }

/* Boutons d'action : pilules, 44 px de haut au moins (le doigt sur un téléphone). Une seule action principale par page. */
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.portail .act {
  display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 1.5px solid rgba(236, 231, 218, .35); color: var(--texte); font-size: 15px;
  font-weight: 600; line-height: 1.25; text-decoration: none;
  transition: border-color .15s ease-out, background-color .15s ease-out, transform .1s ease-out;
}
.portail .act:hover { border-color: var(--texte); }
.portail .act:active { transform: translateY(1px); }
.portail .act small { font-size: 13.5px; font-weight: 400; color: var(--doux); }
.portail .act.principal { background: var(--orange); border-color: var(--orange); color: var(--salle); font-weight: 680; }
.portail .act.principal:hover { background: #ffaa1a; border-color: #ffaa1a; }
.portail .act.principal small { color: var(--salle); }

/* Les quatre vues (« En ligne d'abord » cochée au chargement depuis le 04/12/2026) : boutons radio cachés à l'œil
   mais pas au clavier, étiquettes en pilules */
.vh { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.row label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--carte); color: var(--doux); font-size: 15px; cursor: pointer; user-select: none;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.row label:hover { color: var(--texte); }
#vt:checked ~ .row label[for=vt], #vd:checked ~ .row label[for=vd], #vc:checked ~ .row label[for=vc], #va:checked ~ .row label[for=va] {
  background: var(--orange); color: var(--salle); font-weight: 650;
}
#vt:focus-visible ~ .row label[for=vt], #vd:focus-visible ~ .row label[for=vd], #vc:focus-visible ~ .row label[for=vc], #va:focus-visible ~ .row label[for=va] {
  outline: 2px solid var(--orange); outline-offset: 3px;
}
.q {
  flex: 1; min-width: 240px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--creme); color: var(--encre); font: inherit; font-size: 16px;
}
.q::placeholder { color: var(--souligne); }
.pv { display: none; }
#vt:checked ~ .pan .p0, #vd:checked ~ .pan .p1, #vc:checked ~ .pan .p2, #va:checked ~ .pan .p3 { display: block; }
.portail .grp h3 { margin: 32px 0 14px; font-size: 16px; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--doux); }
.p0 .grp, .p3 .grp { padding-top: 18px; }

/* Les modules : un dessin par module, la carte mène à la page du module */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.portail a.mc {
  display: flex; flex-direction: column; padding: 10px 10px 18px; border-radius: 10px;
  background: var(--carte); color: inherit; text-decoration: none;
  outline: 1.5px solid transparent; outline-offset: -1.5px; transition: outline-color .15s ease-out, transform .1s ease-out;
}
.portail a.mc:hover { outline-color: var(--orange); }
.portail a.mc:active { transform: scale(.99); }
.portail a.mc:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.mc-i { display: block; aspect-ratio: 16 / 10; margin-bottom: 14px; border-radius: 7px; background: var(--carte-img); }
.mc-i svg, .mp-i svg { display: block; width: 100%; height: 100%; }
.mc-n { padding: 0 6px; font-size: 18px; font-weight: 650; line-height: 1.3; }
.mc-d { padding: 4px 6px 0; font-size: 15px; line-height: 1.4; color: var(--doux); }

/* De A à Z : une ligne par outil, toute la ligne mène au module, les codes de scène restent des liens à part */
.portail .az { list-style: none; margin: 0; padding: 0; max-width: 980px; }
.az li {
  position: relative; display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2px 18px; align-items: baseline;
  min-height: 44px; padding: 10px 0; box-sizing: border-box;
}
.az.prof li { grid-template-columns: 11rem 7rem minmax(0, 1fr); }
.portail .az-n { font-size: 17px; font-weight: 650; color: var(--texte); text-decoration: none; transition: color .15s ease-out; }
.az-n::after { content: ''; position: absolute; inset: 0; }
.az li:hover .az-n { color: var(--orange); }
.az-d { font-size: 15.5px; line-height: 1.45; color: var(--doux); }
.az-v { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--doux); }
.portail .az-v a { position: relative; z-index: 1; color: var(--texte); }

/* Déjà dans tes cours (vue enseignant) */
.vu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 16px; font-size: 15px; color: var(--doux); }
.portail .vu a { color: var(--texte); }
.vu small { margin-left: 7px; font-size: 13px; color: var(--doux); }
.vide { display: none; margin-top: 22px; color: var(--doux); }
.portail .note { margin-top: 26px; font-size: 15px; color: var(--doux); }

/* La page d'un module */
.portail .ariane { margin-bottom: 22px; font-size: 15px; color: var(--doux); }
.portail .ariane a { text-decoration: none; border-bottom: 1px solid var(--souligne); }
.portail .ariane a:hover { color: var(--texte); border-bottom-color: var(--orange); }
.mp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 28px 56px; align-items: center; }
.mp .chapo { max-width: 52ch; }
.mp-i { display: block; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--carte-img); }
.portail .mp-a { margin-top: 30px; }
.portail > .docs-i { max-width: 68ch; margin-top: 12px; font-size: 16.5px; color: var(--doux); }
.portail > .docs { max-width: 780px; list-style: none; counter-reset: doc; margin: 30px 0 0; padding: 0; }
.docs > li { counter-increment: doc; position: relative; padding-left: 56px; }
.docs > li + li { margin-top: 40px; }
.docs > li::before {
  content: counter(doc); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--salle);
  font-size: 17px; font-weight: 760; line-height: 1;
}
.portail .docs h3 { padding-top: 3px; font-size: 22px; line-height: 1.25; font-weight: 650; font-stretch: 86%; }
.docs p { margin-top: 8px; font-size: 16.5px; line-height: 1.5; color: var(--doux); }
.docs .acts { margin-top: 16px; }
.docs .docs-n { font-size: 15px; }
.docs .docs-l { margin-top: 18px; font-size: 15px; }
.docs .lieux { margin-top: 10px; gap: 8px; }
.portail .lieux .act { padding: 8px 15px; font-size: 14.5px; font-weight: 500; }

/* Les méthodes à venir (28/11/2026) : grisées, sans lien, sans carte ni dessin. Gris lisible sur le fond de la salle
   (nom 5,9 pour 1, description 4,6 pour 1), plus sourd que les cartes des modules en ligne. */
.av { margin-top: 6px; }
/* sous les modules en ligne, en cartes (« En ligne d'abord », « Par domaine », « Par cours ») ou en lignes (« De A à
   Z », depuis le 05/12/2026) */
.mgrid + .av, .az + .av { margin-top: 28px; }
.portail .av-t { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--doux); }
.portail .av-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 28px; }
.av-l li { display: flex; flex-direction: column; justify-content: flex-start; min-height: 44px; padding: 8px 0; cursor: default; }
.av-n { font-size: 16px; font-weight: 600; line-height: 1.3; color: #9a9ca7; }
.av-d { margin-top: 2px; font-size: 14.5px; line-height: 1.4; color: #858793; }
.av-v { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 13.5px; }
.portail .av-v a { color: var(--doux); }
.portail .av-v a:hover { color: var(--texte); }
/* De A à Z : une méthode à venir n'est pas un lien. Depuis le 05/12/2026, elles sont toutes sous le titre « À venir »,
   la ligne ne le répète plus. */
.az li.az-av { cursor: default; }
.portail .az-av .az-n { font-weight: 600; color: #9a9ca7; }
.az-av .az-n::after { content: none; }
.az li.az-av:hover .az-n { color: #9a9ca7; }
/* « à venir » au bout du nom : seulement dans une page d'avant le 05/12/2026 encore gardée par un navigateur, qui
   recevrait cette feuille (même adresse de fichier) */
.az-av .az-n small { display: inline-block; white-space: nowrap; margin-left: 10px; font-size: 13px; font-weight: 400; color: #858793; }
.az-av .az-d { color: #858793; }

@media (max-width: 960px) {
  .cgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mp { grid-template-columns: 1fr; }
  .mp-i { max-width: 440px; }
}
@media (max-width: 640px) {
  .portail h2 { margin-top: 56px; }
  .q { flex-basis: 100%; min-width: 0; }
  .mgrid { grid-template-columns: 1fr; }
  .az li { grid-template-columns: minmax(0, 1fr); }
  /* vue enseignant : le nom, puis les scènes, puis à quoi sert l'outil, l'un sous l'autre (un nom long ne pousse plus
     les codes hors de l'écran) */
  .az.prof li { grid-template-columns: minmax(0, 1fr); }
  .az.prof .az-d { grid-column: 1 / -1; }
  .az-v a { white-space: nowrap; }
  .az.prof .az-d:empty { display: none; }
  .docs > li { padding-left: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .portail .act, .row label, .portail a.mc, .portail .az-n { transition: none; }
}
