/* Mise en page : une feuille de mise en place (liste réglée) posée sur un plan inox ; la pastille du jour est le seul accent. */
:root {
  --bg: #E6EAEC; --paper: #FFFFFF; --well: #F0F3F4; --ink: #14181B; --ink2: #56626B; --line: #D0D8DD; --inv: #FFFFFF;
  --ok: #136C3D; --warn: #8A5200; --late: #B3261E; --scrim: rgba(12, 16, 19, .46);
  --d0: #14181B; --d0o: #FFFFFF; --d1: #1F6FD6; --d1o: #FFFFFF; --d2: #F2C200; --d2o: #14181B; --d3: #D9342B; --d3o: #FFFFFF;
  --d4: #7A4A2A; --d4o: #FFFFFF; --d5: #1B8A4B; --d5o: #FFFFFF; --d6: #F07D1A; --d6o: #14181B;
  --day: var(--d1); --on-day: var(--d1o);
  --disp: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101316; --paper: #1A1F23; --well: #242B30; --ink: #EEF1F2; --ink2: #9BA7AF; --line: #323B42; --inv: #14181B;
    --ok: #55CC8B; --warn: #F2AD46; --late: #FF7A70; --scrim: rgba(0, 0, 0, .6);
    --d0: #EEF1F2; --d0o: #14181B; --d1: #4F96F2; --d1o: #0C1116; --d2: #F5CB1D; --d2o: #0C1116; --d3: #F25A50; --d3o: #0C1116;
    --d4: #BC8659; --d4o: #0C1116; --d5: #42BC77; --d5o: #0C1116; --d6: #F7933B; --d6o: #0C1116; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101316; --paper: #1A1F23; --well: #242B30; --ink: #EEF1F2; --ink2: #9BA7AF; --line: #323B42; --inv: #14181B;
  --ok: #55CC8B; --warn: #F2AD46; --late: #FF7A70; --scrim: rgba(0, 0, 0, .6);
  --d0: #EEF1F2; --d0o: #14181B; --d1: #4F96F2; --d1o: #0C1116; --d2: #F5CB1D; --d2o: #0C1116; --d3: #F25A50; --d3o: #0C1116;
  --d4: #BC8659; --d4o: #0C1116; --d5: #42BC77; --d5o: #0C1116; --d6: #F7933B; --d6o: #0C1116; color-scheme: dark;
}
:root[data-day="0"] { --day: var(--d0); --on-day: var(--d0o) } :root[data-day="1"] { --day: var(--d1); --on-day: var(--d1o) }
:root[data-day="2"] { --day: var(--d2); --on-day: var(--d2o) } :root[data-day="3"] { --day: var(--d3); --on-day: var(--d3o) }
:root[data-day="4"] { --day: var(--d4); --on-day: var(--d4o) } :root[data-day="5"] { --day: var(--d5); --on-day: var(--d5o) }
:root[data-day="6"] { --day: var(--d6); --on-day: var(--d6o) }

@property --p { syntax: '<number>'; inherits: false; initial-value: 0 }
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 var(--text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent }
body.big { font-size: 18px }
h1, h2, h3, p { margin: 0 }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px }
.wrap { max-width: 660px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 148px; display: flex; flex-direction: column; gap: 18px }
.num, .qt, .stp b { font-variant-numeric: tabular-nums }

/* Barre du haut */
.top { max-width: 660px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding-block: 12px 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.mark { font: 800 26px/1 var(--disp); font-stretch: 76%; letter-spacing: .01em }
.kname { flex: 1; min-width: 0; color: var(--ink2); font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rf.turn svg { animation: sp .8s linear infinite }
.me { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--line); display: grid; place-items: center; font: 800 16px var(--disp) }

/* En-tête du jour */
.hero { display: flex; align-items: center; gap: 14px }
.hero-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px }
.hero .date { color: var(--ink2); font-size: .95em }
.hero h1 { font: 800 2.35em/1.02 var(--disp); font-stretch: 78%; letter-spacing: -.005em; text-wrap: balance }
.hero .sub { font-size: 1em }
.hero-m { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; border: 1.5px solid currentColor; font-weight: 700; font-size: .875em; white-space: nowrap }
.pill.ok { color: var(--ok) } .pill.warn { color: var(--warn) } .pill.late { color: var(--late) } .pill.mute { color: var(--ink2) }
.stick { flex: none; width: 112px; height: 112px; border-radius: 50%; padding: 7px; background: conic-gradient(var(--ink) calc(var(--p, 0) * 1%), var(--line) 0); transition: --p .4s }
.stick > span { width: 100%; height: 100%; border-radius: 50%; background: var(--day); color: var(--on-day); box-shadow: 0 0 0 4px var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center }
.stick b { font: 800 30px/1 var(--disp); font-stretch: 76%; letter-spacing: .02em }
.stick small { font-size: 13px; font-weight: 700; margin-top: 2px }
.stick.ready b { transform: rotate(-9deg); font-size: 31px }
.stick.stamp > span { animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) }
@keyframes stamp { 0% { transform: scale(1.7) rotate(14deg); opacity: 0 } 100% { transform: none; opacity: 1 } }

