/*
 * Photographi-K — identité visuelle propre, tirée du logo « appareil photo 3D »
 * (logo/kit-appareil-photo/charte-graphique.html). Volontairement à l'opposé de Lithotek :
 *  - formes arrondies et en relief, comme le boîtier du logo (cartes blanches, ombres douces) ;
 *  - bleu nuit en dégradé (le corps de l'appareil), crème en fond, argent pour les détails
 *    (les bagues de l'objectif, reprises en motif d'anneaux) ;
 *  - Playfair Display italique (le nom du logo) pour les grands titres et les montants ;
 *    texte et intitulés en police système, intitulés en capitales espacées ;
 *  - rose #DA1C5C = le déclencheur : une seule touche, le petit bouton sur le déclencheur
 *    d'ajout. Jamais de surface rose.
 */
@font-face { font-family: "Playfair PK"; src: url("/fonts/playfair-display-semibold-italic.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap; } /* fichier italique seul : déclaré « normal » pour l'utiliser tel quel */

:root {
  --bg: #F3F5F9; --surface: #FFFFFF; --sunk: #E6EAF1; --photo: #EBEEF4;
  --navy: #0E1F45; --navy-hi: #22407F; --navy-lo: #0A1633;
  --text: #0E1F45; --muted: #66708A; --line: #E4E8EF; --silver: #B8C2D4; --rose: #DA1C5C;
  --ok: #2E8B57; --fair: #7AA34A; --warn: #D39B2A; --bad: #C0392B; --danger: #B3261E;
  --r-xl: 26px; --r-lg: 20px; --r: 15px;
  --shadow: 0 1px 2px rgba(14, 31, 69, .06), 0 8px 22px rgba(14, 31, 69, .07);
  --shadow-up: 0 10px 30px rgba(10, 22, 51, .28);
  --body-grad: linear-gradient(155deg, var(--navy-hi) 0%, var(--navy) 52%, var(--navy-lo) 100%);
  /* anneaux d'objectif (motif décoratif) */
  --rings: radial-gradient(circle, transparent 0 34%, rgba(184, 194, 212, .22) 34.5% 36%, transparent 36.5% 50%,
           rgba(184, 194, 212, .14) 50.5% 52%, transparent 52.5% 66%, rgba(184, 194, 212, .08) 66.5% 68%, transparent 68.5%);
  --serif: "Playfair PK", "Playfair Display", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; background: var(--bg); color: var(--text); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
#app { max-width: 760px; margin: 0 auto; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease; touch-action: manipulation; }
button:active:not(:disabled), a.card:active, a.round:active { transform: scale(.97); }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--navy-hi); outline-offset: 2px; }
input, textarea { font: inherit; font-size: 16px; color: inherit; }
img { display: block; }
svg { display: block; flex: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.muted { color: var(--muted); }
.num { font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums; }
.caps { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- pages ---------- */
.page { padding-bottom: calc(118px + var(--bottom)); }
.pad { padding-left: 18px; padding-right: 18px; }

/* accueil : bandeau bleu nuit (corps de l'appareil) avec anneaux d'objectif */
.hero { position: relative; overflow: hidden; background: var(--body-grad); color: #fff;
  border-radius: 0 0 var(--r-xl) var(--r-xl); padding: calc(var(--top) + 14px) 18px 20px; }
.hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -40px; background: var(--rings); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-logo { height: 52px; width: auto; margin-left: -8px; }
.stat { display: flex; flex-direction: column; margin: 22px 0 18px; }
.stat-lbl { font-size: 11.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.stat-val { font: 600 44px/1.1 var(--serif); margin-top: 4px; }
.stat-sub { color: var(--silver); font-size: 14px; }
.install { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pagehead .install { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }

.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r); padding: 0 14px; height: 48px;
  color: var(--muted); box-shadow: 0 2px 10px rgba(10, 22, 51, .18); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(184, 194, 212, .6); }
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); height: 100%; min-width: 0; }
.pagehead + .search, .search.solo { margin: 4px 16px 14px; box-shadow: var(--shadow); }
.search.flush { margin: 14px 0 12px; box-shadow: none; border: 1.5px solid var(--line); }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: calc(var(--top) + 26px) 18px 16px; }
.pagehead h1 { font: 600 36px/1.1 var(--serif); }
.pagehead p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* barre des écrans secondaires : bouton rond — titre — action en pilule */
.bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(var(--top) + 10px) 14px 10px; background: rgba(243, 245, 249, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar > :last-child { justify-self: end; }
.bar-title { font: 600 19px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--navy); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; }

