/* polices du site, servies localement */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(assets/fonts/nunito-latin-ext-400-900.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(assets/fonts/nunito-latin-400-900.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400 800; font-display: swap; src: url(assets/fonts/literata-latin-ext-400-800-i.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400 800; font-display: swap; src: url(assets/fonts/literata-latin-400-800-i.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/literata-latin-ext-400-800.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/literata-latin-400-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --tio-bg: #F1F2E0;
  --tio-surface: #E4E8C6;
  --tio-text: #26112B;
  --tio-muted: #5A4262;
  --tio-accent: #5B1F5E;
  --tio-accent2: #6B7A22;
  --tio-on-accent: #F1F2E0;
  --tio-felt: #46511A;
  --tio-felt-line: #8E9C45;
  --tio-coin: #E0A33A;
  --tio-coin-dark: #A8731B;
  --tio-rule: #B9BC95;
  --tio-font-display: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --tio-font-body: "Literata", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--tio-bg);
  color: var(--tio-text);
  font-family: var(--tio-font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--tio-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--tio-accent);
  outline-offset: 3px;
}

/* En-tête */
.tio-header {
  border-bottom: 1px solid var(--tio-text);
  background: var(--tio-bg);
}

.tio-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
}

.tio-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--tio-text);
  text-decoration: none;
}

.tio-brand svg {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
}

.tio-brand-mark-bg {
  fill: var(--tio-accent);
}

.tio-brand-mark-fg {
  fill: var(--tio-on-accent);
}

.tio-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.tio-nav a {
  font-family: var(--tio-font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--tio-text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.tio-nav a:hover {
  border-bottom-color: var(--tio-accent);
}

/* Premier écran */
.tio-hero {
  position: relative;
}

.tio-hero-visual {
  position: relative;
  overflow: hidden;
  height: clamp(250px, 40vw, 540px);
  background: var(--tio-felt);
}

.tio-hero-visual svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.tio-hero-panel {
  position: relative;
  background: var(--tio-accent);
  color: var(--tio-on-accent);
  width: min(47rem, calc(100% - 2rem));
  margin: -3.5rem 0 0 max(1rem, 7vw);
  padding: 2rem clamp(1.25rem, 3vw, 2.75rem) 2rem;
}

.tio-hero-panel h1 {
  margin: 0 0 1rem;
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  color: var(--tio-on-accent);
}

.tio-hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

.tio-hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--tio-on-accent);
}

.tio-hero-facts div {
  padding: 0.8rem 1rem 0.2rem 0;
}

.tio-hero-facts dt {
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.2;
}

.tio-hero-facts dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tio-hero-panel a {
  color: var(--tio-on-accent);
}

.tio-hero-panel :focus-visible {
  outline-color: var(--tio-on-accent);
}

.tio-svg-felt { fill: var(--tio-felt); }
.tio-svg-arc { fill: none; stroke: var(--tio-felt-line); stroke-width: 3; }
.tio-svg-shadow { fill: #1A210A; fill-opacity: 0.4; }
.tio-svg-coin-edge { fill: var(--tio-coin-dark); }
.tio-svg-coin-rim { fill: var(--tio-coin); }
.tio-svg-coin-face { fill: none; stroke: var(--tio-coin-dark); stroke-width: 5; }
.tio-svg-coin-glyph { fill: var(--tio-text); }
.tio-svg-glyph-text {
  font-family: var(--tio-font-display);
  font-weight: 900;
  fill: var(--tio-text);
  text-anchor: middle;
}
.tio-svg-card { fill: var(--tio-bg); stroke: var(--tio-text); stroke-width: 3; }
.tio-svg-card-mark { fill: var(--tio-accent); }
.tio-svg-chip-a { fill: var(--tio-accent); }
.tio-svg-chip-b { fill: var(--tio-surface); }
.tio-svg-chip-side { fill: #2F0C33; }
.tio-svg-chip-side-b { fill: #A9AE82; }
.tio-svg-chip-ring { fill: none; stroke: var(--tio-on-accent); stroke-width: 4; stroke-dasharray: 14 12; }
.tio-svg-chip-ring-b { fill: none; stroke: var(--tio-accent); stroke-width: 4; stroke-dasharray: 14 12; }

/* Corps de page */
.tio-main {
  display: block;
  padding: 3.5rem 1.25rem 4rem;
}

.tio-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 2.5rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 3rem 0 0.5rem;
}

.tio-section + .tio-section {
  border-top: 1px solid var(--tio-rule);
  margin-top: 2.5rem;
}

.tio-margin {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  font-family: var(--tio-font-display);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--tio-muted);
}

.tio-margin-num {
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--tio-accent);
}

.tio-margin-key {
  font-weight: 600;
  padding-top: 0.2rem;
  border-top: 2px solid var(--tio-accent2);
}

.tio-col {
  min-width: 0;
  max-width: 40rem;
}

