/* J'aime ma basse : page d'attente. Charte « Rouille & cuir » (site/DESIGN.md). */
@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url(fonts/anton-latin-ext-7bc989.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url(fonts/anton-latin-5f6ded.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap; src: url(fonts/space-grotesk-latin-ext-012a46.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap; src: url(fonts/space-grotesk-latin-1d9f0c.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #ede5d2;
  --paper: #fbf6e9;
  --ink: #231a15;
  --red: #a8461f;
  --vif: #b94a1c;
  --mustard: #e8c27a;
  --muted: #5f5a54;
  --bois: #2b2019;
  --trait: color-mix(in srgb, var(--ink) 18%, transparent);
  --marge: clamp(16px, 4vw, 48px);
  --large: 1100px;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Space Grotesk", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.6; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
::selection { background: var(--mustard); color: var(--ink); }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--vif); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2 { font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; line-height: 1.02; letter-spacing: 0.01em; margin: 0 0 0.4em; }
h1 em, h2 em { color: var(--red); font-style: normal; }
p { margin: 0 0 0.8em; max-width: 60ch; text-wrap: pretty; }

.saut { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.saut:focus { left: 8px; }

/* En-tête */
.barre { max-width: var(--large); width: 100%; margin: 0 auto; padding: 14px var(--marge) 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { width: clamp(150px, 22vw, 210px); height: auto; display: block; }
.etiquette { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.etiquette span { display: inline-block; margin-right: 4px; animation: clignote 1.6s steps(2, start) infinite; }
@keyframes clignote { to { visibility: hidden; } }

/* Une */
.une { max-width: var(--large); margin: 0 auto; padding: clamp(10px, 2vw, 24px) var(--marge) 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px, 0.75fr); gap: 8px clamp(24px, 5vw, 64px); align-items: end; }
h1 { font-size: clamp(44px, 7.4vw, 92px); margin-bottom: 0.3em; }
.chapo { font-size: clamp(18px, 1.6vw, 20px); }
.signature { font-weight: 600; color: var(--muted); font-size: 15px; }
.signature::before { content: "— "; }
.portrait { width: 100%; max-width: 340px; height: auto; justify-self: end; display: block; margin-bottom: -2px; }

/* Manche */
.manche { background: var(--ink); color: var(--paper); padding: 26px 0 22px; }
.manche-tete, .manche-bas { max-width: var(--large); margin: 0 auto; padding: 0 var(--marge); }
.manche-tete h2 { font-size: clamp(26px, 3vw, 36px); color: var(--mustard); }
.manche-tete p { color: color-mix(in srgb, var(--paper) 88%, var(--ink)); }
.petit-clair { font-size: 14.5px; opacity: 0.8; }

.basse { max-width: var(--large); margin: 14px auto 16px; padding: 0 var(--marge); display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.tete { display: grid; grid-template-rows: repeat(4, 1fr); gap: 0; background: #3a2c22; border-radius: 3px 0 0 3px; padding: 6px 6px; border-right: 6px solid #e9dfc6; }
.cheville { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 48px; height: 48px; margin: auto; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--paper) 55%, transparent); color: var(--paper); font-weight: 700; font-size: 13px; transition: background-color 200ms, border-color 200ms, transform 700ms var(--sortie); }
.cheville:hover { border-color: var(--mustard); }
.cheville:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; }
.cheville.accordee { border-style: solid; border-color: var(--mustard); background: var(--mustard); color: var(--ink); }
.cheville.tourne { transform: rotate(360deg); }

.touche { position: relative; display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); grid-template-rows: repeat(4, 56px); background: var(--bois); border-radius: 0 3px 3px 0; }
.case { all: unset; box-sizing: border-box; position: relative; cursor: pointer; display: grid; place-items: center; border-right: 3px solid #b9ad94; }
.case::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--epais, 2px); transform: translateY(-50%); background: linear-gradient(#efe6d2, #a99c84); pointer-events: none; }
.case.vibre::before { animation: vibre 420ms ease-out; }
@keyframes vibre { 0%, 100% { transform: translateY(-50%); } 20% { transform: translateY(calc(-50% + 2px)); } 40% { transform: translateY(calc(-50% - 2px)); } 60% { transform: translateY(calc(-50% + 1px)); } }
.case:hover { background: color-mix(in srgb, var(--paper) 7%, transparent); }
.case:focus-visible { outline: 2px solid var(--mustard); outline-offset: -3px; }
.point { position: relative; z-index: 1; min-width: 36px; height: 30px; padding: 0 6px; border-radius: 15px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--paper); color: var(--ink); opacity: 0; transform: scale(0.6); transition: opacity 160ms, transform 300ms var(--sortie); pointer-events: none; }
.case.montre .point { opacity: 1; transform: scale(1); }
.case.juste .point { background: var(--vif); color: var(--paper); }
.repere { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #d9ccb0; opacity: 0.55; transform: translate(-50%, -50%); top: 50%; pointer-events: none; }
.numeros { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); font-size: 12px; color: color-mix(in srgb, var(--paper) 60%, transparent); text-align: center; grid-column: 2; padding-top: 4px; }

.manche-bas p { margin: 0 0 6px; }
.compteur { font-family: "Anton", Impact, sans-serif; text-transform: uppercase; font-size: 22px; letter-spacing: 0.02em; color: var(--mustard); }
.defi strong { color: var(--mustard); }
.note-jouee { min-height: 1.6em; font-size: 15px; color: color-mix(in srgb, var(--paper) 80%, transparent); }

/* Liens */
.liens { max-width: var(--large); margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--marge); }
.liens h2 { font-size: clamp(28px, 3.4vw, 42px); }
.liens em { font-style: normal; font-weight: 700; }
.videos { list-style: none; margin: 18px 0 22px; padding: 0; border-top: 1px solid var(--trait); max-width: 760px; }
.videos li { border-bottom: 1px solid var(--trait); }
.videos a { display: flex; gap: 12px; align-items: baseline; padding: 12px 2px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.videos a::before { content: "▶"; color: var(--red); font-size: 12px; flex: none; }
.videos a:hover { color: var(--red); }
.boutons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 20px; background: var(--paper); border: 1px solid var(--ink); border-radius: 2px; font-weight: 600; font-size: 16px; text-decoration: none; color: var(--ink); transition: background-color 160ms, border-color 160ms, color 160ms; }
.btn:hover { border-color: var(--red); color: var(--red); }
.btn.plein { background: var(--ink); color: var(--paper); }
.btn.plein:hover { background: var(--red); border-color: var(--red); color: var(--paper); }

.pied { border-top: 1px solid var(--trait); padding: 16px var(--marge) 22px; text-align: center; font-size: 14px; color: var(--muted); }
.pied p { margin: 0 auto 2px; }

/* Téléphone */
@media (max-width: 720px) {
  .une { grid-template-columns: minmax(0, 1fr) 118px; align-items: start; }
  .une > div { grid-column: 1 / -1; grid-row: 1; }
  .portrait { display: none; }
  .basse { grid-template-columns: 56px minmax(0, 1fr); padding: 0 12px; }
  .tete { padding: 6px 3px; }
  .cheville { width: 44px; height: 44px; font-size: 12px; }
  .touche, .numeros { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
  .case.loin, .numeros .loin { display: none; }
}

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