/* Sections et feuille */
.sec { display: flex; flex-direction: column; gap: 8px }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-inline: 2px }
.sec-h h2 { font: 800 1.3em/1.1 var(--disp); font-stretch: 80% }
.sec-h span, .sec-h button { color: var(--ink2); font-size: .9em }
.sec-h button { text-decoration: underline; text-underline-offset: 3px; min-height: 32px }
.paper { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden }
.paper > * + * { border-top: 1px solid var(--line) }
.pad { padding: 14px 16px }
.note { color: var(--ink2); font-size: .92em }
.lk.sm { min-height: 34px; font-size: .9em }
.lk { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px }

/* Ligne de tâche */
.row { display: flex; align-items: stretch; min-height: 68px }
.row .dot { flex: none; width: 56px; display: grid; place-items: center; position: relative }
.dot i { width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--ink2); display: grid; place-items: center; font: 800 17px/1 var(--disp); font-style: normal; color: transparent }
.row.doing .dot i { border-style: solid; border-color: var(--ink); background: radial-gradient(var(--ink) 34%, transparent 38%) }
.row.done .dot i { border: 0; background: var(--c, var(--day)); color: var(--co, var(--on-day)); transform: rotate(var(--r, -5deg)) }
.row.pop .dot i { animation: slap .34s cubic-bezier(.2, 1.3, .4, 1) }
@keyframes slap { 0% { transform: scale(2) rotate(calc(var(--r, -5deg) + 16deg)); opacity: 0 } 100% { transform: rotate(var(--r, -5deg)); opacity: 1 } }
.dot .pts { position: absolute; left: 50%; top: 4px; font: 800 15px var(--disp); color: var(--ink); animation: rise .9s ease-out forwards; pointer-events: none }
@keyframes rise { 0% { transform: translate(-50%, 6px); opacity: 0 } 25% { opacity: 1 } 100% { transform: translate(-50%, -22px); opacity: 0 } }
.row .rb { flex: 1; min-width: 0; padding: 11px 6px 11px 0; display: flex; flex-direction: column; gap: 2px; justify-content: center }
.nm { font-weight: 700; font-size: 1.06em; line-height: 1.25; overflow-wrap: anywhere }
.nm span { background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 56% / 0 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone }
.row.done .nm { color: var(--ink2); font-weight: 400 }
.row.done .nm span { background-size: 100% 2.5px }
.row.pop .nm span { animation: strike .3s ease-out }
@keyframes strike { 0% { background-size: 0 3px } 100% { background-size: 100% 2.5px } }
.qt { font-weight: 800; font-size: 1.12em }
.qt small { font-weight: 400; font-size: .82em; color: var(--ink2); margin-left: 4px }
.row.done .qt { display: none }
.mt { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink2); font-size: .86em }
.mt .hot { color: var(--late); font-weight: 700 }
.row .fi, .row .pl { flex: none; align-self: center; height: 44px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; display: grid; place-items: center }
.row .fi { padding: 0 12px; border-radius: 10px 0 0 10px; font-size: .92em }
.row .pl { width: 44px; border-left: 0; border-radius: 0 10px 10px 0; margin-right: 10px; font: 400 24px/1 var(--disp) }
.row .pl.solo { border-left: 1.5px solid var(--line); border-radius: 10px }
.row.big { min-height: 86px }
.row.big .nm { font-size: 1.2em }
.row.big .qt { font-size: 1.3em }

