/* Parcours découverte (/<lang>/tutorial/). Pages generated by tutorial-src/. */

:root {
  --rice-paper: #F7F5F3;
  --parchment: #F0EDE8;
  --warm-white: #FEFCFA;
  --sage: #87A96B;
  --bamboo: #6B8E5A;
  --sage-wash: #EEF4E8;
  --plum: #8E6B8E;
  --deep-plum: #6B4C6B;
  --coffee: #6F4E37;
  --sand: #F6D7B0;
  --peach: #EAD9C4;
  --charcoal: #4A4A4A;
  --stone: #8A8A8A;
  --mist: #D3D3D3;
  --rose: #B86F6F;
  --rose-wash: #F8EDEC;
  --nav-w: 288px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rice-paper); color: var(--charcoal); font-family: 'Nunito', system-ui, sans-serif; line-height: 1.5; }
a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--deep-plum); }
p { text-wrap: pretty; }
img { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.t-skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--deep-plum); color: var(--warm-white); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.t-skip:focus { top: 12px; color: var(--warm-white); }

/* ---- header */
.t-header { max-width: 1180px; margin: 0 auto; padding: 22px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.t-brand { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--coffee); text-decoration: none; }
.t-langs { display: flex; gap: 6px; }
.t-lang { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--mist); background: var(--warm-white); color: var(--stone); text-decoration: none; }
.t-lang:hover { color: var(--deep-plum); border-color: var(--plum); }
.t-lang.is-active { background: var(--plum); color: var(--warm-white); border-color: var(--plum); }
.t-menu { display: none; align-items: center; gap: 8px; margin-right: auto; margin-left: 4px; font-size: 14px; font-weight: 700; padding: 8px 14px 8px 12px; border-radius: 999px; border: 1px solid var(--mist); background: var(--warm-white); color: var(--charcoal); cursor: pointer; }
.t-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.t-menu-count { color: var(--stone); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- shell */
.t-shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); gap: 56px; align-items: start; }
.t-main { max-width: 760px; padding: 36px 0 96px; min-width: 0; }

/* ---- the check: an empty ring that fills and draws its tick */
.t-tick { width: 22px; height: 22px; flex: 0 0 auto; overflow: visible; }
.t-tick circle { fill: none; stroke: var(--mist); stroke-width: 1.5; transition: fill 0.3s ease, stroke 0.3s ease; transform-origin: 12px 12px; }
.t-tick path { fill: none; stroke: var(--warm-white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 0.4s ease 0.12s; }
.is-done > a .t-tick circle, .is-done > .t-row .t-tick circle, .is-done .t-lesson-title .t-tick circle,
.is-done > a > .t-tick circle { fill: var(--sage); stroke: var(--sage); }
.is-done > a .t-tick path:last-child, .is-done .t-lesson-title .t-tick path:last-child { stroke-dashoffset: 0; }
.is-just-done .t-tick circle { animation: t-pop 0.55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes t-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.t-lock .t-lock-body, .t-lock .t-lock-arc { fill: none; stroke: var(--stone); stroke-width: 1.4; stroke-dasharray: none; stroke-dashoffset: 0; transition: opacity 0.3s ease; }
.is-open .t-lock .t-lock-body, .is-open .t-lock .t-lock-arc, .is-done .t-lock .t-lock-body, .is-done .t-lock .t-lock-arc { opacity: 0; }
.is-open > a .t-lock circle { stroke: var(--plum); stroke-width: 2; }

/* ---- side navigation */
.t-nav { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 36px 4px 32px 0; scrollbar-width: thin; }
.t-nav-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin: 0 0 6px; }
.t-nav-title { display: block; font-size: 19px; line-height: 1.25; font-weight: 700; color: var(--coffee); text-decoration: none; margin-bottom: 16px; }
.t-nav-title:hover { color: var(--deep-plum); }
.t-meter { height: 6px; border-radius: 999px; background: var(--parchment); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03); }
.t-meter span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--sage), var(--bamboo)); transition: width 0.7s cubic-bezier(.2, .8, .2, 1); }
.t-nav-stats { font-size: 13.5px; font-weight: 600; margin: 10px 0 2px; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.t-nav-total { font-size: 12.5px; margin: 0; color: var(--stone); }
.t-nav-note { font-size: 12.5px; line-height: 1.5; color: var(--coffee); background: var(--sand); border-radius: 10px; padding: 8px 10px; margin: 12px 0 0; }
.t-steps, .t-steps ol { list-style: none; margin: 0; padding: 0; }
.t-steps { margin-top: 22px; display: grid; gap: 14px; }
.t-step-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin: 0 0 4px 10px; }
.t-step-label span { color: var(--plum); }
.t-item > a, .t-item > .t-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; color: var(--charcoal); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.t-item > a:hover { background: var(--parchment); color: var(--charcoal); }
.t-item.is-current > a { background: var(--warm-white); box-shadow: inset 0 0 0 1px var(--mist); font-weight: 700; color: var(--coffee); }
.t-item.is-current:not(.is-done) > a .t-tick circle { stroke: var(--plum); stroke-width: 2; }
.t-item-welcome > a, .t-item-quiz > a { grid-template-columns: 22px 1fr auto; }
.t-item-quiz { margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--mist); }
.t-dur { font-size: 12px; color: var(--stone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-item.is-soon { opacity: 0.55; }
.t-item.is-soon .t-dur { font-style: italic; }
.t-nav-close { display: none; }
.t-scrim { display: none; }

/* ---- lesson */
.t-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin: 0 0 14px; }
.t-main h1 { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; color: var(--coffee); margin: 0 0 18px; }
.t-goal { font-size: 16px; line-height: 1.6; margin: 0; padding: 12px 16px; background: var(--parchment); border-left: 3px solid var(--sage); border-radius: 4px 12px 12px 4px; }
.t-goal span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bamboo); margin-bottom: 2px; }

