/* ============ Popups d'aide (tour22-28) ============ */
.guide-ov { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 1rem; background: rgba(0,0,0,.62); opacity: 0; transition: opacity .2s ease; }
.guide-ov.on { opacity: 1; }
.guide-card { position: relative; width: min(100%, 440px); max-height: calc(100dvh - 2rem); overflow-y: auto; display: grid; gap: .9rem; padding: 1.6rem 1.4rem 1.3rem; border-radius: 28px; background: var(--bg-surface); border: 1px solid var(--stroke-line); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); transform: translateY(14px) scale(.98); transition: transform .28s cubic-bezier(.2,.9,.3,1); }
.guide-ov.on .guide-card { transform: none; }
.guide-x { position: absolute; top: .8rem; right: .8rem; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bg-elevated); color: var(--color-muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.guide-eyebrow { justify-self: start; padding: .2rem .75rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.guide-card h2 { margin: 0; padding-right: 2.6rem; font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.05; }
.guide-text { margin: 0; color: var(--color-secondary); font-size: .95rem; line-height: 1.55; }
.guide-points { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.guide-points li { position: relative; padding: .6rem .9rem .6rem 2.3rem; border-radius: 16px; background: var(--bg-elevated); font-size: .9rem; line-height: 1.4; }
.guide-points li::before { content: ""; position: absolute; left: .9rem; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.guide-check { display: flex; align-items: center; gap: .7rem; min-height: 44px; font-size: .9rem; color: var(--color-secondary); cursor: pointer; }
.guide-check input { position: absolute; opacity: 0; pointer-events: none; }
.guide-box { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--stroke-line); background: var(--bg-elevated); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.guide-check input:checked + .guide-box { background: var(--accent); border-color: var(--accent); }
.guide-check input:checked + .guide-box::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid var(--on-accent, #fff); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.guide-check input:focus-visible + .guide-box { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.guide-ok { width: 100%; justify-content: center; }

/* bouton « ? » rond en haut à droite de la page */
.page-head, .hero-stage { position: relative; }
.guide-help { position: absolute; top: 0; right: 0; z-index: 6; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--stroke-line); background: var(--bg-surface); color: var(--color-secondary); font: 800 1rem/1 var(--font-display, inherit); cursor: pointer; transition: transform .2s, color .2s, border-color .2s; }
.guide-help:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.hero-stage > .guide-help { top: calc(70px + 1rem); right: 1rem; z-index: 8; background: color-mix(in srgb, var(--bg-surface) 88%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, var(--stroke-line)); color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.35); backdrop-filter: blur(6px); }
.guide-reset { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; padding: 1rem 1.1rem; border-radius: 20px; background: var(--bg-surface); border: 1px solid var(--stroke-line); }
.guide-reset > div { display: grid; gap: .1rem; }
.guide-reset small { color: var(--color-muted); }

/* accueil : le compteur ouvre le tutoriel */
#hero-gauge[data-guide] { cursor: pointer; }
#hero-gauge .gauge-help { position: absolute; top: 4%; right: 4%; z-index: 6; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font: 800 1rem/1 var(--font-display, inherit); color: var(--accent); background: color-mix(in srgb, var(--bg-surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--stroke-line)); box-shadow: 0 4px 16px rgba(0,0,0,.35); animation: gaugeHelp 2.6s ease-in-out infinite; }
#hero-gauge:hover .gauge-help, #hero-gauge:focus-visible .gauge-help { animation: none; transform: scale(1.1); }
@keyframes gaugeHelp { 0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,.35), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 4px 16px rgba(0,0,0,.35), 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { #hero-gauge .gauge-help { animation: none; } }
