/* Carnet de Recettes — palette inspirée de PANTONE 17-1230 Mocha Mousse
   (couleur de l'année 2025 « gourmande ») et de ses harmonies Pantone :
   Cannoli Cream, Chanterelle, Chocolate Martini, Tendril (vert). */
:root {
  --mocha: #A47864;          /* PANTONE 17-1230 Mocha Mousse */
  --mocha-deep: #7A5240;     /* version foncée lisible pour boutons/texte */
  --choco: #45342D;          /* proche Chocolate Martini : texte */
  --choco-2: #7B6A61;        /* texte secondaire */
  --cream: #F6F1E9;          /* Cannoli Cream : fond */
  --card: #FFFCF8;
  --line: #E6DCCF;
  --sage: #6E8A57;           /* Tendril assombri : minuteurs, validations */
  --sage-soft: #E5ECDC;
  --butter: #F4E3BF;
  --tomato: #B9533E;         /* suppression */
  --t0: #F1E3DA; --t1: #E5ECDC; --t2: #F6E6C9; --t3: #EADFD6; --t4: #F3DAD0; --t5: #E0E5E6;
  --shadow: 0 1px 2px rgba(69,52,45,.06), 0 6px 20px rgba(69,52,45,.08);
  --r: 18px;
  --f-title: "Fraunces", Georgia, serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --mocha: #C69A84; --mocha-deep: #D9AE97; --choco: #F3EAE1; --choco-2: #BCAEA4;
    --cream: #1D1714; --card: #29211D; --line: #3B312B; --sage: #9DB884; --sage-soft: #2C3326;
    --butter: #4A3E26; --tomato: #E07A62;
    --t0: #3A2C25; --t1: #2C3326; --t2: #3D3322; --t3: #352B26; --t4: #3E2A24; --t5: #2A3032;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; background: var(--cream); color: var(--choco);
  font: 400 17px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  user-select: none; -webkit-user-select: none;
}
input, textarea, select { font: inherit; font-size: 16px; color: inherit; user-select: text; -webkit-user-select: text; } /* 16px : évite le zoom auto iOS */
.steps, .ck-step, .notes p { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-title); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
svg { width: 22px; height: 22px; flex: none; }
.ico-s { width: 14px; height: 14px; vertical-align: -2px; }
[hidden] { display: none !important; }

/* ── mise en page ── */
.page { max-width: 1120px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(110px + var(--safe-b)); }
.demo-band { background: var(--butter); color: var(--choco); text-align: center; font-size: 13px; font-weight: 600; padding: calc(4px + var(--safe-t)) 8px 4px; }
.demo-band + .page { padding-top: 12px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.card h3 { font-size: 20px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.hint { color: var(--choco-2); font-size: 14px; margin: 8px 0; }
.msg.err { color: var(--tomato); font-weight: 600; font-size: 15px; }

/* ── boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 16px; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--mocha-deep); border-color: var(--mocha-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #1D1714; } }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.big { min-height: 56px; font-size: 17px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.link { background: none; border: 0; color: var(--mocha-deep); font-weight: 600; padding: 12px 0 0; display: block; margin: 0 auto; }
.link.sm { padding: 0; font-size: 13px; margin: 0 0 0 auto; }
.row-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,252,248,.92); border: 0; box-shadow: var(--shadow); color: #45342D; }
.round-btn.flat { background: transparent; box-shadow: none; color: var(--choco); }
.icon-btn { background: none; border: 0; padding: 8px; color: var(--choco-2); margin-left: auto; }

/* ── barre d'onglets ── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-around;
  padding: 6px 24px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--choco-2); padding: 6px 18px; }
.tab.on { color: var(--mocha-deep); }
.tab-add { width: 62px; height: 62px; margin-top: -26px; border-radius: 22px; border: 4px solid var(--cream); background: var(--mocha); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(122,82,64,.35); }
.tab-add svg { width: 28px; height: 28px; stroke-width: 2.4; }
body.cooking .tabbar, body.cooking .demo-band { display: none; }

/* ── en-tête ── */
.top { margin-bottom: 18px; }
.top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.logo { font-size: 30px; font-weight: 700; color: var(--mocha-deep); }
.logo i { font-weight: 500; font-style: italic; color: var(--mocha); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--mocha); color: #fff; font-weight: 700; font-family: var(--f-title); flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.top.simple { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.top.simple h1 { font-size: 24px; flex: 1; }

.seg { display: flex; background: var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--choco-2); display: inline-flex; gap: 6px; justify-content: center; align-items: center; }
.seg button svg { width: 18px; height: 18px; }
.seg button.on { background: var(--card); color: var(--choco); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg.big button { padding: 12px; font-size: 16px; }

.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--choco-2); }
.search input { flex: 1; border: 0 !important; background: transparent !important; padding: 13px 0 !important; outline: none; min-width: 0; }
.search:focus-within { border-color: var(--mocha); }

