/* Foot-Tots — espace de gestion */
body { padding-bottom: env(safe-area-inset-bottom); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(800px 400px at 100% 0%, #fff4cf, transparent 60%), radial-gradient(700px 400px at 0% 100%, var(--sky), transparent 60%), #fff; }
.login-card { width: 100%; max-width: 380px; }
.login-brand { text-align: center; margin-bottom: 1rem; }
.login-brand img { width: 170px; display: block; margin: 0 auto .3rem; }

.topbar { position: sticky; top: 0; z-index: 20; background: #fff; display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; padding-top: max(.55rem, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav a { position: relative; display: flex; align-items: center; gap: .45rem; color: var(--muted); text-decoration: none; font-weight: 800; font-size: .92rem; padding: .5rem .8rem; border-radius: 10px; }
.nav a svg { width: 20px; height: 20px; fill: currentColor; }
.nav a:hover { color: var(--blue); background: var(--sky); }
.nav a.active { color: var(--blue); background: var(--sky); }
.badge { background: var(--sun); color: var(--navy); font-size: .7rem; font-weight: 900; border-radius: 999px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
@media (max-width: 760px) {
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); z-index: 30; box-shadow: 0 -4px 16px rgba(11,37,69,.06); }
  .nav a { flex-direction: column; gap: .1rem; font-size: .68rem; color: var(--muted); padding: .35rem .3rem; flex: 1; }
  .nav a.active { color: var(--blue); background: var(--sky); }
  .nav a:hover { background: transparent; color: var(--blue); }
  .nav a .badge { position: absolute; top: 2px; right: calc(50% - 22px); }
  .main { padding-bottom: 90px !important; }
}
.main { max-width: 1040px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
.loading { padding: 3rem; text-align: center; color: var(--muted); font-weight: 700; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow); border-top: 4px solid var(--blue); }
.kpi.sun { border-top-color: var(--sun); }
.kpi.red { border-top-color: var(--red); }
.kpi.amber { border-top-color: #e3a008; }
.kpi.green { border-top-color: var(--green); }
.kpi .lab { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi .val { font-size: 1.7rem; font-weight: 900; color: var(--navy); line-height: 1.15; margin-top: .15rem; }
.kpi .sub { font-size: .78rem; color: var(--muted); font-weight: 600; }
a.kpi { text-decoration: none; color: inherit; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .name { font-weight: 800; color: var(--ink); text-decoration: none; }
.list .meta { font-size: .8rem; color: var(--muted); font-weight: 600; }
.list .grow { flex: 1; min-width: 0; }
.empty { color: var(--muted); font-weight: 600; padding: .8rem .2rem; font-size: .9rem; }
.card h2 { display: flex; align-items: center; gap: .5rem; }
.card h2 .chip { font-size: .72rem; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.toolbar select { width: auto; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-weight: 800; font-size: .9rem; border: 0; background: transparent; color: var(--muted); padding: .45rem .85rem; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--blue); color: #fff; }
.seg button.g23.on { background: var(--g23); color: var(--navy); }
.seg button.g45.on { background: var(--g45); color: #fff; }
.kid { border-left: 5px solid var(--g, var(--line)) !important; }
.sec-head { display: flex; align-items: center; gap: .6rem; margin: 1.2rem 0 .5rem; }
.sec-head h2 { margin: 0; color: var(--gink); }
.sec-head .bar-c { flex: 1; height: 3px; background: var(--g); border-radius: 2px; opacity: .5; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .2em; background: var(--bg); border: 1.5px dashed var(--line); border-radius: 12px; padding: .5rem .9rem; display: inline-block; color: var(--navy); }

/* appel */
.session-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.session-bar input[type=date] { width: auto; }
.icon-btn { font: inherit; font-weight: 900; border: 1.5px solid var(--line); background: #fff; color: var(--blue); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: inline-grid; place-items: center; }
.session-title { font-size: 1.15rem; font-weight: 900; color: var(--navy); text-transform: capitalize; }
.counter { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .9rem; }
.kid { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .85rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.kid-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .55rem; }
.kid-name { font-weight: 900; font-size: 1.02rem; color: var(--navy); text-decoration: none; }
.kid-top .spacer { flex: 1; }
.codes { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.codes button { font: inherit; font-weight: 800; font-size: .82rem; border: 1.5px solid var(--line); background: #fff; color: var(--muted); border-radius: 10px; padding: .6rem .2rem; cursor: pointer; min-height: 44px; }
.codes button[data-c=P].on { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.codes button[data-c=S].on { background: var(--paid-bg); border-color: var(--paid); color: var(--paid); }
.codes button[data-c=E].on { background: var(--sky); border-color: var(--blue-2); color: var(--blue); }
.codes button[data-c=O].on { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); }
.codes button[data-c=A].on { background: var(--grey-bg); border-color: #9aa7b6; color: var(--ink); }
.kid.saving { opacity: .7; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .5rem .6rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.t td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--sky); }
table.t .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* child detail */
.detail-head { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--sky); color: var(--blue); display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; flex: none; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; font-size: .92rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; font-weight: 700; word-break: break-word; }
.money { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.money div { background: var(--bg); border-radius: 10px; padding: .55rem .7rem; }
.money b { display: block; font-size: 1.2rem; color: var(--navy); }
.money span { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.money .red b { color: var(--red); }
.money .green b { color: var(--green); }
.bars { display: grid; gap: .35rem; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 34px; gap: .5rem; align-items: center; font-size: .82rem; font-weight: 700; }
.bar { display: flex; height: 14px; background: var(--bg); border-radius: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar i.a { background: var(--blue); }
.bar i.a { background: var(--g23); }
.bar i.b { background: var(--g45); }
.legend { display: flex; gap: .9rem; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(11, 37, 69, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-box { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 1rem 1.1rem 1.4rem; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal { align-items: center; } .modal-box { border-radius: 18px; } }
.modal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; position: sticky; top: -1rem; background: #fff; padding-top: .2rem; z-index: 1; }
.modal-head h2 { margin: 0; flex: 1; }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .8rem; }
fieldset { border: 0; padding: 0; margin: 0 0 .4rem; }
legend { font-weight: 900; color: var(--navy); font-size: .95rem; margin-bottom: .5rem; padding: 0; }
.copy { display: flex; gap: .5rem; }
.copy input { flex: 1; }

/* ===================== écran Séance ===================== */
.session-bar { display: grid; grid-template-columns: 44px 1fr 44px 44px; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.session-date { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.session-title { font-size: 1.2rem; font-weight: 900; color: var(--navy); text-transform: capitalize; line-height: 1.2; }
.linkish { font: inherit; font-size: .8rem; font-weight: 800; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 0; }
.date-pick { position: relative; width: 44px; height: 40px; border: 1.5px solid var(--line); border-radius: 10px; display: grid; place-items: center; background: #fff; cursor: pointer; margin: 0; font-size: 1.1rem; }
.date-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.chip.blue { background: var(--sky); color: var(--blue); }

.group-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .7rem; }
.gt { font: inherit; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: .6rem .8rem; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0 .4rem; color: var(--ink); }
.gt b { grid-column: 1 / -1; font-size: 1.2rem; font-weight: 900; color: var(--gink); white-space: nowrap; }
.gt span { grid-column: 1; grid-row: 2; align-self: center; white-space: nowrap; font-size: .8rem; font-weight: 700; color: var(--muted); }
.gt em { grid-row: 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 900; font-size: .8rem; background: var(--gbg); color: var(--gink); border-radius: 999px; padding: .2rem .55rem; }
.gt.on { border-color: var(--g); background: var(--gbg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 25%, transparent); }
.gt.on em { background: var(--g); color: #fff; }
.gt.g23.on em { color: var(--navy); }
.hint-line { font-size: .8rem; color: var(--muted); font-weight: 600; margin: -.2rem 0 .7rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: .6rem; padding-bottom: 6.5rem; }
.tile { position: relative; font: inherit; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: .8rem .4rem .7rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .1rem; box-shadow: var(--shadow); color: var(--ink); min-height: 150px; transition: transform .08s, border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.tile:active { transform: scale(.96); }
.tile .av { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.25rem; background: var(--gbg); color: var(--gink); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--g); margin-bottom: .35rem; }
.tile .nm { font-weight: 900; font-size: 1rem; line-height: 1.15; text-align: center; color: var(--navy); }
.tile .ln { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .st { margin-top: auto; padding-top: .45rem; }
.tile .st .chip, .tile .st.chip { font-size: .7rem; }
.tile.on { border-color: var(--g); background: var(--gbg); }
.tile.on .av { background: var(--g); color: #fff; box-shadow: 0 0 0 2px var(--g); }
.tiles.g23 .tile.on .av { color: var(--navy); }
.tile.on.due { border-color: var(--red); }
.tile .check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
.tile.absent { opacity: .55; }
.tile.add { border-style: dashed; box-shadow: none; background: transparent; }
.tile.add .av { background: #fff; color: var(--blue); box-shadow: 0 0 0 2px var(--line); font-size: 1.8rem; }
.tile.add .nm { color: var(--blue); }
.tile.add .st { font-size: .7rem; color: var(--muted); font-weight: 700; }

.endbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(1000px, calc(100% - 24px)); background: var(--navy); color: #fff; border-radius: 16px; padding: .7rem .8rem .7rem 1rem; display: flex; align-items: center; gap: .8rem; z-index: 25; box-shadow: 0 10px 30px rgba(10,58,140,.3); }
.endbar > div { flex: 1; display: flex; flex-direction: column; }
.endbar b { font-size: 1rem; }
.endbar span { font-size: .78rem; opacity: .8; font-weight: 600; }
@media (max-width: 760px) { .endbar { bottom: calc(70px + env(safe-area-inset-bottom)); } .tiles { padding-bottom: 8rem; } }

.stack-sm { display: grid; gap: .5rem; }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .6rem; }
.sum-grid div { background: var(--bg); border-radius: 12px; padding: .55rem; text-align: center; }
.sum-grid b { display: block; font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.sum-grid span { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.sum-grid .green b { color: var(--green); } .sum-grid .violet b { color: var(--violet); } .sum-grid .red b { color: var(--red); }
.modal h3 { margin: 1rem 0 .3rem; display: flex; gap: .5rem; align-items: center; }
.modal .list li { gap: .4rem; }

/* fiche enfant */
.detail-head .avatar { background: var(--gbg); color: var(--gink); box-shadow: 0 0 0 3px var(--g); }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .8rem; }
.big-stats > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.big-stats span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.big-stats b { display: block; font-size: 2rem; font-weight: 900; color: var(--navy); line-height: 1.1; margin: .1rem 0; }
.big-stats em { font-style: normal; font-size: .78rem; color: var(--muted); font-weight: 600; }
.big-stats .green { border-top-color: var(--green); } .big-stats .green b { color: var(--green); }
.big-stats .amber { border-top-color: #e3a008; } .big-stats .amber b { color: var(--amber); }
.big-stats .red { border-top-color: var(--red); } .big-stats .red b { color: var(--red); }
@media (max-width: 560px) { .big-stats { grid-template-columns: 1fr 1fr; } .big-stats > div:first-child { grid-column: span 2; } }

/* liste enfants */
.card.pending { border-color: #f3d27a; background: #fffbea; margin-bottom: 1rem; }
.kid-list { display: grid; gap: .45rem; }
.kid-row { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .75rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.kid-row:hover { border-color: var(--g); }
.kid-row .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--gbg); color: var(--gink); flex: none; }
.kid-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kid-row .meta { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kid-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.red-txt { color: var(--red); }
.tile .more { position: absolute; top: 5px; left: 5px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; line-height: 1; color: var(--muted); background: rgba(255,255,255,.85); border: 1px solid var(--line); }
.tile .more:active { background: var(--sky); }
.quick-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .5rem; }
.quick-amounts .btn { font-size: 1.1rem; padding: .8rem .4rem; }

/* bandeau hors connexion */
.netbar { text-align: center; font-weight: 800; font-size: .85rem; padding: .5rem .8rem; }
.netbar.off { background: #3b4252; color: #fff; }
.netbar.sync { background: var(--sun); color: var(--navy); }
.backup-list li { font-size: .9rem; }



/* ---------- design : titres ronds, tableau des présents, animations ---------- */
.session-title, .gt b, .tile .nm, .kpi .val, .big-stats b, .sum-grid b, .money b, .endbar b, .tile .av, .kid-row .av, .avatar, .kid-name { font-family: var(--display); }
.session-title { font-weight: 600; font-size: 1.3rem; }
.gt b { font-weight: 600; font-size: 1.3rem; }
.tile .nm { font-weight: 600; font-size: 1.08rem; }
.tile .av, .kid-row .av, .avatar { font-weight: 600; letter-spacing: .02em; }
.kpi .val, .big-stats b, .sum-grid b, .money b { font-weight: 600; }
.endbar b { font-weight: 600; font-size: 1.08rem; }

.score { position: relative; overflow: hidden; background: #fff; border: 2px solid var(--g); border-radius: 18px; padding: .75rem 1rem .85rem; margin-bottom: .7rem; box-shadow: var(--shadow);
  background-image: radial-gradient(260px 160px at 100% 0%, var(--gbg), transparent 70%); }
.score-ball { position: absolute; right: -26px; top: -30px; width: 132px; height: 132px; opacity: .14; transform: rotate(-18deg); pointer-events: none; }
.score-main { position: relative; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.score-n { font-family: var(--display); font-weight: 700; font-size: 3.4rem; line-height: .9; color: var(--gink); font-variant-numeric: tabular-nums; }
.score-of { font-weight: 800; font-size: .82rem; line-height: 1.15; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.score .counter { margin: 0 0 0 .3rem; flex: 1; min-width: 150px; }
.score-empty { font-size: .85rem; font-weight: 700; color: var(--muted); }
.score-bar { position: relative; height: 10px; background: var(--grey-bg); border-radius: 6px; overflow: hidden; margin-top: .6rem; }
.score-bar i { display: block; height: 100%; background: var(--g); border-radius: 6px; transition: width .35s cubic-bezier(.34, 1.4, .64, 1); }
.score.over { border-color: var(--red); }
.score.over .score-bar i { background: var(--red); }
.score.bump .score-n { animation: scoreBump .5s cubic-bezier(.34, 1.56, .64, 1) var(--pd, 0ms) both; }
@keyframes scoreBump { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }

.tile.on { background: linear-gradient(180deg, #fff 0%, var(--gbg) 55%); box-shadow: 0 4px 14px color-mix(in srgb, var(--g) 28%, transparent); }
.tile.pop { animation: tilePop .55s cubic-bezier(.34, 1.56, .64, 1) var(--pd, 0ms) both; }
.tile.pop .check { animation: checkIn .45s cubic-bezier(.34, 1.8, .64, 1) calc(var(--pd, 0ms) + 80ms) both; }
.tile.pop::after { content: ""; position: absolute; inset: -2px; border-radius: 18px; border: 3px solid var(--g); animation: ring .6s ease-out var(--pd, 0ms) both; pointer-events: none; }
@keyframes tilePop { 0% { transform: scale(.92); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes checkIn { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.14); } }
.gt em { white-space: nowrap; }
.big-stats .balls { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: .35rem 0 .3rem; max-width: 380px; }
.big-stats .balls img { width: 100%; aspect-ratio: 1; display: block; }
.big-stats .balls img.used { filter: grayscale(1); opacity: .22; }
.tile .adh-chip { margin-top: .3rem; font-size: .68rem; font-weight: 900; color: var(--amber); background: var(--amber-bg); border: 1.5px dashed #e3a008; border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.access-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.access-list li { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sun); border-radius: 14px; padding: .65rem .8rem; box-shadow: var(--shadow); }
.access-list li.sent { border-left-color: var(--green); }
.access-list .grow { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .2rem; }
.access-list .meta { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.access-list .acts { display: flex; gap: .4rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--navy); }
.msg-preview { white-space: pre-wrap; font: inherit; font-size: .9rem; background: #e7fbe4; border-radius: 12px; padding: .8rem .9rem; margin: .7rem 0 0; color: var(--ink); }
.page-head .btn + .btn { margin-left: .4rem; }
.off-card { text-align: center; background: #fff; border: 2px dashed #e4b5b0; border-radius: 18px; padding: 1.4rem 1rem 1.2rem; margin-top: .4rem; box-shadow: var(--shadow); }
.off-card .off-ic { font-size: 2.6rem; line-height: 1; margin-bottom: .3rem; }
.off-card h2 { font-size: 1.6rem; color: var(--red); margin-bottom: .1rem; }
.off-motif { font-weight: 800; color: var(--navy); margin-bottom: .6rem; }
.off-card .msg-preview { text-align: left; max-width: 480px; margin: .8rem auto; }

/* ---------- onglets catégorie (Enfants) ---------- */
.cat-tabs { display: flex; gap: .4rem; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 5px; margin: 0 0 .4rem; box-shadow: var(--shadow); }
.ct { --g: var(--blue); --gbg: var(--sky); --gink: var(--navy); flex: 1; font: inherit; border: 0; background: transparent; border-radius: 12px; padding: .55rem .4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--muted); font-weight: 800; transition: background .15s, color .15s; }
.ct span { font-family: var(--display); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.ct em { font-style: normal; font-size: .75rem; font-weight: 900; min-width: 22px; padding: .05rem .4rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
.ct.on { background: var(--g); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--g) 35%, transparent); }
.ct.g23.on { color: var(--navy); }
.ct.on em { background: rgba(255, 255, 255, .85); color: var(--gink); }

/* ---------- cartes enfants ---------- */
.kcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: .65rem; }
.kcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .05rem; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 0 .6rem .7rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); overflow: hidden; transition: transform .12s, border-color .12s; }
.kcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 38px; background: var(--gbg); border-bottom: 3px solid var(--g); }
.kcard:hover { border-color: var(--g); transform: translateY(-2px); }
.kcard:active { transform: scale(.98); }
.kc-top { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; margin-top: 10px; }
.kc-top .chip { position: absolute; top: -4px; left: calc(100% + 4px); }
.kcard .av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--g); color: #fff; font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: .02em; border: 3px solid #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--g) 35%, transparent); }
.kcards.g23 .kcard .av { color: var(--navy); }
.kc-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--navy); margin-top: .3rem; line-height: 1.1; }
.kc-last { font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; line-height: 1.2; }
.kc-meta { font-size: .76rem; font-weight: 700; color: var(--gink); margin-top: .2rem; }
.kc-parent { display: flex; align-items: center; justify-content: center; gap: .3rem; width: 100%; margin-top: .45rem; padding: .3rem .4rem; background: var(--bg); border-radius: 10px; font-size: .78rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.kc-parent svg { width: 14px; height: 14px; fill: var(--blue); flex: none; }
.kc-parent i { font-style: normal; color: var(--muted); font-weight: 600; }
.kc-parent.none { color: var(--muted); font-weight: 600; }
.kc-parent.none svg { fill: var(--muted); }
.kc-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; margin-top: .45rem; }
@media (max-width: 380px) { .kcards { grid-template-columns: 1fr 1fr; gap: .5rem; } }

/* ---------- barre d'onglets principale ---------- */
.nav a.active { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(10, 111, 208, .3); }
.nav a.active:hover { background: var(--navy); color: #fff; }
@media (max-width: 760px) {
  .nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; gap: 4px; border: 1px solid rgba(219, 227, 238, .9); border-radius: 24px;
    background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(10, 58, 140, .2); }
  .nav a { border-radius: 18px; padding: .3rem .2rem .35rem; gap: .12rem; font-size: .68rem; font-weight: 800; color: var(--muted); box-shadow: none; }
  .nav a svg { width: 22px; height: 22px; padding: 5px 16px; box-sizing: content-box; border-radius: 999px; transition: background .2s, color .2s, transform .2s; }
  .nav a.active { background: transparent; color: var(--navy); box-shadow: none; font-weight: 900; }
  .nav a.active svg { background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; box-shadow: 0 4px 12px rgba(10, 111, 208, .35); transform: translateY(-1px); }
  .nav a.active:hover { background: transparent; color: var(--navy); }
  .nav a .badge { top: 0; right: calc(50% - 26px); border: 2px solid #fff; }
  .main { padding-bottom: 110px !important; }
  .endbar { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
.acc-h { display: flex; align-items: center; gap: .5rem; margin: 1.2rem 0 .5rem; font-size: 1.15rem; }
.acc-done > summary { list-style: none; cursor: pointer; }
.acc-done > summary::-webkit-details-marker { display: none; }
.acc-done > summary .acc-h::after { content: "▾"; color: var(--muted); font-size: .9rem; transition: transform .2s; }
.acc-done:not([open]) > summary .acc-h::after { transform: rotate(-90deg); }
.access-list li.acc-envoyer { border-left-color: var(--red); }
.access-list li.acc-relancer { border-left-color: var(--sun); }
.access-list li.acc-fait { border-left-color: var(--green); background: #fbfefc; }
.acc-name { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.acc-name b { font-family: var(--display); font-weight: 600; font-size: 1.08rem; color: var(--navy); }
.acc-kids, .acc-status { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.acc-kid { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; font-size: .88rem; }
.acc-kid i { width: 9px; height: 9px; border-radius: 50%; background: var(--g); }
.sum-grid .amber b { color: var(--amber); }
@media (max-width: 760px) { .topbar { position: static; padding-top: max(.4rem, env(safe-area-inset-top)); padding-bottom: .4rem; } }
.topbar .refresh-btn { margin-left: auto; }
@media (min-width: 761px) { .topbar .refresh-btn { margin-left: .6rem; } }

/* mode de paiement : gros boutons + encaissement SumUp sans contact */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }

.mode { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin: 0; padding: .55rem .3rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 800; font-size: .82rem; color: var(--ink); text-align: center; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode .mi { font-size: 1.35rem; line-height: 1; }
.mode:has(input:checked) { border-color: var(--blue); background: var(--sky); color: var(--navy); box-shadow: 0 0 0 2px rgba(10, 111, 208, .18); }
.mode.sumup:has(input:checked) { border-color: #111; background: #f2f2f2; color: #111; box-shadow: 0 0 0 2px rgba(0, 0, 0, .12); }
.sumup-box { margin-top: .6rem; background: #111; color: #fff; border-radius: 16px; padding: .85rem 1rem .8rem; }
.sumup-box .sb-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.sumup-box .sb-head span { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.sumup-box .sb-amt { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1; }
.sumup-box ol { margin: .6rem 0 0; padding-left: 1.2rem; font-size: .88rem; line-height: 1.4; }
.sumup-box li + li { margin-top: .2rem; }
.by-mode .bm { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.bm-i { font: inherit; text-align: left; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: .55rem .7rem; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; }
.bm-i span { font-size: .8rem; font-weight: 800; color: var(--muted); }
.bm-i b { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--navy); }
.bm-i.sumup { border-color: #111; }
.bm-i:hover { border-color: var(--blue-2); }
.chip.conf { background: #dff1ff; color: #0a5aa8; }
.tile.conf { border: 2px dashed #5aaee8; background: linear-gradient(180deg, #fff, #f0f8ff); }
