/* SP · Suivi Personnel — thème « Dark Premium » (or, vert entrées, corail sorties) */
:root {
  --bg: #07080B; --bg2: #0B0C10; --card: rgba(255,255,255,.045); --card2: rgba(255,255,255,.07); --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #F2F3F7; --muted: #9AA0AE; --dim: #6F7584;
  --gold: #E6C068; --gold1: #F3D58A; --gold2: #C9A04A; --ink: #1A1406;
  --in: #4BE0A6; --out: #FF8A7C; --blue: #8DB8FF; --violet: #B79BFF;
  --r: 20px; --r2: 16px; --safeT: env(safe-area-inset-top, 0px); --safeB: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.4; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(110% 50% at 85% -8%, #231D0E 0%, rgba(11,12,16,0) 60%), radial-gradient(80% 40% at -10% 110%, #0E1A16 0%, rgba(7,8,11,0) 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.num { font-family: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cur { color: var(--gold); font-weight: 600; font-size: .8em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .in { color: var(--in); } .out { color: var(--out); } .goldT { color: var(--gold); }
.small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .gap6 { gap: 6px; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack6 { display: flex; flex-direction: column; gap: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- structure ----- */
#app { min-height: 100dvh; }
.page { padding: calc(var(--safeT) + 10px) 18px calc(var(--safeB) + 120px); max-width: 720px; margin: 0 auto; }
.page.enter { animation: pageIn .42s var(--ease) both; } .page.enterBack { animation: pageBack .42s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes pageBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: center; gap: 12px; padding: 6px 0 16px; min-height: 52px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; flex: 1; min-width: 0; letter-spacing: -.01em; }
.iconBtn { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--card2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; position: relative; transition: transform .15s, background .2s; }
.iconBtn:active { transform: scale(.94); }
.dot { position: absolute; top: 9px; right: 10px; min-width: 9px; height: 9px; border-radius: 9px; background: var(--out); box-shadow: 0 0 0 2px var(--bg); }
.sectionHead { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 10px; }
.sectionHead h2 { margin: 0; font-size: 16.5px; font-weight: 800; }
.sectionHead a, .sectionHead button { font-size: 13px; color: var(--gold); text-decoration: none; background: none; border: 0; padding: 4px; }

/* ----- barre du bas ----- */
.nav { position: fixed; left: 12px; right: 12px; bottom: calc(var(--safeB) + 10px); height: 68px; max-width: 560px; margin: 0 auto; border-radius: 24px; z-index: 30;
  background: rgba(20,22,29,.82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.nav a { text-decoration: none; color: #7D8292; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; width: 66px; padding: 6px 0; position: relative; transition: color .25s; }
.nav a.on { color: var(--gold); }
.nav a.on::after { content: ''; position: absolute; bottom: -2px; width: 18px; height: 3px; border-radius: 3px; background: var(--gold); animation: rise .35s var(--ease); }
.nav .badge { position: absolute; top: 0; right: 14px; background: var(--out); color: #2A0C08; font-size: 10px; font-weight: 800; border-radius: 9px; padding: 0 5px; min-width: 16px; text-align: center; }
.fab { width: 58px; height: 58px; margin-top: -32px; border-radius: 21px; border: 0; color: var(--ink); background: linear-gradient(135deg, var(--gold1), var(--gold2)); display: flex; align-items: center; justify-content: center; animation: glow 3.2s ease-in-out infinite; transition: transform .2s var(--ease); }
.fab:active { transform: scale(.92) rotate(90deg); }
@keyframes glow { 0%,100% { box-shadow: 0 10px 28px rgba(230,192,104,.32); } 50% { box-shadow: 0 10px 40px rgba(230,192,104,.6); } }
body.sheetOpen .nav { transform: translateY(140%); }
.nav { transition: transform .35s var(--ease); }

/* ----- cartes ----- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.tight { padding: 12px 14px; border-radius: 18px; }
.card.click { cursor: pointer; transition: transform .15s, background .2s; } .card.click:active { transform: scale(.985); background: var(--card2); }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 20px; background: linear-gradient(145deg, #2A2414 0%, #17150F 55%, #101114 100%); border: 1px solid rgba(230,192,104,.26); }
.hero.pro { background: linear-gradient(145deg, #13213A 0%, #11151F 55%, #0F1014 100%); border-color: rgba(141,184,255,.28); }
.hero::after { content: ''; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 999px; background: radial-gradient(circle, rgba(230,192,104,.33), transparent 70%); pointer-events: none; animation: float 7s ease-in-out infinite; }
.hero.pro::after { background: radial-gradient(circle, rgba(141,184,255,.3), transparent 70%); }
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px, 10px); } }
.hero .label { font-size: 13px; color: #CFC3A0; }
.hero.pro .label { color: #AFC6EE; }
.bigAmt { font-size: 34px; font-weight: 700; line-height: 1.12; margin-top: 6px; }
.subAmt { font-size: 19px; font-weight: 600; color: #DAD4C3; }
.pills { display: flex; gap: 10px; margin-top: 14px; }
.pill { flex: 1; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pill.inB { background: rgba(75,224,166,.12); } .pill.outB { background: rgba(255,138,124,.12); }
.pill small { font-size: 11px; color: var(--muted); }
.hs { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hs::-webkit-scrollbar { display: none; }
.wcard { flex: 0 0 158px; scroll-snap-align: start; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 16px; color: #fff; text-decoration: none; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.wcard .k { font-size: 12px; color: rgba(255,255,255,.75); display: flex; justify-content: space-between; align-items: center; }
.wcard b { font-size: 17px; }
.w-cash { background: linear-gradient(145deg,#3A3F4C,#1D2028); } .w-mobile { background: linear-gradient(145deg,#1F7A57,#0E3D2C); } .w-bank { background: linear-gradient(145deg,#2C3E8F,#141E4A); }
.w-avance { background: linear-gradient(145deg,#8A6420,#3E2C0D); } .w-epargne { background: linear-gradient(145deg,#5B3A8F,#26174A); } .w-autre { background: linear-gradient(145deg,#8F2C4F,#4A1426); }
.chart { display: flex; align-items: flex-end; justify-content: space-between; height: 118px; margin-top: 12px; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 92px; }
.chart .bar { width: 9px; border-radius: 5px; transform-origin: bottom; animation: grow .8s var(--ease) both; min-height: 2px; }
.chart .bar.i { background: linear-gradient(#4BE0A6, #1E8F68); } .chart .bar.o { background: linear-gradient(#FF8A7C, #B4473D); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ----- listes ----- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--text); width: 100%; text-align: left; transition: transform .15s, background .2s; }
.item:active { transform: scale(.985); background: var(--card2); }
.item .ico { width: 40px; height: 40px; border-radius: 13px; background: var(--card2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .end { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.item.cancelled { opacity: .5; } .item.cancelled b { text-decoration: line-through; }
.dayHead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 4px 2px; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 64px; height: 64px; border-radius: 22px; background: rgba(230,192,104,.1); color: var(--gold); display: flex; align-items: center; justify-content: center; animation: float 5s ease-in-out infinite; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.tag.gold { background: rgba(230,192,104,.16); color: var(--gold); } .tag.red { background: rgba(255,138,124,.15); color: var(--out); } .tag.green { background: rgba(75,224,166,.14); color: var(--in); } .tag.blue { background: rgba(141,184,255,.14); color: var(--blue); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; } .kv > span:first-child { color: var(--muted); } .kv > :last-child { text-align: right; }
.progress { height: 8px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--gold2), var(--gold1)); transition: width .7s var(--ease); }
.progress.red > span { background: linear-gradient(90deg, #B4473D, var(--out)); }

/* ----- formulaires ----- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hint { color: var(--dim); font-size: 12px; }
.input { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--text); padding: 11px 14px; font-size: 16px; outline: none; transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none; }
textarea.input { min-height: 84px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { border-color: var(--gold); background: rgba(230,192,104,.05); }
.input.bad { border-color: var(--out); }
.input[type="date"], .input[type="datetime-local"] { min-height: 48px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { min-height: 50px; border: 0; border-radius: 16px; padding: 0 18px; font-weight: 800; font-size: 15.5px; color: var(--ink); background: linear-gradient(135deg, var(--gold1), var(--gold2)); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, opacity .2s; text-decoration: none; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .5; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line2); font-weight: 700; }
.btn.danger { background: linear-gradient(135deg, #FF9B8F, #D9564A); color: #2A0C08; }
.btn.green { background: linear-gradient(135deg, #7BEFC2, #2BB683); color: #04241A; }
.btn.sm { min-height: 40px; font-size: 13.5px; border-radius: 12px; padding: 0 14px; }
.btn.block { width: 100%; }
.linkBtn { background: none; border: 0; color: var(--gold); font-weight: 700; padding: 6px 0; font-size: 14px; }
.seg { display: flex; padding: 4px; border-radius: 16px; background: rgba(255,255,255,.05); gap: 2px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 12px; background: transparent; color: #B4B8C4; font-weight: 700; font-size: 14px; transition: background .3s var(--ease), color .3s; }
.seg button.on { background: var(--gold); color: var(--ink); }
.seg button.on.in { background: var(--in); color: #04241A; } .seg button.on.out { background: var(--out); color: #2A0C08; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #C3C7D1; font-size: 13.5px; font-weight: 600; transition: all .2s; }
.chip.on { background: rgba(230,192,104,.16); border-color: rgba(230,192,104,.5); color: var(--gold); }
.amountBig { text-align: center; padding: 6px 0 2px; }
.amountBig input { text-align: center; font-size: 42px; font-weight: 700; border: 0; background: transparent; min-height: 60px; padding: 0; }
.amountBig input:focus { background: transparent; }
.feeRow { display: grid; grid-template-columns: minmax(0, 1fr) 74px 88px 36px; gap: 6px; align-items: center; }
.feeRow .input { min-height: 44px; padding: 8px 10px; font-size: 16px; }
.feeRow select.input { padding-right: 26px; background-position: calc(100% - 15px) 20px, calc(100% - 10px) 20px; }
.totalLine { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 800; }
.drop { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--line2); border-radius: 16px; padding: 13px 14px; color: #B4B8C4; background: transparent; width: 100%; text-align: left; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 74px; height: 74px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .lbl { position: absolute; bottom: 4px; left: 4px; right: 4px; font-size: 10px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 1px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ----- feuilles ----- */
.sheetWrap { position: fixed; inset: 0; z-index: 60; }
.sheetWrap .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100dvh - var(--safeT) - 24px); max-width: 720px; margin: 0 auto; background: #111319; border-radius: 28px 28px 0 0; border-top: 1px solid var(--line2);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .38s var(--ease); box-shadow: 0 -20px 50px rgba(0,0,0,.5); }
.sheet.full { height: calc(100dvh - var(--safeT) - 24px); }
.sheetWrap.open .backdrop { opacity: 1; } .sheetWrap.open .sheet { transform: none; }
.grip { width: 44px; height: 5px; border-radius: 9px; background: #3A3E4A; margin: 9px auto 0; flex: 0 0 auto; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 6px; }
.sheetHead h2 { margin: 0; font-size: 19px; font-weight: 800; }
.sheetBody { overflow-y: auto; padding: 8px 18px calc(var(--safeB) + 22px); -webkit-overflow-scrolling: touch; }
.lead { font-size: 15.5px; line-height: 1.5; margin: 4px 0 6px; }

/* ----- toasts, attente ----- */
#toasts { position: fixed; top: calc(var(--safeT) + 10px); left: 12px; right: 12px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(520px, 100%); overflow-wrap: anywhere; padding: 12px 16px; border-radius: 16px; background: rgba(28,31,40,.96); border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0,0,0,.4); transform: translateY(-20px) scale(.96); opacity: 0; transition: all .35s var(--ease); font-size: 14px; font-weight: 600; pointer-events: auto; }
.toast.show { transform: none; opacity: 1; } .toast.ok svg { color: var(--in); } .toast.err svg { color: var(--out); } .toast.info svg { color: var(--gold); }
.busy { position: fixed; inset: 0; z-index: 90; background: rgba(7,8,11,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; opacity: 0; transition: opacity .2s; color: var(--muted); font-size: 14px; }
.busy.show { opacity: 1; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(230,192,104,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 64px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ----- connexion / ouverture ----- */
.splash { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .5s, visibility .5s; }
.splash.out { opacity: 0; visibility: hidden; }
.splash img { width: 96px; animation: logoIn 1s var(--ease) both; filter: drop-shadow(0 10px 30px rgba(230,192,104,.35)); }
.splash .name { font-weight: 800; letter-spacing: .3em; font-size: 12px; color: var(--muted); animation: rise .8s .3s var(--ease) both; }
@keyframes logoIn { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); filter: blur(8px); } 60% { opacity: 1; transform: scale(1.06) rotate(0); filter: blur(0); } 100% { transform: scale(1); } }
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safeT) + 30px) 24px calc(var(--safeB) + 30px); max-width: 440px; margin: 0 auto; gap: 18px; }
.auth img { width: 76px; animation: logoIn .9s var(--ease) both; }
.auth h1 { margin: 0; font-size: 28px; font-weight: 800; }
.powered { text-align: center; font-size: 11px; color: var(--dim); margin-top: 6px; }

/* ----- tâches ----- */
.task { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; transition: opacity .35s, transform .35s var(--ease); }
.task.done { opacity: .5; } .task.done .tt { text-decoration: line-through; }
.task.leaving { opacity: 0; transform: translateX(40px) scale(.96); }
.cbx { flex: 0 0 26px; width: 26px; height: 26px; margin-top: 1px; border-radius: 9px; border: 2px solid var(--pc, var(--gold)); background: transparent; color: var(--ink); padding: 0; display: flex; align-items: center; justify-content: center; transition: background .25s, transform .2s; }
.cbx.on { background: var(--pc, var(--gold)); animation: pop .35s var(--ease); }
.cbx:active { transform: scale(.88); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.task .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.task .tt { font-weight: 700; }
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.dayBtn { flex: 0 0 48px; height: 66px; border-radius: 16px; border: 0; background: var(--card); color: #B4B8C4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
.dayBtn b { font-size: 17px; } .dayBtn i { width: 5px; height: 5px; border-radius: 9px; background: transparent; }
.dayBtn.has i { background: var(--gold); } .dayBtn.on { background: var(--gold); color: var(--ink); } .dayBtn.on i { background: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { text-align: center; font-size: 11px; color: var(--dim); padding: 4px 0; }
.cal button { aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--card); color: var(--text); font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.cal button.out { opacity: .3; } .cal button.today { outline: 1.5px solid var(--gold); } .cal button.on { background: var(--gold); color: var(--ink); }
.cal button i { display: flex; gap: 2px; } .cal button i span { width: 4px; height: 4px; border-radius: 4px; background: var(--gold); } .cal button.on i span { background: var(--ink); }

/* ----- menu ----- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 18px; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; font-weight: 650; text-align: center; padding: 8px 4px; transition: transform .15s, background .2s; }
.tile:active { transform: scale(.95); background: var(--card2); }
.tile .ti { width: 40px; height: 40px; border-radius: 13px; background: rgba(230,192,104,.12); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.okBox { border-radius: 18px; padding: 12px 14px; background: rgba(75,224,166,.08); border: 1px solid rgba(75,224,166,.22); display: flex; gap: 12px; align-items: center; }
.warnBox { border-radius: 18px; padding: 12px 14px; background: rgba(255,138,124,.1); border: 1px solid rgba(255,138,124,.28); display: flex; gap: 12px; align-items: center; }
.goldBox { border-radius: 18px; padding: 12px 14px; background: rgba(230,192,104,.08); border: 1px solid rgba(230,192,104,.28); display: flex; gap: 12px; align-items: center; }

/* ----- comparateur ----- */
.offer { border-radius: 20px; padding: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.offer.best { border: 1.5px solid var(--gold); background: linear-gradient(160deg, rgba(230,192,104,.14), rgba(255,255,255,.03)); }
.offer .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; color: #B4B8C4; }
.offer .grid3 b { color: var(--text); font-size: 13.5px; display: block; }

/* ----- anneau / donut ----- */
.ring circle.v { animation: ringIn 1.2s var(--ease) both; }
@keyframes ringIn { from { stroke-dashoffset: 264; } }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.legend span.sw { width: 10px; height: 10px; border-radius: 4px; flex: 0 0 auto; }

/* ----- aperçu fichier ----- */
.preview { max-width: 100%; border-radius: 14px; display: block; margin: 0 auto; }

@media (min-width: 760px) {
  .page { padding-top: calc(var(--safeT) + 22px); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
