/*  examens.css — LA RUBRIQUE « BREVET ET BAC » (03/11/2026)
 *
 *  Chargée par /examens, /brevet et /bac-francais seulement (via
 *  $pageHeadExtra) : ces règles ne pèsent rien sur le reste du site.
 *  Elle passe AVANT site.css dans le <head> : tout est préfixé `exa-`, et les
 *  retouches des classes communes (.btn) passent par un sélecteur plus
 *  précis, jamais par l'ordre.
 *  Uniquement des jetons du thème : cinq thèmes, dont des sombres.
 */

.exa { max-width: 52rem; }
.exa > section, .exa > .exa-matiere { margin: 0 0 1.4rem; }
.exa .card > h2:first-child { margin-top: 0; }

/* Le sommaire des matières : des pastilles qui passent à la ligne. */
.exa-sommaire { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.2rem; }
.exa-sommaire a { display: inline-block; padding: .35rem .8rem; border: 1.5px solid var(--line);
  border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.exa-sommaire a:hover { border-color: var(--marker); background: var(--wash); }

/* Un bloc par matière. */
.exa-matiere { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); scroll-margin-top: 5rem; }
.exa-matiere h2 { margin: 0 0 .3rem; }
.exa-matiere h3 { margin: 1.1rem 0 .4rem; font-size: 1.02rem; }
.exa-matiere h4 { margin: .9rem 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); }

.exa-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0 .4rem; }

.exa-chapitres { margin: .2rem 0 .6rem; padding-left: 1.1rem; }
.exa-chapitres li { margin-bottom: .25rem; overflow-wrap: anywhere; }
.exa-avant li { font-weight: 600; }
.exa-ctl { display: inline-block; margin-left: .2rem; padding: 0 .45rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; vertical-align: .1em; white-space: nowrap;
  background: var(--marker); color: var(--marker-ink); }

.exa-tout { margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.exa-tout > summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: .3rem 0; }
.exa-note { margin: -.8rem 0 1.4rem; }

/* Le compte des semaines. */
.exa-compte .exa-semaines { font-size: 1.12rem; }

/* La semaine type : un jour par ligne, le libellé à gauche. */
.exa-semaine { list-style: none; margin: .8rem 0 1rem; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.exa-semaine li { display: grid; grid-template-columns: 7rem 1fr; gap: .8rem; padding: .55rem .9rem;
  border-top: 1px solid var(--line); }
.exa-semaine li:first-child { border-top: 0; }
.exa-semaine li strong { color: var(--ink); }

.exa-faq h3 { margin: 1rem 0 .3rem; font-size: 1.02rem; }
.exa-faq p { margin: 0 0 .6rem; }

/* La porte /examens : deux cartes côte à côte, l'une sous l'autre en étroit. */
.exa-portes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem;
  margin: 0 0 2rem; }
.exa-porte { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); }
.exa-portes > .exa-porte { margin: 0; }
.exa-porte h2 { margin: 0 0 .4rem; }
.exa-porte h2 a { color: inherit; text-decoration: none; }
.exa-porte h2 a:hover { text-decoration: underline; }

/* Mobile d'abord : sous 560 px, les boutons prennent toute la largeur. */
@media (max-width: 560px) {
  .exa-matiere, .exa-porte { padding: .9rem 1rem; }
  .exa-actions .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .exa-semaine li { grid-template-columns: 1fr; gap: .1rem; }
}