.t-player { margin: 28px 0 0; }
.t-player video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--parchment); box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.t-player-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.t-speed { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--warm-white); border: 1px solid var(--mist); }
.t-speed-label { font-size: 12.5px; font-weight: 600; color: var(--stone); padding: 0 6px 0 10px; }
.t-speed button { font-size: 13px; font-weight: 700; min-width: 46px; padding: 7px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--stone); cursor: pointer; font-variant-numeric: tabular-nums; }
.t-speed button:hover { color: var(--deep-plum); background: var(--parchment); }
.t-speed button[aria-pressed="true"] { background: var(--plum); color: var(--warm-white); }
.t-player-dur { font-size: 13px; color: var(--stone); font-weight: 600; }

.t-read { margin-top: 60px; }
.t-read h2, .t-section h2 { font-size: 26px; line-height: 1.3; font-weight: 700; color: var(--coffee); margin: 0 0 8px; }
.t-read-intro { font-size: 15px; color: var(--stone); margin: 0 0 8px; }
.t-beat { margin-top: 30px; }
.t-beat p { font-size: 17.5px; line-height: 1.75; margin: 0 0 14px; max-width: 66ch; }
.t-beat strong { color: var(--coffee); }
.t-fig { margin: 0 0 16px; }
.t-fig-imgs img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--mist); background: var(--rice-paper); }
.t-fig-pair .t-fig-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.t-fig figcaption { margin-top: 6px; }
.t-seek { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--plum); font-size: 13px; font-weight: 700; cursor: pointer; }
.t-seek svg { width: 12px; height: 12px; fill: currentColor; }
.t-seek:hover { color: var(--deep-plum); }
.t-seek-time { color: var(--stone); font-weight: 600; font-variant-numeric: tabular-nums; }
.no-js .t-seek { display: none; }

