/* 2027 : réviser les programmes. Base cuauh.fr (TASA, sobre), icônes Material Symbols remplies, couleurs en aplats. */

@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/2027/assets/material-symbols.woff2?v=1") format("woff2");
}

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: 500;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: -0.22em;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  user-select: none;
}

body.p27-page {
  --bg: #ffffff;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.6);
  --line: rgba(17, 17, 17, 0.12);
  --soft: #f4f3ef;
  --soft2: #ebe9e3;
  --good: #1f9d55;
  --bad: #e5484d;
  --mid: #f2b630;
  background: var(--bg);
  color: var(--ink);
}
html.theme-dark body.p27-page {
  --bg: #000000;
  --ink: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.62);
  --line: rgba(255, 255, 255, 0.16);
  --soft: #141414;
  --soft2: #1f1f1f;
  color: var(--ink);
}

.p27 {
  max-width: 1040px;
  margin: 0 auto;
  padding: 120px 24px 110px;
  font-family: "TASA", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  position: relative;
  z-index: 2;
}
#title + .p27 { padding-top: 90px; }
.p27 a { color: inherit; }
.p27 h1, .p27 h2, .p27 h3, .p27 h4 { font-weight: bold; letter-spacing: -0.02em; margin: 0; }
.p27 .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.p27 kbd {
  font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid currentColor; opacity: 0.55; margin-left: 4px;
}
@media (hover: none) { .p27 kbd { display: none; } }

/* ---------- accueil ---------- */
.p27-intro { max-width: 760px; margin-bottom: 48px; }
.p27-intro h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; margin-bottom: 20px; text-wrap: balance; }
.p27-lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); margin: 0 0 18px; text-wrap: pretty; }
.p27-meta { font-size: 14px; color: var(--muted); margin: 0; }
.p27-meta a { text-decoration: underline; text-underline-offset: 3px; }

.p27-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 80px; }
.p27-mode {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 210px;
  padding: 22px 20px 20px; border-radius: 16px; text-decoration: none; color: #111 !important;
  transition: transform 0.2s ease;
}
.p27-mode-ic { font-size: 34px; }
.p27-mode-t { font-size: 22px; font-weight: bold; letter-spacing: -0.02em; line-height: 1.1; }
.p27-mode-d { font-size: 14px; line-height: 1.45; opacity: 0.78; text-wrap: pretty; }
.p27-mode-go { position: absolute; right: 18px; bottom: 18px; font-size: 22px; }
@media (hover: hover) { .p27-mode:hover { transform: translateY(-3px); } }
.m-jaune, .m-flashcards { background: #ffd95a; }
.m-bleu, .m-qui-propose { background: #9cc3ff; }
.m-corail, .m-quiz { background: #ffab91; }
.m-vert, .m-vrai-faux { background: #8fdcab; }
@media (max-width: 900px) { .p27-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .p27-modes { grid-template-columns: 1fr; } .p27-mode { min-height: 0; padding-right: 50px; } }

.p27-progs h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 24px; }
.p27-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.p27-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  padding: 30px 20px 18px; border-radius: 14px; background: var(--soft); text-decoration: none;
  transition: background 0.2s ease;
}
.p27-card-band { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--c, #888); }
.p27-card-nom { font-size: 22px; font-weight: bold; letter-spacing: -0.02em; }
.p27-card-parti { font-size: 14px; color: var(--muted); }
.p27-card-titre { font-size: 14px; line-height: 1.4; margin-top: 6px; text-wrap: pretty; }
.p27-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); }
@media (hover: hover) { .p27-card:hover { background: var(--soft2); } }
.p27-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--bg); }
.p27-note { margin-top: 22px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 760px; }