/* Boutons, champs, pastilles */
.btn { min-height: 52px; padding: 0 20px; border-radius: 12px; background: var(--ink); color: var(--inv); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink) }
.btn.soft { background: var(--well); color: var(--ink) }
.btn.day { background: var(--day); color: var(--on-day) }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .94em }
.btn.block { width: 100% }
.btn[disabled] { opacity: .45; pointer-events: none }
.btn.danger { background: transparent; color: var(--late); border: 1.5px solid var(--late) }
.acts { display: flex; flex-wrap: wrap; gap: 10px }
.acts > .btn { flex: 1 1 150px }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none }
.chips.scroll::-webkit-scrollbar { display: none }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: .92em; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none }
.chip.on { background: var(--ink); color: var(--inv); border-color: var(--ink) }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; background: var(--well); font-size: .84em; font-weight: 600; white-space: nowrap }
.tag.alg { background: transparent; border: 1.5px solid var(--ink) }
.tag.sea { background: var(--day); color: var(--on-day) }
.tags { display: flex; flex-wrap: wrap; gap: 6px }
.sdot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: var(--co); font: 800 12px/22px var(--disp); text-align: center; display: inline-block; flex: none }
.sdot.hollow { background: transparent; border: 2px dashed var(--ink2); color: var(--ink2); line-height: 18px }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--well); border-radius: 12px; padding: 4px; gap: 4px }
.seg button { min-height: 42px; border-radius: 9px; font-weight: 700; font-size: .94em; text-align: center; color: var(--ink2) }
.dsw button { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 56px; text-align: left }
.dsw button > span:last-child { display: flex; flex-direction: column; line-height: 1.2 }
.dsw small { font-weight: 400; color: var(--ink2); font-size: .82em }
.dsw .sdot { width: 30px; height: 30px; line-height: 30px; font-size: 13px }
.dsw button:not(.on) .sdot { background: transparent; border: 2px dashed var(--ink2); color: var(--ink2); line-height: 26px }
.alg-l { font-size: .84em }
.chip .live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none }
.chip.on .live { box-shadow: 0 0 0 2px var(--inv) }
.alg-l b { font-weight: 700; color: var(--ink) }
.algband { border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px }
.algband.warn { border-color: var(--warn) }
.algband .tags { gap: 6px }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line) }
.field { display: flex; flex-direction: column; gap: 5px }
.field > span { font-weight: 700; font-size: .9em }
.field small { color: var(--ink2); font-size: .84em }
.in, textarea.in, select.in { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink) }
textarea.in { min-height: 120px; resize: vertical; line-height: 1.45 }
.in:focus { border-color: var(--ink); outline: 0 }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.stp { display: inline-flex; align-items: center; gap: 4px }
.stp button { width: 52px; height: 52px; border-radius: 12px; background: var(--well); font: 400 28px/1 var(--disp); display: grid; place-items: center }
.stp button:nth-child(2) { width: auto; min-width: 78px; padding: 0 4px; background: none; font: inherit }
.stp b { display: block; text-align: center; font-size: 1.2em; white-space: nowrap }
.stp.xl b { font: 800 4em/1 var(--disp); font-stretch: 78%; min-width: 130px }
.stp.xl button { width: 64px; height: 64px }
.stp.xl button:nth-child(2) { width: auto; min-width: 150px; height: auto }
.li { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; width: 100% }
.li .gr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px }
.li .t { font-weight: 700; overflow-wrap: anywhere }
.li .s { color: var(--ink2); font-size: .88em }
.li .r { flex: none; color: var(--ink2); font-size: .92em; text-align: right }
.li .r b { color: var(--ink); font-size: 1.06em }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line) }
.kv:last-child { border-bottom: 0 }
.kv b { text-align: right }
.kv b.num { white-space: nowrap }
.kv .x { color: var(--ink2); font-weight: 400 }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 8px; line-height: 1.45 }
.steps li::before { content: counter(s); font: 800 1.25em/1.15 var(--disp); color: var(--ink2) }
.banner { background: var(--paper); border: 1.5px dashed var(--ink2); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px }
.alert { display: flex; gap: 10px; align-items: center; padding: 12px 16px; min-height: 52px; width: 100% }
.alert::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none }
.alert.red::before { background: var(--late) }
.week { display: flex; gap: 8px; flex-wrap: wrap }
.week .sdot { width: 34px; height: 34px; line-height: 34px; font-size: 15px }
.week .sdot.hollow { line-height: 30px }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px }
.badge { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--paper) }
.badge b { font: 800 1.08em/1.15 var(--disp); font-stretch: 82% }
.badge span { font-size: .84em; color: var(--ink2) }
.badge.off { opacity: .55; border-style: dashed }
.badge.on { border-color: var(--ink) }
.empty { text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 22px 18px }
.empty h2 { font: 800 1.6em/1.08 var(--disp); font-stretch: 80%; text-wrap: balance }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px }
.tiles.four { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) }
.tiles.five { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) }
.tile { border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 14px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 3px; text-align: left }
.tile b { font-weight: 700; line-height: 1.2 }
.tile span { font-size: .84em; color: var(--ink2); line-height: 1.3 }
.tile.on { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--well) }
.ob-hero { display: flex; flex-direction: column; gap: 12px; padding-block: 18px 6px }
.ob-hero h1 { font: 800 2.6em/1.02 var(--disp); font-stretch: 76%; text-wrap: balance }
.ob-hero p { font-size: 1.05em; max-width: 34em }
.ob-mark { align-self: flex-start; background: var(--day); color: var(--on-day); font: 800 22px/1 var(--disp); font-stretch: 76%; padding: 10px 12px; border-radius: 50%; transform: rotate(-8deg) }
.ob-points { display: grid; gap: 10px }
.ob-acts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 6px }
.ob-acts .btn { width: 100% }
.ob-points > div { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--day); padding: 2px 0 2px 12px }
.ob-points span { color: var(--ink2); font-size: .94em }
.ob-svc { display: grid; grid-template-columns: 1fr 120px 100px auto; gap: 10px; align-items: end }
.ob-svc > b { align-self: center }
.ob-sum .kv b { font-weight: 700 }
.acc { display: flex; flex-direction: column; gap: 10px }
.acc h3 { font: 800 1.15em/1.1 var(--disp); font-stretch: 80% }
@media (max-width: 480px) { .ob-svc { grid-template-columns: 1fr 1fr } .ob-svc > b { grid-column: 1 / -1 } }
.wz-h { display: flex; flex-direction: column; gap: 6px }
.wz-h h1 { font: 800 2em/1.05 var(--disp); font-stretch: 78%; text-wrap: balance }
.wz-p { display: flex; gap: 6px }
.wz-p i { flex: 1; height: 6px; border-radius: 3px; background: var(--line) }
.wz-p i.on { background: var(--ink) }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) }
.bar > div { max-width: 628px; margin: 0 auto; display: flex; gap: 10px }
.bar .btn { flex: 1 }
.bar .btn.ghost { flex: 0 0 auto }

