/* Alder — app des parents.
 * 0.12.0 : image de marque (vert forêt, crème, sauge, ambre, cordon corail).
 * Polices hébergées ici (licence OFL, voir licences-polices/) : Fredoka pour les titres,
 * Nunito Sans pour le texte. Rien n'est chargé chez Google.
 */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/app/fredoka-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/app/fredoka-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/app/nunitosans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/app/nunitosans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F8F3EA; --card: #FFFDF8; --ink: #173E2D; --ink2: #3A4F44; --mute: #4F5D55;
  --line: #E8E0D0; --line2: #D9D1C1; --field: #8C8473; --off: #D9D1C1; --off-ink: #4F5D55;
  --accent: #173E2D; --accent-ink: #0E2A1E; --soft: #E3EBD8; --soft-ink: #173E2D;
  --ok-bg: #E3EBD8; --ok: #2E6A4D; --warn-bg: #FBE3D7; --warn: #A2401C;
  --bad-bg: #FBE3D7; --bad: #B4471F; --bad-ink: #A2401C; --violet-bg: #FCEBCB; --violet: #7A4300;
  --forest: #173E2D; --forest2: #2E5643; --night: #0E2A1E; --cream: #F8F3EA; --sage: #CAD5BA;
  --amber: #EA950B; --coral: #F47C4D; --peach: #F49A74; --rose: #EEC6C9; --grey-bg: #ECE6DA;
  --round: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 16px;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); }
.screen.with-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

h1 { margin: 0; font-family: var(--round); font-weight: 600; font-size: 29px; line-height: 1.15; }
h2 { margin: 0; font-family: var(--round); font-weight: 600; font-size: 19px; line-height: 1.2; }
p { margin: 0; }
.lead { font-size: 17px; color: var(--ink2); max-width: 320px; }
.text { font-size: 15px; color: var(--ink2); }
.hint { font-size: 13px; color: var(--mute); margin-top: -6px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--mute); }
.small { font-size: 13px; color: var(--mute); }
.label, label { font-size: 15px; font-weight: 600; }

/* Barre du haut et progression */
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.bar .step { font-size: 13px; font-weight: 600; color: var(--off-ink); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: -4px; }
.progress span { height: 6px; border-radius: 999px; background: var(--off); }
.progress span.on { background: var(--accent); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px;
  padding: 0 18px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card);
  color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--cream); font-weight: 800; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.primary:disabled { background: var(--off); border-color: var(--off); color: var(--off-ink); cursor: not-allowed; }
.btn.dashed { border: 2px dashed var(--coral); background: transparent; color: var(--ink); min-height: 48px; font-size: 15px; font-weight: 800; border-radius: 18px; }
.btn.dashed svg { color: var(--coral); stroke-width: 2.6; }
.btn.link { border: 0; background: transparent; color: var(--accent); min-height: 44px; font-size: 15px; padding: 0 4px; align-self: center; }
.btn.back { border: 0; background: transparent; color: var(--accent); min-height: 44px; padding: 0; font-size: 15px; gap: 4px; }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 14px; }
.btn.quiet { color: var(--bad); border-color: var(--line2); }
.btn:disabled { cursor: not-allowed; opacity: .75; }

/* Champs */
input[type=text], input[type=email], input:not([type]), input[inputmode] {
  min-height: 52px; width: 100%; padding: 0 16px; border: 1.5px solid var(--field); border-radius: 14px;
  background: var(--card); font-size: 17px; color: var(--ink); }
input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--sage); }
input.code { font-size: 24px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 15px; line-height: 1.45;
  padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--grey-bg); border-radius: 16px; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 11px; background: transparent;
  color: var(--off-ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 1px 3px rgba(23, 62, 45, .18); }