/* ---------- filtres ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 16px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip { flex: none; height: 36px; padding: 0 15px; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgba(14, 31, 69, .08);
  font-size: 14px; font-weight: 550; color: var(--text); }
.chip[aria-pressed=true] { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(14, 31, 69, .25); }
.chip.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--silver); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 550; }

/* ---------- grille de la collection ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; padding: 0 16px; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--r-lg); padding: 6px; box-shadow: var(--shadow);
  transition: transform .14s ease; }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 15px; overflow: hidden; background: var(--photo); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(14, 31, 69, .82); color: #fff;
  font-size: 11.5px; font-weight: 650; backdrop-filter: blur(6px); }
.badge.wait { background: rgba(255, 255, 255, .92); color: var(--navy); }
.info { padding: 9px 7px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model { font-size: 15px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; }
.no { flex: none; padding: 3px 8px; border-radius: 999px; background: #EEF0F5; color: #4A5675; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.val { font: 600 16px var(--serif); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.e0 { background: var(--ok); } .e1 { background: var(--fair); } .e2 { background: var(--warn); } .e3 { background: var(--bad); }
.w0 { background: var(--ok); } .w1 { background: var(--warn); } .w2 { background: var(--bad); }

/* état vide : un objectif dessiné */
.empty { text-align: center; color: var(--muted); padding: 50px 30px; font-size: 15px; }
.empty::before { content: ""; display: block; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .7) 0 4px, transparent 5px),
              radial-gradient(circle, var(--navy-hi) 0 30%, var(--navy) 31% 42%, var(--silver) 43% 54%, var(--surface) 55% 100%);
  box-shadow: var(--shadow); }
.banner { margin: 0 16px 14px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow);
  font-size: 14px; display: flex; align-items: center; gap: 10px; }

/* ---------- dock du bas : onglets + déclencheur ---------- */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--bottom)); z-index: 6;
  width: calc(100% - 24px); max-width: 736px; display: flex; align-items: center; gap: 12px; }
.tabbar { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); height: 64px; padding: 6px; border-radius: 24px;
  background: var(--body-grad); box-shadow: var(--shadow-up); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 18px;
  color: rgba(184, 194, 212, .85); font-size: 11px; font-weight: 600; transition: background-color .15s ease, color .15s ease; }