/* Onglets et bouton + */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line); padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)) }
.tabs > div { max-width: 644px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr) }
.tabs button { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink2); font-size: 12.5px; font-weight: 700; position: relative }
.tabs button.on { color: var(--ink) }
.tabs button.on::after { content: ""; position: absolute; top: 2px; right: calc(50% - 22px); width: 9px; height: 9px; border-radius: 50%; background: var(--day); box-shadow: 0 0 0 2px var(--paper) }
.tabs svg, .ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none }
.fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(82px + env(safe-area-inset-bottom, 0px)); z-index: 21; width: 60px; height: 60px; border-radius: 50%; background: var(--day); color: var(--on-day); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--bg); font: 400 36px/1 var(--disp) }

/* Volets */
.shw { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center }
.sh { background: var(--paper); width: 100%; max-width: 660px; max-height: 94%; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .22s ease-out }
.sh.tall { height: 94% }
@keyframes up { from { transform: translateY(24px); opacity: 0 } }
.sh-h { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line) }
.sh-h h2 { flex: 1; min-width: 0; font: 800 1.3em/1.12 var(--disp); font-stretch: 80%; overflow-wrap: anywhere }
.sh-h button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; flex: none }
.sh-b { flex: 1; min-height: 0; overflow-y: auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain }
.sh-b > * { flex: none }
.banner .acts > .btn { flex: 0 0 auto }
.sh-f { border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 10px }
.sh-f .btn { flex: 1 }
.menu { display: flex; flex-direction: column }
.menu button { min-height: 58px; padding: 8px 4px; display: flex; align-items: center; gap: 14px; font-weight: 700; border-bottom: 1px solid var(--line); width: 100% }
.menu button:last-child { border-bottom: 0 }
.menu button small { display: block; font-weight: 400; color: var(--ink2); font-size: .86em }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px }
.tbl table { border-collapse: collapse; font-size: .86em; min-width: 100% }
.tbl th, .tbl td { padding: 8px 9px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap }
.tbl th:first-child, .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); white-space: normal; min-width: 150px }
.tbl thead th { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; vertical-align: bottom; height: 110px; font-weight: 700 }
.tbl thead th:first-child { writing-mode: horizontal-tb; transform: none }
.tbl td b { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink) }