.t-practice { margin-top: 44px; padding: 22px 26px; border-radius: 16px; background: var(--warm-white); border: 1px solid var(--mist); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.t-practice h2 { font-size: 18px; font-weight: 700; color: var(--coffee); margin: 0 0 10px; }
.t-practice ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.t-practice li { font-size: 16px; line-height: 1.65; }

.t-done { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.t-done-btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px 11px 13px; border-radius: 999px; border: 1.5px solid var(--sage); background: var(--warm-white); color: var(--bamboo); font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.25s ease, color 0.25s ease; }
.t-done-btn:hover { background: var(--sage-wash); }
.t-done-btn .t-tick circle { stroke: var(--sage); }
.t-done-btn .t-tick path { stroke: var(--sage); }
.t-done-btn[aria-pressed="true"] { background: var(--sage); color: var(--warm-white); }
.t-done-btn[aria-pressed="true"] .t-tick circle { fill: var(--warm-white); stroke: var(--warm-white); }
.t-done-btn[aria-pressed="true"] .t-tick path { stroke-dashoffset: 0; }
.t-done-btn.is-just-done .t-tick circle { animation: t-pop 0.55s cubic-bezier(.3, 1.6, .5, 1); }
.t-nudge { font-size: 15.5px; line-height: 1.6; margin: 0; min-height: 1.6em; color: var(--charcoal); }
.t-nudge:empty { display: none; }
.t-nudge a { font-weight: 700; white-space: nowrap; }
.t-nudge.is-fresh { animation: t-rise 0.45s ease; }
@keyframes t-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.t-pager { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t-pager a { display: block; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--mist); background: var(--warm-white); color: var(--coffee); font-size: 16px; font-weight: 700; text-decoration: none; }
.t-pager a:hover { border-color: var(--plum); color: var(--deep-plum); }
.t-pager span { display: block; font-size: 12.5px; font-weight: 600; color: var(--stone); margin-bottom: 2px; }
.t-next { text-align: right; grid-column: 2; }

/* ---- welcome */
.t-lead { font-size: 19px; line-height: 1.65; margin: 0 0 14px; }
.t-meta { font-size: 14px; font-weight: 700; color: var(--stone); margin: 0; }
.t-cta-row { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.t-cta { display: inline-block; padding: 14px 28px; border-radius: 999px; border: 1.5px solid var(--deep-plum); background: var(--deep-plum); color: var(--warm-white); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.t-cta:hover { background: var(--plum); border-color: var(--plum); color: var(--warm-white); }
.t-cta:disabled { opacity: 0.45; cursor: default; background: var(--deep-plum); }
.t-cta-quiet { background: transparent; color: var(--deep-plum); }
.t-cta-quiet:hover { background: var(--parchment); color: var(--deep-plum); }
.t-notice { font-size: 15.5px; line-height: 1.65; padding: 14px 18px; border-radius: 12px; background: #FBEEDD; border: 1px solid var(--sand); margin: 0; }
.t-hero { margin: 36px 0 0; border-radius: 18px; overflow: hidden; background: var(--parchment); aspect-ratio: 16 / 7; }
.t-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
.t-section { margin-top: 56px; }
.t-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px; }
.t-card { background: var(--warm-white); border: 1px solid var(--mist); border-radius: 16px; padding: 20px 22px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.t-card h3 { font-size: 16.5px; line-height: 1.35; font-weight: 700; color: var(--coffee); margin: 0 0 8px; }
.t-card p { font-size: 15px; line-height: 1.65; margin: 0; }

.t-path, .t-lessons { list-style: none; margin: 0; padding: 0; }
.t-path { display: grid; gap: 28px; margin-top: 18px; }
.t-path-step h3 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin: 0 0 10px; }
.t-path-step h3 span { color: var(--plum); }
.t-lessons { display: grid; gap: 10px; }
.t-lesson > a, .t-lesson > div { display: grid; grid-template-columns: 176px 1fr; gap: 18px; align-items: center; padding: 10px; border-radius: 16px; background: var(--warm-white); border: 1px solid var(--mist); color: var(--charcoal); text-decoration: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.t-lesson > a:hover { border-color: var(--plum); box-shadow: 0 4px 14px rgba(0,0,0,0.06); color: var(--charcoal); }
.t-lesson img, .t-lesson-ph { display: block; width: 176px; aspect-ratio: 16 / 9; height: auto; border-radius: 10px; object-fit: cover; border: 1px solid var(--parchment); }
.t-lesson-ph { background: repeating-linear-gradient(135deg, var(--parchment) 0 10px, var(--rice-paper) 10px 20px); }
.t-lesson-body { display: block; min-width: 0; }
.t-lesson-title { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 700; line-height: 1.3; color: var(--coffee); }
.t-lesson-sum { display: block; font-size: 14.5px; line-height: 1.5; margin-top: 4px; }
.t-lesson-dur { display: block; font-size: 12.5px; font-weight: 700; color: var(--stone); margin-top: 6px; }
.t-lesson.is-done > a { border-color: #C8D9BA; }
.t-lesson.is-soon { opacity: 0.6; }
.t-lesson.is-soon .t-lesson-dur { font-style: italic; }
.t-path-quiz > a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; border: 1.5px dashed var(--mist); background: var(--warm-white); color: var(--charcoal); text-decoration: none; }
.t-path-quiz > a:hover { border-color: var(--plum); color: var(--charcoal); }
.t-path-quiz strong { color: var(--coffee); }
.t-path-quiz [data-quiz-state] { color: var(--stone); font-size: 14px; }
.t-path-quiz.is-open > a { border-style: solid; border-color: var(--plum); }
.t-path-quiz.is-done > a { border-style: solid; border-color: #C8D9BA; }
.t-path-quiz .t-tick { width: 24px; height: 24px; }
.t-how { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; }
.t-how li { font-size: 15.5px; line-height: 1.65; }
.t-how strong { display: block; color: var(--coffee); margin-bottom: 2px; }
.t-privacy { margin: 56px 0 0; padding-top: 20px; border-top: 1px solid var(--mist); font-size: 13.5px; line-height: 1.65; color: var(--stone); }
.t-linkish { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--plum); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.t-linkish:hover { color: var(--deep-plum); }
.t-small { font-size: 13px; line-height: 1.6; color: var(--stone); }

/* ---- quiz */
.t-quiz h2 { font-size: 24px; font-weight: 700; color: var(--coffee); margin: 0 0 10px; }
.t-remaining { padding-left: 20px; display: grid; gap: 6px; font-size: 16px; }
.t-remaining span { color: var(--stone); font-size: 13.5px; }
.t-q-counter { font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); margin: 8px 0 10px; }
.t-question fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.t-question legend { font-size: 22px; line-height: 1.4; font-weight: 700; color: var(--coffee); padding: 0; margin-bottom: 18px; }
.t-options { display: grid; gap: 10px; }
.t-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--mist); background: var(--warm-white); font-size: 16px; line-height: 1.5; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.t-option:hover { border-color: var(--plum); }
.t-option input { accent-color: var(--plum); margin: 4px 0 0; width: 16px; height: 16px; flex: 0 0 auto; }
.t-option:has(input:checked) { border-color: var(--plum); }
.t-option.is-right, .t-option.is-right:has(input:checked) { border-color: var(--sage); background: #E4EFDA; }
.t-option.is-wrong, .t-option.is-wrong:has(input:checked) { border-color: var(--rose); background: #F5E1DF; }
.t-option.is-right::after, .t-option.is-wrong::after { margin-left: auto; padding-left: 8px; font-weight: 700; }
.t-option.is-right::after { content: "✓"; color: var(--bamboo); }
.t-option.is-wrong::after { content: "✕"; color: var(--rose); }
.t-option.is-locked { cursor: default; }
.t-feedback p { font-size: 16px; line-height: 1.65; margin: 16px 0 0; }
.t-score { font-size: 48px; line-height: 1; font-weight: 700; color: var(--coffee); margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.t-result ul { padding-left: 20px; display: grid; gap: 6px; margin: 0 0 8px; }
.t-badge { display: flex; align-items: flex-start; gap: 20px; margin: 28px 0 20px; padding: 24px; border-radius: 18px; background: var(--warm-white); border: 1px solid var(--sand); box-shadow: 0 4px 16px rgba(111, 78, 55, 0.08); animation: t-rise 0.6s ease; }
.t-badge img { width: 72px; height: 72px; border-radius: 16px; flex: 0 0 auto; }
.t-badge p { font-size: 15.5px; line-height: 1.65; margin: 0; }
.t-badge .t-cta-row { margin-top: 14px; }
.t-badge .t-small { margin-top: 12px; }

/* ---- footer */
.t-footer { border-top: 1px solid var(--mist); padding: 32px 24px 44px; text-align: center; }
.t-footer nav { display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.t-footer-main { gap: 20px; font-size: 14px; }
.t-footer-main a { color: var(--stone); font-weight: 600; text-decoration: none; }
.t-footer-legal { gap: 16px; font-size: 12.5px; }
.t-footer-legal a { color: #ABABAB; text-decoration: none; }
.t-footer a:hover { color: var(--deep-plum); }
.t-footer p { margin: 0; font-size: 13px; color: #ABABAB; }

/* ---- narrow screens: the navigation becomes a drawer */
@media (max-width: 959px) {
  .t-shell { display: block; padding: 0 16px; }
  .t-header { padding: 16px 16px 0; }
  .t-menu { display: inline-flex; }
  .js .t-nav { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); max-height: none; padding: 24px 18px 24px 20px; background: var(--rice-paper); box-shadow: 4px 0 24px rgba(0,0,0,0.12); transform: translateX(-105%); visibility: hidden; transition: transform 0.3s ease, visibility 0s linear 0.3s; }
  .js .t-nav-open .t-nav { transform: none; visibility: visible; transition: transform 0.3s ease; }
  .no-js .t-nav { position: static; max-height: none; padding: 24px 0 0; }
  .t-nav-close { display: block; margin: 22px 0 0 10px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--mist); background: var(--warm-white); color: var(--charcoal); font-size: 14px; font-weight: 600; cursor: pointer; }
  .t-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(74, 74, 74, 0.35); }
  .t-main { padding: 24px 0 72px; }
  .t-main h1 { font-size: 31px; }
  .t-beat p { font-size: 17px; }
  .t-pager { grid-template-columns: 1fr; }
  .t-next { grid-column: 1; }
}
@media (max-width: 560px) {
  .t-lesson > a, .t-lesson > div { grid-template-columns: 112px 1fr; gap: 12px; }
  .t-lesson img, .t-lesson-ph { width: 112px; }
  .t-lesson-sum { display: none; }
  .t-fig-pair .t-fig-imgs { grid-template-columns: 1fr; }
  .t-speed-label { display: none; }
  .t-speed button { min-width: 0; padding: 7px 8px; }
  .t-badge { flex-direction: column; }
  .t-hero { aspect-ratio: 16 / 9; }
  .t-langs .t-lang { padding: 6px 9px; }
}
@media (max-width: 420px) {
  /* Brand, menu and three languages don't fit side by side: the footer still links home. */
  .js .t-brand { display: none; }
  .js .t-menu { margin-left: 0; }
  .t-menu span { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
