/* DA « planche » : fond gris bleuté, cartes blanches très arrondies, bleu glacier + corail, Inter et une touche manuscrite (Caveat) */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --sunk: #eef2f7;
  --ink: #2f3640;
  --ink-2: #6b7280;
  --line: #e6ebf1;
  --sky: #6faed9;          /* déco, formes */
  --sky-strong: #2f7bb5;   /* boutons à texte blanc */
  --sky-ink: #1f6fa8;      /* texte bleu sur fond clair */
  --sky-soft: #eaf4fb;
  --on-sky: #ffffff;
  --coral: #ff7f73;        /* réservé à « passer son stage » */
  --coral-ink: #b8402f;
  --coral-soft: #fff1ef;
  --on-coral: #3a1410;
  --mint: #0f7a4a;  --mint-soft: #e4f6ee;
  --lav: #5b47c9;   --lav-soft: #efecfd;
  --open: #0f7a4a;    --open-bg: #e4f6ee;
  --soon: #5b47c9;    --soon-bg: #efecfd;
  --full: #a15c07;    --full-bg: #fdf0d9;
  --closed: #a3243b;  --closed-bg: #fbe7ea;
  --unknown: #5f6b79; --unknown-bg: #eef1f5;
  --star: #f5a524;
  --shadow: 0 1px 2px rgba(47, 54, 64, .04), 0 10px 30px rgba(47, 54, 64, .07);
  --f: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --card: #171e27; --sunk: #1e2732; --ink: #e8edf3; --ink-2: #a3adba; --line: #283342;
    --sky: #7fbbe4; --sky-strong: #7fbbe4; --sky-ink: #8cc4ea; --sky-soft: #16283a; --on-sky: #0f141a;
    --coral: #ff8a7f; --coral-ink: #ff9a90; --coral-soft: #331c1b; --on-coral: #0f141a;
    --mint: #5fd3a0; --mint-soft: #13301f; --lav: #a99bf5; --lav-soft: #241f45;
    --open: #5fd3a0; --open-bg: #13301f; --soon: #a99bf5; --soon-bg: #241f45; --full: #f0b05a; --full-bg: #33240f;
    --closed: #ff8fa3; --closed-bg: #3a1a22; --unknown: #a3adba; --unknown-bg: #222c38; --star: #f7bf4f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --card: #171e27; --sunk: #1e2732; --ink: #e8edf3; --ink-2: #a3adba; --line: #283342;
  --sky: #7fbbe4; --sky-strong: #7fbbe4; --sky-ink: #8cc4ea; --sky-soft: #16283a; --on-sky: #0f141a;
  --coral: #ff8a7f; --coral-ink: #ff9a90; --coral-soft: #331c1b; --on-coral: #0f141a;
  --mint: #5fd3a0; --mint-soft: #13301f; --lav: #a99bf5; --lav-soft: #241f45;
  --open: #5fd3a0; --open-bg: #13301f; --soon: #a99bf5; --soon-bg: #241f45; --full: #f0b05a; --full-bg: #33240f;
  --closed: #ff8fa3; --closed-bg: #3a1a22; --unknown: #a3adba; --unknown-bg: #222c38; --star: #f7bf4f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--card); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sky-strong); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hand { font-family: var(--f-hand); font-weight: 700; color: var(--sky-ink); font-size: 1.28em; line-height: .8; letter-spacing: 0; position: relative; display: inline-block; padding: 0 .04em; }
.hand::after { content: ""; position: absolute; left: 4%; right: 0; bottom: -.12em; height: .2em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 25 3, 60 2, 98 6' fill='none' stroke='%23ff7f73' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }

/* Boutons */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: .94rem; line-height: 1.2; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--sky); }
.btn.blue { background: var(--sky-strong); border-color: var(--sky-strong); color: var(--on-sky); box-shadow: 0 6px 18px color-mix(in srgb, var(--sky-strong) 28%, transparent); }
.btn.coral { background: var(--coral); border-color: var(--coral); color: var(--on-coral); box-shadow: 0 6px 18px color-mix(in srgb, var(--coral) 30%, transparent); }
.btn.blue:hover, .btn.coral:hover { transform: translateY(-1px); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); font-weight: 500; }
.btn.ghost:hover { color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: .84rem; }