/* Mode cuisine */
.km { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); gap: 12px }
.km-h { display: flex; align-items: center; gap: 10px; color: var(--ink2) }
.km-h b { flex: 1; min-width: 0; color: var(--ink) }
.km-b { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; gap: 18px }
.km-n { font: 800 1.2em var(--disp); color: var(--ink2) }
.km-t { font: 700 clamp(1.7em, 6.4vw, 3em)/1.22 var(--text); text-wrap: balance }
.km-i { display: flex; flex-direction: column }
.km-i .kv { font-size: 1.25em }

#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--inv); padding: 12px 18px; border-radius: 12px; font-weight: 700; max-width: min(92vw, 520px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s }
#toast.on { opacity: 1 }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: sp .8s linear infinite; flex: none }
@keyframes sp { to { transform: rotate(360deg) } }

@media (min-width: 900px) {
  .shw { justify-content: flex-end; align-items: stretch }
  .sh, .sh.tall { max-width: 500px; max-height: none; height: 100%; border-radius: 0; border-left: 1px solid var(--line) }
  @keyframes up { from { transform: translateX(24px); opacity: 0 } }
  .shw { background: transparent; pointer-events: none }
  .sh { pointer-events: auto }
  body.has-sh .top, body.has-sh .wrap { margin-left: max(0px, calc((100vw - 500px - 660px) / 2)); margin-right: auto }
  body.has-sh .tabs, body.has-sh .bar { right: 500px }
  body.has-sh .fab { right: 516px }
}
@media (max-width: 380px) { .stick { width: 96px; height: 96px } .stick b { font-size: 26px } .hero h1 { font-size: 2.05em } .row .fi { padding: 0 9px } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }
body.calm *, body.calm *::before, body.calm *::after { animation: none !important; transition: none !important }

/* Chef à domicile : prestations et liste à emporter */
.pcard .sdot { width: 34px; height: 34px; line-height: 34px; font-size: 14px }
.pst-h { display: flex; flex-direction: column; gap: 6px }
.pst-h h3 { font: 800 1.5em/1.05 var(--disp); font-stretch: 78%; text-wrap: balance; margin-bottom: 4px }
.sel { user-select: all; -webkit-user-select: all; text-align: right; overflow-wrap: anywhere }
.pk-h { padding-block: 10px 2px; color: var(--ink2) }
.pk { min-height: 52px; text-align: left }
.pk .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink2); flex: none; position: relative }
.pk.on .box { background: var(--day); border-color: var(--day) }
.pk.on .box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-day); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) }
.pk.on .t { color: var(--ink2); font-weight: 400; text-decoration: line-through; text-decoration-thickness: 1.5px }
.ok-l { color: var(--ok) }
.ob-addr { font-weight: 700 }
/* Le passe */
.lp-new { display: flex; flex-direction: column; gap: 8px }
.lp-new textarea { resize: vertical; min-height: 64px }
.lp-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap }
.lp { align-items: flex-start }
.lp .lp-t { font-weight: 400; white-space: pre-wrap }
.lp.new { box-shadow: inset 3px 0 0 var(--day) }
.tabs .nb { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--late); color: var(--inv); font: 800 11px/18px var(--text); text-align: center }
.pk.pick.on .t { color: var(--ink); font-weight: 700; text-decoration: none }

