/* DUEL TSSR v15.0.4 — Contraste accessible Cuivre & Ambre (portage v14.9.3).
   Portage validé sur les sélecteurs du package v15.0.3 ; aucune logique métier modifiée.
   Règles limitées à data-design-theme="cuivre".
   Les surfaces claires doivent toujours disposer de couleurs de texte foncées. */
body[data-design-theme="cuivre"] {
  --c1493-paper: #f8fafb;
  --c1493-paper-alt: #eef3f6;
  --c1493-ink: #172b3d;
  --c1493-muted: #3f5263;
  --c1493-amber-ink: #855016;
  --c1493-outline: #8798a6;
}
/* Rappel de panne : ne pas hériter du texte crème du thème sombre. */
body[data-design-theme="cuivre"] .pa-quiz-context {
  background: var(--c1493-paper) !important;
  color: var(--c1493-ink) !important;
  border-color: #ba7d3b !important;
}
body[data-design-theme="cuivre"] .pa-quiz-context strong,
body[data-design-theme="cuivre"] .pa-quiz-context p {
  color: var(--c1493-ink) !important;
  opacity: 1 !important;
}
body[data-design-theme="cuivre"] .pa-quiz-context .eyebrow {
  color: var(--c1493-amber-ink) !important;
  opacity: 1 !important;
}
/* Réponses : blanc cassé + texte bleu encre, en conservant les états des boutons. */
body[data-design-theme="cuivre"] .pa-answers .pa-answer {
  background: #ffffff !important;
  color: var(--c1493-ink) !important;
  border: 1px solid var(--c1493-outline) !important;
  font-weight: 550;
  opacity: 1 !important;
  line-height: 1.5;
}
body[data-design-theme="cuivre"] .pa-answers .pa-answer span {
  color: var(--c1493-amber-ink) !important;
  opacity: 1 !important;
}
body[data-design-theme="cuivre"] .pa-answers .pa-answer:hover:not(:disabled) {
  background: #fff1dd !important;
  border-color: #a56524 !important;
  box-shadow: 0 0 0 2px #b7793d33 !important;
}
body[data-design-theme="cuivre"] .pa-answers .pa-answer:is(:focus-visible, [aria-pressed="true"], .selected) {
  outline: 3px solid #b2752e;
  outline-offset: 2px;
  border-color: #965a1e !important;
  background: #fff0d5 !important;
  color: #172b3d !important;
}
body[data-design-theme="cuivre"] .pa-answers .pa-answer:disabled {
  background: #e9eef2 !important;
  color: #394b5a !important;
  border-color: #99a7b2 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}
/* Tableaux : les fonds presque blancs ne doivent jamais recevoir --ink (beige). */
body[data-design-theme="cuivre"] .pa-scoreboard .table-scroll,
body[data-design-theme="cuivre"] .pa-player-report .table-scroll,
body[data-design-theme="cuivre"] .pa-monitor .table-scroll {
  border-radius: 8px;
  border: 1px solid #aebbc5;
  background: #ffffff;
}
body[data-design-theme="cuivre"] .pa-scoreboard table,
body[data-design-theme="cuivre"] .pa-player-report table,
body[data-design-theme="cuivre"] .pa-monitor table {
  background: #ffffff !important;
  color: var(--c1493-ink) !important;
}
body[data-design-theme="cuivre"] .pa-scoreboard table :is(th,td),
body[data-design-theme="cuivre"] .pa-player-report table :is(th,td),
body[data-design-theme="cuivre"] .pa-monitor table :is(th,td) {
  color: var(--c1493-ink) !important;
  border-bottom: 1px solid #ced9e0 !important;
  opacity: 1 !important;
}
body[data-design-theme="cuivre"] .pa-scoreboard table thead th,
body[data-design-theme="cuivre"] .pa-player-report table thead th,
body[data-design-theme="cuivre"] .pa-monitor table thead th {
  background: #e8edf1 !important;
  color: #33485b !important;
  font-weight: 800;
}
body[data-design-theme="cuivre"] .pa-scoreboard table tbody tr:nth-child(odd),
body[data-design-theme="cuivre"] .pa-player-report table tbody tr:nth-child(odd),
body[data-design-theme="cuivre"] .pa-monitor table tbody tr:nth-child(odd) {
  background: #ffffff !important;
}
body[data-design-theme="cuivre"] .pa-scoreboard table tbody tr:nth-child(even),
body[data-design-theme="cuivre"] .pa-player-report table tbody tr:nth-child(even),
body[data-design-theme="cuivre"] .pa-monitor table tbody tr:nth-child(even) {
  background: #f1f5f7 !important;
}
body[data-design-theme="cuivre"] .pa-scoreboard table tbody tr:hover,
body[data-design-theme="cuivre"] .pa-player-report table tbody tr:hover,
body[data-design-theme="cuivre"] .pa-monitor table tbody tr:hover {
  background: #e7f0f4 !important;
}
body[data-design-theme="cuivre"] .pa-scoreboard table a,
body[data-design-theme="cuivre"] .pa-player-report table a,
body[data-design-theme="cuivre"] .pa-monitor table a {
  color: #814714 !important;
}
/* Fonds clairs secondaires des parcours, bilans et corrections. */
body[data-design-theme="cuivre"] :is(.pa-domain-grid>div, .pa-bank-count, .pa-import-report,
   .pa-diagram, .jury145-editor, .code-panel, .draw-tile, .waiting-note) {
  background: var(--c1493-paper-alt) !important;
  color: var(--c1493-ink) !important;
  border-color: #9dafba !important;
}
body[data-design-theme="cuivre"] :is(.pa-domain-grid>div, .pa-bank-count, .pa-import-report,
   .pa-diagram, .jury145-editor, .code-panel, .draw-tile, .waiting-note) :is(p,small,strong,span,li) {
  color: var(--c1493-ink) !important;
  opacity: 1 !important;
}
body[data-design-theme="cuivre"] :is(.pa-domain-grid>div, .pa-bank-count, .pa-import-report,
   .pa-diagram, .jury145-editor, .code-panel, .draw-tile, .waiting-note) .helper {
  color: var(--c1493-muted) !important;
}
/* Feedback et réponses classiques lorsqu'une carte impose un fond clair. */
body[data-design-theme="cuivre"] :is(.correction, .correction.failure, .answer.correct, .answer.incorrect) {
  color: var(--c1493-ink) !important;
}
body[data-design-theme="cuivre"] :is(.correction, .correction.failure, .answer.correct, .answer.incorrect) :is(p,li,strong,span) {
  color: var(--c1493-ink) !important;
}
/* Lisibilité conservée pour les contrôles intégrés dans les lignes claires. */
body[data-design-theme="cuivre"] .pa-scoreboard table button.ghost,
body[data-design-theme="cuivre"] .pa-player-report table button.ghost,
body[data-design-theme="cuivre"] .pa-monitor table button.ghost {
  color: #fff6e7 !important;
  background: #213649 !important;
  border-color: #425a6c !important;
  opacity: 1 !important;
}
@media print {
  body[data-design-theme="cuivre"] .pa-player-report table,
  body[data-design-theme="cuivre"] .pa-player-report table :is(th,td) {
    color: #111 !important;
    background: #fff !important;
  }
}
