/* Loop Studio — byloop.ca
   Clair par défaut. Papier froid, encre, vert Loop. Une seule bande sombre : la nuit GTA 6.
   Signature : la ligne de temps du stream, d'où tombent les clips. */

@font-face { font-family: "Outfit"; src: url("/assets/fonts/outfit-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F4F6F1;
  --surface: #FFFFFF;
  --ink: #0C0F0D;
  --ink-2: #49514B;
  --line: #D7DDD4;
  --green: #45F56B;        /* vert de la marque : en aplat, sous du texte encre */
  --green-mid: #17C653;    /* barres et pics sur papier */
  --green-deep: #0A6E30;   /* texte vert sur papier (contraste AA) */
  --yellow: #FFE500;       /* le jaune des sous-titres */
  --live: #E5281E;

  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --r-clip: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.night :focus-visible, .foot :focus-visible { outline-color: var(--green); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: baseline; font: 800 2.35rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; color: inherit; }
.logo svg { height: 0.54em; width: auto; margin: 0 0.035em; overflow: visible; }
.logo-sym { color: inherit; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.top.is-stuck { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 0.95rem; font-weight: 500; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }
.lang { font-size: 0.875rem; font-weight: 600; text-decoration: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; }
.lang:hover { border-color: var(--ink); }

.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.menu summary span { transform: translateY(-3px); } .menu summary span::before { content: ""; transform: translateY(6px); }
.menu-panel { position: absolute; right: 0; top: 54px; min-width: 230px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 18px; padding: 8px; display: grid; box-shadow: 5px 5px 0 var(--ink); }
.menu-panel a { padding: 13px 14px; text-decoration: none; font-weight: 500; border-radius: 10px; }
.menu-panel a:hover { background: var(--paper); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: #fff; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease), background-color 140ms;
}
.btn:hover { background: #262B27; }
.btn:active { transform: scale(0.97); }
.btn-go { background: var(--green); color: var(--ink); border-color: var(--ink); }
.btn-go:hover { background: #6BF88A; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.btn-xl { min-height: 60px; padding: 0 32px; font-size: 1.125rem; }
.btn[aria-disabled="true"] { background: transparent; color: var(--ink-2); border-style: dashed; border-color: var(--ink-2); cursor: default; }
.night .btn-line { color: #fff; border-color: rgba(255,255,255,0.5); }
.night .btn-line:hover { background: rgba(255,255,255,0.08); }

/* ---------- Champ « colle un lien » ---------- */
.paste { display: flex; gap: 8px; padding: 8px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 999px; max-width: 640px; box-shadow: 6px 6px 0 var(--ink); }
.paste input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 1.0625rem/1 var(--body); color: var(--ink); padding: 0 8px 0 18px; }
.paste input::placeholder { color: #6B736D; }
.paste input:focus { outline: none; }
.paste:focus-within { box-shadow: 6px 6px 0 var(--green-mid); }
.paste-note { margin-top: 18px; font-size: 0.9rem; color: var(--ink-2); min-height: 1.5em; }
.paste-note.is-err { color: #A1160E; font-weight: 600; }

/* ---------- Héros ---------- */
.hero { padding: clamp(32px, 4.5vw, 64px) 0 0; }
.hero h1 { font-size: clamp(2.5rem, 6.3vw, 5.5rem); letter-spacing: -0.04em; line-height: 0.96; }
.hero h1 .l2 { display: block; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 40px; align-items: end; margin-top: clamp(24px, 3.5vw, 40px); }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 52ch; margin-bottom: 28px; }
.tminus { justify-self: end; text-align: right; text-decoration: none; display: block; }
.tminus b { display: block; font: 800 clamp(1.8rem, 3.4vw, 2.8rem)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tminus span { font-size: 0.9rem; color: var(--ink-2); }
.tminus:hover span { text-decoration: underline; }

/* ---------- La ligne de temps ---------- */
.reel { margin-top: clamp(36px, 4vw, 56px); position: relative; }
.track { position: relative; height: 84px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 2px solid var(--ink); overflow: hidden; }
.track i { flex: 1; min-width: 0; background: var(--ink); opacity: 0.16; border-radius: 2px 2px 0 0; height: var(--h); }
.track i.pk { background: var(--green-mid); opacity: 1; }
.track-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-2); padding-top: 8px; font-variant-numeric: tabular-nums; }
.head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--live); transform: translateX(100vw); }
.clips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px); margin: -26px 0 0; padding: 0; list-style: none; }
.clip { position: relative; padding-top: var(--drop, 40px); margin: 0; }
.clip::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: var(--drop, 40px); background: var(--green-mid); }
.clips li:nth-child(1) .clip { --drop: 36px; } .clips li:nth-child(2) .clip { --drop: 96px; } .clips li:nth-child(3) .clip { --drop: 56px; } .clips li:nth-child(4) .clip { --drop: 120px; }
.clip-f { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-clip); overflow: hidden; background: #1a1d1b; border: 1.5px solid var(--ink); }
.clip-f video, .clip-f img { width: 100%; height: 100%; object-fit: cover; }
.clip figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 0.875rem; line-height: 1.35; }
.clip figcaption b { font-weight: 600; }
.clip figcaption span { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.reel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; font-size: 0.9rem; color: var(--ink-2); }
.toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; font: 500 0.875rem/1 var(--body); padding: 10px 16px; cursor: pointer; }
.toggle:hover { border-color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .js .head { animation: sweep 2.6s linear 0.3s both; }
  .js .clip { animation: drop 0.7s var(--ease) both; animation-delay: calc(0.3s + var(--at) * 2.6s); }
  .js .track i.pk { animation: peak 0.4s var(--ease) both; animation-delay: calc(0.3s + var(--at) * 2.6s); transform-origin: bottom; }
  @keyframes sweep { from { transform: translateX(0); } to { transform: translateX(100vw); } }
  @keyframes drop { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
  @keyframes peak { from { transform: scaleY(0.2); } to { transform: none; } }
}

/* ---------- Sections ---------- */
.sec { padding: clamp(72px, 10vw, 136px) 0 0; }
.sec-h { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 18ch; }
.sec-lead { margin-top: 18px; color: var(--ink-2); max-width: 58ch; font-size: 1.125rem; }

/* Comment ça marche : une vraie suite, donc numérotée */
.steps { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); counter-reset: s; }
.steps li { counter-increment: s; padding: 24px 28px 0 0; position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(s); display: block; font: 800 4.5rem/0.9 var(--display); letter-spacing: -0.04em; color: var(--green-deep); margin-bottom: 18px; }
.steps h3 { font-size: 1.5rem; margin-bottom: 10px; }
.steps p { color: var(--ink-2); }