/* ---------- boutons ---------- */
.p27-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 16px; text-decoration: none; line-height: 1.2;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.p27-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.p27-btn--go { background: var(--ink); color: var(--bg) !important; }
.p27-btn--ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.p27-btn--c { background: var(--c, var(--ink)); color: #fff !important; }
@media (hover: hover) { .p27-btn:not(:disabled):hover { opacity: 0.85; } }
.p27-btn:active { transform: scale(0.98); }
.p27-link {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- page programme ---------- */
.p27-crumb { margin-bottom: 26px; font-size: 14px; }
.p27-crumb a { text-decoration: none; color: var(--muted); }
.p27-crumb a:hover { color: var(--ink); }
.p27-prog-head { position: relative; padding: 34px 0 30px; margin-bottom: 28px; border-top: 10px solid var(--c, var(--ink)); }
.p27-prog-parti { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.p27-prog-head h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; margin-bottom: 12px; }
.p27-prog-titre { font-size: 18px; line-height: 1.45; margin: 0 0 22px; max-width: 760px; text-wrap: pretty; }
.p27-prog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.p27-star { color: var(--mid); }
.p27-warn {
  margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--soft);
  font-size: 14px; line-height: 1.5; max-width: 760px;
}
.p27-warn a { text-decoration: underline; }

.p27-tools {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 0; margin-bottom: 10px; background: var(--bg);
}
.p27-search {
  flex: 1 1 300px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 10px; background: var(--soft);
}
.p27-search .ms { color: var(--muted); }
.p27-search input {
  flex: 1; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 12px 0; outline: none;
}
.p27-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.p27-toggle input { width: 18px; height: 18px; accent-color: var(--c, var(--ink)); }
.p27-count { font-size: 14px; color: var(--muted); }

.p27-toc { margin: 6px 0 30px; border-radius: 12px; background: var(--soft); }
.p27-toc summary { cursor: pointer; padding: 14px 16px; font-weight: bold; list-style: none; }
.p27-toc summary::-webkit-details-marker { display: none; }
.p27-toc[open] summary .ms { transform: rotate(180deg); }
.p27-toc ol { list-style: none; margin: 0; padding: 0 16px 16px; columns: 2 280px; column-gap: 28px; }
.p27-toc li { break-inside: avoid; font-size: 14px; line-height: 1.4; padding: 3px 0; }
.p27-toc li a { text-decoration: none; }
.p27-toc li a:hover { text-decoration: underline; }
.p27-toc-p { font-weight: bold; margin-top: 10px; color: var(--muted); }

.p27-part { margin-top: 40px; }
.p27-part-t { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px !important; }
.p27-chap { padding-top: 18px; scroll-margin-top: 80px; }
.p27-chap-t {
  font-size: clamp(24px, 3vw, 32px); line-height: 1.12; margin-bottom: 8px !important; text-wrap: balance;
  padding-left: 14px; border-left: 6px solid var(--c, var(--ink));
}
.p27-sub { margin-top: 18px; }
.p27-sub-t { font-size: 17px; line-height: 1.35; margin-bottom: 6px !important; }
.p27-mes { list-style: none; margin: 0; padding: 0; }
.p27-mes li {
  position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  padding: 11px 36px 11px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.55;
}
.p27-mes li .p27-star { flex: 0 0 auto; }
.p27-mes-t { flex: 1 1 0; min-width: 0; text-wrap: pretty; }
.p27-mes-d { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.p27-mes li.is-cle .p27-mes-t { font-weight: bold; }
.p27-chap-src { font-size: 0.55em; color: var(--muted); text-decoration: none; vertical-align: 0.2em; }
.p27-chap-src:hover { color: var(--ink); }
.p27-src { position: absolute; right: 0; top: 11px; color: var(--muted); text-decoration: none; }
.p27-src:hover { color: var(--ink); }
.p27-empty { color: var(--muted); padding: 30px 0; }

/* ---------- jeux ---------- */
.p27-play { max-width: 820px; }
.p27-play-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 30px; }
.p27-play-ic {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 16px; color: #111; font-size: 32px;
}
.p27-play-head h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.04; margin-bottom: 8px; }
.p27-play-head p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

