:root {
  --bg: #f5f5f7; --panel: #ffffff; --side: #ebebef; --text: #1d1d1f; --muted: #6e6e73; --line: #d9d9de;
  --accent: #0055a4; --accent-soft: rgba(0, 85, 164, .09); --red: #e1000f; --green: #1e8e3e; --green-soft: rgba(30,142,62,.12);
  --bad-soft: rgba(225,0,15,.10); --orange: #d9730d; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
}
:root[data-theme="dark"] { --bg: #1c1c1e; --panel: #2c2c2e; --side: #232325; --text: #f5f5f7; --muted: #a1a1a6; --line: #3a3a3c;
    --accent: #4d9dff; --accent-soft: rgba(77,157,255,.14); --green: #34c759; --green-soft: rgba(52,199,89,.16); --bad-soft: rgba(255,69,58,.16); --shadow: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --bg: #1c1c1e; --panel: #2c2c2e; --side: #232325; --text: #f5f5f7; --muted: #a1a1a6; --line: #3a3a3c;
    --accent: #4d9dff; --accent-soft: rgba(77,157,255,.14); --green: #34c759; --green-soft: rgba(52,199,89,.16); --bad-soft: rgba(255,69,58,.16); --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
.app { display: flex; height: 100vh; }
body.spa { display: flex; flex-direction: column; height: 100vh; }
body.spa .app { flex: 1; min-height: 0; height: auto; }
.drag { -webkit-app-region: drag; height: 38px; flex: none; }
.sidebar { width: 230px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 0 12px 14px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(180deg, var(--accent) 72%, #fff 72%, #fff 86%, var(--red) 86%);
  color: #fff; font: 700 17px/36px Georgia, serif; text-align: center; box-shadow: var(--shadow); }
nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); margin-bottom: 2px; font-weight: 500; }
nav a:hover { background: rgba(127,127,127,.12); }
nav a.active { background: var(--accent); color: #fff; }
nav a span { width: 20px; text-align: center; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px; line-height: 1.7; }
main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
main > .drag { position: sticky; top: 0; z-index: 5; background: var(--bg); }
.view { width: 100%; margin: 0; padding: 4px 48px 60px; }
h1 { font-size: 30px; line-height: 1.2; margin: 6px 0 8px; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); margin: 14px 0; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--panel); }
.box-title { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.row { display: flex; gap: 14px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 9px 16px; font: 600 14px/1.2 inherit; cursor: pointer;
  background: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.secondary { background: rgba(127,127,127,.15); color: var(--text); }
.btn.green { background: var(--green); }
.btn.big { padding: 12px 22px; font-size: 15px; }
.stats { display: flex; gap: 24px; align-items: center; }
.ring { width: 86px; height: 86px; flex: none; }
.big-num { font: 800 42px/1 -apple-system, sans-serif; letter-spacing: -.03em; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 10px; cursor: pointer; color: var(--text); }
.list-item:hover { background: rgba(127,127,127,.1); }
.list-item .grow { flex: 1; min-width: 0; }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 12px; }
.check.done { background: var(--green); border-color: var(--green); color: #fff; }
.choice { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(127,127,127,.06);
  padding: 11px 14px; border-radius: 10px; margin: 6px 0; font: inherit; color: var(--text); cursor: pointer; }
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice.right { background: var(--green-soft); border-color: var(--green); }
.choice.wrong { background: var(--bad-soft); border-color: var(--red); }
.choice:disabled { cursor: default; }
.feedback { margin-top: 8px; }
.ok { color: var(--green); font-weight: 700; } .ko { color: var(--orange); font-weight: 700; }
textarea, input[type=text], input[type=time], input[type=date], select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
textarea { width: 100%; min-height: 110px; resize: vertical; }
.progress { height: 6px; border-radius: 99px; background: rgba(127,127,127,.2); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.seg { display: inline-flex; background: rgba(127,127,127,.15); border-radius: 9px; padding: 2px; margin: 6px 0 14px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; font: 500 13px inherit; color: var(--text); cursor: pointer; }
.seg button.on { background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.flash { min-height: 200px; display: grid; place-items: center; text-align: center; cursor: pointer; border-radius: 16px; padding: 28px; user-select: none;
  background: rgba(127,127,127,.08); border: 1px solid var(--line); transition: background .2s; }
.flash.flipped { background: var(--accent-soft); }
.flash .term { font-size: 26px; font-weight: 700; }
.steps { position: sticky; top: 38px; background: var(--bg); padding: 8px 0 12px; z-index: 4; }
.footer-bar { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 4px; }
.section-head h3 { margin: 0; }
details { border-top: 1px solid var(--line); padding: 8px 0; } details summary { cursor: pointer; font-weight: 600; }
.dots { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(127,127,127,.18); color: var(--muted); font: 600 12px inherit; cursor: pointer; }
.dot.on { background: var(--accent); color: #fff; }
.bar { height: 8px; background: rgba(127,127,127,.18); border-radius: 99px; overflow: hidden; margin-top: 6px; } .bar > div { height: 100%; background: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.search { width: 100%; margin-bottom: 8px; }
.center { text-align: center; }
.highlight { background: var(--accent-soft); }
mark { background: rgba(255, 204, 0, .35); color: inherit; border-radius: 3px; }

/* ---------- v3 : photos, schémas, jeu, récap du soir ---------- */
.copy { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; opacity: .8; }
.nbadge { margin-left: auto; background: var(--red); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.tiny { font-size: 11px; }
.hero { margin: 0 0 14px; } .hero img { width: 100%; height: 300px; object-fit: cover; border-radius: 16px; display: block; box-shadow: var(--shadow); }
.hero figcaption, .diagram figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; }
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 18px 0; box-shadow: var(--shadow); }
.diagram-title { font-weight: 700; margin-bottom: 8px; color: var(--accent); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.avatar.ph { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.xp { display: flex; gap: 12px; align-items: center; color: var(--text); padding: 10px 12px; border-radius: 12px; background: rgba(127,127,127,.08); }
.xp:hover { background: rgba(127,127,127,.14); }
.lvl { font-weight: 800; white-space: nowrap; background: linear-gradient(135deg, #f2a900, #e1000f); color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--text); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); transition: transform .15s; }
.tile:hover { transform: translateY(-2px); } .tile span { font-size: 26px; } .tile small { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); opacity: 0; transition: all .3s; z-index: 100;
  background: #1d1d1f; color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast.big { background: linear-gradient(135deg, #0055a4, #7b3fbf); font-size: 16px; padding: 14px 24px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.night-card { background: linear-gradient(135deg, #1a1f4d, #3b2a6b); color: #fff; border: 0; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 22px; flex: none; }
body.night main, body.night main > .drag { background: #0d1030; color: #e8e8f6; }
body.night .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #e8e8f6; box-shadow: none; }
.night-wrap { text-align: center; padding-top: 10px; } .night-wrap h2 { text-align: left; }
.moon { font-size: 64px; filter: drop-shadow(0 0 24px rgba(255,230,150,.45)); animation: glow 4s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 38px rgba(255,230,150,.75)); transform: translateY(-3px); } }
.np-card { background: rgba(255,255,255,.07); border-radius: 22px; padding: 24px; margin: 20px auto; max-width: 560px; }
.np-title { font-size: 18px; font-weight: 700; min-height: 26px; }
.np-progress { height: 6px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; margin: 16px 0 6px; } .np-progress div { height: 100%; background: #f2c94c; }
.np-controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.np-controls button { background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 15px; cursor: pointer; }
.np-controls button:hover { background: rgba(255,255,255,.2); }
.np-controls .np-play { width: 76px; height: 76px; font-size: 26px; background: #f2c94c; color: #1a1f4d; }
.night-wrap select { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.night-list .list-item { color: inherit; text-align: left; } .night-list .list-item.playing { background: rgba(242,201,76,.15); }
.night-list .btn.secondary { background: rgba(255,255,255,.12); color: #fff; }
.small-btn { padding: 6px 12px; font-size: 12px; }
.big-clock { font: 800 28px/1 -apple-system, sans-serif; color: var(--red); }
.level-card { display: flex; gap: 18px; align-items: center; } .lvl-big { font-size: 64px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.badge { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; opacity: .55; }
.badge.on { opacity: 1; border-color: #f2a900; box-shadow: 0 0 0 1px #f2a900, var(--shadow); } .b-icon { font-size: 34px; }
.roadmap { display: flex; flex-wrap: wrap; gap: 10px 6px; align-items: flex-start; }
.node { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-align: center; }
.node span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(127,127,127,.15); color: var(--muted); }
.node small { font-size: 9.5px; line-height: 1.2; color: var(--muted); }
.node.done span { background: var(--green); color: #fff; } .node.current span { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2s infinite; }
.node.goal span { background: var(--red); color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px var(--accent-soft); } }
.about .logo { margin-right: 4px; }
.logo-img { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.avatar-wrap { position: relative; display: inline-block; flex: none; }
.avatar-wrap > * { position: absolute; inset: 0; }
img.avatar { object-position: center 22%; background: var(--panel); }
.hero.small { float: right; width: 260px; margin: 0 0 12px 20px; } .hero.small img { height: auto; max-height: 320px; object-fit: contain; }
/* v3.2 : barre redimensionnable, questionnaires */
.sidebar { width: 230px; min-width: 0; overflow: hidden; }
.resizer { width: 7px; margin: 0 -3px; cursor: col-resize; z-index: 20; position: relative; -webkit-app-region: no-drag; flex: none; }
.resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .15s; }
.resizer:hover::after, body.resizing .resizer::after { background: var(--accent); width: 2px; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing main, body.resizing .sidebar { pointer-events: none; }
nav a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand strong, .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 12px 0; }
.theme-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, transform .15s; }
.theme-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-btn.all { background: var(--accent-soft); }
.match-row summary { list-style: none; cursor: pointer; padding: 8px 0; } .match-row summary::-webkit-details-marker { display: none; }
.match-pct { font: 800 20px/1 -apple-system, sans-serif; min-width: 70px; text-align: right; }
.grow { flex: 1; min-width: 0; }
/* ---------- Site web ---------- */
.drag { -webkit-app-region: no-drag; }
.topbar { display: flex; align-items: center; padding: 0 48px; height: 64px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--accent); color: #fff; font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1;
  padding: 12px 22px 12px 16px; border-radius: 999px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,85,164,.35);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease; }
.back-btn:hover { background: #0b2a5b; box-shadow: 0 6px 18px rgba(0,85,164,.45); transform: translateX(-2px); }
.back-btn:active { transform: scale(.94); box-shadow: 0 2px 6px rgba(0,85,164,.35); }
.back-btn:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
.back-btn .arrow { font-size: 22px; line-height: 0; margin-top: -2px; }
.copy a { color: inherit; text-decoration: underline; }
.np-card { max-width: 620px; margin: 16px auto; text-align: center; }
.np-title { font-size: 18px; font-weight: 700; min-height: 26px; }
.np-controls { display: flex; justify-content: center; align-items: center; gap: 12px; }
.np-controls button { background: rgba(127,127,127,.14); color: var(--text); border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 15px; cursor: pointer; }
.np-controls button:hover { background: rgba(127,127,127,.24); }
.np-controls .np-play { width: 70px; height: 70px; font-size: 24px; background: var(--accent); color: #fff; }
.list-item.playing { background: var(--accent-soft); }
@media (max-width: 760px) {
  .view { padding: 4px 16px 60px; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { width: 100% !important; height: auto; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .sidebar > .drag, .side-foot, .brand small { display: none; }
  .brand { padding: 10px 6px 6px; }
  nav#nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; scrollbar-width: none; }
  nav#nav a { flex: none; padding: 6px 10px; font-size: 14px; }
  .resizer { display: none; }
  main { overflow: visible; }
  .view { padding: 4px 16px 60px; }
  .tiles { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .stats { flex-wrap: wrap; }
  .hero img { height: 200px; }
  .hero.small { float: none; width: 100%; margin: 0 0 12px; }
  .topbar { padding: 0 16px; height: 56px; }
  .back-btn { font-size: 15px; padding: 10px 18px 10px 14px; }
}

/* Page d'accueil plein écran */
body.landing .sidebar, body.landing .resizer, body.landing main > .topbar { display: none; }
body.landing .view { padding: 0; }
.landing-hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; text-align: center;
  color: #0b2a5b; background: linear-gradient(180deg, #6fb0ea 0%, #a9d2f4 55%, #e3f0f8 100%); overflow: hidden; }
.landing-hero .hero-text { padding: clamp(40px, 9vh, 110px) 24px 0; position: relative; z-index: 2; }
.landing-hero .hero-art { width: 100%; flex: 1; min-height: 52vh; margin-top: 10px; background: url('img/elysee-accueil.svg?v=2') center bottom / auto 100% no-repeat; }
.landing-hero .flag { width: 72px; height: 6px; border-radius: 3px; margin: 0 auto 22px; background: linear-gradient(90deg, #0055a4 33%, #fff 33% 66%, #e1000f 66%); }
.landing-hero h1 { font-size: clamp(42px, 7.5vw, 88px); line-height: 1.02; margin: 0; letter-spacing: -.03em; font-weight: 800; color: #0b2a5b; }
.landing-hero .tagline { font-size: clamp(17px, 2.2vw, 23px); margin: 16px 0 28px; color: #17396d; }
.landing-hero .btn { font-size: 18px; padding: 14px 30px; border-radius: 999px; background: #0b2a5b; color: #fff; box-shadow: 0 6px 20px rgba(11,42,91,.25); }
.landing-hero .btn:hover { background: #0055a4; }
.landing-hero .sub { margin-top: 16px; font-size: 14px; color: #17396d; opacity: .85; }
.landing-hero .hero-foot { position: absolute; left: 14px; bottom: 10px; font-size: 11px; color: #4a3b22; opacity: .8; z-index: 2; }
.landing-hero .hero-foot a { color: inherit; text-decoration: underline; }
@media (max-width: 760px) {
  .landing-hero .hero-art { min-height: 44vh; }
  .landing-hero .hero-foot { left: 0; right: 0; }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); color: var(--text); padding: 8px 16px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.brand { cursor: pointer; }
.diagram svg { max-width: 860px; display: block; margin: 0 auto; }

/* Aujourd'hui */
.info-card { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.countdown { display: flex; gap: 16px; align-items: center; min-width: 260px; }
.info-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.info { display: flex; flex-direction: column; background: rgba(127,127,127,.07); border-radius: 12px; padding: 12px 14px; color: var(--text); }
a.info:hover { background: var(--accent-soft); }
.info-num { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.info small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.day-label { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.day-card h1 { margin-top: 8px; }
/* Quiz : score permanent et correction */
.scorebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 64px; z-index: 3;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.fb { border-radius: 10px; padding: 12px 14px; margin: 12px 0; border: 1px solid; }
.fb-ok { background: var(--green-soft); border-color: var(--green); color: var(--text); }
.fb-ok > strong:first-child { color: var(--green); }
.fb-ko { background: var(--bad-soft); border-color: var(--red); color: var(--text); }
.fb-ko > strong:first-child { color: var(--red); }
.fb-expl { margin-top: 6px; color: var(--muted); }
/* Récaps : chapitres */
.chapter { padding: 0; }
.chapter summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::before { content: '›'; font-size: 20px; color: var(--muted); transition: transform .15s; }
.chapter[open] summary::before { transform: rotate(90deg); }
.chapter .list-item { padding-left: 46px; padding-right: 18px; }
/* Candidats */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.tabs .tab { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 10px 18px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs .tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.cand-card { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--text); }
.cand-card:hover, .cmp-card:hover { border-color: var(--accent); }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cmp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.cmp-card p { margin: 10px 0 0; font-size: 14px; }
.cmp-card.empty p { color: var(--muted); font-style: italic; }
.tiny { font-size: 11px; }
@media (max-width: 760px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-num { font-size: 18px; }
  .countdown { min-width: 0; }
}

.btn.support { background: #e1306c; background: linear-gradient(135deg, #e8415f, #c2185b); color: #fff; }
.btn.support.side { display: block; text-align: center; margin: 0 0 12px; padding: 9px 12px; font-size: 14px; }
.support-card { border-color: rgba(232,65,95,.35); }

/* Encarts livre + soutien */
.promo { display: flex; gap: 28px; align-items: center; margin: 22px 0; padding: 26px 30px; border-radius: 18px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(255,226,122,.35), transparent 40%), linear-gradient(135deg, #0b2a5b 0%, #0055a4 70%, #2f7fd6 100%); box-shadow: 0 10px 30px rgba(11,42,91,.25); }
.promo-book { width: 150px; flex: none; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); transform: rotate(-4deg); }
.promo-badge { display: inline-block; background: #e1000f; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .06em; padding: 4px 10px; border-radius: 8px; }
.promo h2 { color: #fff; margin: 10px 0 6px; font-size: 26px; }
.promo p { margin: 0 0 14px; opacity: .92; }
.promo-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.promo .btn.promo-main { background: #fff; color: #0b2a5b; font-size: 16px; padding: 12px 20px; border-radius: 999px; }
.promo .btn.promo-alt { background: linear-gradient(135deg, #e8415f, #c2185b); color: #fff; font-size: 16px; padding: 12px 20px; border-radius: 999px; }
.promo .promo-note { font-size: 12px; opacity: .75; margin: 12px 0 0; }
.promo.compact { padding: 20px 24px; }
.promo.compact .promo-book { width: 110px; }
.promo.compact h2 { font-size: 21px; }
.side-promo { display: flex; gap: 10px; align-items: center; background: linear-gradient(135deg, #0b2a5b, #0055a4); color: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; line-height: 1.35; }
.side-promo img { width: 40px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.side-promo:hover { filter: brightness(1.1); }
.btn.support.side { margin-bottom: 12px; }
.hero-promo { display: inline-flex; gap: 14px; align-items: center; margin-top: 22px; background: rgba(255,255,255,.85); color: #0b2a5b; border-radius: 16px; padding: 10px 18px 10px 12px; text-align: left; font-size: 14px; box-shadow: 0 6px 20px rgba(11,42,91,.15); }
.hero-promo img { width: 46px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.hero-promo:hover { background: #fff; }
@media (max-width: 760px) {
  .promo { flex-direction: column; text-align: center; padding: 22px 18px; }
  .promo-btns { justify-content: center; }
  .promo-book { width: 120px; }
}

/* Bannière en haut de toutes les pages */
.site-banner { position: relative; display: block; flex: none; height: 132px; overflow: hidden; color: #0b2a5b;
  background: linear-gradient(180deg, #6fb0ea 0%, #a9d2f4 70%, #e3f0f8 100%); border-bottom: 1px solid rgba(11,42,91,.12); }
.site-banner .sb-art { position: absolute; inset: 0; background: url('img/elysee.svg?v=2') right -120px bottom / auto 100% no-repeat; }
.site-banner .sb-fade { position: absolute; left: 0; top: 0; bottom: 26px; width: 74%; background: linear-gradient(180deg, #6fb0ea, #a2cdf2); -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent); mask-image: linear-gradient(90deg, #000 72%, transparent); }
.site-banner::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(180deg, #ead9b5, #d8c08f); z-index: 0; }
.site-banner .sb-art { z-index: 1; -webkit-mask-image: linear-gradient(90deg, transparent calc(100% - 700px), #000 calc(100% - 560px)); mask-image: linear-gradient(90deg, transparent calc(100% - 700px), #000 calc(100% - 560px)); } .site-banner .sb-fade { z-index: 2; } .site-banner .sb-text { z-index: 3; }
.site-banner .sb-text { position: absolute; left: 40px; top: 0; bottom: 30px; display: flex; flex-direction: column; justify-content: center; text-shadow: 0 1px 8px rgba(255,255,255,.55); }
.site-banner .flag { width: 54px; height: 5px; border-radius: 3px; margin-bottom: 10px; background: linear-gradient(90deg, #0055a4 33%, #fff 33% 66%, #e1000f 66%); }
.site-banner strong { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.site-banner .sb-text > span:last-child { font-size: 17px; margin-top: 6px; color: #0b2a5b; font-weight: 600; }
body.landing .site-banner { display: none; }
@media (max-width: 760px) {
  body.spa { height: auto; display: block; }
  .site-banner { height: 92px; }
  .site-banner .sb-art { background-position: right -230px bottom; -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 70%); mask-image: linear-gradient(90deg, transparent 45%, #000 70%); }
  .site-banner .sb-text > span:last-child { font-size: 12px; }
  .site-banner::after { height: 18px; } .site-banner .sb-fade { bottom: 18px; }
  .site-banner .sb-fade { width: 62%; }
  .site-banner .sb-text { left: 16px; bottom: 20px; }
  .site-banner strong { font-size: 26px; }
  .site-banner .sb-text > span:last-child { font-size: 13px; }
  .site-banner .flag { margin-bottom: 6px; }
}
/* Le bouton Retour n'apparaît que sur les pages « enfants » (fiche, séance, candidat, questionnaire…) */
.back-btn[hidden] { display: none; }
.topbar:has(.back-btn[hidden]) { height: 16px; }

/* Aujourd'hui en deux colonnes : tout visible sans défiler */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.today-main > .card:first-child, .today-main > a:first-child .card, .today-side .card { margin-top: 0; }
.today-side .info-card { flex-direction: column; align-items: stretch; gap: 16px; }
.today-side .countdown { min-width: 0; }
.today-side .info-grid { grid-template-columns: 1fr 1fr; }
.today-side .info-num { font-size: 20px; }
.today-main .day-card h1 { font-size: 32px; }
@media (max-width: 1050px) { .today-grid { grid-template-columns: 1fr; } .today-side { order: -1; } }

/* Urne animée à gauche du décompte */
.urne { width: 68px; height: 54px; flex: none; overflow: visible; align-self: center; }
.urne .u-env { animation: vote 3.4s cubic-bezier(.45,.05,.55,.95) infinite; transform-box: view-box; }
@keyframes vote {
  0% { transform: translate(-4px, -22px) rotate(-12deg); opacity: 0; }
  12% { opacity: 1; }
  45% { transform: translate(0, -12px) rotate(0deg); }
  55% { transform: translate(0, -12px) rotate(0deg); }
  85%, 100% { transform: translate(0, 34px) rotate(0deg); opacity: 1; }
}
.urne .u-pile { animation: pile 3.4s ease-in-out infinite; transform-origin: 52px 96px; transform-box: view-box; }
@keyframes pile { 0%, 80% { transform: translateY(0); } 88% { transform: translateY(-2px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .urne .u-env, .urne .u-pile { animation: none; } }

/* Apprendre : choix de l'affichage */
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 18px; }
.mode-card { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.mode-card:hover { border-color: var(--accent); }
.mode-card:active { transform: scale(.97); }
.mode-card .mc-icon { font-size: 28px; width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent-soft); }
.mode-card strong { display: block; font-size: 16px; }
.mode-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.mode-card.on { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,85,164,.25); }
.mode-card.on small { color: rgba(255,255,255,.85); }
.mode-card.on .mc-icon { background: rgba(255,255,255,.2); }
@media (max-width: 760px) { .mode-cards { grid-template-columns: 1fr; gap: 8px; } .mode-card { padding: 10px 12px; } .mode-card .mc-icon { width: 40px; height: 40px; font-size: 22px; } }

/* Questionnaires en trois colonnes */
.quiz-cols { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; align-items: start; margin-top: 14px; }
.qcol { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.qcol-match { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--panel); }
.qcol-icon { font-size: 34px; width: 60px; height: 60px; border-radius: 16px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.qcol h2 { margin: 0 0 8px; font-size: 21px; }
.qcol p { margin: 0 0 12px; }
.qcol-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.qcol-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.qcol-item:hover { border-color: var(--accent); }
.qcol-item small { color: var(--muted); white-space: nowrap; font-size: 12px; }
.qcol-stats { display: flex; gap: 10px; margin: 4px 0 16px; }
.qcol-stats > div { flex: 1; background: rgba(127,127,127,.07); border-radius: 12px; padding: 12px; text-align: center; }
.qcol-stats b { display: block; font-size: 30px; color: var(--accent); line-height: 1.1; }
.qcol-stats span { font-size: 12px; color: var(--muted); }
.qcol-btn { justify-content: center; }
@media (max-width: 1100px) { .quiz-cols { grid-template-columns: 1fr 1fr; } .qcol-match { grid-row: span 2; } }
@media (max-width: 760px) { .quiz-cols { grid-template-columns: 1fr; } .qcol-match { grid-row: auto; } }

/* Aujourd'hui : colonnes de même hauteur + encart livre en bandeau */
.today-grid { align-items: stretch; }
.today-main { display: flex; flex-direction: column; gap: 14px; }
.today-main > * { margin: 0 !important; }
.today-main > a:first-child, .today-main > .day-wrap { flex: 1; display: flex; }
.today-main > a:first-child .day-card { flex: 1; display: flex; flex-direction: column; justify-content: space-between; margin: 0; }
.today-side { display: flex; }
.today-side .info-card { flex: 1; margin: 0; }
.promo.wide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; margin: 20px 0 0; padding: 18px 26px; }
.promo.wide .promo-book { width: 78px; }
.promo.wide h2 { font-size: 21px; margin: 6px 0 4px; }
.promo.wide p { margin: 0; font-size: 14px; }
.promo.wide .promo-btns { flex-direction: column; align-items: stretch; }
.promo.wide .btn { justify-content: center; white-space: nowrap; font-size: 15px; padding: 10px 18px; }
@media (max-width: 1050px) { .promo.wide { grid-template-columns: auto minmax(0, 1fr); } .promo.wide .promo-btns { grid-column: 1 / -1; flex-direction: row; justify-content: center; } }
@media (max-width: 760px) { .promo.wide { grid-template-columns: 1fr; text-align: center; } .promo.wide .promo-book { margin: 0 auto; } }

/* Décompte : urne, J-xx et date alignés sur une ligne */
.today-side .countdown { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; padding-top: 18px; }
.today-side .countdown .big-num { white-space: nowrap; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; }
.today-side .countdown .muted { line-height: 1.35; font-size: 14px; }
/* Encart du jour : titre en haut, bouton en bas */
.today-main > a:first-child .day-card { justify-content: flex-start; }
.today-main > a:first-child .day-card h1 { margin: 10px 0 8px; }
.today-main > a:first-child .day-card > .row:last-child { margin-top: auto; }

.day-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.day-step { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 6px; font-size: 14px; }
.day-step b { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.today-grid { grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr); }
@media (max-width: 1050px) {
  .today-grid { grid-template-columns: 1fr; }
  .today-side { order: -1; }
  .today-main > a:first-child { flex: none; }
}

/* Transférer ma progression */
.transfer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-top: 10px; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; justify-content: center; align-items: center; min-height: 220px; }
.qr-box img { width: 240px; max-width: 100%; height: auto; image-rendering: pixelated; }
.file-btn { cursor: pointer; }
@media (max-width: 900px) { .transfer-cols { grid-template-columns: 1fr; } }
.side-promo strong { display: block; line-height: 1.25; margin-bottom: 2px; }
.side-promo img { width: 46px; flex: none; }
.side-promo small { display: block; font-size: 12px; opacity: .9; }

/* Mon compte */
.account-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; margin-top: 10px; }
.code-input { font-size: 28px; letter-spacing: 8px; text-align: center; max-width: 260px; }
.s-list-small { padding-left: 0; list-style: none; margin: 0 0 12px; line-height: 1.9; }
.s-list-small li::before { content: '✓ '; color: var(--green); font-weight: 800; }
.btn.danger { background: var(--red); color: #fff; }
nav a .nav-label { width: auto; text-align: left; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }
.account-grid input[type=email], .account-grid .code-input { width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font-family: inherit; }
.account-grid .code-input { font-size: 28px; letter-spacing: 8px; max-width: 260px; }
.account-grid input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* Candidats : une colonne par famille politique */
.fam-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
.fam-col { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); border-top: 5px solid var(--fc); }
.fam-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--fc); margin: 2px 4px 10px; }
.fam-0 { --fc: #b3001b; } .fam-1 { --fc: #e5487a; } .fam-2 { --fc: #e0a100; } .fam-3 { --fc: #1f5fbf; } .fam-4 { --fc: #2b2f6b; }
.cand-mini { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; color: var(--text); }
.cand-mini:hover { background: var(--accent-soft); }
.cand-mini strong { display: block; font-size: 14px; line-height: 1.25; }
.cand-mini small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 2px; }
.compare-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cmp-card { padding: 12px 14px; }
.cmp-card p { font-size: 13.5px; margin-top: 8px; }
@media (max-width: 1250px) { .fam-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .fam-cols { grid-template-columns: 1fr 1fr; } }

.disclaimer { margin: -2px 0 6px; } .disclaimer summary { cursor: pointer; list-style: none; } .disclaimer summary::-webkit-details-marker { display: none; }
.disclaimer p { margin: 4px 0 0; }
.compare-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cmp-card { border-top: 4px solid var(--fc); padding: 10px 12px; }
.cmp-card .avatar, .cmp-card img { flex: none; }
.cmp-card p { font-size: 13px; line-height: 1.4; margin-top: 6px; }
.chips .chip { padding: 6px 12px; font-size: 13px; }
@media (max-width: 1250px) { .compare-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .compare-grid { grid-template-columns: 1fr; } }

/* Pastille de compte : toujours en haut à droite */
.account-pill { position: fixed; top: 14px; right: 18px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px;
  border-radius: 999px; background: rgba(255,255,255,.95); color: #0b2a5b; font-weight: 700; font-size: 15px; box-shadow: 0 4px 16px rgba(11,42,91,.2);
  border: 2px solid #c9d7e8; transition: transform .12s, box-shadow .15s; }
.account-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(11,42,91,.28); }
.account-pill:active { transform: scale(.96); }
.account-pill .ap-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa5b4; }
.account-pill.on { border-color: #1e8e3e; color: #14632b; }
.account-pill.on .ap-dot { background: #1e8e3e; box-shadow: 0 0 0 3px rgba(30,142,62,.2); }
.account-pill:not(.on) { background: #0055a4; color: #fff; border-color: #0055a4; }
.account-pill:not(.on) .ap-dot { background: #ffd54a; }
.hero-login { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.landing-hero .btn.hero-login-btn { background: #fff; color: #0b2a5b; font-size: 16px; padding: 11px 22px; box-shadow: 0 4px 14px rgba(11,42,91,.15); }
.hero-login-sub { font-size: 13px; color: #17396d; opacity: .85; }
.hero-logged { font-size: 15px; font-weight: 600; color: #14632b; background: rgba(255,255,255,.85); padding: 8px 16px; border-radius: 999px; }
@media (max-width: 760px) { .account-pill { top: auto; bottom: 16px; right: 14px; padding: 10px 16px 10px 12px; font-size: 14px; } }

/* Encarts côte à côte : toujours de la même hauteur, boutons alignés en bas */
.quiz-cols, .account-grid, .fam-cols, .compare-grid, .mode-cards, .info-grid, .cand-grid, .theme-grid, .day-steps { align-items: stretch; }
.account-grid { grid-template-columns: 1fr 1fr; }
.qcol { height: 100%; }
.qcol-btn, .qcol-actions { margin-top: auto; }
.qcol-actions { padding-top: 12px; }
.fam-col { height: 100%; }
.cmp-card { height: 100%; }
.qcol-match .qcol-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qcol-match .qcol-item { flex-direction: column; align-items: flex-start; gap: 0; }
@media (max-width: 760px) { .qcol-match .qcol-list { grid-template-columns: 1fr; } }
/* Bannière : bâtiment au centre, pastille de compte lisible à droite */
.site-banner .sb-art { background-position: center bottom; -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 34%, #000 66%, transparent 78%); mask-image: linear-gradient(90deg, transparent 22%, #000 34%, #000 66%, transparent 78%); }
.site-banner .sb-fade { display: none; }
@media (min-width: 761px) { .account-pill { top: 40px; right: 28px; } }
@media (max-width: 760px) { .site-banner .sb-art { background-position: 70% bottom; -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 65%); mask-image: linear-gradient(90deg, transparent 45%, #000 65%); } }

/* Fiche candidat : en-tête compact + positions en grille avec icônes */
.cand-head { display: grid; grid-template-columns: auto auto 1fr; gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-top: 5px solid var(--fc); border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow); margin-top: 6px; }
.cand-id h1 { margin: 0; font-size: 28px; }
.cand-party { margin: 2px 0 8px; color: var(--muted); }
.fam-label { color: var(--fc); font-weight: 700; }
.cand-bio { margin: 0; font-size: 14px; line-height: 1.5; border-left: 3px solid var(--line); padding-left: 18px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.pos-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.pos-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pos-icon { font-size: 22px; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.pos-head h3 { margin: 0; font-size: 15px; }
.pos-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.pos-card.empty p { color: var(--muted); font-style: italic; }
@media (max-width: 1100px) { .pos-grid { grid-template-columns: 1fr 1fr; } .cand-head { grid-template-columns: auto 1fr; } .cand-bio { grid-column: 1 / -1; border-left: 0; padding-left: 0; } }
@media (max-width: 640px) { .pos-grid { grid-template-columns: 1fr; } }

/* Candidats : onglets pleine largeur, fiche affichée dans la page */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tabs .tab { padding: 14px 18px; font-size: 16px; text-align: center; transition: transform .1s, background .15s; }
.tabs .tab:active { transform: scale(.98); }
.cand-backlink { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 6px; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); }
.cand-backlink:hover { background: var(--accent); color: #fff; }
.cand-panel { animation: candIn .18s ease-out; }
@keyframes candIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Questionnaires : version compacte, tout visible sans défiler */
.quiz-cols { gap: 12px; margin-top: 8px; }
.quiz-cols .qcol { padding: 14px 16px; }
.quiz-cols .qcol-icon { font-size: 22px; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px; }
.quiz-cols .qcol h2 { font-size: 18px; margin-bottom: 4px; }
.quiz-cols .qcol p { font-size: 14px; margin-bottom: 8px; line-height: 1.45; }
.quiz-cols .qcol-list { gap: 5px; margin-bottom: 10px; }
.quiz-cols .qcol-item { padding: 6px 10px; font-size: 13px; }
.quiz-cols .qcol-item small { font-size: 11px; }
.quiz-cols .qcol-stats { margin: 2px 0 10px; }
.quiz-cols .qcol-stats > div { padding: 8px; }
.quiz-cols .qcol-stats b { font-size: 24px; }
.quiz-cols .btn.big.qcol-btn { padding: 10px 16px; font-size: 15px; }
.quiz-cols .qcol .muted.small { margin-top: -2px !important; }

/* Encart du jour : le programme est une information, seul le bouton lance la séance */
.today-main > .day-wrap .day-card { flex: 1; display: flex; flex-direction: column; margin: 0; }
.day-program { margin: 6px 0 16px; font-size: 14px; color: var(--muted); }
.dp-label { display: block; font-weight: 600; margin-bottom: 4px; }
.dp-list { color: var(--text); }
.dp-list i { font-style: normal; color: var(--muted); margin: 0 8px; }
.day-cta { margin-top: auto; display: flex; justify-content: flex-end; }
.day-cta .btn { font-size: 17px; padding: 13px 26px; }

/* Page détaillée candidat × thème */
.pos-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.pos-pn { display: flex; gap: 8px; } .pos-pn a { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
.pos-top { display: flex; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--fc); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); margin-top: 8px; }
.pos-top h2 { margin: 2px 0; font-size: 24px; }
.pos-theme { font-weight: 800; color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
.pos-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.pos-cols h3 { margin: 0 0 8px; font-size: 16px; }
.pos-sum { font-size: 15px; margin: 0; }
.pos-points { margin: 0; padding-left: 18px; } .pos-points li { margin: 6px 0; line-height: 1.5; font-size: 14.5px; }
.src-tag { font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.src-list { display: flex; flex-direction: column; gap: 6px; }
.src-link { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel); }
.src-link:hover { border-color: var(--accent); }
.src-link strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.src-link small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.src-ic { font-size: 18px; flex: none; }
a.pos-card { color: var(--text); display: flex; flex-direction: column; } a.pos-card:hover { border-color: var(--accent); }
.pos-more { margin-top: auto; padding-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
a.chip { display: inline-block; }
@media (max-width: 900px) { .pos-cols { grid-template-columns: 1fr; } .pos-top { flex-wrap: wrap; } }
.sidebar nav a { white-space: normal; line-height: 1.25; }
@media (max-width: 760px) { .sidebar nav a { white-space: nowrap; } }

/* Bandeau « spécial » de la page d'accueil */
.promo-band { display: inline-flex; align-items: center; gap: 14px; margin: 0 auto 22px; padding: 8px 18px 8px 8px; border-radius: 18px; text-align: left;
  background: linear-gradient(135deg, #fff 0%, #fff7e0 100%); border: 2px solid #f2c14e; box-shadow: 0 8px 24px rgba(11,42,91,.18); position: relative; overflow: hidden; animation: pbIn .6s ease-out; }
.promo-band::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.8), transparent); animation: shine 4s ease-in-out infinite; }
.pb-flag { background: linear-gradient(135deg, #e1000f, #b3000c); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 10px 10px; border-radius: 12px; writing-mode: horizontal-tb; }
.pb-icons { display: flex; align-items: center; gap: 4px; }
.pb-ic { width: 38px; height: 38px; }
.promo-band .urne { width: 40px; height: 34px; }
.pb-bull { animation: wiggle 3s ease-in-out infinite; transform-origin: 50% 90%; }
.pb-text strong { display: block; font-size: 16px; color: #0b2a5b; }
.pb-text small { display: block; font-size: 12.5px; color: #4a5a72; margin-top: 2px; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes pbIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
.landing-hero .flag { display: none; }
@media (max-width: 760px) { .promo-band { flex-wrap: wrap; justify-content: center; text-align: center; padding: 10px; gap: 8px; } .pb-text strong { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .promo-band, .promo-band::after, .pb-bull { animation: none; } }
.promo-band .urne .u-env { animation-name: voteSmall; } @keyframes voteSmall { 0% { transform: translate(0,-14px); opacity: 0; } 20% { opacity: 1; } 85%, 100% { transform: translate(0, 34px); opacity: 1; } } .landing-hero .hero-text { padding-top: clamp(70px, 11vh, 120px); }
/* Accueil : encart du livre en élément spécial, en bas à droite */
.landing-hero .hero-promo { position: fixed; right: 24px; bottom: 24px; z-index: 40; margin: 0; max-width: 340px; padding: 14px 18px 14px 14px;
  background: linear-gradient(135deg, #0b2a5b, #0055a4); color: #fff; border: 2px solid #f2c14e; border-radius: 18px;
  box-shadow: 0 12px 32px rgba(11,42,91,.35); animation: bookIn .7s .4s both cubic-bezier(.2,.9,.3,1.3); }
.landing-hero .hero-promo strong { color: #fff; }
.landing-hero .hero-promo:hover { background: linear-gradient(135deg, #0055a4, #2f7fd6); transform: translateY(-2px); }
.landing-hero .hero-promo img { width: 58px; transform: rotate(-6deg); }
.landing-hero .hero-promo::before { content: '⭐ SPÉCIAL'; position: absolute; top: -12px; left: 16px; background: #e1000f; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; }
@keyframes bookIn { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .landing-hero .hero-promo { right: 12px; left: 12px; bottom: 74px; max-width: none; padding: 10px 14px 10px 10px; } .landing-hero .hero-promo img { width: 44px; } }
@media (prefers-reduced-motion: reduce) { .landing-hero .hero-promo { animation: none; } }

/* Tampon « Mis à jour – Présidentielle 2027 » qui s'imprime à l'arrivée */
.landing-hero .hero-text { position: relative; }
.stamp { position: absolute; top: clamp(30px, 6vh, 70px); right: calc(50% - 560px); z-index: 3; transform: rotate(-14deg); pointer-events: none;
  animation: stampIn .55s 0.35s both cubic-bezier(.3,1.6,.5,1); }
.stamp-in { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 190px; height: 190px; border-radius: 50%;
  color: #c4001a; border: 6px solid #c4001a; box-shadow: inset 0 0 0 4px rgba(255,255,255,.0), inset 0 0 0 9px #c4001a00; position: relative;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, rgba(255,255,255,.12) 70%);
  -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 60%, rgba(0,0,0,.75) 61%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.6 1.25'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.stamp-in::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed #c4001a; }
.st-top, .st-bot { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.st-main { font-size: 19px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; margin-top: 6px; border-top: 3px solid #c4001a; border-bottom: 3px solid #c4001a; padding: 2px 6px; }
.st-year { font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: .02em; margin: 2px 0 4px; }
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-14deg) scale(3.2); filter: blur(2px); }
  60% { opacity: 1; transform: rotate(-14deg) scale(.92); filter: none; }
  75% { transform: rotate(-14deg) scale(1.04); }
  100% { opacity: .92; transform: rotate(-14deg) scale(1); }
}
.landing-hero.stamped { animation: thump .25s .6s ease-out; }
@keyframes thump { 0%, 100% { transform: none; } 40% { transform: translateY(2px); } }
@media (max-width: 1150px) { .stamp { right: 24px; top: 70px; } .stamp-in { width: 150px; height: 150px; } .st-year { font-size: 36px; } .st-main { font-size: 15px; } }
@media (max-width: 760px) { .stamp { position: relative; top: 0; right: 0; margin: 0 auto 6px; width: max-content; } .stamp-in { width: 128px; height: 128px; border-width: 5px; } .st-year { font-size: 30px; } .st-main { font-size: 13px; } .st-top, .st-bot { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }
.stamp { right: auto; left: calc(50% - 600px); top: clamp(60px, 9vh, 100px); }
@media (max-width: 1250px) { .stamp { left: 24px; right: auto; top: 90px; } }
@media (max-width: 760px) { .stamp { left: 0; top: 0; } }
/* iPhone : bannière lisible (bâtiment à droite, texte à gauche sur le ciel) et pastille de compte dans la bannière */
@media (max-width: 760px) {
  .site-banner { height: 96px; }
  .site-banner .sb-art { background-size: auto 88%; background-position: right -70px bottom 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 52%, #000 72%); mask-image: linear-gradient(90deg, transparent 52%, #000 72%); }
  .site-banner .sb-text { left: 14px; right: 40%; bottom: 18px; }
  .site-banner strong { font-size: 22px; white-space: nowrap; }
  .site-banner .sb-text > span:last-child { font-size: 11.5px; }
  .account-pill { position: absolute; top: 8px; bottom: auto; right: 8px; padding: 5px 10px 5px 8px; font-size: 12px; gap: 5px; box-shadow: 0 2px 8px rgba(11,42,91,.2); }
  .account-pill .ap-icon { display: none; }
  .account-pill .ap-text { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 760px) {
  .site-banner .sb-art { background-size: auto 70%; background-position: right -40px bottom 18px; -webkit-mask-image: linear-gradient(90deg, transparent 62%, #000 80%); mask-image: linear-gradient(90deg, transparent 62%, #000 80%); }
  .site-banner .sb-text { right: 30%; }
  .site-banner strong { font-size: 21px; }
  .landing-hero .hero-promo { bottom: 16px; }
}
@media (max-width: 760px) {
  .site-banner { height: 112px; }
  .sidebar { padding-top: 10px; box-shadow: 0 2px 8px rgba(11,42,91,.08); }
  nav#nav { padding-top: 4px; }
}
/* iPhone : candidats adaptés à la largeur de l'écran */
@media (max-width: 760px) {
  .fam-cols { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fam-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; padding: 10px; height: auto; }
  .fam-col h3 { grid-column: 1 / -1; margin-bottom: 4px; }
  .cand-mini { padding: 6px 4px; gap: 8px; min-width: 0; }
  .cand-mini .avatar, .cand-mini img { width: 38px !important; height: 38px !important; flex: none; }
  .cand-mini strong { font-size: 13px; }
  .cand-mini small { font-size: 11px; }
  .cand-mini > span { min-width: 0; overflow-wrap: anywhere; }
  .tabs .tab { padding: 10px 8px; font-size: 14px; }
  .view { overflow-x: hidden; }
}
/* Thèmes : petites pastilles uniformes (même hauteur, même style) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; line-height: 1; white-space: nowrap; }
@media (max-width: 760px) {
  .chips { gap: 5px; }
  .chips .chip { height: 30px; padding: 0 10px; font-size: 12.5px; }
}
@media (max-width: 760px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin-left: -16px; margin-right: -16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chips .chip { flex: none; }
}
.swipe-hint { display: none; } @media (max-width: 760px) { .swipe-hint { display: inline; } }
/* iPhone : tous les thèmes visibles d'un coup, grille compacte 3 × 3 */
@media (max-width: 760px) {
  .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; overflow: visible; padding: 0; margin: 0; -webkit-mask-image: none; mask-image: none; }
  .chips .chip { flex-direction: column; justify-content: center; gap: 2px; height: 50px; padding: 4px 4px; border-radius: 10px; font-size: 11px; line-height: 1.15; white-space: normal; text-align: center; }
  .swipe-hint { display: none; }
}
@media (max-width: 760px) { .chips .chip .ci { font-size: 16px; } }

/* Tampon dans la bannière */
.site-banner .sb-stamp { position: absolute; z-index: 4; left: 470px; top: 50%; transform: translateY(-50%) rotate(-12deg); pointer-events: none; animation: sbStamp .5s .3s both cubic-bezier(.3,1.6,.5,1); }
.site-banner .sb-stamp .stamp-in { width: 104px; height: 104px; border-width: 4px; }
.site-banner .sb-stamp .stamp-in::before { inset: 5px; }
.site-banner .sb-stamp .st-top { font-size: 7.5px; letter-spacing: .1em; }
.site-banner .sb-stamp .st-main { font-size: 10.5px; margin-top: 3px; border-width: 2px; padding: 1px 4px; }
.site-banner .sb-stamp .st-year { font-size: 26px; margin: 1px 0 6px; }
@keyframes sbStamp { 0% { opacity: 0; transform: translateY(-50%) rotate(-12deg) scale(2.6); } 70% { opacity: 1; transform: translateY(-50%) rotate(-12deg) scale(.94); } 100% { opacity: .92; transform: translateY(-50%) rotate(-12deg) scale(1); } }
@media (max-width: 1100px) { .site-banner .sb-stamp { left: auto; right: 250px; } }
@media (max-width: 760px) { .site-banner .sb-stamp { right: 118px; top: 58%; } .site-banner .sb-stamp .stamp-in { width: 66px; height: 66px; border-width: 3px; } .site-banner .sb-stamp .st-top { display: none; } .site-banner .sb-stamp .st-main { font-size: 6.5px; } .site-banner .sb-stamp .st-year { font-size: 17px; margin-bottom: 2px; } .site-banner .sb-text { right: 46%; } .site-banner strong { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .site-banner .sb-stamp { animation: none; opacity: .92; } }
.site-banner .sb-stamp { left: 400px; right: auto; }
@media (max-width: 1100px) { .site-banner .sb-stamp { left: 390px; right: auto; } }
@media (max-width: 760px) {
  .site-banner .sb-stamp { left: auto; right: 16px; top: auto; bottom: 4px; transform: rotate(-12deg); animation-name: sbStampM; }
  .site-banner .sb-stamp .stamp-in { width: 60px; height: 60px; }
  .site-banner .sb-text { right: 30%; } .site-banner strong { font-size: 21px; }
}
@keyframes sbStampM { 0% { opacity: 0; transform: rotate(-12deg) scale(2.4); } 70% { opacity: 1; transform: rotate(-12deg) scale(.94); } 100% { opacity: .92; transform: rotate(-12deg) scale(1); } }
/* Le tampon n'est jamais recouvert par un bouton */
@media (max-width: 1250px) {
  .stamp { position: relative; top: 0 !important; left: 0 !important; right: 0 !important; margin: 0 auto 14px; width: max-content; }
  .stamp-in { width: 130px; height: 130px; } .st-year { font-size: 32px; } .st-main { font-size: 13px; }
}
@media (max-width: 760px) { .stamp { margin-bottom: 18px; } }
@media (min-width: 761px) and (max-width: 1100px) { .site-banner .sb-stamp { left: 415px; } }

/* Fenêtre « livre » sur smartphone */
.book-bar { display: none; }
@media (max-width: 760px) {
  .book-bar { display: flex; align-items: center; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    background: linear-gradient(135deg, #0b2a5b, #0055a4); border: 2px solid #f2c14e; border-radius: 16px; box-shadow: 0 10px 28px rgba(11,42,91,.4); animation: bookIn .5s .6s both cubic-bezier(.2,.9,.3,1.3); }
  .bb-link { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; color: #fff; min-width: 0; }
  .bb-link img { width: 34px; flex: none; transform: rotate(-6deg); }
  .bb-link strong { display: block; font-size: 12.5px; line-height: 1.2; }
  .bb-link small { display: block; font-size: 11.5px; opacity: .85; }
  .bb-link > span:nth-child(2) { min-width: 0; flex: 1; }
  .bb-cta { flex: none; background: #fff; color: #0b2a5b; font-weight: 800; font-size: 12.5px; padding: 7px 10px; border-radius: 999px; }
  .bb-close { flex: none; width: 30px; height: 30px; margin-right: 6px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 14px; cursor: pointer; }
  body:has(.book-bar) .view { padding-bottom: 110px; }
}

.account-grid:has(> section:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.date-input { display: block; margin-top: 4px; padding: 9px 12px; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
@media (max-width: 1100px) { .account-grid:has(> section:nth-child(3)) { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .account-grid:has(> section:nth-child(3)) { grid-template-columns: 1fr; } }

/* ============================================================
   Finitions « Apple » (skill apple-design, d'après les WWDC 2018-2026)
   Couche ajoutée en dernier : ne change pas la mise en page.
   ============================================================ */
/* 1. Typographie : police système, interlettrage et interligne selon la taille */
html, body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
h1, h2, .site-banner strong, .landing-hero h1, .big-num { font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif; }
h1 { line-height: 1.1; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
h2 { line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h3 { line-height: 1.3; letter-spacing: -.005em; }
p, li { text-wrap: pretty; }

.match-pct, .qcol-stats b, .scorebar { font-variant-numeric: tabular-nums; }

/* 2. Réponse immédiate : retour visuel dès qu'on appuie, bref et sans rebond */
.btn, .chip, .tabs .tab, .seg button, .tile, .theme-btn, .cand-card, .cand-mini, .cmp-card, .list-item, .choice, .qcol-item,
a.pos-card, a.info, .src-link, .pos-pn a, .cand-backlink, nav a, .dot, .np-controls button, .side-promo, .bb-cta, .bb-close, .xp {
  transition: transform 100ms ease-out, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.btn:active, .chip:active, .tabs .tab:active, .seg button:active, .tile:active, .theme-btn:active, .cand-card:active, .cand-mini:active, .cmp-card:active,
.list-item:active, .choice:active:not(:disabled), .qcol-item:active, a.pos-card:active, a.info:active, .src-link:active, .pos-pn a:active,
.cand-backlink:active, nav a:active, .dot:active, .np-controls button:active, .side-promo:active, .bb-cta:active, .bb-close:active, .xp:active { transform: scale(.97); }
.tile:hover, .theme-btn:hover { transform: none; }
.btn:hover { filter: none; background-color: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.secondary:hover { background-color: rgba(127,127,127,.22); }
.btn.green:hover { background-color: color-mix(in srgb, var(--green) 88%, #000); }
.btn.danger:hover { background-color: color-mix(in srgb, var(--red) 88%, #000); }

/* 3. Focus clavier visible partout (accessibilité) */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

/* 4. Matières : ombres plus douces et étagées, barres translucides */
:root { --shadow: 0 0.5px 1px rgba(0,0,0,.04), 0 2px 6px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04); }
@media (max-width: 760px) {
  .sidebar { background: color-mix(in srgb, var(--side) 78%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0; box-shadow: 0 0.5px 0 rgba(0,0,0,.12); }
}
.scorebar { background: color-mix(in srgb, var(--panel) 80%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }

/* 5. Accessibilité : réglages de l'appareil respectés */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .btn:active, .chip:active, .tabs .tab:active, .tile:active, .cand-card:active, .cand-mini:active, .list-item:active, .choice:active, nav a:active,
  a.pos-card:active, a.info:active, .qcol-item:active, .mode-card:active, .back-btn:active, .account-pill:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .scorebar { background: var(--side); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .scorebar { background: var(--panel); }
}
@media (prefers-contrast: more) {
  :root { --line: #8e8e93; }
  .card, .tile, .cand-card, .cmp-card, .pos-card, .qcol, .fam-col, .info { border-width: 1.5px; }
}
/* Apprendre : deux modes (Calendrier, Par thème) */
.mode-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .mode-cards.two { grid-template-columns: 1fr; } }
.chapter summary .grow { min-width: 0; }
.nowrap { white-space: nowrap; }
/* Flèche des sections repliables : chevron net qui pivote à l'ouverture */
.chapter summary::before { content: ''; flex: none; width: 9px; height: 9px; margin: 0 4px 0 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform 200ms ease-out; }
.chapter[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.chapter summary:hover::before { border-color: var(--accent); }

/* Tampon (page d'accueil seulement) : un vrai coup de tampon.
   L'ombre de l'objet arrive et se resserre, l'empreinte frappe d'un coup sec (léger écrasement puis rebond),
   l'encre s'étale en une auréole qui s'efface, et la page encaisse le choc. */
.stamp { animation: none; }
.stamp::before, .stamp::after { content: ''; position: absolute; pointer-events: none; border-radius: 50%; opacity: 0; }
.stamp::before { inset: 4%; z-index: 0; background: radial-gradient(circle, rgba(10,20,40,.5) 0%, rgba(10,20,40,.28) 50%, transparent 72%); animation: stampShadow 1.2s .4s both; }
.stamp::after { inset: -3%; z-index: 2; box-shadow: 0 0 0 4px rgba(196,0,26,.28), inset 0 0 0 3px rgba(196,0,26,.18); animation: stampSplash 1.2s .4s both; }
.stamp .stamp-in { animation: stampSlam 1.2s .4s both; }
@keyframes stampShadow {
  0% { opacity: 0; transform: translate(14%, 18%) scale(1.7); filter: blur(10px); animation-timing-function: cubic-bezier(.7, 0, 1, .5); }
  28% { opacity: .55; transform: translate(2%, 3%) scale(1); filter: blur(3px); }
  31%, 100% { opacity: 0; transform: translate(2%, 3%) scale(1); }
}
@keyframes stampSlam {
  0% { opacity: 0; transform: scale(2.3); filter: blur(5px); animation-timing-function: cubic-bezier(.7, 0, 1, .5); }
  10% { opacity: .5; }
  30% { opacity: 1; transform: scale(1); filter: blur(0); animation-timing-function: ease-out; }
  34% { transform: scale(.95, .94); }
  42% { transform: scale(1.012); }
  52% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: .92; }
}
@keyframes stampSplash {
  0%, 29% { opacity: 0; transform: scale(.94); }
  31% { opacity: 1; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.14); }
}
.landing-hero.stamped { animation: thump .28s .76s ease-out; }
@keyframes thump { 0%, 100% { transform: none; } 30% { transform: translateY(3px) scale(.998); } 60% { transform: translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .stamp::before, .stamp::after { display: none; } .stamp .stamp-in { animation: none; opacity: .92; } .landing-hero.stamped { animation: none; } }
/* Apprendre : les deux catégories forment un sélecteur à onglets (style iOS), distinct de la liste en dessous */
.mode-cards.two { display: flex; gap: 4px; padding: 5px; margin: 14px 0 6px; background: rgba(127,127,127,.15); border-radius: 16px; }
.mode-cards.two .mode-card { flex: 1; min-width: 0; justify-content: center; border: 0; border-radius: 12px; background: transparent; box-shadow: none; padding: 12px 16px; color: var(--muted); }
.mode-cards.two .mode-card:hover { background: rgba(127,127,127,.10); }
.mode-cards.two .mode-card .mc-icon { background: transparent; width: 36px; height: 36px; font-size: 24px; }
.mode-cards.two .mode-card strong { font-size: 17px; }
.mode-cards.two .mode-card small { color: var(--muted); }
.mode-cards.two .mode-card.on { background: var(--panel); color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.08); }
.mode-cards.two .mode-card.on .mc-icon { background: transparent; }
.mode-cards.two .mode-card.on small { color: var(--muted); }
.plist-hint { margin: 14px 2px 8px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
@media (max-width: 760px) {
  .mode-cards.two { display: flex; }
  .mode-cards.two .mode-card { padding: 9px 6px; gap: 6px; }
  .mode-cards.two .mode-card small { display: none; }
  .mode-cards.two .mode-card strong { font-size: 15px; }
  .mode-cards.two .mode-card .mc-icon { width: 26px; height: 26px; font-size: 19px; }
  .plist-hint { font-size: 11.5px; }
}

/* Aujourd'hui : tout tient dans la fenêtre sans défiler (ordinateur). Les tailles se réduisent avec la hauteur, sans rien couper. */
@media (min-width: 1051px) {
  .view:has(> .today-grid) { padding-bottom: 16px; }
}
@media (min-width: 1051px) and (max-height: 860px) {
  .site-banner { height: 104px; }
  .site-banner strong { font-size: 33px; }
  .site-banner .sb-text { top: 4px; bottom: 24px; }
  .site-banner .flag { margin-bottom: 7px; }
  .site-banner .sb-text > span:last-child { font-size: 15px; margin-top: 4px; }
  .site-banner .sb-stamp { scale: .8; }
  .account-pill { top: 26px; }
  .today-grid { margin-top: 0; gap: 16px; }
  .today-main { gap: 10px; }
  .today-main .day-card { padding: 14px 20px; }
  .today-main .day-card h1 { font-size: 27px; margin: 6px 0 4px !important; }
  .today-main .day-card .lead { font-size: 16px; margin-bottom: 8px !important; }
  .day-program { margin: 2px 0 10px; }
  .day-cta .btn { font-size: 16px; padding: 10px 22px; }
  .today-main > .card { padding: 12px 20px; }
  .today-side .info-card { gap: 10px; padding: 14px 16px; }
  .today-side .countdown { padding-top: 4px; }
  .today-side .countdown .big-num { font-size: 38px; }
  .today-side .info { padding: 8px 12px; }
  .today-side .info-num { font-size: 18px; }
  .today-side .info small { font-size: 11.5px; line-height: 1.35; }
  .promo.wide { margin-top: 12px; padding: 10px 22px; gap: 18px; }
  .promo.wide .promo-book { width: 54px; }
  .promo.wide .promo-badge { font-size: 11px; padding: 3px 8px; }
  .promo.wide h2 { font-size: 18px; margin: 4px 0 2px; }
  .promo.wide p { font-size: 13px; line-height: 1.4; }
  .promo.wide .btn { padding: 8px 16px; font-size: 14px; }
}
@media (min-width: 1051px) and (max-height: 700px) {
  .site-banner { height: 84px; }
  .site-banner strong { font-size: 27px; }
  .site-banner .flag { display: none; }
  .site-banner .sb-text { top: 0; bottom: 20px; }
  .site-banner .sb-text > span:last-child { font-size: 13px; }
  .site-banner .sb-stamp { scale: .64; }
  .account-pill { top: 18px; padding: 7px 14px 7px 10px; font-size: 14px; }
  .topbar:has(.back-btn[hidden]) { height: 10px; }
  .today-main .day-card { padding: 10px 18px; }
  .today-main .day-card h1 { font-size: 23px; }
  .today-main .day-card .lead { font-size: 14.5px; line-height: 1.45; }
  .day-label { font-size: 12px; }
  .day-program { font-size: 13px; margin-bottom: 8px; }
  .day-cta .btn { font-size: 15px; padding: 8px 18px; }
  .today-main > .card { padding: 9px 18px; }
  .today-side .info-card { gap: 8px; padding: 10px 14px; }
  .today-side .countdown .big-num { font-size: 32px; }
  .today-side .countdown .muted { font-size: 13px; }
  .today-side .urne { width: 54px; height: 44px; }
  .today-side .info-grid { gap: 8px; }
  .today-side .info { padding: 6px 10px; }
  .today-side .info-num { font-size: 16px; }
  .today-side .info small { font-size: 11px; }
  .promo.wide { padding: 8px 20px; margin-top: 10px; }
  .promo.wide .promo-book { width: 42px; }
  .promo.wide h2 { font-size: 16px; }
  .promo.wide p { font-size: 12.5px; }
}

/* Lecteur à forme d'onde dans les fiches (style SoundCloud) */
.wave-player { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.wp-play { flex: none; width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-left: 3px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform 100ms ease-out, background-color 150ms ease; }
.wave-player.playing .wp-play { padding-left: 0; font-size: 15px; letter-spacing: -2px; }
.wp-play:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.wp-play:active { transform: scale(.93); }
.wp-main { flex: 1; min-width: 0; }
.wp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.wp-title { font-weight: 600; }
.wp-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp-wave { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 56px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; outline-offset: 4px; }
.wp-wave i { flex: 1; min-width: 1px; border-radius: 2px 2px 1px 1px; background: rgba(127,127,127,.32); transition: background-color 120ms ease; }
.wp-wave i.on { background: var(--accent); }
.wp-wave i.pv:not(.on) { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.wp-wave.drag i.on:not(.pv) { background: color-mix(in srgb, var(--accent) 45%, rgba(127,127,127,.32)); }
.wp-cursor { position: absolute; top: -4px; bottom: 0; left: var(--x, 0); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--accent); opacity: 0; pointer-events: none; transition: opacity 120ms; }
.wp-tip { position: absolute; top: -28px; left: var(--x, 0); transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: #1d1d1f; color: #fff; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 120ms; }
.wp-wave.drag .wp-cursor, .wp-wave.drag .wp-tip { opacity: 1; }
@media (hover: hover) { .wp-wave:hover .wp-cursor, .wp-wave:hover .wp-tip { opacity: 1; } }
@media (max-width: 760px) {
  .wave-player { gap: 12px; padding: 12px 14px; }
  .wp-play { width: 46px; height: 46px; font-size: 16px; }
  .wp-wave { height: 46px; gap: 2px; }
  .wp-wave i:nth-of-type(even) { display: none; }
  .wp-wave i { border-radius: 2px; }
  .wp-head { font-size: 13px; }
}

/* Bannière : tampon plus gros, centré entre le titre et le début des arbres (≈ 31,5 % de la largeur) */
@media (min-width: 761px) {
  .site-banner .sb-stamp { left: max(392px, calc(133px + 15.75vw)); right: auto; scale: 1.1; top: calc(50% + 2px); }
}
@media (min-width: 1051px) and (max-height: 860px) { .site-banner .sb-stamp { left: max(330px, calc(104px + 15.75vw)); scale: .95; } }
@media (min-width: 1051px) and (max-height: 700px) { .site-banner .sb-stamp { left: max(280px, calc(79px + 15.75vw)); scale: .78; } }

/* Aujourd'hui : bandeau du livre plus grand quand la fenêtre est assez haute */
@media (min-width: 1051px) and (min-height: 1000px) {
  .promo.wide { padding: 24px 34px; gap: 30px; margin-top: 22px; }
  .promo.wide .promo-book { width: 110px; }
  .promo.wide h2 { font-size: 26px; margin: 10px 0 6px; }
  .promo.wide p { font-size: 16px; line-height: 1.5; }
  .promo.wide .btn { font-size: 17px; padding: 14px 26px; }
  .promo.wide .promo-badge { font-size: 13px; padding: 5px 12px; }
}

/* « À rattraper » compact : une ligne par séance */
.catchup { padding: 10px 20px; }
.catchup .box-title { margin-bottom: 2px; }
.catchup .list-item { padding: 6px 8px; gap: 10px; }
.catchup .list-item br { display: none; }
.catchup .list-item .grow strong { font-weight: 600; }
.catchup .list-item .grow .muted.small::before { content: ' · '; }
.catchup .list-item .check { width: 18px; height: 18px; }
@media (min-width: 1051px) and (max-height: 860px) {
  .catchup { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 6px 18px; }
  .catchup .box-title { margin: 0; white-space: nowrap; }
  .catchup .list-item { flex: 1 1 320px; min-width: 0; padding: 4px 8px; }
}
/* Lecteur des fiches : plus fin (même longueur) */
.wave-player { gap: 12px; margin: 4px 0 14px; padding: 7px 14px 8px 8px; border-radius: 14px; }
.wp-play { width: 36px; height: 36px; font-size: 13px; padding-left: 2px; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent); }
.wave-player.playing .wp-play { font-size: 11px; }
.wp-head { margin-bottom: 3px; font-size: 12.5px; }
.wp-time { font-size: 11.5px; }
.wp-wave { height: 28px; gap: 1px; }
.wp-wave i { border-radius: 1px; }
.wp-tip { top: -24px; font-size: 10.5px; }
@media (max-width: 760px) {
  .wave-player { gap: 10px; padding: 6px 12px 7px 7px; }
  .wp-play { width: 34px; height: 34px; font-size: 12px; }
  .wp-wave { height: 26px; gap: 1.5px; }
  .wp-head { font-size: 12px; }
}

/* Aujourd'hui, écrans bas : récap audio et « À rattraper » côte à côte */
@media (min-width: 1250px) and (max-height: 860px) {
  .today-main:has(.catchup) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-content: start; }
  .today-main:has(.catchup) > .day-wrap, .today-main:has(.catchup) > a:first-child { grid-column: 1 / -1; }
  .today-main:has(.catchup) > .card { display: flex; flex-direction: column; justify-content: center; }
  .today-main:has(.catchup) .catchup .list-item { flex: none; }
}

/* Couleurs uniformes : tous les encarts ont le même fond bleuté et la même bordure que l'encart du jour */
:root { --card: color-mix(in srgb, var(--accent) 8%, var(--panel)); --card-line: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.card, .card.accent, .diagram, .tile, .badge, .theme-btn, .cand-card, .qcol, .qcol-match, .wave-player, .scorebar,
.cmp-card, .fam-col, .cand-head, .pos-card, .pos-top, .mode-card, .info-card { background: var(--card); }
.card, .card.accent, .diagram, .tile, .badge, .theme-btn, .cand-card, .qcol, .qcol-match, .wave-player, .scorebar, .mode-card { border-color: var(--card-line); }
.cmp-card, .fam-col, .cand-head, .pos-card, .pos-top { border-left-color: var(--card-line); border-right-color: var(--card-line); border-bottom-color: var(--card-line); }
.pos-card { border-top-color: var(--card-line); }
.card:hover, .tile:hover, .theme-btn:hover, .cand-card:hover, .cmp-card:hover, a.pos-card:hover, .mode-card:hover { border-color: var(--accent); }
.fam-col:hover, .cmp-card:hover { border-top-color: var(--fc); }
/* Les éléments à l'intérieur des encarts restent blancs pour bien se détacher */
.card .info, .qcol-stats > div { background: var(--panel); }
.mode-cards.two .mode-card { background: transparent; border-color: transparent; }
.mode-cards.two .mode-card.on { background: var(--panel); }
/* Exceptions volontaires : promotions, corrections vert/rouge, nuit */
.card.night-card { background: linear-gradient(135deg, #1a1f4d, #3b2a6b); border: 0; }
body.night .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }

/* Fin de séance : tout tient dans la fenêtre (félicitations + rappel du livre) */
.session-done { padding-top: 6px; }
.sd-emoji { font-size: 52px; line-height: 1; }
.session-done h1 { margin: 8px 0 4px; }
.sd-stats { justify-content: center; gap: 34px; margin: 12px 0 10px; }
.session-done > p { margin: 4px 0 12px; }
.sd-promo .promo { margin: 18px 0 0; padding: 18px 26px; gap: 24px; }
.sd-promo .promo-book { width: 96px; }
.sd-promo .promo h2 { font-size: 21px; margin: 6px 0 4px; }
.sd-promo .promo p { font-size: 14px; margin-bottom: 10px; }
.sd-promo .promo .btn { font-size: 15px; padding: 10px 18px; }
.sd-promo .promo .promo-note { font-size: 12px; margin-top: 8px; }
@media (min-width: 761px) and (max-height: 860px) {
  .sd-emoji { font-size: 40px; }
  .session-done h1 { font-size: 26px; }
  .session-done .big-num { font-size: 34px; }
  .sd-stats { margin: 8px 0 6px; }
  .session-done .btn.big { padding: 10px 20px; font-size: 15px; }
  .sd-promo .promo { margin-top: 12px; padding: 12px 22px; }
  .sd-promo .promo-book { width: 70px; }
  .sd-promo .promo h2 { font-size: 18px; }
  .sd-promo .promo p { font-size: 13px; margin-bottom: 8px; }
  .sd-promo .promo .btn { font-size: 14px; padding: 8px 16px; }
}
@media (min-width: 761px) and (max-height: 700px) {
  .sd-emoji { font-size: 30px; }
  .session-done h1 { font-size: 22px; margin: 4px 0 2px; }
  .session-done .big-num { font-size: 28px; }
  .sd-promo .promo-book { width: 54px; }
}
@media (min-width: 761px) { .view:has(.session-done) { padding-bottom: 12px; } }
@media (min-width: 761px) and (max-height: 700px) {
  .view:has(.session-done) .steps { padding: 4px 0 6px; }
  .sd-stats { gap: 26px; }
  .sd-promo .promo { padding: 10px 20px; }
  .sd-promo .promo p { font-size: 12.5px; margin-bottom: 6px; }
  .sd-promo .promo .promo-note { font-size: 11px; margin-top: 6px; }
}

/* Pastilles de catégorie sur les cartes de question */
.qpills { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; margin-right: 8px; }
.qpill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  color: #fff; background: var(--pc, #5f6b7a); }
.qpill.soft { color: var(--text); background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.qsrc { color: var(--muted); font-size: 12px; }

/* Réglages : cartes compactes côte à côte, lignes « intitulé · réglage » (style Réglages iOS) */
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; align-items: stretch; }
.set-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.set-card h2 { font-size: 15px; margin: 0 0 6px; letter-spacing: 0; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 14px; }
.set-card h2 + .set-row { border-top: 0; }
.set-row select, .set-row input[type=date] { padding: 6px 9px; font-size: 14px; max-width: 60%; }
.set-row .seg { margin: 0; }
.set-row .seg button { padding: 6px 11px; font-size: 13px; }
.set-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
details.set-hint { border: 0; padding: 0; } details.set-hint summary { font-weight: 600; color: var(--accent); font-size: 12px; }
.set-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; padding: 4px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 14px; }
.set-card h2 + .set-link { border-top: 0; }
.set-link small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.set-link > span:last-child { color: var(--muted); }
.set-link:hover > span:first-child { color: var(--accent); }
.set-danger { margin-top: auto; align-self: flex-start; color: var(--red); }
.set-card .row { margin: 2px 0 6px; }
@media (max-width: 1100px) { .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .set-grid { grid-template-columns: 1fr; } }
/* Aujourd'hui : lecteur audio au-dessus des deux blocs, retard signalé dans l'encart du jour */
.view > .wave-player { margin: 4px 0 12px; }
.day-late { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--orange); }
@media (min-width: 1051px) and (max-height: 860px) {
  .day-late { margin-bottom: 6px; font-size: 13px; }
}
/* Bannière des pages : empreinte permanente, jamais animée */
.site-banner .sb-stamp, .site-banner .sb-stamp .stamp-in { animation: none !important; }
.site-banner .sb-stamp { opacity: .92; }
/* Questionnaires au clavier : lettre de chaque réponse et aide */
.choice { align-items: center; }
.choice .key-hint { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--card-line); background: var(--panel);
  font-size: 12px; font-weight: 700; color: var(--accent); }
.choice.right .key-hint, .choice.wrong .key-hint { opacity: .6; }
.kbd-help { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); font: 600 11.5px/1.5 system-ui, sans-serif; text-align: center; color: var(--text); }
@media (hover: none) { .kbd-help { display: none; } }
/* Aujourd'hui : lecteur sous les deux blocs, au-dessus du bandeau du livre */
.view > .wave-player { margin: 14px 0 0; }
.view > .wave-player + .promo.wide { margin-top: 12px; }
@media (min-width: 1051px) and (max-height: 860px) { .view > .wave-player { margin: 10px 0 0; } .view > .wave-player + .promo.wide { margin-top: 10px; } }
/* Ligne des pastilles : catégories à gauche, fiche d'origine tout à droite */
.qmeta { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.qmeta .qsrc { margin-left: auto; text-align: right; }

/* Pages secondaires : plus d'air autour du bouton Retour et du contenu */
@media (min-width: 761px) {
  .topbar:not(:has(.back-btn[hidden])) { height: 92px; padding-top: 10px; }
}
@media (min-width: 761px) and (max-height: 860px) {
  .topbar:not(:has(.back-btn[hidden])) { height: 72px; padding-top: 4px; }
}
/* Révision : mise en page aérée */
.view:has(#stop) h1 { margin: 10px 0 14px; }
.view:has(#stop) > p.muted { margin: 0 0 26px; max-width: 1100px; line-height: 1.6; }
.view:has(#stop) #q { padding: 26px 30px 28px; }
.view:has(#stop) .qmeta { margin: 20px 0 6px; }
.view:has(#stop) #q > p strong { display: block; font-size: 19px; line-height: 1.4; margin: 18px 0 20px; }
.view:has(#stop) #q .choice { padding: 15px 18px; margin: 10px 0; gap: 14px; }
.view:has(#stop) #q .feedback { margin-top: 18px; }
.view:has(#stop) #q .fb { padding: 16px 18px; }
.view:has(#stop) #q .next { margin-top: 4px; padding: 11px 22px; }
.view:has(#stop) > .row { margin-top: 22px; }
@media (max-width: 760px) {
  .view:has(#stop) #q { padding: 16px 16px 18px; }
  .view:has(#stop) #q > p strong { font-size: 17px; }
}
@media (min-width: 1300px) { .view:has(#stop) #q .choice { font-size: 16px; } .view:has(#stop) .qsrc { font-size: 13px; } .view:has(#stop) .qpill { height: 24px; font-size: 12px; } }

/* Aujourd'hui : lecteur plus grand (comme celui des fiches), chapitre en cours et retard en jaune */
.view > .wave-player { padding: 12px 18px 12px 12px; gap: 16px; }
.view > .wave-player .wp-play { width: 50px; height: 50px; font-size: 17px; }
.view > .wave-player .wp-head { font-size: 14px; margin-bottom: 6px; }
.view > .wave-player .wp-wave { height: 40px; }
.wp-now { margin-top: 6px; font-size: 13.5px; color: var(--text); min-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-late { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #ffd54a; color: #5a4300; font-size: 11px; font-weight: 700; vertical-align: 1px; }
@media (min-width: 1051px) and (max-height: 860px) {
  .view > .wave-player { padding: 8px 14px 8px 10px; }
  .view > .wave-player .wp-play { width: 42px; height: 42px; }
  .view > .wave-player .wp-wave { height: 30px; }
  .wp-now { margin-top: 4px; }
}
@media (min-width: 1051px) and (max-height: 700px) {
  .view > .wave-player { padding: 6px 12px 6px 8px; margin-top: 8px; }
  .view > .wave-player .wp-play { width: 36px; height: 36px; }
  .view > .wave-player .wp-wave { height: 22px; }
  .view > .wave-player .wp-head { margin-bottom: 3px; font-size: 13px; }
  .wp-now { margin-top: 2px; font-size: 12.5px; min-height: 17px; }
}
@media (min-width: 1051px) and (max-height: 640px) {
  .promo.wide { padding: 6px 18px; margin-top: 8px !important; }
  .promo.wide h2 { margin: 2px 0 0; }
  .promo.wide p { line-height: 1.3; }
  .today-main .day-card { padding-top: 8px; padding-bottom: 8px; }
}

/* Menu : Contact et Réglages en bas, juste au-dessus de l'encart du livre */
@media (min-width: 761px) {
  .sidebar nav#nav { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .sidebar nav#nav .nav-sep { margin-top: auto; }
  .sidebar .side-foot { margin-top: 10px; }
}
.nav-sep { display: block; }
@media (max-width: 760px) { .nav-sep { display: none; } }

/* Contact */
.contact-intro { max-width: 900px; margin: 0 0 18px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: stretch; }
.contact-form { gap: 12px; }
.contact-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-kinds .chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 12px; font-size: 13.5px; }
.contact-kinds .chip input { position: absolute; opacity: 0; pointer-events: none; }
.contact-kinds .chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.contact-kinds .chip:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.contact-err { margin: 0; color: var(--red); font-size: 13px; font-weight: 600; }
.contact-mail { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
/* Apprendre : croix pour effacer la recherche */
.search-wrap { position: relative; }
.search-wrap .search { padding-right: 44px; }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin-top: -4px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(127,127,127,.2); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.search-clear:hover { background: rgba(127,127,127,.32); }
.search-clear[hidden] { display: none; }

/* Aujourd'hui : séance et audio réunis dans un seul encart */
.day-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 14px; }
.st-late, .st-ok { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.st-late { background: #ffd54a; color: #5a4300; }
.st-ok { background: var(--green-soft); color: var(--green); }
.day-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.day-actions .day-read { flex: none; font-size: 16px; padding: 13px 22px; }
.day-or { flex: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.day-actions .wave-player { flex: 1; min-width: 0; margin: 0; padding: 8px 14px 8px 8px; box-shadow: none; background: var(--panel); }
.day-actions .wp-play { width: 42px; height: 42px; }
.day-actions .wp-wave { height: 30px; }
.today-main > .day-wrap .day-card { display: flex; flex-direction: column; }
@media (max-width: 1250px) { .day-actions { flex-direction: column; align-items: stretch; } .day-or { text-align: center; } .day-actions .day-read { justify-content: center; } }
@media (min-width: 1051px) and (max-height: 860px) {
  .day-status { margin-bottom: 8px; }
  .day-actions .day-read { padding: 10px 18px; font-size: 15px; }
  .day-actions .wave-player { padding: 5px 12px 5px 6px; }
  .day-actions .wp-play { width: 36px; height: 36px; }
  .day-actions .wp-wave { height: 24px; }
}

/* Bouton de compte replié : icône + voyant ; il se déplie au survol (et un instant à l'arrivée) */
.account-pill { gap: 0; padding: 7px; border-radius: 999px; transition: gap .35s cubic-bezier(.2,.8,.2,1), padding .35s cubic-bezier(.2,.8,.2,1), transform .12s, box-shadow .15s; }
.account-pill .ap-icon { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.95); font-size: 17px; line-height: 1; }
.account-pill .ap-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.account-pill:not(.on) .ap-dot { background: #ffd54a; }
.account-pill.on .ap-dot { background: #1e8e3e; box-shadow: none; }
.account-pill.on .ap-icon { background: #e8f5ec; }
.account-pill .ap-text { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; vertical-align: middle;
  transition: max-width .4s cubic-bezier(.2,.8,.2,1), opacity .25s ease, margin .4s cubic-bezier(.2,.8,.2,1); }
.account-pill:hover, .account-pill:focus-visible, .account-pill.peek { gap: 10px; padding: 7px 16px 7px 7px; }
.account-pill:hover .ap-text, .account-pill:focus-visible .ap-text, .account-pill.peek .ap-text { max-width: 280px; opacity: 1; }
@media (max-width: 760px) {
  .account-pill, .account-pill.peek { padding: 4px; gap: 0; }
  .account-pill .ap-icon { display: grid; width: 28px; height: 28px; font-size: 15px; }
  .account-pill .ap-text, .account-pill.peek .ap-text { max-width: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .account-pill, .account-pill .ap-text { transition: none; } }
/* Contact : tient dans la fenêtre sans défiler */
.view:has(#cf) h1 { margin-bottom: 4px; }
.contact-intro { margin: 0 0 12px; }
.contact-form { gap: 10px; }
.contact-form h2, .contact-side h2 { margin-bottom: 2px; }
.contact-kinds .chip { padding: 5px 11px; font-size: 13px; height: auto; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.field { gap: 4px; font-size: 13px; }
.field input, .field textarea { padding: 8px 11px; font-size: 14px; }
.field-msg textarea { min-height: 80px; height: clamp(80px, calc(100vh - 560px), 260px); }
.contact-send { gap: 12px; }
.contact-send .btn.big { padding: 10px 20px; font-size: 15px; }
@media (min-width: 761px) and (max-height: 700px) {
  .view:has(#cf) h1 { font-size: 24px; margin-top: 0; }
  .contact-intro { margin-bottom: 8px; }
  .field-msg textarea { height: clamp(70px, calc(100vh - 500px), 200px); }
  .contact-form { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
}
@media (max-width: 900px) { .field-row { grid-template-columns: 1fr; } .field-msg textarea { height: 140px; } }
.field-msg textarea { height: clamp(70px, calc(100vh - 600px), 260px); }
@media (min-width: 761px) and (max-height: 700px) { .field-msg textarea { height: clamp(64px, calc(100vh - 590px), 200px); } }
.contact-side .set-hint { line-height: 1.4; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Aujourd'hui : « Lire » et « Écouter », deux tuiles identiques côte à côte */
.day-choices { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; align-items: stretch; }
.choice-tile { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--card-line); color: var(--text); box-shadow: var(--shadow); }
.ct-read { transition: transform 100ms ease-out, border-color 150ms; }
.ct-read:hover { border-color: var(--accent); }
.ct-read:active { transform: scale(.98); }
.ct-ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 20px; }
.ct-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ct-txt strong, .ct-listen .wp-title strong { font-size: 15.5px; font-weight: 700; color: var(--text); }
.ct-txt small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ct-go { flex: none; font-size: 20px; color: var(--accent); }
.ct-listen { padding: 0; }
.ct-listen .wave-player { flex: 1; margin: 0; padding: 12px 16px; gap: 14px; border: 0; box-shadow: none; background: transparent; }
.ct-listen .wp-play { width: 46px; height: 46px; font-size: 16px; box-shadow: none; }
.ct-listen .wp-head { margin-bottom: 4px; }
.ct-listen .wp-wave { height: 26px; }
.ct-listen .wp-now { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.ct-listen .wp-now strong { color: var(--text); font-weight: 600; }
@media (max-width: 1250px) { .day-choices { grid-template-columns: 1fr; } }
@media (min-width: 1051px) and (max-height: 860px) {
  .choice-tile { min-height: 62px; padding: 8px 12px; }
  .ct-listen .wave-player { padding: 8px 12px; }
  .ct-ic, .ct-listen .wp-play { width: 40px; height: 40px; }
  .ct-listen .wp-wave { height: 22px; }
}
/* Tuile « Écouter » : le lecteur reste dans son cadre, quelle que soit la largeur */
.day-choices > * { min-width: 0; }
.ct-listen { overflow: hidden; }
.ct-listen .wave-player { min-width: 0; width: 100%; }
.ct-listen .wp-main { min-width: 0; overflow: hidden; }
.ct-listen .wp-head { min-width: 0; }
.ct-listen .wp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-listen .wp-wave { overflow: hidden; }
@media (min-width: 1051px) and (max-width: 1500px) { .ct-listen .wp-wave i:nth-of-type(even) { display: none; } .ct-listen .wp-wave { gap: 2px; } }
.ct-listen .wp-wave i { min-width: 0; }
.day-choices { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.ct-txt strong { white-space: nowrap; }
@media (max-width: 1250px) { .day-choices { grid-template-columns: 1fr; } }

/* Aujourd'hui : fil d'actualités sous le bandeau du livre (défile, s'arrête au survol) */
.news-band { display: flex; align-items: stretch; margin-top: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow); overflow: hidden; }
.nb-label { flex: none; display: flex; align-items: center; padding: 0 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.nb-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.nb-track { display: inline-flex; align-items: center; white-space: nowrap; padding: 12px 0; animation: nbScroll var(--nb-dur, 60s) linear infinite; }
.news-band:hover .nb-track, .news-band:focus-within .nb-track { animation-play-state: paused; }
.nb-copy { display: inline-flex; align-items: center; }
@keyframes nbScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.nb-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 6px; border-radius: 6px; color: var(--text); font-size: 14px; font-weight: 500; }
.nb-item:hover { color: var(--accent); text-decoration: underline; }
.nb-date { color: var(--accent); font-weight: 700; font-size: 12.5px; }
.nb-src { color: var(--muted); font-size: 12px; font-weight: 400; }
.nb-sep { color: var(--card-line); margin: 0 14px; }
@media (min-width: 1051px) and (max-height: 860px) { .news-band { margin-top: 10px; } .nb-track { padding: 8px 0; } }
@media (prefers-reduced-motion: reduce) {
  .nb-track { animation: none; } .nb-copy { display: none; }
  .nb-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
@media (min-width: 1051px) and (max-width: 1250px) and (max-height: 760px) {
  .news-band { margin-top: 8px; } .nb-track { padding: 6px 0; }
  .choice-tile { min-height: 54px; padding: 6px 12px; }
  .day-choices { gap: 8px; }
}
@media (min-width: 1051px) and (max-width: 1250px) and (max-height: 760px) {
  .day-choices { grid-template-columns: 1fr; gap: 6px; }
  .choice-tile { min-height: 0; padding: 5px 12px; }
  .ct-ic, .ct-listen .wp-play { width: 34px; height: 34px; font-size: 15px; }
  .ct-listen .wave-player { padding: 5px 12px; }
  .ct-listen .wp-wave { height: 18px; }
  .ct-listen .wp-now { margin-top: 2px; }
  .ct-txt strong, .ct-listen .wp-title strong { font-size: 14.5px; }
  .day-status { margin-bottom: 6px; }
}

/* Petit rond des listes : cliquable pour cocher / décocher */
.check[data-toggle] { cursor: pointer; transition: transform 100ms ease-out, background-color 150ms, border-color 150ms; }
.check[data-toggle]:hover { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.check[data-toggle]:active { transform: scale(.85); }
.list-item .check[data-toggle] { width: 24px; height: 24px; }

/* Tag « Validée », façon graffiti au pochoir */
.tag-valid { position: relative; display: inline-block; margin: 6px 0 12px 4px; padding: 5px 18px 7px; color: #fff; background: #1e8e3e;
  font: 900 21px/1 "Arial Black", Impact, "Helvetica Neue", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-4deg) skewX(-7deg); border-radius: 7px 16px 9px 18px / 14px 7px 16px 7px;
  box-shadow: 4px 4px 0 #0b4d20, 0 0 0 3px var(--bg), 0 0 0 5px #1e8e3e; text-shadow: 2px 2px 0 rgba(0,0,0,.28); }
.tag-valid::before { content: '✓ '; }
.tag-valid::after { content: ''; position: absolute; left: 24%; top: calc(100% - 2px); width: 5px; height: 13px; border-radius: 0 0 4px 4px; background: #1e8e3e;
  box-shadow: 38px -4px 0 -1px #1e8e3e, 70px 1px 0 0 #1e8e3e; }
.steps + * .tag-valid, .view > .tag-valid + .steps { margin-top: 0; }
/* Bouton de compte : « Connecté », et au survol « Se déconnecter » */
.account-pill .ap-off { display: none; }
.account-pill.on:hover .ap-on, .account-pill.on:focus-visible .ap-on { display: none; }
.account-pill.on:hover .ap-off, .account-pill.on:focus-visible .ap-off { display: inline; }
.account-pill.on:hover { border-color: #b3261e; }

/* Aujourd'hui : bandeau du livre un peu plus grand (dans la limite de la fenêtre) */
.promo.wide { padding: 22px 30px; gap: 26px; }
.promo.wide .promo-book { width: 96px; }
.promo.wide h2 { font-size: 24px; margin: 8px 0 6px; }
.promo.wide p { font-size: 15px; }
.promo.wide .btn { font-size: 16px; padding: 12px 22px; }
@media (min-width: 1051px) and (max-height: 860px) {
  .promo.wide { padding: 14px 24px; gap: 20px; }
  .promo.wide .promo-book { width: 70px; }
  .promo.wide h2 { font-size: 20px; margin: 4px 0 3px; }
  .promo.wide p { font-size: 13.5px; }
  .promo.wide .btn { font-size: 15px; padding: 10px 18px; }
}
@media (min-width: 1051px) and (max-height: 700px) {
  .promo.wide { padding: 8px 20px; }
  .promo.wide .promo-book { width: 50px; }
  .promo.wide h2 { font-size: 17px; }
  .promo.wide p { font-size: 12.5px; }
}
@media (min-width: 1051px) and (min-height: 1000px) {
  .promo.wide { padding: 30px 40px; gap: 34px; margin-top: 22px; }
  .promo.wide .promo-book { width: 124px; }
  .promo.wide h2 { font-size: 29px; margin: 10px 0 8px; }
  .promo.wide p { font-size: 17px; line-height: 1.5; }
  .promo.wide .btn { font-size: 18px; padding: 15px 28px; }
  .promo.wide .promo-badge { font-size: 13px; padding: 5px 12px; }
}
@media (min-width: 861px) and (min-height: 861px) and (max-height: 999px) and (min-width: 1051px) {
  .promo.wide { padding: 26px 34px; }
  .promo.wide .promo-book { width: 108px; }
  .promo.wide h2 { font-size: 26px; }
  .promo.wide p { font-size: 16px; }
}
@media (min-width: 1051px) and (max-height: 640px) { .promo.wide { padding: 6px 18px; } }
@media (min-width: 1051px) and (max-width: 1250px) and (max-height: 760px) { .promo.wide { padding-top: 7px; padding-bottom: 7px; } }
/* Lignes de liste : rond (bouton) + lien séparé */
.list-item:has(> .li-link) { padding-top: 0; padding-bottom: 0; cursor: default; }
.li-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--text); }
.li-link:hover .grow > :first-child, .li-link:hover strong { color: var(--accent); }
button.check { padding: 0; background: transparent; font: inherit; font-size: 12px; color: inherit; line-height: 1; }
button.check.done { background: var(--green); border-color: var(--green); color: #fff; }
/* Connexion par lien e-mail */
.mail-sent { font-size: 15px; margin: 4px 0 8px; }
.mail-steps { margin: 0 0 10px; padding-left: 20px; line-height: 1.7; font-size: 14px; }
.code-alt { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.code-alt summary { font-size: 13px; font-weight: 600; color: var(--muted); }
.code-alt .code-input { margin: 8px 0; }
