/* Celsius Tours Gratuits — thème « ticket parisien » : carton crème, encre bleu nuit, tampon rouge */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/space-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-mono-700-latin.woff2") format("woff2"); }
/* polices de secours à la largeur de Space Grotesk (mesurée) : le passage à la vraie police ne décale rien (CLS) */
@font-face { font-family: "SG Fallback"; font-weight: 400; src: local("Arial"), local("ArialMT"); size-adjust: 107.9%; }
@font-face { font-family: "SG Fallback"; font-weight: 700; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 100.6%; }
@font-face { font-family: "SG Fallback Android"; font-weight: 400; src: local("Roboto"), local("Roboto Regular"), local("Roboto-Regular"); size-adjust: 108.7%; }
@font-face { font-family: "SG Fallback Android"; font-weight: 700; src: local("Roboto Bold"), local("Roboto-Bold"); size-adjust: 107.3%; }
/* Courier New a la même chasse (0,6 em) qu'IBM Plex Mono */
@font-face { font-family: "Plex Fallback"; font-weight: 400; src: local("Courier New"), local("CourierNewPSMT"); }
@font-face { font-family: "Plex Fallback"; font-weight: 700; src: local("Courier New Bold"), local("CourierNewPS-BoldMT"); }

:root {
  --paper: #f6f2e9;
  --card: #fffdf8;
  --ink: #1d2b4f;
  --ink-2: #4b5878;
  --line: #d9d1bf;
  --ticket: #efe2b8;
  --ticket-edge: #e2d19c;
  --stripe: #6e4a2a;
  --stamp: #c8352b;
  --stamp-dark: #a92a21;
  --mono: "IBM Plex Mono", "Plex Fallback", ui-monospace, Menlo, monospace;
  --sans: "Space Grotesk", "SG Fallback", "SG Fallback Android", system-ui, -apple-system, sans-serif;
  --wrap: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--stamp); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }

/* ---------- en-tête ---------- */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: inline-flex; flex: none; line-height: 0; border-radius: 6px; }
.logo svg { display: block; width: 118px; height: 40px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; color: #dfe4f2; text-decoration: none; font: 600 14px/1 var(--sans); white-space: nowrap; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.12); }
.age { flex: none; display: inline-grid; place-items: center; min-width: 42px; height: 30px; padding: 0 6px; border: 2px solid var(--stamp); border-radius: 5px; color: #fff; font: 700 13px/1 var(--mono); transform: rotate(-5deg); }
@media (max-width: 560px) {
  .nav a[aria-current="page"] { display: none; }
  .nav a { padding: 0 10px; }
}
/* mobile : H1 → intro → H2 → composteur et ticket dans le premier écran */
@media (max-width: 560px) {
  .site-header .wrap { min-height: 56px; }
  .page-head { padding-top: 16px; }
  h1 { font-size: 26px; margin-bottom: 8px; }
  h2 { font-size: 22px; margin-top: 40px; }
  .byline { font-size: 12px; margin-bottom: 8px; }
  .intro { font-size: 15px; line-height: 1.55; }
  .page-head + h2 { margin-top: 22px; }
  .machine { margin-top: 12px; }
  .composteur { height: 44px; border-radius: 12px 12px 5px 5px; }
  .composteur .c-label { top: 9px; }
  .composteur .c-led { top: 8px; }
  .composteur::after { bottom: 8px; height: 6px; }
  .stage { margin-top: -14px; padding-top: 14px; min-height: 300px; }
  .ticket--big { min-height: 262px; }
  .t-band { min-height: 50px; }
}
@media (max-width: 360px) {
  .site-header .wrap { gap: 8px; }
  /* seul le rond °C du logo, comme sur le site Celsius en mobile */
  .site-header .logo { width: 40px; overflow: hidden; }
  .site-header .logo svg { flex: none; max-width: none; }
  .nav a { padding: 0 8px; font-size: 13px; }
}

/* ---------- texte ---------- */
main { display: block; padding-bottom: 8px; }
.page-head { padding: 28px 0 4px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { font: 700 clamp(28px, 7vw, 42px)/1.12 var(--sans); letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font: 700 clamp(23px, 5vw, 30px)/1.2 var(--sans); letter-spacing: -0.015em; margin: 52px 0 14px; }
h3 { font: 700 20px/1.3 var(--sans); margin: 28px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--ink-2); }
strong, b { font-weight: 700; }
.byline { margin: 0 0 14px; font: 500 13px/1.4 var(--mono); color: var(--ink-2); }
.byline time { white-space: nowrap; }
.intro { font-size: 18px; color: var(--ink-2); }
.figure { margin: 22px 0; }
.figure img { width: 100%; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); }
/* emplacement vide tant que l'image n'est pas posée */
.figure:has(img[src=""]) { aspect-ratio: 16 / 9; border: 2px dashed var(--line); border-radius: 10px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%23b9ab84' stroke-width='2'%3E%3Crect x='6' y='10' width='36' height='28' rx='3'/%3E%3Ccircle cx='17' cy='20' r='3'/%3E%3Cpath d='m6 34 11-10 8 7 6-5 11 9'/%3E%3C/svg%3E") center no-repeat; }
.figure img[src=""] { display: none; }
ul.checks { list-style: none; padding-left: 0; }
ul.checks > li { position: relative; padding: 2px 0 0 38px; margin-bottom: 12px; }
ul.checks > li::before { content: ""; position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 5px; }
ul.checks > li::after { content: ""; position: absolute; left: 6px; top: 9px; width: 12px; height: 7px; border-left: 2.5px solid var(--stamp); border-bottom: 2.5px solid var(--stamp); transform: rotate(-45deg); }
ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; min-height: 34px; padding: 4px 0 0 48px; margin-bottom: 12px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--stamp); border-radius: 6px; color: var(--stamp); font: 700 16px/1 var(--mono); transform: rotate(-6deg); }
.notice { margin: 18px 0; padding: 14px 16px; border-left: 4px solid var(--stamp); background: var(--card); border-radius: 0 10px 10px 0; }