/* Écrans centrés (bienvenue, courriel envoyé, fin) */
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px 0; }
.logo { width: 96px; height: 96px; border-radius: 28px; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.brand { font-size: 34px; }
.brand-logo { display: block; width: 240px; max-width: 70vw; height: auto; }
.mini-logo { display: block; height: 34px; width: auto; }
.center { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 24px; text-align: center; }
.badge { width: 88px; height: 88px; border-radius: 999px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* Pastilles des enfants (inscription) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 6px 0 14px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line2); font-size: 15px; font-weight: 600; }
.chip.fixed { padding-right: 14px; background: var(--soft); border-color: var(--sage); color: var(--soft-ink); }
.chip .num { font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.chip.fixed .num { color: var(--soft-ink); }
.chip button { width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--off-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.note { display: flex; gap: 10px; padding: 14px; border-radius: 14px; background: var(--soft); color: var(--soft-ink); font-size: 14px; line-height: 1.45; }
.note svg { flex-shrink: 0; margin-top: 1px; }
.error { padding: 12px 14px; border-radius: 14px; background: var(--bad-bg); color: var(--bad-ink); font-size: 14px; line-height: 1.45; font-weight: 600; }

/* Accueil */
.home-head { display: flex; flex-direction: column; gap: 2px; }
.home-head h1 { font-size: 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card.invite { background: var(--violet-bg); border-color: #F1D9A8; border-radius: 22px; }
.avatar { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-family: var(--round); font-weight: 600; font-size: 21px; flex-shrink: 0; color: var(--ink); }
.av0 { background: var(--amber); } .av1 { background: var(--sage); }
.av2 { background: var(--peach); } .av3 { background: var(--rose); }
.nw { white-space: nowrap; }
.sub { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.pill.en_ligne { background: var(--ok-bg); color: var(--ok); }
.pill.hors_ligne { background: var(--grey-bg); color: var(--off-ink); }
.pill.aucun { background: var(--warn-bg); color: var(--warn); }
.pill.inconnu { background: var(--grey-bg); color: var(--off-ink); }
.soon-note { font-size: 13px; color: var(--mute); text-align: center; }

/* Réglages */
.settings h2 { font-size: 17px; }
.kid-row { display: flex; gap: 8px; align-items: center; }
.kid-row .sub { width: 76px; text-align: right; flex-shrink: 0; }
.version { font-size: 12px; color: var(--mute); text-align: center; }

/* Navigation du bas */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--bg);
  border-top: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs .inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 480px; }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px;
  border: 0; border-radius: 16px; background: transparent; color: var(--mute); font-size: 12px; font-weight: 700; cursor: pointer; min-height: 56px; }
.tabs button[aria-current="page"] { background: var(--sage); color: var(--ink); font-weight: 800; }
.tabs button.later { color: var(--mute); }
.tabs .later small { font-size: 10px; font-weight: 600; }

#toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #FFFFFF; padding: 10px 16px; border-radius: 12px; max-width: calc(100vw - 32px);
  font-size: 15px; z-index: 10; box-shadow: 0 8px 24px rgba(16, 24, 40, .28); }
.spinner { margin: 40vh auto 0; width: 32px; height: 32px; border-radius: 999px; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* --- 0.5.0 : listes, contacts, touches, interrupteurs ------------------------------------ */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 0;
  border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.list > .item:first-child { border-top: 0; }
.item.static { cursor: default; }
.item .avatar { width: 40px; height: 40px; font-size: 17px; }
.item-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
.item .btn.small { min-height: 40px; padding: 0 12px; flex-shrink: 0; }
.chev { color: var(--field); display: inline-flex; flex-shrink: 0; }
.key { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--forest); color: var(--cream);
  font-family: var(--round); font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.always { color: var(--violet); display: inline-flex; flex-shrink: 0; }
.pill.blocked { background: var(--bad-bg); color: var(--bad-ink); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 0 auto; padding: 0 12px; }
.chip.add { padding: 0 14px 0 10px; cursor: pointer; color: var(--accent); }
.card.tap { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.card.tap:active { background: #F4EEE2; }

.switch { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0; border: 0;
  background: transparent; text-align: left; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--ink); }
.switch .knob { width: 50px; height: 30px; border-radius: 999px; background: var(--off); position: relative; flex-shrink: 0; transition: background .15s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px;
  background: var(--card); box-shadow: 0 1px 3px rgba(23, 62, 45, .3); transition: transform .15s; }
.switch[aria-checked="true"] .knob { background: var(--accent); }
.switch[aria-checked="true"] .knob::after { transform: translateX(20px); }
.switch:disabled { cursor: default; opacity: .7; }

.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keys button { min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--card);
  font-family: var(--round); font-weight: 600; font-size: 22px; cursor: pointer; color: var(--ink); }
.keys button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.keys button:disabled { background: var(--grey-bg); border-color: var(--grey-bg); color: var(--mute); cursor: not-allowed; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.radio { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line);
  background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.list > .radio:first-child { border-top: 0; }
.radio .grow { display: flex; flex-direction: column; gap: 2px; }
.radio .dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--field); flex-shrink: 0; margin-top: 1px; }
.radio[aria-checked="true"] .dot { border: 7px solid var(--accent); }
.radio:disabled { cursor: not-allowed; opacity: .6; }
.big-num { font-family: var(--round); font-weight: 600; font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.card.share { background: var(--ok-bg); border-color: var(--sage); }
.card.share input { font-size: 14px; }
.check input[type=checkbox] + span { font-weight: 600; }
.item.wrap { flex-wrap: wrap; row-gap: 8px; }
.item .actions { display: flex; gap: 8px; width: 100%; padding-left: 52px; }

/* --- 0.6.0 : amis entre familles ------------------------------------------------------- */
.card.req { padding: 14px 16px; }
.link-text { color: var(--accent); font-weight: 600; font-size: 14px; }
.card.center { align-items: center; text-align: center; }
.card.center .btn { align-self: stretch; }
.card.center .btn.link { align-self: center; }
.badge-ok, .badge-no { width: 72px; height: 72px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.badge-ok { background: var(--soft); color: var(--accent); }
.badge-no { background: var(--grey-bg); color: var(--off-ink); }
.badge-no svg { width: 36px; height: 36px; }
.tile { width: 72px; height: 72px; border-radius: 20px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tile svg { width: 38px; height: 38px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 14px; font-weight: 600; }
.or span { flex: 1; height: 1px; background: var(--off); }
.h2like { font-family: var(--round); font-weight: 600; font-size: 19px; }
input.code { font-size: 20px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
video.scan { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #000; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.link.start { align-self: flex-start; padding: 0; }
.btn.link.danger { color: var(--bad); }
.note-card { background: var(--ok-bg); border-color: var(--sage); padding: 12px 16px; }
.pair { display: flex; align-items: center; gap: 12px; color: var(--mute); }
.pair .avatar { width: 64px; height: 64px; font-size: 28px; }
.big-text { font-family: var(--round); font-weight: 600; font-size: 20px; line-height: 1.3; margin: 0; }
.facts { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0;
  padding-top: 14px; border-top: 1px solid var(--line); text-align: left; font-size: 14px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; font-weight: 600; }

/* Carte d'ami (écran et impression) */
.card.cut { padding: 8px; border: 2px dashed var(--field); border-radius: 24px; }
.fcard { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); }
.fcard-head { background: var(--forest); color: var(--cream); padding: 14px 18px; display: flex; align-items: center;
  justify-content: space-between; font-family: var(--round); font-weight: 600; font-size: 22px; }
.fcard-body { padding: 18px; display: flex; align-items: center; gap: 16px; }
.fcard-name { font-family: var(--round); font-weight: 600; font-size: 34px; line-height: 1.05; overflow-wrap: break-word; }
.fcard-num { font-family: var(--round); font-weight: 600; font-size: 26px; letter-spacing: .04em; color: var(--ok); margin-top: 4px; white-space: nowrap; }
.fcard-label { font-size: 13px; color: var(--mute); margin-top: 6px; }
.fcard-code { font-size: 18px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
.fcard .qr { width: 116px; height: 116px; flex-shrink: 0; }
.fcard-note { margin: 0; padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.45; color: var(--mute); }

#print { display: none; }
@media print {
  @page { size: letter; margin: 12mm; }
  html, body { background: #FFFFFF; }
  body > *:not(#print) { display: none !important; }
  #print { display: block; }
  #print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .sheet .cut { border: 1px dashed #8C8473; border-radius: 4mm; padding: 2mm; break-inside: avoid; }
  .sheet .fcard-head { font-size: 15px; padding: 8px 12px; }
  .sheet .fcard-body { padding: 10px 12px; gap: 10px; }
  .sheet .fcard-name { font-size: 24px; }
  .sheet .fcard-num { font-size: 18px; }
  .sheet .fcard-code { font-size: 14px; }
  .sheet .fcard .qr { width: 26mm; height: 26mm; }
  .sheet .fcard-note { font-size: 9px; padding: 6px 12px 8px; }
  .plist-title { font-family: var(--round); font-weight: 600; font-size: 30px; margin: 0 0 6mm; }
  .plist-me { font-size: 20px; margin: 0 0 8mm; }
  .plist table { width: 100%; border-collapse: collapse; font-size: 24px; }
  .plist td { padding: 4mm 3mm; border-bottom: 1px solid #D9D1C1; }
  .plist td.k { width: 18mm; }
  .plist td.k span { display: inline-flex; width: 13mm; height: 13mm; align-items: center; justify-content: center;
    border: 2px solid #173E2D; border-radius: 3mm; font-weight: 800; }
  .plist td.n { font-weight: 700; }
  .plist td.p { text-align: right; color: #3A4F44; }
  .plist-how { font-size: 18px; margin-top: 8mm; }
}

/* --- 0.7.0 : heures calmes, Pause, voix ------------------------------------------------ */
textarea, input[type=time], input[type=date] { width: 100%; border: 1.5px solid var(--field); border-radius: 14px; background: var(--card);
  font: inherit; font-size: 17px; color: var(--ink); }
input[type=time], input[type=date] { min-height: 52px; padding: 0 12px; }
textarea { padding: 12px 14px; min-height: 72px; line-height: 1.4; resize: vertical; }
textarea:focus, input[type=time]:focus, input[type=date]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--sage); }
textarea::placeholder { color: #6E6A5E; }
.stack.tight { gap: 6px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days button { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--card);
  font-weight: 700; font-size: 15px; cursor: pointer; color: var(--ink); }
.days button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--cream); }

.tl { display: flex; flex-direction: column; gap: 4px; }
.tl-bar { position: relative; height: 16px; border-radius: 8px; background: #EDE6D8; overflow: hidden; }
.tl-seg { position: absolute; top: 0; bottom: 0; }
.tl-seg.k_sleep { background: var(--amber); } .tl-seg.k_homework { background: #8FA77A; }
.tl-seg.k_meal { background: var(--peach); } .tl-seg.k_other { background: #B5AC98; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.tl-hours { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--mute); font-variant-numeric: tabular-nums; }

.qicon { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qicon.k_sleep, .qicon.s_calme { background: var(--amber); color: var(--ink); }
.qicon.k_homework { background: var(--sage); color: var(--ink); }
.qicon.k_meal { background: var(--peach); color: var(--ink); }
.qicon.k_other, .qicon.s_libre { background: var(--grey-bg); color: var(--ink); }
.qicon.s_pause { background: var(--warn-bg); color: var(--warn); }
.qrule { gap: 6px; }
.qrule.off .qicon, .qrule.off .item-title, .qrule.off .sub { opacity: .6; }
.switch.mini { width: auto; flex-shrink: 0; }
.qform { gap: 12px; }
.qform .seg button { font-size: 14px; }
.vrow { display: flex; flex-direction: column; gap: 6px; margin-top: -4px; }
.vlabel { font-size: 13px; font-weight: 600; color: var(--mute); }
.vbtns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vrow .btn.small { min-height: 40px; padding: 0 12px; gap: 6px; font-size: 14px; }
.vrow.rec { padding: 10px 12px; border-radius: 14px; background: var(--bad-bg); color: var(--bad-ink); font-weight: 600; margin-top: 0; }
.rec-hint { font-size: 13px; font-weight: 500; line-height: 1.4; }
.recdot { width: 12px; height: 12px; border-radius: 999px; background: var(--bad); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .recdot { animation: none; } }
details.card summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "+"; font-size: 22px; color: var(--coral); font-weight: 800; }
details.card[open] summary::after { content: "–"; }
details.card:not([open]) { gap: 0; }
h2.row { gap: 8px; }

/* Accueil : carte d'un enfant avec son état et la Pause */
.card.kid { gap: 12px; }
.kid-main { display: block; width: 100%; }
.kid-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.kid-q .btn.small { min-height: 40px; padding: 0 12px; gap: 6px; margin-left: auto; }
.qstate { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--off-ink); margin: 0; }
.qstate.s_calme { color: var(--violet); }
.qstate.s_pause { color: var(--warn); }
.pause-pick { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pause-pick .grid2 { grid-template-columns: repeat(3, 1fr); }
.pause-pick .grid2 .btn:last-child { grid-column: 1 / -1; }
.card.avis { background: var(--violet-bg); border-color: #F1D9A8; }
.card.avis .qicon { background: var(--card); }
.avis-actions { display: flex; flex-direction: column; gap: 2px; }

/* --- 0.8.0 : appels dans l'app ------------------------------------------------------------- */
.kid-btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.kid-q .kid-btns .btn.small { margin-left: 0; }
.call-btn { gap: 6px; }
.btn.small.call-btn { color: var(--ink); border-color: var(--forest); }
.btn.primary.call-btn { background: var(--forest); border-color: var(--forest); color: var(--cream); }

.call { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; overflow: hidden;
  background: var(--night); color: var(--cream);
  padding: max(40px, calc(16px + env(safe-area-inset-top))) 28px max(40px, calc(16px + env(safe-area-inset-bottom))); }
body.in-call { overflow: hidden; }
.call-box { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 380px; text-align: center; }
.call-logo { display: block; height: 40px; width: auto; }
.call-ring { position: relative; margin-top: clamp(24px, 8vh, 64px); width: 168px; height: 168px; border-radius: 999px;
  border: 6px solid var(--coral); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.call-ring::before { content: ""; position: absolute; inset: -22px; border-radius: 999px; border: 2px solid rgba(244, 124, 77, .35); }
.avatar.big { width: 140px; height: 140px; border-radius: 999px; font-size: 64px; font-weight: 600; }
.call-box h1 { color: var(--cream); font-size: 40px; line-height: 1.1; margin: clamp(20px, 4.5vh, 36px) 0 0; overflow-wrap: anywhere; }
.call-status { margin: 8px 0 0; font-size: 18px; font-weight: 700; color: var(--sage); min-height: 26px; font-variant-numeric: tabular-nums; }
.call-sub { margin: 6px 0 0; font-size: 15px; color: var(--sage); }
.call-fill { flex: 1; min-height: 150px; }
.call-bottom { position: relative; width: 100%; min-height: 114px; }
.call-cord { position: absolute; left: 50%; bottom: calc(100% + 20px); width: 390px; height: 140px; margin-left: -195px;
  overflow: visible; pointer-events: none; }
.call-actions { position: relative; display: flex; justify-content: space-around; align-items: flex-start; }
.call-act { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 106px; font-size: 15px; line-height: 1.25; font-weight: 800; }
.call-act span { hyphens: manual; }
.round { width: 78px; height: 78px; border-radius: 999px; border: 0; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; background: var(--forest2); color: var(--cream); }
.round:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.round.on { background: var(--cream); color: var(--forest); }
.round.bad { background: var(--bad); color: var(--cream); }
.round.bad svg { transform: rotate(135deg); }
.round.ok { background: var(--sage); color: var(--forest); box-shadow: 0 0 0 10px rgba(202, 213, 186, .18); }
.call.s_incoming .round.ok { animation: callpulse 1.4s ease-in-out infinite; }
@keyframes callpulse { 50% { box-shadow: 0 0 0 16px rgba(202, 213, 186, .28); } }
@media (prefers-reduced-motion: reduce) { .call.s_incoming .round.ok { animation: none; } }
.call.s_ended .call-status { color: var(--cream); }
@media (max-height: 640px) { .call-ring { width: 128px; height: 128px; } .avatar.big { width: 104px; height: 104px; font-size: 48px; }
  .call-box h1 { font-size: 32px; } .call-fill { min-height: 120px; } }

/* 0.8.1 : mes données, supprimer mon compte */
.btn.bad { background: var(--bad); border-color: var(--bad); color: #FFFFFF; }
.btn.bad:disabled { background: var(--off); border-color: var(--off); color: var(--off-ink); }
.del-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink2); font-size: 15px; line-height: 1.45; }

/* 0.9.0 : « Papa → Zoé » dans les derniers appels */
.item-title .arrow { color: var(--mute); font-weight: 500; margin: 0 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 0.9.0 : mise en service d'un téléphone */
.pill.setup_attente { background: var(--warn-bg); color: var(--warn); }
.pill.setup_expire { background: var(--bad-bg); color: var(--bad-ink); }
.tile.small-tile { width: 44px; height: 44px; flex: none; }
ol.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink2); font-size: 15px; line-height: 1.45; }
.item-icon { display: inline-flex; color: var(--accent); margin-right: 2px; }
details.repair { margin-top: 2px; }
details.repair summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
details.repair[open] { display: grid; gap: 8px; }
.tile.small-tile svg { width: 24px; height: 24px; }

/* 0.10.0 : app native (Android) — état des notifications d'appel dans Réglages */
.native-status { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.native-row { gap: 10px; margin: 6px 0; align-items: center; }
.native-status .small { margin: 2px 0 8px; }

/* 0.11.0 : garde partagée */
.kid-custody { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.kid-custody .where { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; border: 0; background: none; padding: 0;
  font-size: 14px; font-weight: 600; color: var(--ok); cursor: pointer; text-align: left; }
.kid-custody .where.there { color: var(--warn); }
.kid-custody .where.both { color: var(--mute); }
.kid-custody .where svg { flex-shrink: 0; }
.where-now { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 700; font-size: 17px; color: var(--ok); }
.where-now.there { color: var(--warn); }
.where-now.both { color: var(--ink2); font-weight: 600; font-size: 16px; }
.where-now svg { flex-shrink: 0; }
.cal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-fields > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-fields input { width: 100%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 4px 0;
  border: 2px solid transparent; border-radius: 12px; font-size: 12px; cursor: pointer; }
.cal-cell b { font-size: 17px; }
.cal-cell.mine { background: var(--sage); color: var(--ink); }
.cal-cell.other { background: var(--violet-bg); color: var(--violet); }
.cal-cell:focus-visible { border-color: var(--accent); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
.cal-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 4px; vertical-align: -1px; }
.cal-legend .mine::before { background: var(--sage); border: 1px solid var(--ink); }
.cal-legend .other::before { background: var(--violet-bg); border: 1px solid var(--violet); }
/* 0.11.1 : vue des deux prochaines semaines */
.cal-grid.view { list-style: none; margin: 0; padding: 0; }
.cal-grid.view .cal-cell { cursor: default; }
.cal-cell.today { border-color: currentColor; }

/* --- 0.12.0 : image de marque ------------------------------------------------------------ */
/* Bandeau vert forêt en haut des écrans principaux, avec la vague crème. */
.band { position: relative; margin: calc(-20px - env(safe-area-inset-top)) -20px 0;
  padding: calc(20px + env(safe-area-inset-top)) 22px 46px; background: var(--forest); color: var(--cream); }
.band .wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 28px; display: block; }
.band .band-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.band .band-logo { display: block; height: 46px; width: auto; }
.band .eyebrow { margin-top: 16px; color: var(--sage); font-size: 15px; font-weight: 700; }
.band h1 { color: var(--cream); font-size: 31px; line-height: 1.1; }
.band .eyebrow + h1 { margin-top: 2px; }
.band .band-title { display: flex; align-items: center; gap: 12px; }
.band .round-back { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--forest2);
  color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.band .round-back svg { stroke-width: 2.4; }
.band :focus-visible { outline-color: var(--cream); }
.band .seg { margin-top: 14px; background: var(--forest2); }
.band .seg button { color: var(--cream); font-size: 16px; font-weight: 700; min-height: 40px; }
.band .seg button[aria-pressed="true"] { background: var(--cream); color: var(--ink); font-weight: 800; box-shadow: none; }
.band + * { margin-top: -6px; }

/* Accueil : une tuile de couleur par enfant */
.kids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kids.one { grid-template-columns: minmax(0, 1fr); }
.kid-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 196px; padding: 16px; border-radius: 26px;
  background: var(--amber); color: var(--ink); }
.kid-tile.t1 { background: var(--sage); } .kid-tile.t2 { background: var(--peach); } .kid-tile.t3 { background: var(--rose); }
.kid-tile.wide { grid-column: 1 / -1; }
.kid-tile .tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.kid-tile .tile-av { width: 54px; height: 54px; border-radius: 999px; background: var(--cream); display: flex; align-items: center;
  justify-content: center; font-family: var(--round); font-weight: 600; font-size: 25px; flex-shrink: 0; }
.kid-tile .state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; text-align: right; line-height: 1.2; }
.kid-tile .state::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 999px; box-sizing: border-box; border: 2px solid currentColor; }
.kid-tile .state.en_ligne::before { background: currentColor; }
.kid-tile h2 { font-size: 24px; margin-top: 4px; overflow-wrap: anywhere; }
.kid-tile .tile-num { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kid-tile .qstate { color: var(--ink); font-size: 13px; font-weight: 700; align-items: flex-start; }
.kid-tile .qstate svg { margin-top: 2px; flex-shrink: 0; }
.kid-tile .tile-fill { flex: 1; }
.kid-tile .tile-btns { display: flex; gap: 8px; margin-top: 6px; }
.kid-tile .pill-btn { flex: 1; min-height: 44px; border-radius: 999px; border: 0; background: var(--forest); color: var(--cream);
  font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0 12px; }
.kid-tile .pill-btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--forest); }
.kid-tile .tile-btns.wrap { flex-wrap: wrap; }
.kid-tile .tile-btns.wrap .pill-btn { flex-basis: 100%; }
.kid-tile .round-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--forest); background: transparent;
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.kid-tile .tile-custody { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 8px; margin-top: 4px;
  border-top: 1.5px solid rgba(23, 62, 45, .22); }
.kid-tile .tile-custody .where { display: inline-flex; align-items: flex-start; gap: 6px; min-height: 32px; border: 0; background: none; padding: 0;
  font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.kid-tile .tile-custody .where svg { flex-shrink: 0; margin-top: 1px; }
.kid-tile .tile-custody .btn { min-height: 40px; font-size: 14px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--forest);
  background: transparent; color: var(--ink); font-weight: 800; }
.kid-tile .tile-custody .btn.link { border: 0; padding: 0; min-height: 32px; text-decoration: underline; }
.kid-tile .pause-pick { margin-top: 6px; padding: 12px; border-radius: 18px; background: var(--cream); }
.kid-tile .pause-pick .btn.small { min-height: 44px; }
.kid-tile :focus-visible { outline-color: var(--ink); }

/* Derniers appels et historique : pictogrammes au lieu des pastilles */
.call-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #EFE8DA; }
.list > .call-row:first-child { border-top: 0; }
.call-row .avatar { width: 36px; height: 36px; font-size: 16px; }
.call-row .item-title { font-weight: 800; font-size: 15px; }
.item-title .arrow { color: var(--bad); font-weight: 800; }
.call-row .o-word { font-weight: 800; }
.call-row .o-word.manque, .call-row .o-word.sans_reponse { color: var(--bad); }
.call-row .o-word.refuse { color: var(--ink); }
.cicon { flex: none; width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.cicon.ok { background: var(--sage); color: var(--ink); }
.cicon.missed { background: var(--bad-bg); color: var(--bad); }
.cicon.refused { background: var(--grey-bg); color: var(--mute); }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.recent-head .btn.link { min-height: 32px; font-weight: 800; font-size: 14px; }
.card.calls { padding: 14px 14px 8px; gap: 4px; }

/* Accueil et connexion : logo foncé */
.hero .brand-logo { margin-bottom: 4px; }
.screen.guest .card .pill.en_ligne { background: var(--sage); color: var(--ink); }
