/* R4 integration: actual TECHXV-RUGBY tokens and components, no native source edits. */
:root {
  color-scheme: light;
  --color-ink: var(--texte); --color-ink-muted: var(--texte-discret);
  --color-canvas: var(--surface); --color-paper: var(--surface-creuse); --color-white: var(--surface-elevee);
  --color-night: var(--surface-terrain); --color-night-deep: var(--terrain-900);
  --color-forest: var(--surface-terrain-elevee); --color-grass: var(--terrain-700);
  --color-lime: var(--action); --color-accent: var(--action); --color-border: var(--bordure);
  --color-on-dark: var(--texte-sur-terrain); --color-muted-dark: var(--texte-sur-terrain-discret);
  --color-warning: var(--alerte); --color-danger: var(--erreur); --color-focus: var(--focus);
  --font-body: var(--font-sans); --font-display: var(--font-sans); --font-number: var(--font-sans);
  --radius-sm: var(--rayon-s); --radius-card: var(--rayon-l); --shadow-card: var(--ombre-1);
  --color-illustration-surface: var(--surface-elevee); --color-teaching-border: var(--bordure);
  --shadow-soft: var(--ombre-1); --space-section: clamp(3rem,6vw,6rem);
  font-size: 16px; scroll-padding-top: 1rem;
}
body { font-size: 1.0625rem; }
.shell { width: min(var(--largeur-contenu),calc(100% - 4rem)); }
h1,h2,h3 { letter-spacing: -.015em; }
h2 { font-size: clamp(1.625rem,3vw,2.125rem); line-height: 1.2; }
h3 { font-size: 1.3125rem; line-height: 1.3; }
.section-paper { background: var(--surface); border-color: var(--bordure); }
.section-heading > p,.lesson-panel > p,.exercise-heading-copy p,.coach-intro > p { font-size: 1.0625rem; color: var(--texte-discret); }
.small-note,.feedback,.teaching-figure figcaption,.diagram-instructions,.coach-availability p,.hero-note { font-size: .9375rem; }
.eyebrow { font-size: .8125rem; letter-spacing: .08em; }
.text-link,.button,label,legend,.radio-options label { font-size: 1rem; }
.button,input,select,textarea { min-height: 48px; }
input,select,textarea { font-size: 1.0625rem; border: 2px solid var(--bordure-forte); background: var(--surface-elevee); }
input::placeholder,textarea::placeholder { color: var(--texte-discret); }
.button { border-width: 2px; border-radius: var(--rayon-s); }
.button-lime { background: var(--action); color: var(--texte-sur-action); border-color: var(--action-contour); }
.button-lime:hover:not(:disabled) { background: var(--action-survol); }
.button-dark { background: var(--surface-terrain); color: var(--texte-sur-terrain); }
.button-dark:hover:not(:disabled) { background: var(--terrain-700); }
.button-outline:hover:not(:disabled),.radio-options label:has(input:checked) { background: var(--surface-survol); }
.pill { text-transform: none; letter-spacing: 0; font-size: .875rem; background: var(--surface-creuse); color: var(--texte); }
.pill-green { color: var(--succes); background: var(--succes-teinte); }
.pill-warning { color: var(--alerte); background: var(--alerte-teinte); }
.sample-row,.control-question,.version-board,.score-note { background: var(--surface-creuse); }
.sample-row strong { color: var(--succes); }
.exercise-main,.support-card,.coach-card,.leaderboard-card { background: var(--surface-elevee); border-color: var(--bordure-forte); }
.practice-aside { background: var(--surface-terrain); color: var(--texte-sur-terrain); }
.practice-aside .small-note,.practice-aside li { color: var(--texte-sur-terrain-discret); }
.practice-aside .text-link { color: var(--lien-sur-terrain); }
.case-illustration,.teaching-details,.diagram-scroll { border-color: var(--bordure); border-radius: var(--rayon-m); }
.teaching-details { background: var(--surface-elevee); }
.teaching-figure figcaption { color: var(--texte-discret); }
.diagram-links .text-link { font-size: .9375rem; }
.native-hint { margin-top: var(--espace-5); }
.tx-surface-terrain--texture::before { -webkit-mask-image: url('/assets/native/terrain-lines.svg'); mask-image: url('/assets/native/terrain-lines.svg'); }
.native-hero { width: 100%; padding: var(--espace-7) max(2rem,calc((100% - var(--largeur-contenu))/2)); gap: var(--espace-7); background: var(--surface-terrain); }
.native-hero .tx-display { max-width: 15ch; font-size: 3rem; line-height: 1.04; font-weight: 800; }
.native-hero .native-kicker { margin: 0 0 var(--espace-5); color: var(--texte-sur-terrain-discret); }
.native-hero .hero-intro { margin: var(--espace-5) 0 var(--espace-6); font-size: 1.1875rem; line-height: 1.55; color: var(--texte-sur-terrain-discret); }
.native-hero .hero-note { margin-top: var(--espace-5); color: var(--texte-sur-terrain-discret); }
.native-hero .hero-art { border-radius: var(--rayon-l); }
.native-hero .match-card { width: 100%; max-width: none; padding: var(--espace-5); background: var(--surface-terrain-elevee); border: 1px solid var(--bordure-sur-terrain); box-shadow: none; }
.native-hero .card-topline h2 { font-size: .8125rem; letter-spacing: .08em; }
.native-hero .case-flow { margin-block: var(--espace-5); }
.native-hero .case-flow strong { font-size: 2.5rem; }
.native-hero .case-flow div span,.native-hero .match-result > span { font-size: .9375rem; color: var(--texte-sur-terrain-discret); }
.native-hero .native-result-legend,.native-hero .native-fact-note { margin-top: var(--espace-3); font-size: .9375rem; color: var(--texte-sur-terrain-discret); }
.native-hero .match-result { margin-top: var(--espace-4); }
.native-hero .match-result strong { font-size: 1.625rem; }
.native-hero .match-result small { color: var(--action); }
.native-hero .bar-lost { background: var(--terrain-300); }
.native-hero .bar-unknown { background: var(--craie-50); }
/* The legacy global nav layout must not impose mobile widths on the native menu. */
#native-navigation nav { width: auto; gap: normal; justify-content: normal; }
#native-navigation .tx-nav__barre { max-width: var(--largeur-contenu); padding-inline: 0; width: calc(100% - 4rem); }
#native-navigation .tx-nav__lien { font-size: 1rem; }
.native-case-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--espace-4); margin-bottom: var(--espace-4); }
.native-case-choice { min-width: 0; }
.native-case-choice .tx-cartecas { height: 100%; }
.native-case-choice.is-selected .tx-cartecas { border-color: var(--texte); box-shadow: inset 0 0 0 1px var(--texte); }
/* No persisted progress exists in app.mjs: remove the native saved-device badge. */
.native-case-choice .tx-cartecas__pied .tx-pastille { display: none; }
.native-selection-note { margin-bottom: var(--espace-5) !important; color: var(--texte-discret); font-size: .9375rem; }
.gps-population { padding: var(--espace-3) var(--espace-4); border-left: 4px solid var(--info); background: var(--info-teinte); color: var(--texte) !important; font-size: .9375rem !important; }
.lesson-panel h3[tabindex="-1"] { scroll-margin-top: 1rem; }
.game-card { background: var(--surface-terrain); color: var(--texte-sur-terrain); }
.game-card .small-note,.game-card .game-readout { color: var(--texte-sur-terrain-discret); font-size: .9375rem; }
.game-card label { color: var(--texte-sur-terrain); }
.game-card .pill { background: var(--surface-terrain-elevee); color: var(--texte-sur-terrain); }
.game-card :focus-visible { outline-color: var(--focus-sur-terrain); }
.game-card .game-push { color: var(--texte-sur-action); background: var(--action); }
#native-footer .tx-pied__interieur { max-width: var(--largeur-contenu); width: calc(100% - 4rem); padding-inline: 0; }
@media (min-width:1051px) {
  .native-hero .match-card { display:grid; grid-template-columns:1fr 1fr; gap:var(--espace-3) var(--espace-5); padding:var(--espace-4) var(--espace-5); }
  .native-hero .card-topline { grid-column:1 / -1; }
  .native-hero .case-flow { grid-column:1; grid-row:2; margin:var(--espace-2) 0; gap:var(--espace-3); }
  .native-hero .case-flow div span { font-size:.875rem; }
  .native-hero .match-result { grid-column:2; grid-row:2; align-self:center; border:0; margin:0; padding:0; }
  .native-hero .match-result strong { font-size:1.375rem; white-space:nowrap; }
  .native-hero .match-result small { font-size:1rem; padding-left:0; }
  .native-hero .result-bar,.native-hero .native-result-legend,.native-hero .native-fact-note { grid-column:1 / -1; margin:0; }
}
@media (max-width:1050px) { .native-hero { gap: var(--espace-6); }.native-hero .tx-display { font-size: 3rem; } }
@media (max-width:800px) { .native-hero { grid-template-columns:1fr; }.native-hero .hero-copy { max-width: 680px; }.native-hero .hero-visual { max-width: 640px; } }
@media (max-width:680px) { #native-navigation nav { width: 100%; }.native-case-grid { grid-template-columns:1fr; } }
@media (max-width:600px) {
  .shell,#native-navigation .tx-nav__barre,#native-footer .tx-pied__interieur { width:calc(100% - 2rem); }
  .native-hero { padding: var(--espace-7) var(--espace-4); gap: var(--espace-6); }
  .native-hero .tx-display { font-size: 2.125rem; max-width: 16ch; }
  .native-hero .hero-intro { font-size: 1.0625rem; }
  .native-hero .button-row { align-items:stretch; }
  .native-hero .match-card { padding: var(--espace-4); }
  .native-hero .card-topline { flex-wrap:wrap; }
  .native-case-choice .tx-cartecas { padding: var(--espace-4); gap:var(--espace-3); }
  .native-case-choice .tx-cartecas__dossard { width:40px; height:48px; font-size:1.375rem; }
  .native-case-choice .tx-cartecas__picto { width:36px; }
  .native-case-choice .tx-cartecas--picto .tx-cartecas__corps { padding-right:40px; }
  .native-case-choice .tx-cartecas__titre { font-size:1.1875rem; }
  .native-case-choice .tx-cartecas__surtitre { font-size:.75rem; }
  .native-case-choice .tx-cartecas__accroche { font-size:.9375rem; }
  .diagram-scroll picture,.diagram-scroll img { min-width:0; width:100%; }
  .diagram-scroll { overflow-x:visible; }
  .exercise-main,.coach-card,.leaderboard-card,.game-card { padding:var(--espace-4); }
  .exercise-label > span:last-child { font-size:.875rem; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media print { #native-navigation,#native-cases,#native-footer,.native-hint { display:none; }.native-hero { background:white; color:black; }.native-hero .hero-intro,.native-hero .hero-note { color:black; } }
