/* ==========================================================================
   PandaCodeur : pages d'examen
   Trois ajouts : les tags sous le titre, le bandeau qui ouvre la
   correction, et la navigation d'un examen a l'autre.
   Le texte des pages n'est pas touche : seule la presentation change.
   ========================================================================== */

:root {
  --pc-ex-accent: #e2571e;
  --pc-ex-corr: #c0392b;
  --pc-ex-bord: rgba(0, 0, 0, .13);
}

/* ------------------------------------------------------------------ tags */
.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 10px 0 20px;
  padding: 0;
  list-style: none;
}

.pc-tags-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .55;
  margin-right: 2px;
}

.pc-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 11px;
  border: 1px solid var(--pc-ex-bord);
  border-radius: 999px;
  background: rgba(226, 87, 30, .06);
  color: inherit;
  white-space: nowrap;
}

/* ------------------------------------------- bandeau ouvrant la correction */
/* Pose sur le titre deja present ; son texte reste celui de la page. */
.pc-titre-corrige {
  display: block !important;
  position: relative;
  margin: 38px 0 22px !important;
  padding: 15px 20px 15px 56px !important;
  border: 0 !important;
  border-radius: 9px;
  background: var(--pc-ex-corr);
  color: #fff !important;
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(192, 57, 43, .22);
  scroll-margin-top: 80px;
}

.pc-titre-corrige * { color: #fff !important; }

/* la coche, dessinee en CSS : aucune image a charger */
.pc-titre-corrige::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 18px;
  height: 10px;
  margin-top: -7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.pc-corrige-note {
  margin: -14px 0 24px;
  padding: 0 4px;
  font-size: .85rem;
  line-height: 1.55;
  opacity: .75;
}

/* ------------------------------------------- navigation entre les examens */
.pc-navex {
  margin: 40px 0 10px;
  padding: 20px 22px;
  border: 2px solid var(--pc-ex-bord);
  border-radius: 12px;
  background: #fff;
}

.pc-navex-titre {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pc-ex-accent);
  margin: 0 0 14px;
}

.pc-navex-rang {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 14px;
}

.pc-navex-liens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.pc-navex-lien {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 13px 16px;
  border: 1px solid var(--pc-ex-bord);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pc-navex-lien:hover {
  border-color: var(--pc-ex-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .09);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.pc-navex-suivant { text-align: right; }

.pc-navex-sens {
  font-size: .71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--pc-ex-accent);
  margin-bottom: 4px;
}

.pc-navex-nom { font-size: .93rem; font-weight: 700; line-height: 1.35; }

.pc-navex-vide {
  border-style: dashed;
  opacity: .45;
  cursor: default;
}

.pc-navex-vide:hover {
  border-color: var(--pc-ex-bord);
  box-shadow: none;
  transform: none;
}

.pc-navex-tous {
  display: block;
  margin: 14px 0 0;
  text-align: center;
  font-size: .89rem;
  font-weight: 700;
}

.pc-navex-tous a { color: var(--pc-ex-accent); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 575.98px) {
  .pc-navex { padding: 15px 14px; }
  .pc-navex-liens { grid-template-columns: 1fr; }
  .pc-navex-suivant { text-align: left; }
  .pc-titre-corrige {
    font-size: 1.05rem !important;
    padding: 13px 15px 13px 46px !important;
  }
  .pc-titre-corrige::before { left: 15px; }
  .pc-tag { font-size: .74rem; padding: 4px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-navex-lien { transition: none !important; }
}

/* titre de correction secondaire : un corrige d'exercice isole, plus loin
   dans la page. Meme code couleur, sans reprendre tout le bandeau. */
.pc-titre-corrige-2 {
  display: block !important;
  margin: 30px 0 16px !important;
  padding: 9px 0 9px 15px !important;
  border: 0 !important;
  border-left: 5px solid var(--pc-ex-corr) !important;
  color: var(--pc-ex-corr) !important;
  font-size: 1.06rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.pc-titre-corrige-2 * { color: var(--pc-ex-corr) !important; }

/* titre de correction sans contenu : on reste neutre plutot que d'annoncer
   en rouge un corrige qui n'est pas encore redige */
.pc-titre-attente {
  display: block !important;
  margin: 32px 0 10px !important;
  padding: 10px 0 10px 15px !important;
  border: 0 !important;
  border-left: 5px solid rgba(0, 0, 0, .2) !important;
  font-size: 1.06rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: .03em;
  opacity: .7;
}

.pc-note-attente {
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .04);
  opacity: .9;
}

/* etat du corrige, en fin de liste de tags */
.pc-tag-etat { font-weight: 800; }

.pc-tag-oui {
  background: rgba(27, 126, 60, .1);
  border-color: rgba(27, 126, 60, .45);
  color: #15682f;
}

.pc-tag-non {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .18);
  opacity: .8;
}

/* --------------------------------------- liste des examens d'une categorie */
.page-items .card-body .pc-ex-etat {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 800;
  line-height: 1.4;
}

.pc-ex-oui {
  background: rgba(27, 126, 60, .1);
  border-color: rgba(27, 126, 60, .45);
  color: #15682f;
}

.pc-ex-non {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .18);
  opacity: .75;
}

