
/* Concept : un album photo familial. Senior = grandes pages calmes, une action par écran.
   Famille = même album vu de l'atelier, plus dense, avec onglets en bas. */
:root{
  --bg:#F8EEE4; --surface:#FFFBF7; --ink:#27352E; --muted:#6B746C; --line:#EBDACB;
  --blue:#2F5D46; --on-blue:#FFFFFF; --blue-soft:#F9E3D2;
  --sage:#3F7A57; --sage-soft:#E3EEDF;
  --sun-soft:#FBDDBF; --sun-ink:#5A3512;
  --coral:#C4553A; --coral-soft:#FADFD6;
  --shadow:0 1px 2px rgba(120,80,40,.08),0 10px 24px rgba(120,80,40,.10);
  --display:'Fraunces',Georgia,serif; --body:'Atkinson Hyperlegible',system-ui,-apple-system,sans-serif;
  --scale:1;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#171C18; --surface:#212823; --ink:#EEF2EC; --muted:#A9B4AB; --line:#323B34;
  --blue:#8FCBA5; --on-blue:#10201A; --blue-soft:#3A2D24;
  --sage:#9CC7AB; --sage-soft:#23312A;
  --sun-soft:#40301E; --sun-ink:#F6CFA0;
  --coral:#F29A86; --coral-soft:#3E2722;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 20px rgba(0,0,0,.3);color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#171C18; --surface:#212823; --ink:#EEF2EC; --muted:#A9B4AB; --line:#323B34;
  --blue:#8FCBA5; --on-blue:#10201A; --blue-soft:#3A2D24;
  --sage:#9CC7AB; --sage-soft:#23312A;
  --sun-soft:#40301E; --sun-ink:#F6CFA0;
  --coral:#F29A86; --coral-soft:#3E2722;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 20px rgba(0,0,0,.3);color-scheme:dark}

*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--body);line-height:1.45;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:12px 24px}
.app{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:16px;min-height:100%}
h1,h2,h3{font-family:var(--display);font-weight:600;margin:0;text-wrap:balance;line-height:1.15}
p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px}

/* barre prototype */
.proto{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:.8rem;color:var(--muted)}
.seg{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:3px}
.seg button{border:0;background:none;padding:7px 14px;border-radius:999px;font-weight:700;font-size:.85rem;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--blue);color:var(--on-blue)}

/* ---------- SENIOR ---------- */
.senior{font-size:calc(1.3rem*var(--scale));display:flex;flex-direction:column;gap:18px}
.s-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.s-top .back{font-size:1rem}
.size{display:flex;gap:6px}
.size button{width:3rem;height:3rem;border-radius:14px;border:2px solid var(--line);background:var(--surface);font-weight:700}
.big-btn{display:flex;align-items:center;gap:16px;width:100%;min-height:5rem;padding:14px 18px;text-align:left;
  border-radius:22px;border:0;background:var(--blue);color:var(--on-blue);font-weight:700;font-size:1em;box-shadow:var(--shadow)}
.big-btn.sage{background:var(--sage-soft);color:var(--ink);border:2px solid var(--sage)}
.big-btn.sun{background:var(--sun-soft);color:var(--sun-ink)}
.big-btn.plain{background:var(--surface);color:var(--ink);border:2px solid var(--line);box-shadow:none}
.big-btn.coral{background:var(--coral-soft);color:var(--ink);border:2px solid var(--coral)}
.big-btn small{display:block;font-weight:400;font-size:.7em;opacity:.9}
.big-btn svg{flex:none;width:2.2rem;height:2.2rem}
.btn-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn-row .big-btn{justify-content:center;text-align:center;min-height:4.2rem;flex-direction:column;gap:2px;font-size:.9em}
.hello{display:flex;flex-direction:column;gap:6px}
.hello h1{font-size:2.1em}
.hello .date{font-family:var(--display);font-size:1.5em;font-weight:500}
.hello .moment{color:var(--muted)}
.panel{background:var(--surface);border-radius:24px;padding:18px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:12px}
.panel.next{background:var(--sun-soft);color:var(--sun-ink);box-shadow:none}
.panel .label{font-size:.7em;letter-spacing:.08em;text-transform:uppercase;font-weight:700;opacity:.85}
.panel p.main{font-size:1.1em}
.pic{width:100%;max-width:260px;aspect-ratio:1;align-self:center;border-radius:28px;overflow:hidden;box-shadow:var(--shadow)}
.pic svg{width:100%;height:100%;display:block}
.pic.sm{max-width:84px;border-radius:18px;align-self:auto;flex:none}
.q{font-family:var(--display);font-size:1.35em;text-wrap:balance}
.answer{background:var(--sage-soft);border:2px solid var(--sage);border-radius:22px;padding:16px;font-size:1.05em}
.hint{background:var(--blue-soft);border-radius:18px;padding:14px}
.mem{display:flex;gap:14px;align-items:center}
.tag{display:inline-block;font-size:.65em;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--blue-soft);color:var(--ink)}
.tag.past{background:var(--sage-soft)} .tag.wait{background:transparent;border:1.5px dashed var(--muted);color:var(--muted)}
.tag.warn{background:var(--coral-soft)}
.row-ev{display:flex;gap:14px;align-items:flex-start}
.row-ev .t{font-family:var(--display);font-size:1.4em;min-width:4.2ch;color:var(--blue)}
.day{font-family:var(--display);font-size:1.1em;color:var(--muted);margin-top:4px}
.entry{display:flex;flex-direction:column;gap:8px}
.entry.wait p{color:var(--muted)}
.mini-listen{align-self:flex-start;border:2px solid var(--line);background:var(--surface);border-radius:14px;padding:8px 14px;font-weight:700;font-size:.75em;display:inline-flex;gap:8px;align-items:center}