.tio-col h2 {
  margin: 0 0 1.25rem;
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  color: var(--tio-text);
}

.tio-col h3 {
  margin: 2rem 0 0.6rem;
  font-family: var(--tio-font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
}

.tio-col p {
  margin: 0 0 1.2rem;
}

.tio-col ul,
.tio-col ol {
  margin: 0 0 1.4rem;
  padding-left: 1.3rem;
}

.tio-col li {
  margin-bottom: 0.5rem;
}

.tio-col li::marker {
  color: var(--tio-accent);
}

.tio-unit {
  font-family: var(--tio-font-display);
  font-weight: 700;
  white-space: nowrap;
}

/* Tableau */
.tio-table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0 1.75rem;
  border-top: 2px solid var(--tio-text);
  border-bottom: 1px solid var(--tio-text);
}

.tio-table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.5;
}

.tio-table caption {
  text-align: left;
  padding: 0.75rem 0;
  font-family: var(--tio-font-display);
  font-weight: 700;
  color: var(--tio-muted);
}

.tio-table th,
.tio-table td {
  padding: 0.6rem 0.9rem 0.6rem 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--tio-rule);
}

.tio-table thead th {
  font-family: var(--tio-font-display);
  font-weight: 700;
  border-top: 1px solid var(--tio-text);
}

.tio-table td.tio-num,
.tio-table th.tio-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-right: 1rem;
}

/* Encadré et liste de définitions */
.tio-encart {
  margin: 1.75rem 0;
  padding: 1.1rem 1.4rem 0.4rem;
  background: var(--tio-surface);
  border-left: 4px solid var(--tio-accent);
}

.tio-encart h3 {
  margin-top: 0;
}

.tio-defs {
  margin: 1.5rem 0;
}

.tio-defs dt {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--tio-rule);
  font-family: var(--tio-font-display);
  font-weight: 800;
  color: var(--tio-accent);
}

.tio-defs dd {
  margin: 0.15rem 0 0;
}

/* Figure */
.tio-figure {
  margin: 2rem 0;
}

.tio-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.tio-figure figcaption {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--tio-rule);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--tio-muted);
}

/* Séquence réelle d'étapes */
.tio-steps {
  list-style: none;
  counter-reset: tio-step;
  padding: 0;
}

.tio-steps li {
  counter-increment: tio-step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1rem;
}

.tio-steps li::before {
  content: counter(tio-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--tio-accent);
  color: var(--tio-on-accent);
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.8rem;
  text-align: center;
}

/* Bloc de questions-réponses */
.tio-faq-item {
  padding: 1.1rem 0 0.2rem;
  border-top: 1px solid var(--tio-rule);
}

.tio-faq-item:first-of-type {
  border-top: 2px solid var(--tio-text);
}

.tio-faq-q {
  margin: 0 0 0.5rem;
  font-family: var(--tio-font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--tio-accent);
}

.tio-faq-a {
  margin: 0 0 1rem;
}

/* Page légale */
.tio-legal {
  max-width: 44rem;
  margin: 0 auto;
}

.tio-legal h1 {
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
}

.tio-legal h2 {
  font-family: var(--tio-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

/* Bandeau titre des pages intérieures */
.tio-pagehead {
  background: var(--tio-accent);
  color: var(--tio-on-accent);
  padding: 2.5rem 1.25rem 3rem;
}

.tio-pagehead-inner {
  max-width: 62rem;
  margin: 0 auto;
}

.tio-pagehead h1 {
  max-width: 40rem;
  margin: 0;
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.15;
}

/* Pied de page */
.tio-footer {
  border-top: 1px solid var(--tio-text);
  background: var(--tio-surface);
  font-size: 0.95rem;
  line-height: 1.6;
}

.tio-footer-inner {
  display: grid;
  gap: 0.6rem 2rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

.tio-footer-name {
  margin: 0;
  font-family: var(--tio-font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.tio-footer p {
  margin: 0;
}

.tio-footer a {
  color: var(--tio-accent);
}

.tio-credits {
  color: var(--tio-muted);
  font-size: 0.88rem;
}

.tio-credits a {
  color: var(--tio-accent);
}

/* Grands écrans */
@media (min-width: 60rem) {
  .tio-section {
    grid-template-columns: 11rem minmax(0, 40rem);
    justify-content: start;
  }

  .tio-margin {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-top: 0.35rem;
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }

  .tio-margin-key {
    border-top: 2px solid var(--tio-accent2);
  }

  .tio-hero-panel {
    margin-top: -5rem;
  }

  .tio-footer-inner {
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
  }
}

@media (min-width: 100rem) {
  body {
    font-size: 1.125rem;
  }
}

@media (max-width: 30rem) {
  .tio-hero-panel {
    margin-left: 1rem;
    padding-top: 1.5rem;
  }

  .tio-main {
    padding-top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