/* tableaux */
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 18px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font: 700 12px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table-stack table, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack thead { display: none; }
  .table-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 10px; padding: 4px 0; border: 0; }
  .table-stack td::before { content: attr(data-label); padding-top: 2px; font: 700 11px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
  .table-stack td:first-child { font-weight: 700; }
}

/* encart bouton */
.cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 22px 0; padding: 16px 18px; border: 1.5px dashed var(--ink); border-radius: 12px; background: var(--card); }
.cta-box p { margin: 0; font-weight: 600; }
.cta-note { font: 500 12px/1.3 var(--mono); color: var(--ink-2); letter-spacing: 0.04em; }
@media (max-width: 560px) { .cta-box .btn { width: 100%; } }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer; font: 700 15px/1.15 var(--sans); text-align: center; text-decoration: none; transition: background-color 0.15s, transform 0.15s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: default; opacity: 0.7; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #2a3b68; color: #fff; }
.btn--red { background: var(--stamp); color: #fff; }
.btn--red:hover { background: var(--stamp-dark); color: #fff; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line:hover { background: rgba(29, 43, 79, 0.06); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* FAQ */
.faq { margin-top: 8px; border-top: 1.5px dashed var(--line); }
.faq details { border-bottom: 1.5px dashed var(--line); }
.faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.faq summary::after { content: ""; flex: none; width: 30px; height: 30px; margin-top: -2px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 16px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- composteur ---------- */
.machine { max-width: 620px; margin: 22px 0 26px; }
.composteur { position: relative; z-index: 2; height: 56px; border-radius: 16px 16px 6px 6px; background: linear-gradient(#3a4a72, #24325a); box-shadow: inset 0 -7px 0 #182345, 0 10px 18px -10px rgba(29, 43, 79, 0.6); }
.composteur::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 7px; border-radius: 4px; background: #0b122b; box-shadow: inset 0 2px 2px #000; }
.composteur .c-label { position: absolute; top: 11px; left: 16px; font: 700 10px/1 var(--mono); letter-spacing: 0.2em; color: #b8c3e6; }
.composteur .c-led { position: absolute; top: 10px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: #3c4a70; transition: background-color 0.2s, box-shadow 0.2s; }
.composteur.is-on .c-led { background: #5be08f; box-shadow: 0 0 10px #5be08f; }
.composteur.is-chunk { animation: chunk 0.16s 2; }
@keyframes chunk { 50% { transform: translateY(2px); } }
/* la scène commence à la fente : ce qui monte disparaît dans la machine */
.stage { position: relative; overflow: hidden; min-height: 330px; margin: -16px 0 -26px; padding: 16px 12px 26px; }
.t-left { min-height: 22px; margin: 12px 0 0; font: 500 14px/1.5 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.t-left b { color: var(--ink); }

/* ---------- ticket ---------- */
.ticket { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 14px 18px 26px 24px; border: 1px solid var(--ticket-edge); border-radius: 8px; color: var(--ink);
  background: repeating-linear-gradient(135deg, rgba(110, 74, 42, 0.045) 0 2px, transparent 2px 7px), var(--ticket);
  box-shadow: 0 1px 0 #fff inset, 0 6px 16px rgba(29, 43, 79, 0.12); }
.ticket::before { content: ""; position: absolute; left: -5px; top: 8px; bottom: 18px; width: 10px; background: radial-gradient(circle at 5px 50%, var(--paper) 3.5px, transparent 4px) 0 0 / 10px 14px repeat-y; }
.ticket p { margin: 0; }
.t-top { display: flex; justify-content: space-between; gap: 12px; font: 700 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.t-serial { letter-spacing: 0.06em; }
.t-game { margin-top: 10px !important; font: 700 24px/1.12 var(--sans); letter-spacing: -0.01em; }
.t-offer { margin-top: 4px !important; font: 500 14px/1.35 var(--mono); color: var(--ink-2); }
.t-valid { margin-top: 2px !important; font: 500 12.5px/1.35 var(--mono); color: var(--ink-2); }
.t-band { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 58px; margin-top: auto; padding-top: 8px; }
.ticket.is-live .t-band:empty::after { content: ""; width: 150px; height: 44px; border: 1.5px dashed rgba(110, 74, 42, 0.32); border-radius: 4px; transform: rotate(-8deg); }
.t-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 44px; margin-top: auto; padding-top: 10px; }
.t-band + .t-code { margin-top: 0; padding-top: 6px; }
.t-dots { font: 700 22px/1 var(--mono); letter-spacing: 0.14em; color: #b9ab84; }
.t-codeval { font: 700 24px/1 var(--mono); letter-spacing: 0.08em; -webkit-user-select: all; user-select: all; }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; min-height: 46px; margin-top: 10px; }
.t-actions .btn { flex: 1 1 auto; }
.t-foot { margin-top: 8px !important; font: 500 12.5px/1.4 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.t-foot a { color: var(--stamp); font-weight: 700; text-decoration: none; }
.t-foot a:hover { text-decoration: underline; }
.t-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--stripe); opacity: 0.9; }
.t-stamp { flex: none; margin-left: auto; padding: 6px 10px; border: 2.5px solid var(--stamp); border-radius: 4px; color: var(--stamp);
  font: 700 13px/1.2 var(--mono); letter-spacing: 0.08em; text-align: center; transform: rotate(-8deg); opacity: 0.9; mix-blend-mode: multiply; }
.t-stamp span { white-space: nowrap; }
.t-holes { display: flex; gap: 6px; margin-right: auto; }
.t-holes i { width: 7px; height: 7px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3); }

.ticket--big { min-height: 288px; transition: transform 0.45s cubic-bezier(0.5, 0, 0.2, 1); }
.ticket--big .t-game { font-size: clamp(22px, 5.6vw, 30px); }
.ticket--big.is-in { transform: translateY(-74%); }
.ticket--big.no-tr { transition: none; }
.ticket--big.is-fresh .t-stamp { animation: thump 0.38s 0.32s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.ticket--big.is-fresh .t-holes i { animation: pop 0.2s 0.12s both; }
@keyframes thump { from { transform: rotate(-8deg) scale(1.9); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 0.9; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.ticket.is-ended { justify-content: center; }
.t-ended { font: 700 20px/1.35 var(--sans); padding-right: 0; }

.ticket.is-locked { background: #e9e5da; border-color: #d7d1c1; filter: grayscale(0.6); }
.ticket.is-locked .t-game { color: #6b6f7d; }
.ticket.is-locked .t-stripe { opacity: 0.45; }
.ticket.is-past { opacity: 0.66; }
.ticket.is-past .t-codeval { text-decoration: line-through; text-decoration-thickness: 2px; }

/* ---------- carnet ---------- */
.carnet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; min-height: 410px; margin: 20px 0 0; }
.ticket--mini { min-height: 196px; }
.ticket--mini .t-game { font-size: 21px; }
.ticket--mini .t-stamp { font-size: 11.5px; padding: 4px 8px; }
.ticket--mini .t-code { row-gap: 14px; }
.ticket--mini .t-foot { margin-top: 12px !important; }
.ticket--mini .t-codeval { font-size: 19px; }
.ticket--mini .t-dots { font-size: 19px; }
.ticket--mini.is-live { outline: 2px solid var(--ink); outline-offset: 3px; }
.fold { margin: 16px 0 0; }
.fold > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; list-style: none; font: 700 12.5px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold .table-wrap { margin-top: 8px; }

@media (max-width: 640px) {
  .carnet { grid-template-columns: 1fr; gap: 16px; min-height: 792px; }
  .ticket--mini { min-height: 186px; }
}
@media (max-width: 420px) {
  .ticket { padding: 12px 14px 24px 20px; }
  .t-codeval { font-size: 22px; }
}

/* ---------- calculateur ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0 22px; border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--card); }
.calc__in { display: grid; gap: 16px; align-content: start; padding: 20px; border-right: 1.5px dashed var(--line); }
.field label { display: block; margin-bottom: 6px; font: 700 12px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.field input { width: 100%; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: 700 18px/1 var(--mono); font-variant-numeric: tabular-nums; }
.field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.calc__out { display: grid; gap: 14px; align-content: start; padding: 20px; background: repeating-linear-gradient(0deg, transparent 0 27px, #efe8d6 27px 28px); }
.res .k { font: 700 12px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.res .v { display: block; font: 700 30px/1.15 var(--mono); font-variant-numeric: tabular-nums; }
.res .v.big { font-size: 40px; color: var(--stamp); }
.res-time { font: 700 18px/1.3 var(--mono); }
.formula { font: 500 13px/1.45 var(--mono); color: var(--ink-2); }
.warn { padding: 10px 12px; border-radius: 10px; background: #fbe4e1; color: #8f2219; font-weight: 700; font-size: 14px; line-height: 1.4; }
@media (max-width: 720px) {
  .calc { grid-template-columns: 1fr; }
  .calc__in { border-right: 0; border-bottom: 1.5px dashed var(--line); }
}

/* ---------- pied de page ---------- */
.site-footer { margin-top: 64px; padding: 30px 0 calc(28px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #c9d0e3; font-size: 14px; line-height: 1.6; }
.f-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-bottom: 18px; border-bottom: 1px dashed rgba(255, 255, 255, 0.22); }
.f-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.f-nav a { color: #fff; text-decoration: none; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.f-nav a:hover { text-decoration: underline; color: #fff; }
.disclaimer { margin: 18px 0 0; }
.disclaimer p { margin: 0 0 10px; }
.site-footer a { color: #fff; }
.f-copy { margin: 14px 0 0; font: 500 12.5px/1.4 var(--mono); color: #98a2c0; }

/* toast */
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; line-height: 1.35; text-align: center; box-shadow: 0 8px 20px rgba(29, 43, 79, 0.3); }

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