.p27-setup { display: flex; flex-direction: column; gap: 22px; padding: 26px; border-radius: 16px; background: var(--soft); }
.p27-setup fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.p27-setup legend { font-weight: bold; font-size: 17px; margin-bottom: 12px; padding: 0; }
.p27-hint { font-weight: normal; color: var(--muted); font-size: 14px; }
.p27-mini { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.p27-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p27-chip { position: relative; cursor: pointer; }
.p27-chip input { position: absolute; opacity: 0; pointer-events: none; }
.p27-chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; transition: background 0.15s ease, color 0.15s ease;
}
.p27-chip span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #888); }
.p27-chip input:checked + span { background: var(--c, var(--ink)); color: #fff; box-shadow: none; }
.p27-chip input:checked + span::before { background: #fff; }
.p27-chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.p27-radios { display: flex; flex-direction: column; gap: 8px; }
.p27-radios--row { flex-direction: row; flex-wrap: wrap; }
.p27-radios label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.p27-radios input { width: 18px; height: 18px; accent-color: var(--ink); }
.p27-setup-info { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.p27-setup .p27-btn--go { align-self: flex-start; font-size: 17px; padding: 14px 24px; }

.p27-game-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.p27-game-bar .p27-link { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.p27-game-bar .p27-link:hover { color: var(--ink); }
.p27-game-prog { text-align: right; }

.p27-card-play { padding: clamp(22px, 4vw, 36px); border-radius: 18px; background: var(--soft); }
.p27-cand { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; background: var(--c, var(--ink)); color: #fff; font-size: 14px; white-space: nowrap; vertical-align: 0.1em; }
.p27-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.p27-cand .p27-dot { background: #fff; }
.p27-info { display: inline-block; font-size: 14px; line-height: 1.4; padding: 5px 11px; border-radius: 8px; background: var(--bg); }
.p27-info b { color: var(--muted); font-weight: normal; margin-right: 4px; }

.p27-flash-infos { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-bottom: 18px; }
.p27-flash-text { font-size: clamp(21px, 2.8vw, 28px); line-height: 1.45; margin: 0; letter-spacing: -0.01em; text-wrap: pretty; }
.p27-flash-text .w { transition: filter 0.35s ease, opacity 0.35s ease; }
.p27-flash-text .w.is-blur { filter: blur(7px); opacity: 0.75; user-select: none; -webkit-user-select: none; pointer-events: none; }
.p27-hints { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.p27-hint-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; background: #ffd95a; color: #111;
}
.p27-hint-btn:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) { .p27-hint-btn:not(:disabled):hover { background: #ffcf2e; } }
.p27-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.p27-full { margin-top: 16px; font-size: 15px; line-height: 1.55; }
.p27-full summary { cursor: pointer; color: var(--muted); }
.p27-full p { margin: 8px 0 0; }
.p27-detail { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }
.p27-src-line { margin: 12px 0 0; font-size: 14px; }
.p27-srclink { color: var(--muted) !important; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.p27-srclink:hover { color: var(--ink) !important; }
.p27-rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.p27-rate-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 10px; border-radius: 12px; border: 0;
  cursor: pointer; font: inherit; font-size: 16px; color: #111;
}
.r-bad { background: #ff9b8f; }
.r-mid { background: #ffd95a; }
.r-good { background: #8fdcab; }
@media (hover: hover) { .p27-rate-btn:hover { filter: brightness(0.95); } }
@media (max-width: 520px) { .p27-rate { grid-template-columns: 1fr; } }

.p27-q-label { font-size: 16px; color: var(--muted); margin: 0 0 14px; line-height: 1.6; }
.p27-q-text { margin: 0 0 22px; padding: 0; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.p27-blank {
  display: inline-block; min-width: 3.5em; border-bottom: 3px solid var(--ink); line-height: 1.1; text-align: center;
}
.p27-blank.is-filled { border-bottom-color: var(--good); color: var(--good); font-weight: bold; }
.p27-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p27-opt {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 0; cursor: pointer;
  font: inherit; font-size: 17px; text-align: left; background: var(--bg); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); transition: background 0.15s ease, box-shadow 0.15s ease;
}
.p27-opt .p27-dot { background: var(--c, var(--muted)); width: 12px; height: 12px; }
@media (hover: hover) { .p27-opt:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--ink); } }
.p27-opt:disabled { cursor: default; }
.p27-opt.is-good { background: var(--good); color: #fff; box-shadow: none; }
.p27-opt.is-bad { background: var(--bad); color: #fff; box-shadow: none; }
.p27-opt.is-good .p27-dot, .p27-opt.is-bad .p27-dot { background: #fff; }
.p27-opts--vf .p27-opt { justify-content: center; font-size: 19px; padding: 18px; }
.o-vrai .ms { color: var(--good); }
.o-faux .ms { color: var(--bad); }
.p27-opt.is-good .ms, .p27-opt.is-bad .ms { color: #fff; }
@media (max-width: 520px) { .p27-opts { grid-template-columns: 1fr; } }
.p27-feedback:empty { display: none; }
.p27-feedback { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.p27-feedback p { margin: 0 0 8px; }
.p27-verdict { font-weight: bold; font-size: 19px; display: inline-flex; align-items: center; gap: 6px; }
.v-good { color: var(--good); }
.v-bad { color: var(--bad); }
.p27-where { font-size: 14px; color: var(--muted); }

.p27-end { text-align: center; }
.p27-end-score { font-size: clamp(56px, 10vw, 96px); font-weight: bold; letter-spacing: -0.04em; margin: 0; line-height: 1; }
.p27-end-score .ms { font-size: 0.6em; color: var(--mid); vertical-align: 0.05em; }
.p27-end-score span:last-child { font-size: 0.45em; color: var(--muted); }
.p27-end-msg { font-size: 20px; margin: 10px 0 0; }
.p27-end .p27-actions { justify-content: center; }
.p27-end-t { font-size: 22px; margin: 40px 0 10px !important; text-align: left; }
.p27-end-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.p27-end-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.p27-end-list p { margin: 0 0 6px; line-height: 1.5; }
.p27-end-list .p27-mini { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- méthode ---------- */
.p27-doc { max-width: 760px; }
.p27-doc h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin-bottom: 24px; }
.p27-doc h2 { font-size: 24px; margin: 40px 0 12px !important; }
.p27-doc p, .p27-doc li { font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.p27-doc a { text-decoration: underline; text-underline-offset: 3px; }
.p27-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.p27-table th, .p27-table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.p27-table th { font-weight: bold; color: var(--muted); }
@media (max-width: 640px) { .p27-table .hide-sm { display: none; } }