/* Face aux clippers à crédits : un tableau, parce que c'est une comparaison */
.versus { width: 100%; border-collapse: collapse; margin-top: clamp(32px, 5vw, 56px); }
.versus th, .versus td { text-align: left; vertical-align: top; padding: 26px 24px 26px 0; border-top: 1px solid var(--line); }
.versus thead td { border-top: 0; }
.versus thead th { border-top: 0; padding-bottom: 14px; font: 600 0.95rem/1.3 var(--body); color: var(--ink-2); }
.versus thead th:last-child { color: var(--ink); }
.versus tbody tr:first-child > * { border-top: 2px solid var(--ink); }
.versus tbody th { width: 26%; font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.02em; }
.versus td { width: 37%; color: var(--ink-2); }
.versus td.us { color: var(--ink); background: linear-gradient(var(--green), var(--green)) no-repeat 0 0 / 100% 0; padding-left: 24px; background-color: var(--surface); }
.versus td.us strong { font-weight: 600; background: linear-gradient(transparent 62%, var(--green) 62%); }

/* ---------- La nuit GTA 6 : la seule bande sombre ---------- */
.night { margin-top: clamp(72px, 10vw, 136px); background: var(--ink); color: #fff; padding: clamp(64px, 9vw, 120px) 0; position: relative; overflow: hidden; }
.night .sec-h { max-width: 16ch; }
.night .sec-lead { color: #B9C2BB; }
.night-sym { position: absolute; right: -6%; top: 50%; width: min(62vw, 880px); transform: translateY(-50%); color: #fff; opacity: 0.07; pointer-events: none; }
.count { display: flex; gap: clamp(14px, 3vw, 40px); margin: clamp(36px, 5vw, 56px) 0 0; font-variant-numeric: tabular-nums; position: relative; }
.count div { min-width: 0; }
.count b { display: block; font: 800 clamp(3.2rem, 11vw, 9rem)/0.9 var(--display); letter-spacing: -0.04em; color: var(--green); }
.count span { display: block; margin-top: 10px; font-size: 0.95rem; color: #B9C2BB; }
.count-msg { font: 800 clamp(2.2rem, 6vw, 4.5rem)/1 var(--display); letter-spacing: -0.03em; color: var(--green); margin-top: clamp(36px, 5vw, 56px); position: relative; }
.night-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; position: relative; }
.night small { display: block; margin-top: 28px; color: #8E978F; font-size: 0.85rem; max-width: 70ch; position: relative; }

/* ---------- L'offre : quatre accès dans l'ordre du temps ---------- */
.ladder { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 0; border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--surface); }
.ladder li { padding: 28px 24px 30px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ladder li:first-child { border-left: 0; background: var(--green); }
.ladder .dur { font: 800 clamp(2.4rem, 4.4vw, 3.6rem)/0.95 var(--display); letter-spacing: -0.035em; }
.ladder h3 { font: 600 1.05rem/1.3 var(--body); letter-spacing: 0; margin: 12px 0 8px; }
.ladder p { font-size: 0.95rem; color: var(--ink-2); }
.ladder li:first-child p { color: #10301B; }
.ladder a { font-weight: 600; margin-top: auto; padding-top: 16px; }
.after { margin-top: 20px; color: var(--ink-2); font-size: 0.95rem; max-width: 70ch; }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font: 700 1.2rem/1.3 var(--display); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform 180ms var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-2); max-width: 68ch; }

/* ---------- Dernier appel ---------- */
.last { padding: clamp(72px, 10vw, 136px) 0; }
.last h2 { font-size: clamp(2.2rem, 6vw, 4.8rem); letter-spacing: -0.035em; max-width: 14ch; margin-bottom: 32px; }

/* ---------- Pied ---------- */
.foot { background: var(--ink); color: #C9D0CA; padding: 56px 0 40px; font-size: 0.95rem; }
.foot .logo { color: #fff; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h2 { font: 600 0.95rem/1.3 var(--body); letter-spacing: 0; color: #fff; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; } .foot a:hover { text-decoration: underline; color: #fff; }
.foot-tag { margin-top: 14px; max-width: 30ch; }
.foot-legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid #2A302B; font-size: 0.82rem; color: #8E978F; max-width: none; }

/* ---------- Pages intérieures ---------- */
.page { padding: clamp(40px, 7vw, 88px) 0 clamp(72px, 10vw, 128px); }
.page h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); letter-spacing: -0.035em; max-width: 15ch; }
.page-lead { margin-top: 20px; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 56ch; }
.door { margin-top: clamp(28px, 4vw, 44px); display: grid; gap: 22px; justify-items: start; }
.state { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #B4BAB5; }
.state.is-open::before { background: var(--green-mid); box-shadow: 0 0 0 4px rgba(23,198,83,0.2); }
.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.aside { border-top: 2px solid var(--ink); padding-top: 22px; }
.aside h2 { font-size: 1.5rem; margin-bottom: 14px; }
.aside ol, .aside ul, .prose ol, .prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--ink-2); }
.aside li::marker { color: var(--ink); font-weight: 700; }
.aside p + p, .prose p + p { margin-top: 12px; }
.meta-line { font-size: 0.9rem; color: var(--ink-2); }
.prose { max-width: 68ch; margin-top: 40px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.todo { background: var(--yellow); color: var(--ink); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .top-in { gap: 10px; } .top-in .lang { margin-left: auto; }
  .menu { display: block; position: relative; order: 9; }
  .track-meta span + span { display: none; }
  .hero-row { grid-template-columns: 1fr; gap: 28px; }
  .tminus { justify-self: start; text-align: left; }
  .clips { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .clips::-webkit-scrollbar { display: none; }
  .clips li { flex: 0 0 62%; max-width: 280px; scroll-snap-align: start; }
  .clips li:nth-child(n) .clip { --drop: 30px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0 26px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .steps li::before { font-size: 3.4rem; margin-bottom: 12px; }
  .versus, .versus tbody, .versus tr, .versus th, .versus td { display: block; width: 100%; }
  .versus thead { display: none; }
  .versus tbody th, .versus td { width: 100%; }
  .versus tbody tr { border-top: 2px solid var(--ink); padding: 22px 0; }
  .versus tbody tr > * { border: 0 !important; padding: 0; }
  .versus td { margin-top: 12px; }
  .versus td::before { content: attr(data-l); display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
  .versus td.us { padding: 14px 16px; border-radius: 12px; }
  .ladder { grid-template-columns: 1fr; }
  .ladder li { border-left: 0; border-top: 1px solid var(--line); }
  .ladder li:first-child { border-top: 0; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in > div:first-child { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
  .faq details p { padding-right: 0; }
}
@media (max-width: 520px) {
  .paste { flex-direction: column; border-radius: 22px; padding: 10px; box-shadow: 4px 4px 0 var(--ink); }
  .paste input { min-height: 48px; padding: 0 6px; font-size: 1rem; letter-spacing: -0.01em; }
  .paste .btn { width: 100%; }
  .count { gap: 12px; }
  .top-in .btn-sm { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