.chips { display: flex; gap: 8px; margin: 0 0 14px; }
.scroll-x { overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
.scroll-x::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.chip em { font-style: normal; color: var(--choco-2); font-weight: 500; font-size: 13px; }
.chip.on { background: var(--choco); border-color: var(--choco); color: var(--cream); }
.chip.on em { color: inherit; opacity: .7; }

/* ── catégories ── */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
.cat-tile { position: relative; border: 0; border-radius: var(--r); padding: 16px; min-height: 104px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: transform .12s; }
.cat-tile:active { transform: scale(.97); }
.cat-tile.t0 { background: var(--t0); } .cat-tile.t1 { background: var(--t1); } .cat-tile.t2 { background: var(--t2); }
.cat-tile.t3 { background: var(--t3); } .cat-tile.t4 { background: var(--t4); } .cat-tile.t5 { background: var(--t5); }
.ct-ico { position: absolute; right: 10px; top: 6px; font-size: 44px; line-height: 1; filter: saturate(.9); }
.ct-name { font-family: var(--f-title); font-weight: 600; font-size: 19px; line-height: 1.15; padding-right: 24px; }
.ct-n { font-size: 13px; font-weight: 600; color: var(--choco-2); }
.sec-title { font-size: 21px; margin: 0 0 12px; }
.crumb { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.crumb h2 { font-size: 24px; }
.back-chip { display: inline-flex; align-items: center; gap: 2px; border: 0; background: var(--line); border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 600; font-size: 14px; }
.back-chip svg { width: 18px; height: 18px; }

/* ── cartes recettes ── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rcard { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .12s; }
.rcard:active { transform: scale(.98); }
.rc-img { aspect-ratio: 4/3; background: var(--t0) center/cover no-repeat; position: relative; display: grid; place-items: center; }
.rc-img.ph span { font-size: 46px; opacity: .85; }
.who { position: absolute; left: 8px; bottom: 8px; background: rgba(255,252,248,.94); color: #45342D; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.rc-body { padding: 10px 12px 13px; }
.rc-body h3 { font-size: 17px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-body p { margin: 4px 0 0; font-size: 13px; color: var(--choco-2); font-weight: 500; }
.empty { text-align: center; padding: 50px 20px; color: var(--choco-2); }
.empty-ico { font-size: 54px; }

/* ── fiche ── */
.detail { margin: calc(-12px - var(--safe-t)) -16px 0; }
.demo-band + .page .detail { margin-top: -12px; }
.hero { position: relative; height: 230px; background: var(--t0) center/cover no-repeat; display: grid; place-items: center; }
.hero.ph { height: 170px; }
.hero.ph span { font-size: 70px; }
.hero .round-btn { position: absolute; top: calc(12px + var(--safe-t)); }
.hero .back { left: 14px; } .hero .edit { right: 14px; }
.d-head { padding: 18px 16px 6px; }
.d-cat { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--mocha-deep); text-transform: uppercase; letter-spacing: .06em; }
.d-head h1 { font-size: 30px; }
.d-who { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; color: var(--choco-2); font-size: 15px; }
.d-who svg { width: 18px; height: 18px; }
.times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.time { flex: 1 1 0; min-width: 84px; background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); border-top: 4px solid var(--mocha); }
.time.tm-cook { border-top-color: var(--tomato); } .time.tm-rest { border-top-color: var(--sage); } .time.total { background: var(--choco); color: var(--cream); border-top-color: var(--choco); }
.time .tl { display: block; font-size: 12px; font-weight: 600; opacity: .75; }
.time b { font-size: 18px; font-family: var(--f-title); font-weight: 600; }
.d-cols { padding: 16px; display: grid; gap: 18px; }
.d-ings { padding: 16px 16px 8px; }
.serv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.serv b { font-size: 26px; font-family: var(--f-title); min-width: 34px; text-align: center; cursor: pointer; }
.stp { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--cream); font-size: 24px; line-height: 1; display: grid; place-items: center; }
.stp:active { background: var(--butter); }
.ings { list-style: none; margin: 0; padding: 0; }
.ing { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ing:last-child { border-bottom: 0; }
.ing-sec { font-family: var(--f-title); font-weight: 600; font-size: 17px; padding: 14px 0 4px; color: var(--mocha-deep); }
.tick { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.ing.done .tick { background: var(--sage); border-color: var(--sage); }
.ing.done .tick::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 700; }
.ing.done .n, .ing.done .q { opacity: .45; text-decoration: line-through; }
.q { border: 0; background: var(--t2); border-radius: 9px; padding: 3px 9px; font-weight: 700; font-size: 16px; min-width: 52px; text-align: center; white-space: nowrap; }
.q small { font-weight: 600; font-size: 13px; }
.q.noq { background: transparent; min-width: 0; padding: 0; }
.n { flex: 1; }
.cook-btn { margin: 0 0 16px; min-height: 56px; font-size: 17px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.55; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--mocha); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; margin-top: 1px; }
.steps li.done { opacity: .45; }
.steps li.done::before { content: "✓"; background: var(--sage); }
.notes { padding: 14px 16px; margin-top: 16px; background: var(--butter); box-shadow: none; }
.notes h4 { margin: 0 0 4px; font-family: var(--f-title); font-size: 17px; }
.notes p { margin: 0; white-space: pre-line; }
.source { color: var(--choco-2); font-size: 14px; font-style: italic; }
.d-actions { margin-top: 22px; display: flex; gap: 10px; }