/* Carte des allergènes : rappel et validation */
.algr { margin: 0; padding: 10px 14px; border-left: 4px solid var(--warn); background: var(--well); border-radius: 0 10px 10px 0; font-size: .9em; color: var(--ink2); display: flex; flex-direction: column; gap: 6px; align-items: flex-start }
.algr p { margin: 0 }
.algr b { color: var(--ink) }
.algr.ok { border-left-color: var(--ok) }
.algr .lk { margin: 0; padding: 0 }
.algr-s { font-size: .84em; color: var(--ink2) }
.sh-b .algr + .tbl { margin-top: 12px }

/* Version en ligne : connexion, invitations */
.auth-box { display: flex; flex-direction: column; gap: 12px }
.auth-box .btn { width: 100% }
.code-in { font: 800 1.6em/1 var(--disp); letter-spacing: .18em; text-align: center; font-variant-numeric: tabular-nums }
.inv-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-block: 6px 4px }
.qr { width: min(260px, 70vw); aspect-ratio: 1; background: #fff; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line) }
.qr svg { display: block; width: 100%; height: 100% }
.inv-code { font: 800 2em/1 var(--disp); letter-spacing: .12em; font-variant-numeric: tabular-nums }
.inv-link { font-size: .82em; color: var(--ink2); overflow-wrap: anywhere; margin-top: 6px }
.inline { display: flex; gap: 8px; align-items: center }
.inline .in { flex: 1; min-width: 0 }
.match { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--paper); border: 1.5px solid var(--ink); margin-top: 10px }
.match .field { width: 100% }
#fd-res .match .btn.day { width: 100% }
.fd-none { margin-top: 10px; display: flex; flex-direction: column; gap: 6px }
/* Suggestions d'adresse */
.ps { display: flex; flex-direction: column; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); overflow: hidden; margin-top: 6px }
.ps-o { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 11px 14px; background: none; border: 0; color: inherit; font: inherit; min-height: 48px }
.ps-o + .ps-o { border-top: 1px solid var(--line) }
.ps-o span { color: var(--ink2); font-size: .88em }
.ps-o em { font-style: normal; font-weight: 700; color: var(--ink) }
.ps-o:hover, .ps-o:focus-visible { background: var(--well); outline: none }
.ps-g { margin: 0; padding: 6px 14px; border-top: 1px solid var(--line); font-size: .78em; color: var(--ink2); text-align: right }
.banner.wait { border-style: dashed }
.rq-note { font-weight: 700 }
/* Connexion avec Apple et Google (logos officiels à déposer dans app/brand/, voir README) */
.sso { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; border-radius: 12px; font-weight: 700 }
.sso-logo { width: 20px; height: 20px; flex: none }
.sso-apple { background: #000; color: #fff; border: 1.5px solid #000 }
.sso-google { background: #fff; color: #1f1f1f; border: 1.5px solid #747775 }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: .9em; margin: 4px 0 }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.del-plan { display: flex; flex-direction: column; gap: 8px }
.auth-box > * + * { border-top: 0 }
.auth-box > small { margin-top: 2px }

/* Hors ligne */
.net { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--well); border: 1.5px dashed var(--ink2); font-size: .92em; color: var(--ink2) }
.net b { color: var(--ink) }

/* Pages légales */
.legal-l { text-align: center; margin-top: 8px }
.legal-l a { color: inherit; text-underline-offset: 3px }

/* Offres */
.plan-row { margin-top: 18px } .plan-row h3 { font-size: .95em; color: var(--ink2); margin: 0 0 8px; font-weight: 600 }
.plan-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px }
.plan { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.plan.on { border-color: var(--ink); border-width: 2px }
.plan.ia { border-color: var(--d2) }
.plan.ia.on { border-color: var(--ink) }
.plan-h { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; flex-wrap: wrap }
.plan-p { font: 800 1.35em/1.1 'Bricolage Grotesque', system-ui, sans-serif } .plan-p small { font: 400 .55em system-ui; color: var(--ink2) }
.plan ul { margin: 0; padding-left: 18px; font-size: .88em; color: var(--ink2) } .plan li + li { margin-top: 2px }
.plan-t { font-size: .84em; font-weight: 700; color: var(--ok) }
.banner.warn-b { border-color: var(--warn); border-style: solid }
.sh-b .seg + .plan-row { margin-top: 12px }
.cfg-l { text-align: left; margin: 12px auto; max-width: 34em; display: grid; gap: 8px }