/* ---------- FAMILLE ---------- */
.fam{display:flex;flex-direction:column;gap:14px;padding-bottom:84px;font-size:1rem}
.fam h1{font-size:1.6rem}
.fam h2{font-size:1.15rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px}
.card.alert{background:var(--coral-soft);border-color:var(--coral)}
.card.info{background:var(--blue-soft);border-color:transparent}
.lead{color:var(--muted)}
.btn{border:0;border-radius:12px;padding:11px 16px;font-weight:700;background:var(--blue);color:var(--on-blue)}
.btn.ghost{background:transparent;border:1.5px solid var(--line);color:var(--ink)}
.btn.sm{padding:7px 12px;font-size:.9rem}
.btns{display:flex;gap:8px;flex-wrap:wrap}
label{display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:.9rem}
input[type=text],input[type=time],select,textarea{border:1.5px solid var(--line);border-radius:10px;padding:10px;background:var(--bg);width:100%;min-width:0;font-weight:400}
textarea{min-height:110px;resize:vertical}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.line{display:flex;justify-content:space-between;align-items:center;gap:10px}
.line > *{min-width:0}
.mut{color:var(--muted);font-size:.9rem}
.chip{font-size:.75rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--blue-soft)}
.chip.ok{background:var(--sage-soft)} .chip.no{background:var(--coral-soft)} .chip.wait{background:var(--sun-soft);color:var(--sun-ink)}
.sw{display:inline-flex;align-items:center;gap:8px;flex-direction:row;font-weight:400}
.sw input{width:1.3rem;height:1.3rem;accent-color:var(--blue)}
.nav{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:center;
  padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));z-index:5}
.nav div{display:flex;width:100%;max-width:520px;gap:4px}
.nav button{flex:1;border:0;background:none;padding:10px 2px;border-radius:10px;font-weight:700;font-size:.78rem;color:var(--muted)}
.nav button[aria-current="page"]{background:var(--blue-soft);color:var(--ink)}
.preview{border:2px dashed var(--blue);border-radius:16px;padding:14px;background:var(--sun-soft);color:var(--sun-ink);font-size:1.15rem;font-family:var(--display)}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);
  padding:12px 18px;border-radius:14px;max-width:min(92vw,460px);z-index:20;font-size:.95rem;box-shadow:var(--shadow)}
.note{font-size:.8rem;color:var(--muted);text-align:center}
@media (prefers-reduced-motion:no-preference){.screen{animation:in .25s ease-out}@keyframes in{from{opacity:.4;transform:translateY(6px)}}}

/* ---- habillage inspiré de la référence : pêche chaude, vert forêt, cartes douces ---- */
body{background:radial-gradient(120% 60% at 50% 0%,var(--surface) 0%,var(--bg) 70%) fixed,var(--bg)}
h1,h2,h3{color:var(--blue)}
.panel,.card{border-radius:26px;border:1px solid var(--line)}
.card{box-shadow:var(--shadow)}
.big-btn{border-radius:999px}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:16px 6px;border:1px solid var(--line);
  border-radius:24px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-weight:700;font-size:.78em;min-height:7.2rem}
.tile small{display:block;font-weight:400;font-size:.8em;color:var(--muted)}
.chipico{width:3rem;height:3rem;border-radius:16px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue)}
.chipico svg{width:1.6rem;height:1.6rem}
.chipico.g{background:var(--sage-soft)} .chipico.o{background:var(--sun-soft);color:var(--sun-ink)}
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hero{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;background:var(--blue-soft);border-radius:30px;padding:18px 18px 0;overflow:hidden;box-shadow:var(--shadow)}
.hero .txt{padding-bottom:18px;min-width:0}
.hero h1{font-size:1.9em}
.hero .duo{display:flex;flex:none;align-items:flex-end}
.hero .duo div{width:4.6rem;aspect-ratio:1;border-radius:50% 50% 0 0;overflow:hidden;margin-left:-.9rem}
.hero .duo svg{width:100%;height:100%;display:block}
.sect{display:flex;justify-content:space-between;align-items:baseline}
.sect h2{font-size:1.1em}
.snav,.nav{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;z-index:5;
  padding:8px max(12px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));
  background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(120,80,40,.08)}
.snav div,.nav div{display:flex;width:100%;max-width:520px;gap:2px}
.snav button,.nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;padding:6px 0;border-radius:16px;
  font-weight:700;font-size:.72rem;color:var(--muted)}
.snav button svg,.nav button svg{width:1.55rem;height:1.55rem}
.snav button[aria-current="page"],.nav button[aria-current="page"]{color:var(--blue);background:var(--blue-soft)}
.senior{padding-bottom:84px}
.btn{border-radius:999px}
.chip{background:var(--blue-soft)}