.tab[aria-current=page] { color: #fff; background: rgba(255, 255, 255, .12); }
/* déclencheur : objectif bleu nuit cerclé d'argent, avec le petit bouton rose */
.shutter { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 34% 28%, #3A63B0 0, var(--navy-hi) 22%, var(--navy) 58%, var(--navy-lo) 100%);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--silver), var(--shadow-up); }
.shutter::after { content: ""; position: absolute; top: -3px; right: 6px; width: 14px; height: 7px; border-radius: 3px; background: var(--rose);
  box-shadow: 0 0 0 2px var(--bg); }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: var(--r);
  font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn.primary, .btn.accent { background: var(--body-grad); color: #fff; box-shadow: 0 4px 14px rgba(14, 31, 69, .25); }
.btn.light { background: #fff; color: var(--navy); }
.btn.ghost { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
.btn.text { padding: 0 6px; color: var(--navy); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn.block { width: 100%; }
.actions { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 6; width: 100%; max-width: 760px;
  padding: 18px 16px calc(14px + var(--bottom)); background: linear-gradient(rgba(243, 245, 249, 0), var(--bg) 40%); display: flex; gap: 10px; }
.actions .btn { flex: 1; }
.spaced { margin-top: 22px; }
.ml-auto { margin-left: auto; }

/* ---------- connexion ---------- */
.wordmark { display: block; width: min(300px, 80vw); height: auto; }
.cover { position: fixed; inset: 0; z-index: 10; overflow-y: auto; background: var(--body-grad); color: #fff; }
.cover::before { content: ""; position: fixed; width: 620px; height: 620px; left: 50%; top: 50%; transform: translate(-50%, -62%); background: var(--rings); pointer-events: none; }
.login { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 400px; margin: 0 auto; gap: 12px; }
.login .wordmark { margin: 0 auto 34px; }
.login p { text-align: center; color: var(--silver); }
.cover .field { background: rgba(255, 255, 255, .08); border-color: rgba(184, 194, 212, .35); color: #fff; }
.cover .field::placeholder { color: rgba(184, 194, 212, .8); }
.cover .field:focus { border-color: #fff; box-shadow: none; }
.cover .btn.primary { background: #fff; color: var(--navy); box-shadow: none; }
.cover :focus-visible { outline-color: #fff; }
.error { color: #FFC2B8; font-size: 14px; min-height: 20px; text-align: center; }

/* ---------- formulaires ---------- */
.field { width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 14px; outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease; }
.field:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(14, 31, 69, .08); }
.lbl { display: block; font-size: 14px; font-weight: 650; margin: 22px 2px 8px; }
.lbl .opt { color: var(--muted); font-weight: 450; }
.photos { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 2px; scrollbar-width: none; }
.photos .t { position: relative; flex: none; width: 76px; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--photo); box-shadow: var(--shadow); }
.photos .t img { width: 100%; height: 100%; object-fit: cover; }
.photos .t.main::after { content: "Principale"; position: absolute; left: 4px; right: 4px; bottom: 4px; border-radius: 999px; background: rgba(14, 31, 69, .82);
  color: #fff; font-size: 9.5px; font-weight: 650; text-align: center; padding: 2px 0; }
.photos .x, .photos .star { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(14, 31, 69, .75); color: #fff; display: grid; place-items: center; }
.photos .x { right: 4px; }
.photos .star { left: 4px; font-size: 12px; }
.addph { flex: none; width: 76px; aspect-ratio: 1 / 1; border-radius: var(--r); border: 1.5px dashed var(--silver); display: grid; place-items: center; color: var(--muted); }
.segf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--sunk); border-radius: var(--r); padding: 4px; }
.segf button { min-height: 42px; border-radius: 11px; font-size: 14px; font-weight: 550; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; color: var(--muted); }
.segf button[aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(14, 31, 69, .12); }
.segf.c4 { grid-template-columns: repeat(4, 1fr); }
.segf.c4 button { font-size: 12.5px; flex-direction: column; gap: 3px; padding: 6px 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.three { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; }
.three .field { padding: 0 10px; min-width: 0; }
.inrow { display: flex; gap: 8px; align-items: center; }
.inrow .btn { flex: none; height: 50px; }
@media (max-width: 380px) { .three { grid-template-columns: 1fr 1fr; } .three .field:last-child { grid-column: 1 / -1; } }
textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px; resize: vertical; outline: 0; min-height: 90px; }

/* ---------- recadrage ---------- */
.redress { display: flex; flex-direction: column; align-items: center; padding: 8px 16px calc(110px + var(--bottom)); }
.stage { position: relative; touch-action: none; border-radius: var(--r-lg); overflow: hidden; background: #111827; }
.stage canvas { display: block; width: 100%; height: 100%; }
.cropbox { position: absolute; pointer-events: none; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(10, 22, 51, .55); }
.handle { position: absolute; left: 0; top: 0; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; cursor: grab; touch-action: none; }
.handle::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--navy), 0 2px 8px rgba(0, 0, 0, .4); }
.hint { text-align: center; font-size: 14px; color: var(--muted); padding: 14px 20px 0; }
.hint.left { text-align: left; padding: 0 4px; }
.busy { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50vh; color: var(--muted); }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--silver); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- fiche appareil ---------- */
.photo-card { margin: 6px 16px 0; padding: 8px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 19px; background: var(--photo); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 4 / 3; max-height: 62vh; object-fit: contain; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--silver); transition: width .2s ease, background-color .2s ease; }
.dots i.on { width: 18px; background: var(--navy); }
.ttl { padding: 22px 20px 4px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ttl h1 { font: 600 34px/1.12 var(--serif); margin-top: 2px; overflow-wrap: anywhere; }
.ttl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* carte « valeur » : bleu nuit avec anneaux d'objectif */
.value { position: relative; overflow: hidden; margin: 18px 16px 0; padding: 20px; border-radius: var(--r-xl); background: var(--body-grad); color: #fff;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-up); }
.value::before { content: ""; position: absolute; width: 300px; height: 300px; right: -110px; top: -90px; background: var(--rings); pointer-events: none; }
.value > * { position: relative; }
.value-lbl { font-size: 11.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.value-none { color: var(--silver); font-size: 14px; }
.vnow { display: flex; flex-direction: column; gap: 3px; margin-top: -8px; }
.num.big { font-size: 44px; line-height: 1.1; }
.vnow small { color: var(--silver); font-size: 13px; }
.vnow .delta { align-self: flex-start; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 650; background: rgba(255, 255, 255, .1); }
.vnow .delta.up { color: #9FE0B8; } .vnow .delta.dn { color: #FFC2B8; }
.hist { border-top: 1px solid rgba(184, 194, 212, .25); }
.hcap { font-size: 11.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--silver); padding: 12px 0 4px; }
.hrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.hrow span { display: flex; flex-direction: column; min-width: 0; }
.hrow small { color: var(--silver); font-size: 12px; overflow-wrap: anywhere; }
.hrow b { font-size: 17px; }
.value .icon-btn { color: var(--silver); }

.section { margin: 26px 16px 0; }
.section h2 { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 4px 10px; }
.facts { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 2px 16px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { display: flex; align-items: center; gap: 6px; font-weight: 600; text-align: right; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links .btn { gap: 6px; }
.comment { margin: 14px 16px 0; padding: 14px 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment.flush { margin: 0; }

/* ---------- listes (référentiel, réglages) ---------- */
.list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.item { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.rows { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 8px 0 16px; min-height: 54px; border-top: 1px solid var(--line);
  font-size: 15px; text-align: left; text-decoration: none; }
.row:first-child { border-top: 0; }
.row > svg { color: var(--muted); }
.row button.grow { text-align: left; }
.row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 14px 0; }
.row small { padding: 2px 9px; border-radius: 999px; background: #EEF0F5; color: #4A5675; font-size: 12px; font-weight: 650; }
.row small:empty { display: none; }
.row.add { color: var(--navy); font-weight: 600; }
.row.add > svg { color: var(--navy); }
.row.danger, .row.danger > svg { color: var(--danger); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }

/* ---------- feuille du bas + message ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(10, 22, 51, .45); animation: fade .2s ease; }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 21; width: 100%; max-width: 760px; max-height: 90dvh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px calc(24px + var(--bottom)); animation: up .3s cubic-bezier(.2, .9, .3, 1); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--silver); margin: 0 auto 16px; }
.sheet h3 { font: 600 25px var(--serif); }
.sheet .rows { margin-top: 4px; }
@keyframes up { from { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--bottom)); z-index: 30; width: calc(100% - 32px); max-width: 520px;
  background: var(--navy); color: #fff; padding: 14px 16px; border-radius: var(--r); box-shadow: var(--shadow-up); font-size: 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