/* En-tête */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.brand .hand { font-size: 1.5em; margin-left: 2px; }
.brand .hand::after { display: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { background: var(--sky-soft); color: var(--sky-ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-ink); font-weight: 700; font-size: .85rem; }
.mock { background: var(--sunk); color: var(--ink-2); font-size: .82rem; }
.mock .wrap { padding-block: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.mock button { border: 0; background: none; padding: 0; color: var(--sky-ink); text-decoration: underline; text-underline-offset: 2px; font-size: .82rem; }

/* Ouverture */
.hero .wrap { padding-block: 56px 36px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: .84rem; color: var(--ink-2); font-weight: 500; box-shadow: var(--shadow); }
.kicker .dotc { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-ink); }
.kicker .dotc .ic { width: 14px; height: 14px; }
.nw { white-space: nowrap; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.035em; margin: 18px 0 16px; text-wrap: balance; }
.lede { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 26px; max-width: 32em; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.ctas .btn { padding: 13px 22px; font-size: 1rem; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.pillar { display: grid; gap: 4px; }
.circ { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky-ink); margin-bottom: 6px; }
.circ.c { background: var(--coral-soft); color: var(--coral-ink); }
.pillar b { font-size: .95rem; }
.pillar span { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }

.art { position: relative; padding: 34px 24px 40px; min-width: 0; }
.blob { position: absolute; inset: 0 4% 6% 8%; border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--sky) 38%, transparent), transparent 70%), var(--sky-soft); filter: blur(2px); }
.arcs { position: absolute; right: -6px; top: -10px; width: 46%; max-width: 220px; height: auto; color: var(--coral); }
.baro { position: relative; background: var(--card); border-radius: var(--r); padding: 20px 20px 16px; box-shadow: var(--shadow); min-width: 0; }
.baro h2 { font-size: 1.02rem; font-weight: 700; margin: 0 0 2px; letter-spacing: -.01em; }
.baro p { margin: 0 0 16px; font-size: .84rem; color: var(--ink-2); }
.bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; background: var(--sunk); }
.bar span { display: block; border-radius: 999px; transition: flex-grow .3s; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-top: 14px; }
.legend button { display: flex; align-items: center; gap: 8px; background: none; border: 1.5px solid transparent; border-radius: 12px; padding: 6px 9px; text-align: left; font-size: .87rem; color: var(--ink); }
.legend button:hover { background: var(--sunk); }
.legend button[aria-pressed="true"] { border-color: var(--sky); background: var(--sky-soft); }
.legend b { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; }
.float { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 8px 16px 8px 8px; box-shadow: var(--shadow); font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.float .circ { width: 32px; height: 32px; margin: 0; }
.float .circ .ic { width: 16px; height: 16px; }
.float b { color: var(--ink); }
.f1 { left: -6px; bottom: 0; }
.f2 { left: 34px; top: 2px; }

/* Recherche et filtres */
.finder { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; }
.search:focus-within { border-color: var(--sky); }
.search > .ic { color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 0; font-size: 1rem; outline: none; }
.search .tune { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--sky-soft); color: var(--sky-ink); display: grid; place-items: center; flex: none; }
.hint { font-size: .8rem; color: var(--ink-2); margin: -6px 0 0 18px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pselect { appearance: none; -webkit-appearance: none; border: 1.5px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; border-radius: 999px; padding: 8px 32px 8px 14px; font-size: .88rem; font-weight: 500; color: var(--ink); max-width: 100%; }
.pselect.on { border-color: var(--sky); background-color: var(--sky-soft); color: var(--sky-ink); }
.seg { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: .86rem; font-weight: 500; color: var(--ink); }
.chip .ic { width: 15px; height: 15px; }
.chip[aria-pressed="true"] { background: var(--sky-soft); border-color: var(--sky); color: var(--sky-ink); }
.sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); }