/* ── mode pas à pas ── */
.cook { min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); padding-top: var(--safe-t); }
.ck-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.ck-name { flex: 1; text-align: center; font-family: var(--f-title); font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-top .round-btn { font-size: 18px; font-weight: 700; }
.ck-bar { height: 6px; background: var(--line); margin: 0 16px; border-radius: 9px; overflow: hidden; }
.ck-bar span { display: block; height: 100%; background: var(--mocha); border-radius: 9px; transition: width .3s; }
.ck-body { flex: 1; padding: 28px 22px; max-width: 760px; width: 100%; margin: 0 auto; overflow-y: auto; }
.ck-kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 13px; color: var(--mocha-deep); margin: 0 0 12px; }
.ck-title { font-size: 28px; margin-bottom: 14px; }
.ck-step { font-size: clamp(22px, 5.6vw, 34px); line-height: 1.45; font-weight: 500; margin: 0; }
.ck-timers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.timer-btn { background: var(--sage-soft); border-color: var(--sage); color: var(--sage); }
.ck-nav { display: flex; gap: 12px; padding: 12px 16px calc(14px + var(--safe-b)); max-width: 760px; width: 100%; margin: 0 auto; }
.ck-nav .btn { flex: 1; }
.ck-end { text-align: center; padding-top: 12vh; }
.ck-end-ico { font-size: 80px; }
#timers { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.timer { display: flex; align-items: center; gap: 10px; background: var(--sage); color: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow); font-weight: 600; }
.timer span { flex: 1; font-size: 14px; }
.timer b { font-size: 20px; font-variant-numeric: tabular-nums; }
.timer button { background: rgba(255,255,255,.22); border: 0; color: #fff; border-radius: 50%; width: 30px; height: 30px; }
.timer.done { background: var(--tomato); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.03); } }