/* Les tableaux colles depuis Word gardent leur largeur d'origine et font
   deborder la page sur telephone. On les rend defilants plutot que de
   toucher au balisage. */
.col-content.col-text table,
.col-content.col-no-widget table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* une seule colonne : le tableau se comporte comme un bloc normal */
.col-content.col-text table tbody,
.col-content.col-no-widget table tbody { display: table; width: 100%; }

/* Le theme peint en vert les blocs marques « row-highlighted ». Sur une
   fiche, ce fond tombait derriere un enonce ou un corrige au hasard de la
   mise en page d'origine, sans rien signifier. On le neutralise : la
   hierarchie de la page vient desormais du cadre des corriges et des
   blocs de code. */
.pc-fiche .row-highlighted:not(.container),
.pc-fiche .row-highlighted.container > .row-content,
.pc-fiche .row-separated:not(.container),
.pc-fiche .row-separated.container > .row-content {
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  color: inherit !important;
}

.pc-fiche .row-highlighted h1,
.pc-fiche .row-highlighted h2,
.pc-fiche .row-highlighted h3 { color: inherit !important; }

/* ======================================================================
   Sujets d'examen redigés dans le nouveau format : en-tete, bareme,
   enonce, resultats encadres et blocs de code. Classes additives :
   aucune page existante ne les utilise.
   ====================================================================== */

.pc-exam-meta {
  margin: 0 0 6px;
  padding: 11px 15px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .04);
  border: 1px solid rgba(0, 0, 0, .1);
  font-size: .92rem;
  line-height: 1.7;
}
.pc-exam-note {
  margin: 0 0 22px;
  font-size: .86rem;
  font-style: italic;
  opacity: .75;
}

.pc-bareme {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 10px;
  background: rgba(226, 87, 30, .12);
  color: #c44714;
  vertical-align: middle;
  white-space: nowrap;
}

.pc-enonce-liste { margin: 0 0 16px; padding-left: 26px; }
.pc-enonce-liste li { margin-bottom: 7px; }
.pc-enonce-liste li:last-child { margin-bottom: 0; }

.pc-formule {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  background: rgba(0, 0, 0, .05);
  border: 1px solid rgba(0, 0, 0, .1);
  font-size: 1.02rem;
}

.pc-resultat {
  margin: 18px 0;
  padding: 13px 17px;
  border-radius: 8px;
  background: rgba(27, 126, 60, .08);
  border: 1px solid rgba(27, 126, 60, .28);
  border-left: 4px solid #1b7e3c;
}

.pc-code {
  margin: 0 0 18px;
  padding: 15px 17px;
  border-radius: 9px;
  background: #16222e;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pc-code code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "DejaVu Sans Mono", monospace;
  font-size: .84rem;
  line-height: 1.6;
  color: #e6edf3;
  background: none;
  padding: 0;
  white-space: pre;
}

@media (max-width: 575.98px) {
  .pc-exam-meta { font-size: .85rem; padding: 9px 12px; }
  .pc-code { padding: 11px 12px; }
  .pc-code code { font-size: .74rem; }
  .pc-formule { font-size: .93rem; padding: 10px 12px; }
}

/* ---------------------------------------------- signature de fin de corrige */
.pc-signature {
  margin: 34px 0 10px;
  padding: 18px 22px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .035);
  border: 1px solid rgba(0, 0, 0, .1);
  text-align: center;
}
.pc-signature-citation {
  margin: 0 0 14px;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
}
.pc-signature-auteur {
  margin: 0 0 14px;
  font-size: .92rem;
}
.pc-wa {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #25d366;
  color: #0b2e18 !important;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none !important;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.pc-wa:hover,
.pc-wa:focus {
  background: #1eb455;
  color: #0b2e18 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, .35);
}
.pc-wa svg { width: 19px; height: 19px; flex: none; fill: currentColor; }

@media (max-width: 575.98px) {
  .pc-signature { padding: 14px 15px; }
  .pc-signature-citation { font-size: .94rem; }
  .pc-wa { font-size: .88rem; padding: 9px 16px; }
}