/* Grille */
main .wrap { padding-block: 26px 120px; }
.finder-wrap { padding-block: 0 4px; }
.listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.count { font-size: .9rem; color: var(--ink-2); margin: 0; }
.count strong { color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--r); padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: var(--shadow); border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.card:hover { border-color: color-mix(in srgb, var(--sky) 60%, transparent); transform: translateY(-2px); }
.chead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chead { flex-wrap: nowrap; }
.chead .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.chead .tag .ic { vertical-align: -2px; margin-right: 3px; }
.chead .tag.coral { flex: none; }
.chead .rt { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; }
.chead .rt .s { color: var(--star); }
.chead .rt .n { color: var(--ink-2); font-weight: 400; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--sunk); color: var(--ink-2); }
.tag.sky { background: var(--sky-soft); color: var(--sky-ink); }
.tag.mint { background: var(--mint-soft); color: var(--mint); }
.tag.lav { background: var(--lav-soft); color: var(--lav); }
.tag.coral { background: var(--coral-soft); color: var(--coral-ink); }
.tag .ic { width: 12px; height: 12px; }
.card h3 { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:hover { color: var(--sky-ink); }
.card h3 button:focus-visible { outline: 2px solid var(--sky-strong); outline-offset: 3px; border-radius: 4px; }
.where { display: flex; align-items: center; gap: 5px; margin: -4px 0 0; color: var(--ink-2); font-size: .88rem; }
.where .ic { width: 15px; height: 15px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px 3px 4px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill .lv { font-weight: 700; font-size: .7rem; background: var(--card); border-radius: 999px; padding: 1px 7px; }
.pill i { font-style: normal; }
.s-open { background: var(--open-bg); color: var(--open); }
.s-soon { background: var(--soon-bg); color: var(--soon); }
.s-full { background: var(--full-bg); color: var(--full); }
.s-closed { background: var(--closed-bg); color: var(--closed); }
.s-unknown { background: var(--unknown-bg); color: var(--unknown); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.d-open { background: var(--open); } .d-soon { background: var(--soon); } .d-full { background: var(--full); } .d-closed { background: var(--closed); } .d-unknown { background: var(--unknown); }
.desc { margin: 0; font-size: .88rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.stars { color: var(--star); letter-spacing: 1px; }
.muted { color: var(--ink-2); }
.warn { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--full); }
.warn .ic { width: 15px; height: 15px; }
.foot { margin-top: auto; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.fresh { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; color: var(--ink-2); min-width: 0; }
.fresh .ic { width: 14px; height: 14px; }
.fresh.old { color: var(--full); }
.still { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--ink-2); margin-left: auto; white-space: nowrap; }
.still button { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; }
.still button:hover { border-color: var(--sky); color: var(--sky-ink); }
.go { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--sky-soft); color: var(--sky-ink); display: grid; place-items: center; flex: none; }
.go:hover { background: var(--sky-strong); color: var(--on-sky); }
.go .ic { width: 16px; height: 16px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--ink-2); border: 1.5px dashed var(--line); border-radius: var(--r); }

.fab { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 6; padding: 14px 22px; }

/* Fiche détaillée */
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 26, .4); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--card); z-index: 21; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.18); padding: calc(22px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) 26px; border-radius: 24px 0 0 24px; }
.drawer .close { position: sticky; top: 0; float: right; border: 0; background: var(--sunk); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; z-index: 1; }
.drawer .kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.drawer h2 { font-weight: 800; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 6px; text-wrap: balance; }
.drawer h3 { font-size: 1rem; font-weight: 700; margin: 28px 0 10px; letter-spacing: -.01em; }
.lvls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.lvl { border-radius: 16px; padding: 12px 14px; }
.lvl .t { font-size: .74rem; font-weight: 600; opacity: .9; }
.lvl .s { font-weight: 700; font-size: 1.02rem; margin: 2px 0; }
.lvl .w { font-size: .8rem; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: .92rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.scale { display: grid; gap: 6px; }
.scale .track { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--sky-soft), var(--sky)); }
.scale .mark { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--coral); border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.2); transform: translate(-50%, -50%); }
.scale .ends { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-2); }
.proc { background: var(--sky-soft); border-radius: 16px; padding: 14px 16px; font-size: .94rem; }
.proc p { margin: 0 0 8px; }
.lock { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--ink-2); margin: 0; }
.lock .ic { width: 15px; height: 15px; margin-top: 2px; }
.timeline { list-style: none; margin: 0 0 0 6px; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--sky); }
.timeline .d { font-size: .76rem; color: var(--ink-2); font-weight: 500; }
.timeline .l { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .88rem; margin: 3px 0; }
.timeline q { display: block; font-size: .88rem; color: var(--ink-2); }
.exp { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.exp .m { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: .78rem; color: var(--ink-2); font-weight: 500; }
.exp p { margin: 6px 0 0; font-size: .92rem; }
.exp .adv { color: var(--ink-2); }
.exp .adv::before { content: "Conseil · "; font-family: var(--f-hand); font-size: 1.2em; color: var(--coral-ink); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* Fenêtres */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(540px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(15, 20, 26, .45); }
dialog form, dialog .in { padding: 24px 24px 22px; display: grid; gap: 16px; }
dialog h2 { font-weight: 800; font-size: 1.35rem; margin: 0; letter-spacing: -.025em; text-wrap: balance; }
dialog .sub { margin: -10px 0 0; color: var(--ink-2); font-size: .9rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
legend, .lab { display: block; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts label { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 13px 6px 10px; font-size: .88rem; cursor: pointer; }
.opts input { accent-color: var(--sky-strong); margin: 0; }
.opts label:has(input:checked) { border-color: var(--sky); background: var(--sky-soft); }
dialog input[type="text"], dialog input[type="email"], dialog input[type="date"], dialog select, dialog textarea { width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 11px 14px; }
dialog input:focus, dialog select:focus, dialog textarea:focus { outline: none; border-color: var(--sky); }
dialog input[type="range"] { width: 100%; accent-color: var(--coral); }
dialog textarea { min-height: 70px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.results { display: grid; gap: 8px; }
.results:empty { display: none; }
.res { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.res.on { border-color: var(--sky); background: var(--sky-soft); }
.res strong { display: block; font-size: .95rem; }
.res span { font-size: .84rem; color: var(--ink-2); }
.match { font-size: .7rem; font-weight: 700; color: var(--sky-ink); text-transform: uppercase; letter-spacing: .06em; }
.rate { display: flex; gap: 4px; }
.rate label { cursor: pointer; font-size: 1.8rem; line-height: 1; color: var(--line); }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate label.on { color: var(--star); }
.rate input:focus-visible + span { outline: 2px solid var(--sky-strong); border-radius: 4px; }
.welcome { position: relative; overflow: hidden; background: var(--coral-soft); padding: 26px 24px 20px; display: grid; gap: 6px; }
.welcome::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--coral); opacity: .35; }
.welcome p { margin: 0; color: var(--ink-2); position: relative; }
.welcome .k { font-size: .84rem; font-weight: 600; color: var(--coral-ink); }
.welcome h2 { font-size: 1.6rem; position: relative; }
.welcome h2 .hand { color: var(--coral-ink); }
.note { font-size: .82rem; color: var(--ink-2); margin: 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: .9rem; z-index: 40; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 18px; padding-block: 34px 22px; }
  .nav { display: none; }
  .who { margin-left: auto; }
  .art { padding: 18px 0 0; }
  .blob { inset: 0 -10px 30% -10px; }
  .float { position: static; display: inline-flex; margin: 12px 8px 0 0; }
  .arcs { width: 120px; right: -10px; top: -14px; }
}
@media (max-width: 560px) {
  .lvls, .row2 { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; gap: 12px; }
  .pillar { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .pillar .circ { grid-row: span 2; margin: 0; }
  .who .name { display: none; }
  .fab span { display: none; }
  .fab { padding: 16px; }
  .drawer { padding-left: max(16px, env(safe-area-inset-left, 0px)); border-radius: 0; }
  .finder { padding: 14px; }
  .frow .pselect { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .foot { flex-wrap: wrap; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}


.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { border-radius: 16px; padding: 14px 12px; display: grid; gap: 2px; background: var(--sky-soft); }
.stat.coral { background: var(--coral-soft); }
.stat b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--sky-ink); }
.stat.coral b { color: var(--coral-ink); }
.stat span { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.stat small { font-size: .74rem; color: var(--ink-2); line-height: 1.3; }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } .stat { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; } .stat b { grid-row: span 2; } }
.mail { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 18px; font-size: .92rem; background: var(--bg); }
.mail dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.mail dt { color: var(--ink-2); }
.mail dd { margin: 0; font-weight: 600; }
.mail p { margin: 0 0 10px; }
.match-note { margin: -4px 0 0; font-size: .86rem; background: var(--mint-soft); color: var(--mint); border-radius: 12px; padding: 8px 12px; }
.res.new { border-style: dashed; }
.match-note.mod { background: var(--sunk); color: var(--ink-2); }

/* Espace admin */
body:not(.admin) .admin-only, body.admin .not-admin { display: none !important; }
#admin .wrap { padding-block: 36px 80px; display: grid; gap: 18px; }
.ah { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; }
#admin .lede { margin: 0; }
.akpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.acard { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; min-width: 0; }
.acard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acard h2 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.arow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.arow .who2 { flex: 1 1 200px; min-width: 0; }
.arow .who2 strong { display: block; font-size: .92rem; overflow-wrap: anywhere; }
.arow .who2 span { font-size: .8rem; color: var(--ink-2); }
.arow .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.empty-s { font-size: .88rem; color: var(--ink-2); margin: 0; padding: 10px 0; }
.atable { overflow-x: auto; }
.atable table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 720px; }
.atable th { text-align: left; font-size: .76rem; font-weight: 600; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.atable td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable td .muted { font-size: .8rem; }
.counts { display: flex; flex-wrap: wrap; gap: 4px; }
.author { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--lav); margin-top: 2px; }
.author .ic { width: 13px; height: 13px; }
@media (max-width: 860px) { .akpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .agrid { grid-template-columns: 1fr; } }
/* Visiteur non connecté */
body.guest .member-only, body:not(.guest) .guest-only { display: none !important; }
.gate { position: relative; padding: 8px 0 40px; }
.ghosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; filter: blur(3px); opacity: .7; }
.ghosts div { height: 240px; border-radius: var(--r); background: linear-gradient(var(--sunk) 0 0) 18px 22px / 40% 14px no-repeat, linear-gradient(var(--sunk) 0 0) 18px 52px / 70% 20px no-repeat, linear-gradient(var(--open-bg) 0 0) 18px 92px / 30% 22px no-repeat, linear-gradient(var(--sunk) 0 0) 18px 134px / 85% 12px no-repeat, var(--card); box-shadow: var(--shadow); }
.gate-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 8px)); background: var(--card); border-radius: 24px; box-shadow: 0 20px 60px rgba(47,54,64,.16); padding: 28px; display: grid; gap: 10px; text-align: center; justify-items: center; }
.gate-card h2 { margin: 4px 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.gate-card > p { margin: 0; color: var(--ink-2); }
.gate-card .note a { color: var(--sky-ink); font-weight: 600; }
.login { width: 100%; text-align: left; display: grid; gap: 4px; margin-top: 6px; }
.login .search { padding-left: 16px; }
@media (max-width: 560px) {
  .gate { padding: 0 0 24px; }
  .ghosts { display: none; }
  .gate-card { position: static; transform: none; width: 100%; padding: 22px 18px; }
  .login .search { flex-wrap: wrap; border-radius: 20px; padding: 8px; }
  .login .search input { flex-basis: calc(100% - 40px); }
  .login .search .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Site réel : rôles et chargement */
body:not(.staff) .staff-only { display: none !important; }
body.loading main, body.loading .fab { visibility: hidden; }
#logout { margin-left: 4px; }
.login .opts { align-items: center; }
.login .opts .note { margin-right: 4px; }
#login-msg:empty { display: none; }
#login-msg { margin-top: 8px; color: var(--ink); background: var(--sky-soft); border-radius: 12px; padding: 8px 12px; }

/* Accueil et remerciements après contribution */
.pass-done { padding: 30px 24px 22px; display: grid; gap: 10px; text-align: center; justify-items: center; }
.pass-done[hidden] { display: none; }
.pass-done p { margin: 0; color: var(--ink-2); max-width: 40ch; }
.pass-done .dlg-actions { justify-self: stretch; margin-top: 8px; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-ink); display: grid; place-items: center; }
.done-ic .ic { width: 30px; height: 30px; }
#done-msg { color: var(--ink); font-weight: 600; font-size: 1.02rem; }
.done-count { font-size: .88rem; }
.mycount { display: inline-flex; align-items: center; gap: 4px; background: var(--coral-soft); color: var(--coral-ink); font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 3px 10px; }
.mycount[hidden] { display: none; }
#f-pass[hidden] { display: none; }
#dlg-pass .welcome[hidden] { display: none; }

#dlg-about p { margin: 0; line-height: 1.55; }
#dlg-about a { color: var(--sky-ink); font-weight: 600; }

.cc { font-size: 12px; color: var(--ink-2); text-align: right; margin-top: 4px; }
.cc.full { color: #b4532a; }
.opts label[hidden], fieldset[hidden] { display: none; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
#p-cwrap { margin-top: 10px; }
#p-cwrap[hidden] { display: none; }
.contacts { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.contacts li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--sunk); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.contacts a { color: var(--sky-ink); font-weight: 600; word-break: break-all; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--sky-ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
.ab-check { margin-top: 4px; }
.ab-check[hidden] { display: none; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline input { width: 80px; }
.season { background: var(--sky-soft); color: var(--ink); font-size: .9rem; }
.season[hidden] { display: none !important; }
.season .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-block: 10px; }
.season .wrap > span { flex: 1 1 260px; }
.season-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 4px; }
.mine { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 8px; }
.mine li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--sunk); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.mine .muted { font-size: .85rem; margin-top: 2px; }
#dlg-mine h3 { margin: 18px 0 6px; font-size: 1rem; }
#f-pass:not(.dem) .dem-only, #f-pass.dem .exp-only, #f-pass .exp-only[hidden], #p-st-f[hidden] { display: none !important; }
.gate-alt { margin: 0; font-size: .92rem; color: var(--ink-2); }
.gate-alt[hidden] { display: none; }
#gate-alt { text-align: center; padding-top: 4px; }
body.gated .hero, body.gated #terrains, body.gated #fab, body.gated #season { display: none !important; }
#pass-later[hidden] { display: none; }
.logo-p8 { display: block; height: auto; background: #fff; border-radius: 10px; padding: 6px 10px; box-sizing: content-box; }
.logo-p8.big { width: 180px; margin: 0 0 4px; }
.foot-site { border-top: 1px solid var(--line); margin-top: 48px; padding-block: 20px 28px; font-size: .85rem; color: var(--ink-2); }
.foot-site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.foot-site .logo-p8 { width: 110px; }
.foot-site a { color: var(--sky-ink); }
body.gated .foot-site { display: none; }