/* ── scanner ── */
.scan p { margin-top: 0; }
.scan-btns { display: grid; gap: 10px; margin: 16px 0; }
.pages { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.page-th { position: relative; width: 84px; height: 112px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.page-th img { width: 100%; height: 100%; object-fit: cover; }
.page-th button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; }
.page-th span { position: absolute; left: 6px; bottom: 4px; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 6px 0; }
.check input { width: 22px; height: 22px; accent-color: var(--mocha-deep); }
.busy { position: fixed; inset: 0; z-index: 60; background: rgba(29,23,20,.55); display: grid; place-items: center; backdrop-filter: blur(4px); }
.busy-card { background: var(--card); border-radius: 22px; padding: 28px 34px; text-align: center; box-shadow: var(--shadow); min-width: 260px; }
.busy-card p { font-weight: 600; margin: 10px 0 0; }
.pot { font-size: 52px; animation: wob 1.2s ease-in-out infinite; }
@keyframes wob { 50% { transform: rotate(-12deg) translateY(-4px); } }

/* ── éditeur ── */
.ai-note { background: var(--sage-soft); color: var(--choco); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 14px; }
.ai-note svg { color: var(--sage); }
.editor { display: grid; gap: 14px; }
.editor label, .auth label, .card label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.editor label small { font-weight: 500; color: var(--choco-2); }
input:not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; outline: none; font-weight: 400; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--mocha); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.times-ed { border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 14px 12px; margin: 0; display: grid; gap: 8px; }
.times-ed legend { font-weight: 600; font-size: 15px; padding: 0 6px; }
.t-row { display: grid; grid-template-columns: 1fr 58px auto 58px auto; gap: 6px; align-items: center; }
.t-row input { text-align: center; padding: 10px 4px !important; }
.t-row .t-lab input { text-align: left; padding: 10px !important; }
.t-row em { font-style: normal; color: var(--choco-2); font-size: 14px; }
.t-lab { font-weight: 600; font-size: 15px; }
.parsed { font-size: 13px; color: var(--choco-2); margin-top: -6px; line-height: 2; }
.pi { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; margin: 0 4px 0 0; line-height: 1.7; }
.ph-edit { display: flex; gap: 14px; align-items: center; }
.ph-prev { width: 120px; aspect-ratio: 4/3; border-radius: 14px; background: var(--t0) center/cover; display: grid; place-items: center; color: var(--choco-2); flex: none; }
.ph-acts { display: grid; gap: 6px; justify-items: start; }
.ph-acts small { color: var(--choco-2); font-size: 12px; }

/* ── feuilles modales ── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(29,23,20,0); display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.sheet-wrap.open { background: rgba(29,23,20,.45); }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 8px 20px calc(20px + var(--safe-b)); transform: translateY(100%); transition: transform .25s ease-out; max-height: 88dvh; overflow-y: auto; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 14px; }
.sheet-title { font-size: 22px; margin-bottom: 14px; }
.sheet-text { font-size: 17px; margin: 6px 0; }
.big-choice { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: var(--cream); border-radius: 18px; padding: 16px; margin-bottom: 10px; }
.big-choice b { display: block; font-size: 17px; }
.big-choice small { color: var(--choco-2); font-size: 14px; }
.bc-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--mocha); color: #fff; display: grid; place-items: center; flex: none; }
.num-ask { display: flex; align-items: center; gap: 10px; }
.num-ask input { font-size: 24px !important; text-align: center; font-weight: 700; }
.num-ask span { font-weight: 600; color: var(--choco-2); }
.toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; z-index: 70; background: var(--choco); color: var(--cream); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; transition: .25s; max-width: 90vw; text-align: center; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── connexion ── */
.auth { min-height: 100dvh; max-width: 440px; margin: 0 auto; padding: calc(40px + var(--safe-t)) 18px 40px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-brand { text-align: center; }
.auth-brand img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }
.auth-brand h1 { font-size: 32px; color: var(--mocha-deep); margin-top: 12px; }
.auth-brand p { color: var(--choco-2); margin: 6px 0 0; }
.auth form { display: grid; gap: 14px; }
.auth h2 { font-size: 22px; margin-bottom: 8px; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--line); border-top-color: var(--mocha); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── réglages ── */
.page > .card { margin-bottom: 16px; }
.demo-info { background: var(--butter); box-shadow: none; }
.demo-info p { margin: 0 0 10px; }
.members { list-style: none; padding: 0; margin: 6px 0 14px; }
.members li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.members li small { display: block; color: var(--choco-2); font-size: 13px; }
.add-m { display: grid; grid-template-columns: 1fr; gap: 8px; }
.version { text-align: center; color: var(--choco-2); font-size: 13px; }

/* ── tablette / iPad ── */
@media (min-width: 700px) {
  .page { padding-left: 28px; padding-right: 28px; }
  .scroll-x { margin-left: -28px; margin-right: -28px; padding: 2px 28px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .detail { margin-left: -28px; margin-right: -28px; }
  .hero { height: 300px; }
  .d-head, .d-cols { padding-left: 28px; padding-right: 28px; }
  .d-head h1 { font-size: 38px; }
  .add-m { grid-template-columns: 1fr 1.6fr auto; }
  .scan-btns { grid-template-columns: 1fr 1fr; }
  .sheet { border-radius: 24px; margin-bottom: 24px; }
  .sheet-wrap { align-items: center; }
}
@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .d-cols { grid-template-columns: 380px 1fr; align-items: start; gap: 28px; }
  .d-ings { position: sticky; top: 16px; }
  .detail { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .hero { border-radius: 0 0 24px 24px; }
}
