/* MYIG — design system
   Palette poudrée bleutée · cartes pleines · verre dépoli réservé aux éléments interactifs */
:root {
  /* Couleurs du logo MYIG */
  --lavender: #C7D4EE;
  --sky: #B3D8E4;
  --deep: #418CBA;        /* bleu du logo : remplissages, boutons (texte blanc dessus en gras) */
  --white-blue: #F7F9FD;
  --powder: #E3EBF7;
  --glacier: #C9DCEB;
  --slate: #2B3A4A;       /* texte principal */
  --slate-2: #5E6E80;     /* texte secondaire */
  --accent: #418CBA;
  --accent-ink: #2F6F9C;  /* accent pour le texte, 5,4:1 sur blanc */
  --brand-gradient: linear-gradient(120deg, #C7D4EE 0%, #B3D8E4 100%);
  /* Dégradé des actions principales : violet #8A2BE2 → orange #FFA500, reflet blanc fantôme #F8F8FF */
  --act-violet: #8A2BE2; --act-orange: #FFA500; --act-white: #F8F8FF;
  --act-gradient: linear-gradient(180deg, rgba(248, 248, 255, .38) 0%, rgba(248, 248, 255, 0) 48%), linear-gradient(115deg, #8A2BE2 0%, #B54FB0 45%, #FFA500 100%);
  --act-shadow: 0 1px 0 rgba(248, 248, 255, .55) inset, 0 6px 18px rgba(138, 43, 226, .28), 0 2px 6px rgba(255, 165, 0, .18);
  /* Position du pointeur, mise à jour par app.js (effet de halo) */
  --gx: -9999; --gy: -9999; --gxp: .5;
  --line: #E3EBF2;
  --card: #FFFFFF;
  --gi-low: #5E9C7E;   --gi-low-bg: #E4F1EA;
  --gi-mid: #B9852F;   --gi-mid-bg: #F7EEDC;
  --gi-high: #C0605A;  --gi-high-bg: #F7E3E1;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(43, 58, 74, .05), 0 6px 20px rgba(43, 58, 74, .07);
  --shadow-lift: 0 2px 4px rgba(53, 75, 96, .08), 0 16px 40px rgba(53, 75, 96, .14);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Yellowtail', 'Snell Roundhand', 'Brush Script MT', cursive;
  --condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --max: 1240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--slate);
  background: #EEF0F3; min-height: 100vh;
}
.backdrop { position: fixed; inset: 0; z-index: -1; background: linear-gradient(160deg, #F7F9FD 0%, #EEF4FB 60%, #E6F1F6 100%); }
.login-page { background: transparent; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--slate); }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
small, .muted { color: var(--slate-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[data-icon] { display: inline-flex; width: 1.15em; height: 1.15em; }
[data-icon] svg { width: 100%; height: 100%; }

/* ---------- Verre dépoli ---------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,.55) 38%, rgba(255,255,255,.48) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 20px rgba(53, 75, 96, .10);
}

/* ---------- Coque : barre d'icônes, en-tête, barre de commande ---------- */
.shell { display: grid; grid-template-columns: 88px minmax(0, 1fr); min-height: 100vh; max-width: 1560px; margin: 0 auto; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 24px 0; }
.rail-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; text-decoration: none !important;
  background: linear-gradient(135deg, #F0A83C 0%, #B862A0 55%, #8A2BE2 100%); box-shadow: 0 6px 16px rgba(138, 43, 226, .28); }
.rail-logo .logo-symbol { width: 32px; }
/* Logo complet (symbole + « myig » en dégradé orange → violet) */
.logo-img { display: block; width: 110px; aspect-ratio: 1344 / 471; background: url(/brand/logo.png) center / contain no-repeat; }
/* Symbole seul, recolorable (blanc par défaut) */
.logo-symbol { display: block; width: 32px; aspect-ratio: 381 / 328; background: #fff;
  -webkit-mask: url(/brand/symbol-mask.png) center / contain no-repeat; mask: url(/brand/symbol-mask.png) center / contain no-repeat; }
.sections { display: flex; flex-direction: column; gap: 10px; }
.sections a { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #7A8695;
  background: transparent; text-decoration: none !important; transition: background .15s, color .15s, box-shadow .15s; }
.sections a .nav-ico { width: 21px; height: 21px; }
.sections a:hover { background: #fff; color: var(--slate); }
.sections a[aria-current="page"] { background: #8A2BE2; color: #fff; box-shadow: 0 6px 16px rgba(138, 43, 226, .32); }
.sections a .nav-long, .sections a .nav-short { position: absolute; left: 58px; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  background: #111; color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; opacity: 0; transition: opacity .15s; z-index: 30; }
.sections a .nav-short { display: none; }
.sections a:hover .nav-long, .sections a:focus-visible .nav-long { opacity: 1; }
.sections a .soon { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #C9D3DE; font-size: 0; }
.sections .nav-profile { display: none; }
.rail-avatar { margin-top: auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  background: radial-gradient(90% 70% at 25% 10%, rgba(255, 255, 255, .45), transparent 60%), linear-gradient(140deg, #A660F0 0%, #8A2BE2 55%, #6A1BB5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px rgba(138, 43, 226, .32); text-decoration: none !important; }
.rail-avatar [data-icon] { width: 20px; height: 20px; }

.main-col { min-width: 0; padding: 24px 28px 48px 8px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 6px 0 26px; }
.head-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.head-logo { display: none; }
.head-date { font-size: 13.5px; color: #7A8695; font-weight: 500; }
.head-h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 400; letter-spacing: -.035em; color: #111; line-height: 1.1; margin-top: 4px; }
.head-tools { display: flex; align-items: center; gap: 12px; flex: 0 1 420px; min-width: 0; }
.cmd { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 14px rgba(17, 24, 39, .05); }
.cmd:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(65, 140, 186, .18), 0 6px 20px rgba(17, 24, 39, .08); }
.cmd-ico { color: #111; width: 18px; height: 18px; }
.cmd input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; outline: none !important; box-shadow: none !important; padding: 0 !important; font: inherit; font-size: 15px; color: #111; }
.cmd-kbd { font: 600 11.5px var(--font); color: #7A8695; background: #F1F3F6; border-radius: 8px; padding: 4px 8px; }
.cmd-list { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; background: #fff; border-radius: 20px; padding: 8px;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .06), 0 18px 40px rgba(17, 24, 39, .14); max-height: 420px; overflow: auto; }
.cmd-list .grp { font-size: 12px; font-weight: 600; color: #7A8695; padding: 8px 10px 4px; }
.cmd-list button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; font: inherit; font-size: 14px; color: #111; text-align: left;
  padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.cmd-list button [data-icon] { width: 16px; height: 16px; color: #7A8695; flex: none; }
.cmd-list button .s { margin-left: auto; font-size: 12px; color: #7A8695; white-space: nowrap; }
.cmd-list button:hover, .cmd-list button.on { background: #F3F5F8; }
.head-btn { width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #111; background: #fff; text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 14px rgba(17, 24, 39, .05); }
.head-btn [data-icon] { width: 20px; height: 20px; }
#app > .page-head h1 { display: none; }
.btn-round { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: var(--deep); }

/* ---------- Panneau de détail (glisse depuis la droite) ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(17, 24, 39, .28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .2s ease-out; }
.drawer { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(760px, calc(100% - 24px)); background: #F7F8FA; border-radius: 28px; overflow: auto;
  box-shadow: 0 24px 60px rgba(17, 24, 39, .25); animation: slidein .28s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.drawer-body { padding: 28px; }
.drawer-close { position: sticky; top: 16px; float: right; margin: 16px 16px 0 0; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: #fff; color: #111; cursor: pointer; box-shadow: 0 2px 8px rgba(17, 24, 39, .1); }
.drawer-close [data-icon] { width: 18px; height: 18px; }
.drawer .food-hero, .drawer .recipe-hero { grid-template-columns: 1fr; }
.drawer .recipe-hero .photo { aspect-ratio: 16 / 9; }
.drawer .grid-2 { grid-template-columns: 1fr; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
body.drawer-open { overflow: hidden; }

/* ---------- Tableau de bord en mosaïque ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile-card { background: #fff; border-radius: 26px; padding: 24px 26px; border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 1px 2px rgba(17, 24, 39, .03); min-width: 0; }
.tile-card.soft { background: #F7F8FA; border-color: #fff; }
.c-8 { grid-column: span 8; } .c-7 { grid-column: span 7; } .c-6 { grid-column: span 6; } .c-5 { grid-column: span 5; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; }
.t-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.t-title { font-size: 20px; font-weight: 500; letter-spacing: -.02em; color: #111; display: flex; align-items: center; gap: 10px; }
.t-sub { font-size: 13px; color: #7A8695; margin-top: 2px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #ECE9FD; color: #6B4FD8; font-size: 12px; font-weight: 700; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid #EEF0F3; background: #fff;
  font: inherit; font-size: 14px; font-weight: 500; color: #111; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.pill-btn:hover { background: #F7F8FA; }
.pill-btn [data-icon] { width: 16px; height: 16px; }
.pill-btn.dark { background: var(--act-gradient); color: #fff; border-color: transparent; box-shadow: var(--act-shadow); text-shadow: 0 1px 2px rgba(60, 10, 90, .35); font-weight: 600; }
.pill-btn.dark:hover { filter: saturate(1.1) brightness(1.04); }
.pill-btn.gray { background: #F1F3F6; border-color: #F1F3F6; }
.pill-btn.wide { flex: 1; justify-content: center; height: 46px; }
.pill-static { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: #F1F3F6; color: #7A8695; font-size: 13px; font-weight: 500; }
.link-more { font-size: 14px; color: #111; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; }
.link-more [data-icon] { width: 16px; height: 16px; }
.quiet-link { font-size: 13px; color: #7A8695; text-decoration: none !important; }
.brief-who { display: flex; align-items: center; gap: 12px; }
.brief-ava { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #F0A83C, #8A2BE2); box-shadow: 0 4px 12px rgba(138, 43, 226, .3); }
.brief-ava .logo-symbol { width: 25px; }
.brief-name { font-weight: 600; color: #111; }
.brief-text { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.38; letter-spacing: -.02em; color: #111; font-weight: 400; margin: 22px 0 26px; max-width: 900px; }
.brief-text b { font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.review-item { border-radius: 18px; background: #F7F8FA; padding: 14px; display: grid; gap: 12px; }
.review-top { display: flex; gap: 12px; align-items: center; }
.review-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #C7D4EE, #8FA8DE); color: #fff; flex: none; }
.review-ico [data-icon] { width: 18px; height: 18px; }
.review-name { font-weight: 600; color: #111; line-height: 1.3; }
.review-meta { font-size: 13px; color: #7A8695; }
.review-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4B5563; background: #fff; border-radius: 12px; padding: 9px 12px; }
.review-hint [data-icon] { width: 15px; height: 15px; color: #6B4FD8; }
.review-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #7A8695; margin-top: 14px; }

.metric { position: relative; border-radius: 26px; padding: 18px 20px 16px; color: #fff; overflow: hidden; min-height: 268px; display: flex; flex-direction: column;
  text-decoration: none !important; isolation: isolate; }
.metric::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.35), transparent 55%); }
.metric.green { background: linear-gradient(160deg, #A8DE8F 0%, #5CC26A 45%, #2E9E4A 100%); }
.metric.amber { background: linear-gradient(160deg, #FFD08A 0%, #F6A23F 50%, #E07B1D 100%); }
.metric.coral { background: linear-gradient(160deg, #FFB4A2 0%, #F2765F 50%, #D9503C 100%); }
.metric.blue { background: linear-gradient(160deg, #B9D8F2 0%, #6FA9D6 45%, #3A7FB0 100%); }
.metric.gray { background: linear-gradient(160deg, #D9DEE5 0%, #A9B3BF 50%, #7D8896 100%); }
.metric .m-top { display: flex; justify-content: space-between; align-items: center; }
.m-label { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: #111; }
.m-arrow { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .72); color: #111; }
.m-arrow [data-icon] { width: 14px; height: 14px; }
.m-num { flex: 1; display: grid; place-items: center; padding: 12px 0 6px; }
.m-num svg { height: 86px; width: auto; max-width: 82%; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .08)); }
.m-foot { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.m-foot .tag { background: #fff; color: #111; border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: 12.5px; }
.m-ruler { margin-top: 12px; height: 26px; width: 100%; }
.week-axis { position: relative; margin: 6px 0 14px; padding-top: 34px; }
.week-row { position: relative; height: 40px; }
.week-chip { position: absolute; top: 4px; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; border-radius: 8px; font-size: 12.5px; font-weight: 500;
  color: #2B3A4A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; text-decoration: none !important; }
.week-chip::before { content: ''; width: 3px; height: 16px; border-radius: 2px; background: currentColor; opacity: .8; flex: none; }
.week-chip.k0 { background: #EEF0FF; color: #4F46E5; } .week-chip.k1 { background: #E7F7EC; color: #15803D; } .week-chip.k2 { background: #FEF3E2; color: #B45309; }
.week-line { border-top: 2px dotted #D9DEE5; margin-top: 8px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: #7A8695; margin-top: 10px; }
.week-days span.today { color: #111; font-weight: 700; }
.week-now { position: absolute; top: 0; bottom: 18px; width: 2px; background: #111; transform: translateX(-1px); }
.week-now span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #D7F36B; color: #111; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.next-row { display: flex; align-items: center; gap: 12px; background: #F7F8FA; border-radius: 16px; padding: 10px 10px 10px 10px; text-decoration: none !important; color: inherit; }
.next-badge { background: #111; color: #fff; border-radius: 10px; padding: 7px 9px; font-size: 12.5px; font-weight: 700; flex: none; }
.next-row .n { font-weight: 600; color: #111; font-size: 14px; }
.next-row .d { font-size: 12.5px; color: #7A8695; }
.next-row .go { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #111; flex: none; }
.next-row .go [data-icon] { width: 15px; height: 15px; }
.rows { display: grid; }
.rowx { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #F1F3F6; }
.rowx:first-child { border-top: 0; }
.rowx .ck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #C9D0D9; display: grid; place-items: center; }
.rowx .ck.on { background: #111; border-color: #111; color: #fff; }
.rowx .ck [data-icon] { width: 13px; height: 13px; }
.rowx .n { font-weight: 500; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowx.done .n { color: #9AA4B1; }
.rowx .d { font-size: 12.5px; color: #7A8695; }
.dotpill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dotpill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dotpill.basse { background: #E7F7EC; color: #15803D; } .dotpill.modérée { background: #FEF3E2; color: #B45309; } .dotpill.élevée { background: #FDE8E5; color: #B42318; }
.dotpill.none { background: #F1F3F6; color: #7A8695; } .dotpill.violet { background: #F3E8FF; color: #9333EA; } .dotpill.blue { background: #E8F1FB; color: #2F6F9C; }
.fam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fam { background: #F7F8FA; border-radius: 18px; padding: 14px; min-height: 168px; display: flex; flex-direction: column; text-decoration: none !important; color: inherit; transition: transform .15s, background .15s; }
.fam:hover { background: #F1F3F6; transform: translateY(-2px); }
.fam-top { display: flex; align-items: center; gap: 8px; }
.fam-em { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: #fff; }
.fam .n { margin-top: auto; font-weight: 600; color: #111; }
.fam .d { font-size: 12.5px; color: #7A8695; }

/* ---------- Mise en page ---------- */
main { outline: none; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin-top: 6px; color: var(--slate-2); max-width: 680px; }
.section { margin-top: 40px; }
.section > h2 { margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.spacer { flex: 1; }

/* ---------- Boutons ---------- */
.btn { --b: rgba(255,255,255,.7); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 14.5px; color: var(--slate); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(246,248,251,.85));
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--b); box-shadow: 0 1px 0 rgba(255,255,255,.95) inset, 0 2px 8px rgba(43,58,74,.08);
  transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.95) inset, 0 8px 22px rgba(53,75,96,.16); }
.btn:active { transform: translateY(0); }
.btn.primary { color: #fff; --b: transparent; background: var(--act-gradient); box-shadow: var(--act-shadow); text-shadow: 0 1px 2px rgba(60, 10, 90, .35); }
.btn.dark { color: #fff; background: linear-gradient(180deg, #3D4F63, #2B3A4A); --b: rgba(255,255,255,.2); }
.btn.danger { color: var(--gi-high); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.icon { width: 44px; padding: 0; justify-content: center; }
.btn.small.icon { width: 34px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--slate); }
.chip[aria-pressed="true"] { background: #8A2BE2; color: #fff; border-color: #8A2BE2; box-shadow: 0 4px 12px rgba(138, 43, 226, .3); }

/* ---------- Cartes ---------- */
.card { background: var(--card); border-radius: 26px; box-shadow: 0 1px 2px rgba(17, 24, 39, .03); padding: 24px; border: 1px solid rgba(255,255,255,.9); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.recipe-card { display: block; color: inherit; text-decoration: none !important; }
.recipe-card .photo { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--powder); }
.recipe-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.recipe-card:hover .photo img { transform: scale(1.04); }
.recipe-card .fav { position: absolute; top: 12px; right: 12px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); width: 26px; height: 26px; }
.recipe-card .fav.on svg { fill: #fff; }
.recipe-card .meta { padding: 12px 2px 0; display: grid; gap: 2px; }
.recipe-card .meta .t { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.recipe-card .meta .s { color: var(--slate-2); font-size: 14px; }
.placeholder-photo { width: 100%; height: 100%; display: grid; place-items: center;
  background: var(--brand-gradient); color: #fff; font-weight: 800; font-size: 64px; letter-spacing: -.04em; text-shadow: 0 2px 10px rgba(65, 140, 186, .25); }
.editorial { display: grid; grid-template-columns: 1.2fr 1fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lift);
  color: inherit; text-decoration: none !important; min-height: 360px; }
.editorial .photo { position: relative; min-height: 280px; background: var(--powder); }
.editorial .photo img, .editorial .photo .placeholder-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editorial .body { padding: 32px; display: grid; align-content: center; gap: 14px; }
.editorial .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--accent-ink); font-weight: 800; }
.editorial h3 { font-size: 28px; letter-spacing: -.01em; }
.editorial .why { font-size: 14px; color: var(--slate-2); }
.picks { display: grid; gap: 24px; }
.picks.two { grid-template-columns: 1fr 1fr; }
.picks.two .editorial { grid-template-columns: 1fr; grid-template-rows: 300px auto; }

/* ---------- Badges IG / CG / origine des données ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge.gi-bas, .badge.gl-basse { background: var(--gi-low-bg); color: #3D7259; }
.badge.gi-moyen, .badge.gl-modérée { background: var(--gi-mid-bg); color: #86601F; }
.badge.gi-élevé, .badge.gl-élevée { background: var(--gi-high-bg); color: #9B4640; }
.badge.none { background: #EEF2F6; color: var(--slate-2); }
.prov { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.prov::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prov.mesure { color: #3D7259; background: #EAF4EE; }
.prov.calcul { color: var(--accent-ink); background: #E8F0F7; }
.prov.estimation { color: #86601F; background: #F8F0E0; }
.prov.auto { color: #86601F; background: #F8F0E0; }

/* ---------- Fiche aliment ---------- */
.food-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: stretch; }
.gauge-wrap { display: grid; gap: 8px; justify-items: center; text-align: center; }
.gauge-value { font-size: 48px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: baseline; }
.kv dt { color: var(--slate-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.kv .sub { font-weight: 500; font-size: 12px; color: var(--slate-2); }
.portion { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portion input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent-ink); }
.portion output { font-weight: 800; min-width: 64px; }
.source-box { font-size: 13px; color: var(--slate-2); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; display: grid; gap: 4px; }
.note { font-size: 13.5px; color: var(--slate-2); background: rgba(220, 233, 243, .55); border-radius: var(--radius-sm); padding: 12px 14px; }
.note.warn { background: #FBF3E4; color: #6E4F18; }

/* ---------- Listes de résultats ---------- */
.result { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 18px;
  background: #fff; box-shadow: 0 1px 2px rgba(53,75,96,.05); color: inherit; text-decoration: none !important; border: 1px solid transparent; }
.result:hover { border-color: var(--glacier); box-shadow: var(--shadow); }
.result .n { font-weight: 700; }
.result .d { font-size: 13px; color: var(--slate-2); }
.result .r { display: flex; gap: 8px; align-items: center; }
.cat-title { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 12px; color: var(--accent-ink); margin: 28px 0 10px; }

/* ---------- Comparateur ---------- */
.compare-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; align-items: center;
  padding: 8px 8px 8px 20px; border-radius: 999px; max-width: calc(100% - 32px); }
.compare-bar .items { display: flex; gap: 6px; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table thead th { font-size: 13px; color: var(--slate-2); font-weight: 700; vertical-align: bottom; }
.compare-table tbody th { font-weight: 600; }
.compare-table .best { color: #3D7259; font-weight: 800; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-family: var(--font); fill: var(--slate); }
.weights { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.weights label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.weights select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--slate); }
.verdict { display: grid; gap: 10px; }
.verdict li { margin-bottom: 6px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; }
.field small { font-size: 12.5px; }
input[type=text], input[type=password], input[type=number], input[type=search]:not(.cmd input), input[type=date], input[type=time], input[type=datetime-local], input[type=tel], input[type=email], input[type=url], textarea, select {
  font: inherit; color: var(--slate); background: #fff; border: 1px solid #D5E1EB; border-radius: 12px; padding: 11px 14px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.cols-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.ing-row { display: grid; grid-template-columns: 1.6fr .6fr 1.6fr auto; gap: 10px; align-items: start; }
.ing-row .link { font-size: 12.5px; color: var(--slate-2); padding: 4px 2px; }
.picker { position: relative; }
.picker-list { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lift);
  max-height: 280px; overflow: auto; padding: 6px; display: none; }
.picker-list.open { display: block; }
.picker-list button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--slate); }
.picker-list button:hover, .picker-list button:focus { background: var(--white-blue); outline: none; }
.picker-list .s { font-size: 12px; color: var(--slate-2); }
.tags-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid #D5E1EB; border-radius: 12px; background: #fff; }
.tags-input input { border: 0 !important; outline: none !important; flex: 1; min-width: 120px; padding: 6px !important; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--powder); padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag button { border: 0; background: none; cursor: pointer; color: var(--slate-2); font-size: 15px; line-height: 1; padding: 0 4px; }

/* ---------- Recette ---------- */
.recipe-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.recipe-hero .photo { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--powder); position: relative; }
.recipe-hero .photo img, .recipe-hero .photo .placeholder-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.facts { display: flex; gap: 22px; flex-wrap: wrap; color: var(--slate-2); font-size: 14px; }
.facts b { color: var(--slate); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--powder); display: grid; place-items: center; font-weight: 800; }
.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ing-list .q { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--glacier); font-size: 20px; line-height: 1; }
.stars button.on { color: #E0A93B; }

/* ---------- États ---------- */
.empty { text-align: center; padding: 56px 24px; display: grid; gap: 12px; justify-items: center; }
.empty .ill { width: 72px; aspect-ratio: 381 / 328; background: linear-gradient(120deg, #F0A83C, #8A2BE2); -webkit-mask: url(/brand/symbol-mask.png) center / contain no-repeat; mask: url(/brand/symbol-mask.png) center / contain no-repeat; font-size: 0; }
.empty p { max-width: 460px; color: var(--slate-2); }
.skeleton { background: linear-gradient(90deg, #EEF3F8 0%, #F7FAFC 50%, #EEF3F8 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
.error-box { background: var(--gi-high-bg); color: #7E3833; padding: 14px 18px; border-radius: 14px; }
#toasts { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; }
.toast { background: var(--slate); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-lift); font-weight: 600; font-size: 14px; animation: up .25s ease-out; }
.toast.err { background: #9B4640; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Fenêtres modales ---------- */
dialog { border: 0; padding: 0; border-radius: 24px; box-shadow: var(--shadow-lift); max-width: min(560px, calc(100% - 32px)); width: 100%; color: var(--slate); }
dialog::backdrop { background: rgba(53, 75, 96, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog .dlg { padding: 28px; display: grid; gap: 18px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- Pages à venir ---------- */
.roadmap-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.roadmap-card .num { font-size: 56px; font-weight: 800; line-height: 1; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roadmap-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--slate-2); }

/* ---------- Bibliothèque ---------- */
.c-12 { grid-column: 1 / -1; }
.lib-doc { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: start; }
.lib-cover { width: 120px; aspect-ratio: 538 / 652; border-radius: 12px; overflow: hidden; background: var(--brand-gradient); box-shadow: 0 6px 18px rgba(17, 24, 39, .14); }
.lib-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.lib-recipe { display: grid; background: #fff; border-radius: 20px; overflow: hidden; text-decoration: none !important; color: inherit; border: 1px solid rgba(255,255,255,.9); transition: transform .15s, box-shadow .15s; }
.lib-recipe:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17, 24, 39, .08); }
.lib-thumb { height: 120px; display: grid; place-items: center; font-size: 52px; }
.lib-thumb .em { filter: drop-shadow(0 6px 8px rgba(17, 24, 39, .16)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.lib-recipe:hover .lib-thumb .em { transform: scale(1.12) rotate(-5deg); }
.lib-meta { padding: 12px 14px 14px; display: grid; gap: 3px; }
.lib-meta .n { font-weight: 600; color: #111; line-height: 1.3; }
.lib-meta .d { font-size: 12.5px; color: #7A8695; }
.lib-meta .dotpill { justify-self: start; margin-top: 4px; }
.lib-page { background: #fff; border-radius: 18px; padding: 10px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); margin-top: 14px; }
.lib-page img { width: 100%; display: block; border-radius: 10px; }
.lib-snip { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
mark { background: rgba(255, 165, 0, .28); color: inherit; border-radius: 3px; padding: 0 2px; }
.lib-tip { background: linear-gradient(135deg, rgba(138, 43, 226, .07), rgba(255, 165, 0, .09)); }
.kicker-v { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; color: #8A2BE2; margin-bottom: 6px; }
.tip-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; background: linear-gradient(135deg, #fff 0%, #FBF7FF 60%, #FFF7EC 100%); }
.tip-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #F0A83C, #8A2BE2); }
.tip-badge [data-icon] { width: 22px; height: 22px; }
.tip-card .pill-btn { white-space: normal; height: auto; min-height: 40px; padding: 8px 16px; text-align: left; }
.tip-text { font-size: 18px; line-height: 1.5; color: #111; margin-top: 6px; letter-spacing: -.01em; }

/* ---------- Barre de progression (ajout d'un livre) ---------- */
.upload-wrap { display: grid; gap: 12px; justify-items: end; }
.empty .upload-wrap { justify-items: center; }
.progress-panel { width: min(520px, 100%); background: #fff; border-radius: 18px; padding: 16px 18px; display: grid; gap: 10px;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .05), 0 12px 30px rgba(17, 24, 39, .08); text-align: left; }
.progress-stage { font-weight: 600; color: #111; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-pct { font-weight: 800; font-variant-numeric: tabular-nums; color: #8A2BE2; }
.progress-track { height: 10px; border-radius: 999px; background: #F0EEF6; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8A2BE2, #FFA500); transition: width .25s ease-out; }
.progress-fill.busy { background: linear-gradient(90deg, #8A2BE2 0%, #FFA500 40%, #F8F8FF 50%, #FFA500 60%, #8A2BE2 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.progress-fill.err { background: #D9503C; }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress-detail { font-size: 12.5px; color: #7A8695; }
.progress-steps { display: flex; gap: 10px; font-size: 11.5px; color: #A0A9B5; }
.progress-steps .on { color: #8A2BE2; font-weight: 700; }
.progress-steps .done { color: #15803D; font-weight: 600; }

/* ---------- Carrousels et cartes de mise en avant ---------- */
.rail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.rail-head h2 { font-size: 26px; }
.rail-head .go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #F1F4F8; color: var(--slate); }
.rail-head .go [data-icon] { width: 16px; height: 16px; }
.rail-head .arrows { margin-left: auto; display: flex; gap: 8px; }
.rail-head .arrows button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #F1F4F8; color: var(--slate); cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.rail-head .arrows button:disabled { opacity: .35; cursor: default; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 18px) / 6); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel.wide { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
.tile { display: grid; gap: 10px; color: var(--slate); text-decoration: none !important; }
.tile .art { aspect-ratio: 1 / 0.95; border-radius: 18px; display: grid; place-items: center; font-size: 72px; overflow: hidden; position: relative; transition: transform .25s; }
.tile:hover .art { transform: translateY(-2px); }
.tile .art .em { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 8px 10px rgba(43, 58, 74, .18)); }
.tile:hover .art .em { transform: scale(1.12) rotate(-5deg); }
.tile .t { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.tile .s { color: var(--slate-2); font-size: 13.5px; margin-top: -6px; }
.art-1 { background: linear-gradient(150deg, #E7EEFA, #C7D4EE); } .art-2 { background: linear-gradient(150deg, #E5F3F7, #B3D8E4); }
.art-3 { background: linear-gradient(150deg, #EEF0FA, #D4DBF2); } .art-4 { background: linear-gradient(150deg, #E9F5F2, #C1E2DA); }
.art-5 { background: linear-gradient(150deg, #FBF3E6, #F0DDBD); } .art-6 { background: linear-gradient(150deg, #F7ECEF, #EBCFD6); }
.promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promo { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 26px 28px; border-radius: 22px; background: #fff;
  border: 1px solid #EEF2F7; box-shadow: 0 2px 6px rgba(43, 58, 74, .04), 0 12px 30px rgba(43, 58, 74, .07); }
.promo .em { font-size: 64px; line-height: 1; filter: drop-shadow(0 8px 10px rgba(43, 58, 74, .18)); }
.promo h3 { font-size: 18px; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.promo p { color: var(--slate-2); font-size: 14px; margin-bottom: 12px; }
.promo .btn { height: 40px; }
.hero-hello { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-hello h1 { font-size: clamp(26px, 3vw, 34px); }

/* ---------- Connexion ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 28px; padding: 24px; max-width: none; }
.login-logo .logo-img { width: 200px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .btn { justify-content: center; }
.login-card, .login-card .field { text-align: center; }
.login-card .field > span, .login-card .field small { justify-self: center; }
.login-card input { text-align: center; }
.login-card .error-box { text-align: center; }
.nav-short { display: none; }
@media (max-width: 1280px) {
  .c-3 { grid-column: span 6; } .c-6 { grid-column: span 12; }
  .c-8, .c-7 { grid-column: span 12; } .c-4, .c-5 { grid-column: span 12; }
  .promos { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1281px) and (max-width: 1440px) {
  .c-8 { grid-column: span 7; } .c-4 { grid-column: span 5; }
}
/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .food-hero, .recipe-hero, .editorial, .picks.two { grid-template-columns: 1fr; }
  .editorial .photo { min-height: 240px; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  /* barre d'icônes → barre fixe en bas */
  .rail { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid #E5E8EC; box-shadow: 0 -4px 16px rgba(17, 24, 39, .06); }
  .rail-logo, .rail-avatar { display: none; }
  .sections { flex-direction: row; flex: 1; justify-content: space-around; gap: 0; }
  .sections a { width: auto; height: auto; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 4px; font-size: 10.5px; font-weight: 600; }
  .sections a .nav-long { display: none; }
  .sections a .nav-short { display: block; position: static; transform: none; opacity: 1; background: none; color: inherit; padding: 0; font-size: 10.5px; }
  .sections a[aria-current="page"] { box-shadow: none; background: rgba(138, 43, 226, .1); color: #8A2BE2; }
  .sections .nav-profile { display: flex; color: #8A2BE2; }
  .sections a.nav-soon { display: none; }
  .upload-wrap { justify-items: stretch; width: 100%; } .progress-steps { display: none; }
  .lib-doc { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; } .lib-cover { width: 84px; }
  .lib-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .lib-thumb { height: 90px; font-size: 40px; }
  .tip-text { font-size: 16px; }
  .main-col { padding: 14px 16px calc(100px + env(safe-area-inset-bottom)); }
  .head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .head-title { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .head-logo { display: block; } .head-logo .logo-img { width: 120px; }
  .head-h1 { font-size: 28px; }
  .head-tools { flex: none; }
  .cmd-kbd { display: none; }
  .t-head .pill-static { display: none; }
  .bento { gap: 12px; }
  .bento > * { grid-column: 1 / -1 !important; }
  .bento > .metric { grid-column: span 6 !important; min-height: 210px; }
  .tile-card { padding: 20px; border-radius: 22px; }
  .rowx { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .rowx .act { display: none; }
  .fam-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fam { min-height: 130px; padding: 12px; }
  .drawer { top: 0; right: 0; bottom: 0; left: 0; width: 100%; border-radius: 0; }
  .drawer-body { padding: 16px 16px 40px; }
  .compare-bar, #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .compare-bar { padding-left: 16px; white-space: nowrap; }
  .compare-bar b { font-size: 13px; }
  .compare-table thead th { min-width: 120px; }
  .tags-input input { min-width: 0; }
  .page-head { margin-bottom: 18px; }
  .rail-head h2 { font-size: 21px; }
  .rail-head .arrows { display: none; }
  .promos { grid-template-columns: 1fr; }
  .recipe-hero .photo, .editorial { border-radius: 22px; }
  .facts { gap: 12px; }
  .btn { height: 42px; padding: 0 16px; }
  dialog .dlg { padding: 20px; }
  .weights { grid-template-columns: 1fr 1fr; }
  .ing-row { grid-template-columns: 1fr 84px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .ing-row .picker { grid-column: 1 / 2; }
  .ing-row .rm { grid-column: 2 / 3; justify-self: end; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; }
  .editorial .body { padding: 22px; }
  .result { grid-template-columns: 1fr; gap: 8px; }
  .result .r { justify-content: space-between; }
}
@media (max-width: 380px) { .bento > .metric { grid-column: 1 / -1 !important; } }
/* ---------- Halo qui suit le pointeur sur tous les éléments d'action ----------
   Porté du composant « spotlight card » : bordure lumineuse et lueur intérieure,
   teinte du violet (#8A2BE2, 271°) vers l'orange (#FFA500, 39°) selon la position horizontale. */
:root { --g-hue: calc(271 + var(--gxp) * 128); }
.btn, .pill-btn, .chip, .head-btn, .head-compare, .cmd, .result, .fam, .next-row, .sections a, .rail-avatar, .btn-round, .recipe-card .photo, .metric, .editorial,
.review-item, .compare-bar, .stars button, .drawer-close, .m-arrow, .rail-logo, .tile-card a.go, .rowx .ck, dialog .dlg-actions .btn {
  position: relative; isolation: isolate; }
.btn::after, .pill-btn::after, .chip::after, .head-btn::after, .head-compare::after, .cmd::after, .result::after, .fam::after, .next-row::after, .sections a::after,
.rail-avatar::after, .btn-round::after, .recipe-card .photo::after, .editorial::after, .review-item::after, .drawer-close::after, .rail-logo::after {
  content: ''; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 2;
  background: radial-gradient(150px 150px at calc(var(--gx) * 1px) calc(var(--gy) * 1px),
    hsl(var(--g-hue) 100% 62% / 1) 0%, hsl(calc(var(--g-hue) + 20) 100% 70% / .55) 35%, transparent 70%) fixed;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.btn::before, .pill-btn::before, .chip::before, .head-btn::before, .head-compare::before, .cmd::before, .result::before, .fam::before, .next-row::before, .sections a::before,
.rail-avatar::before, .btn-round::before, .review-item::before, .drawer-close::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(110px 110px at calc(var(--gx) * 1px) calc(var(--gy) * 1px),
    hsl(var(--g-hue) 100% 70% / .16), transparent 70%) fixed; }
.metric::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; padding: 2px;
  background: radial-gradient(180px 180px at calc(var(--gx) * 1px) calc(var(--gy) * 1px), hsl(0 0% 100% / .95), transparent 70%) fixed;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.sections a::after, .recipe-card .photo::after, .editorial::after { inset: 0; }
/* Sans souris (téléphone, tablette tactile) ou mouvements réduits : pas de halo */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .btn::after, .pill-btn::after, .chip::after, .head-btn::after, .head-compare::after, .cmd::after, .result::after, .fam::after, .next-row::after, .sections a::after,
  .rail-avatar::after, .btn-round::after, .recipe-card .photo::after, .editorial::after, .review-item::after, .drawer-close::after, .rail-logo::after, .metric::after,
  .btn::before, .pill-btn::before, .chip::before, .head-btn::before, .cmd::before, .result::before, .fam::before, .next-row::before, .sections a::before,
  .rail-avatar::before, .btn-round::before, .review-item::before, .drawer-close::before { display: none; }
}

/* Bouton sélectionné ou appuyé : violet #8A2BE2 */
.btn:active, .pill-btn:active, .chip:active, .head-btn:active, .btn-round:active, .drawer-close:active, .cmd-list button:active,
.btn[aria-pressed="true"], .pill-btn[aria-pressed="true"], [role="tab"][aria-selected="true"] {
  background: #8A2BE2 !important; color: #fff !important; border-color: #8A2BE2 !important; text-shadow: none; filter: none; }
.cmd-list button.on { background: rgba(138, 43, 226, .1); color: #8A2BE2; }
.cmd-list button.on [data-icon] { color: #8A2BE2; }

@media print {
  .rail, .head, .compare-bar, #toasts, .backdrop, .drawer-close, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- v0.10 : santé, glycémie, repas ---------- */
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 20px; }
.tabs .chip { text-decoration: none; color: inherit; }
.btn.ghost-add { border-style: dashed; color: var(--slate-2); background: transparent; justify-content: flex-start; }
.doc-group { display: grid; gap: 8px; } .doc-group h3 { font-size: 14px; color: var(--slate-2); margin: 4px 0 0; font-weight: 600; }
.doc-row, .appt-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.doc-ava { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #8A2BE2; background: #F3E8FF; }
.doc-ava [data-icon] { width: 20px; height: 20px; }
.doc-main { display: grid; gap: 2px; min-width: 0; } .doc-main > * { overflow: hidden; text-overflow: ellipsis; }
.appt-date { width: 44px; height: 48px; border-radius: 14px; display: grid; place-content: center; text-align: center; color: #fff; line-height: 1.05;
  background: linear-gradient(150deg, #A660F0, #8A2BE2); } .appt-date strong { font-size: 18px; } .appt-date span { font-size: 11px; text-transform: uppercase; }
.appt-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.cal { border: 1px solid var(--line); border-radius: 20px; padding: 12px; background: #fff; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11.5px; color: var(--slate-2); font-weight: 600; padding: 4px 0; }
.cal-cell { min-height: 58px; border: 0; border-radius: 10px; background: #F7F8FA; padding: 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; cursor: pointer; font: inherit; text-align: left; overflow: hidden; }
.cal-cell:hover { background: #F3E8FF; } .cal-cell.out { opacity: .45; }
.cal-cell.today .cal-n { background: #8A2BE2; color: #fff; border-radius: 999px; padding: 0 6px; align-self: flex-start; }
.cal-n { font-size: 12px; font-weight: 600; } .cal-ev { font-size: 10.5px; background: #8A2BE2; color: #fff; border-radius: 6px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-group { border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: grid; gap: 6px; background: #fff; }
.lab-head { display: flex; justify-content: space-between; align-items: center; } .lab-head h3 { margin: 0; font-size: 16px; }
.lab-spark { width: 120px; height: 32px; } .lab-spark path { fill: none; stroke: #8A2BE2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lab-row { display: grid; grid-template-columns: 110px 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lab-ref { font-size: 13px; }
/* Courbe glycémique */
.gc { display: block; width: 100%; height: auto; }
.gc-band { fill: rgba(138, 43, 226, .08); } .gc-grid { stroke: #E5E8EC; stroke-dasharray: 3 4; } .gc-tick { font-size: 11px; fill: #6B7785; }
.gc-line { stroke: #8A2BE2; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gc-dot { fill: #FFA500; } .gc-last { fill: #fff; stroke: #8A2BE2; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.gc-wrap { border-radius: 16px; overflow: hidden; }
.gstats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.gstat { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: #F7F8FA; } .gstat strong { font-size: 20px; } .gstat span, .gstat small { font-size: 12.5px; }
/* Journal des repas */
.meal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.meal-col { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 18px; background: #F7F8FA; } .meal-col h3 { margin: 0; font-size: 15px; }
.meal-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: start; background: #fff; border-radius: 12px; padding: 8px 10px; }
.meal-item > div { display: grid; gap: 2px; min-width: 0; } .meal-item small { font-size: 12px; }
.meal-results { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.meal-hit { display: grid; gap: 1px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 10px; cursor: pointer; font: inherit; }
.meal-hit:hover { border-color: #8A2BE2; }

/* Blocs « verre » du tableau de bord */
.metric.glass { isolation: isolate; border: 1px solid rgba(255, 255, 255, .42); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -18px 40px rgba(40, 0, 80, .16), 0 18px 40px -12px var(--glass-shadow), 0 2px 6px rgba(17, 24, 39, .06);
  text-shadow: 0 1px 2px rgba(40, 0, 70, .18); }
.metric.glass::before { z-index: -1; background:
  linear-gradient(165deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 26%, rgba(255, 255, 255, 0) 42%),
  radial-gradient(60% 45% at 92% 105%, var(--glass-orb), transparent 70%),
  radial-gradient(45% 35% at 8% 70%, rgba(255, 255, 255, .22), transparent 70%); }
.metric.glass-violet { --glass-shadow: rgba(138, 43, 226, .55); --glass-orb: rgba(255, 165, 0, .35);
  background: linear-gradient(155deg, rgba(178, 118, 245, .96) 0%, rgba(138, 43, 226, .94) 52%, rgba(104, 26, 182, .96) 100%); }
.metric.glass-orange { --glass-shadow: rgba(255, 140, 0, .5); --glass-orb: rgba(138, 43, 226, .3);
  background: linear-gradient(155deg, rgba(255, 206, 120, .97) 0%, rgba(255, 165, 0, .95) 52%, rgba(240, 128, 0, .97) 100%); }
.metric.glass .m-label, .metric.glass .m-arrow, .metric.glass .m-foot .tag { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: none;
  box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(40, 0, 80, .1); }
.g-now { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 10px; }
.m-num.sm { flex: none; padding: 0; } .m-num.sm svg { height: 50px; }
.g-unit { font-size: 13px; font-weight: 600; opacity: .9; padding-bottom: 4px; }
.g-curve { flex: 1; min-height: 70px; margin: 10px -4px 8px; display: flex; align-items: center; }
.gc-compact { height: 92px; }
.gc-compact .gc-band { fill: rgba(255, 255, 255, .18); }
.gc-compact .gc-line { stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 2px 4px rgba(40, 0, 80, .35)); }
.gc-compact .gc-last { fill: #FFA500; stroke: #fff; }
.m-empty { flex: 1; display: grid; place-content: center; text-align: center; gap: 6px; padding: 10px 6px; font-size: 13.5px; } .m-empty strong { font-size: 17px; }
.meal-lines { flex: 1; display: grid; align-content: center; gap: 8px; margin: 14px 0 12px; }
.meal-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; border-radius: 16px; color: #3B2200; text-shadow: none;
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ml-name { display: grid; font-weight: 700; font-size: 14px; min-width: 0; } .ml-name small { font-weight: 500; font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-gi { min-width: 42px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: #fff; color: #7A8695; }
.ml-gi.basse { color: #15803D; } .ml-gi.modérée { color: #B45309; } .ml-gi.élevée { color: #B42318; }
.metric.glass-orange .m-foot { color: #3B2200; text-shadow: none; }
@media (max-width: 900px) { .gstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .meal-grid { grid-template-columns: 1fr 1fr; } .appt-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; } .tabs .chip { flex: none; }
  .lab-row { grid-template-columns: minmax(0, 1fr) auto; } .lab-ref { grid-column: 1 / -1; order: 3; } .lab-row > span:last-child { grid-row: 1 / 3; grid-column: 2; }
  .doc-row, .appt-row { grid-template-columns: 44px minmax(0, 1fr); } .doc-row > .row, .appt-row > .row { grid-column: 1 / -1; justify-content: flex-end; }
  .meal-grid { grid-template-columns: minmax(0, 1fr); }
  .cal-cell { min-height: 44px; } .cal-ev { font-size: 0; height: 5px; padding: 0; }
  .bento > .metric.glass { grid-column: 1 / -1 !important; min-height: 240px; }
}
@media (prefers-reduced-transparency: reduce) { .metric.glass, .metric.glass .m-label, .meal-line { -webkit-backdrop-filter: none; backdrop-filter: none; } }
.tabs .chip[aria-pressed="true"] { color: #fff; }

/* ---------- v0.11 : coach IG + bloc « À vérifier » simplifié ---------- */
.coach { gap: 14px; }
.coach-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.coach-sub strong { font-size: 15px; } .coach-sub .muted { font-size: 12px; }
.coach-foods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cf { display: grid; gap: 4px; min-width: 0; }
.cf-link { position: relative; display: block; border-radius: 20px; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 1 / 1.08;
  box-shadow: 0 10px 24px -14px rgba(17, 24, 39, .45); }
.cf-media { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(150deg, #F3E8FF, #FFE9C7); }
.cf-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cf-link:hover .cf-media img { transform: scale(1.05); }
.cf-emoji { font-size: 44px; }
.cf-link::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, transparent, rgba(20, 8, 40, .72)); }
.cf-name { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; font-weight: 700; font-size: 14px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.cf-gi { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 12px; font-weight: 700; color: #15803D; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 #fff; }
.cf-like { position: absolute; top: 10px; right: 10px; z-index: 1; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; color: #8A2BE2;
  background: rgba(255, 255, 255, .82); } .cf-like [data-icon] { width: 14px; height: 14px; }
.cf-credit { font-size: 10.5px; color: var(--slate-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px; }
.cf-credit a { color: inherit; }
.coach-note { margin: 0; font-size: 13px; color: var(--slate-2); }
.coach-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; }
.coach-journal, .coach-tip { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: inherit; }
.coach-journal { background: linear-gradient(150deg, #F6EEFF, #FFF4E3); }
.coach-journal .pill-btn { justify-self: start; }
.coach-tip { background: #F7F8FA; } .coach-tip p { margin: 0; font-size: 14px; line-height: 1.45; } .coach-tip .muted { font-size: 12px; }
.cj-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cj-count { font-weight: 800; color: #8A2BE2; }
.cj-dots { display: flex; gap: 6px; } .cj-dots span { flex: 1; height: 6px; border-radius: 999px; background: rgba(138, 43, 226, .15); }
.cj-dots span.on { background: linear-gradient(90deg, #8A2BE2, #FFA500); }
.cj-streak { font-size: 13px; color: var(--slate-2); }
.tip-ico { color: #8A2BE2; } .tip-ico [data-icon] { width: 18px; height: 18px; }
.review-intro { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--slate-2); }
.review-q { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.review-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 12px; }
.review-pair > div { display: grid; gap: 2px; background: #fff; border-radius: 14px; padding: 10px 12px; min-width: 0; }
.review-pair > div .muted { font-size: 11.5px; } .review-pair strong { font-size: 14px; overflow-wrap: anywhere; }
.review-eq { font-weight: 800; color: #8A2BE2; }
@media (max-width: 1100px) { .coach-foods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .coach-foods { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -4px; padding: 0 4px 4px; }
  .cf { scroll-snap-align: start; }
  .coach-row { grid-template-columns: minmax(0, 1fr); }
}
.brief-ava { flex: none; }
@media (max-width: 760px) { .coach .t-head .quiet-link { display: none; } }

/* Comparateur dans l'en-tête */
.head-tools.with-tray { flex-basis: 600px; }
.head-tray { display: flex; align-items: center; gap: 8px; flex: none; }
.head-tray[hidden] { display: none; }
.head-compare { height: 50px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 18px; border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none !important;
  background: var(--act-gradient); box-shadow: var(--act-shadow); white-space: nowrap; }
.head-compare [data-icon] { width: 18px; height: 18px; }
.hc-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: rgba(255, 255, 255, .85); color: #8A2BE2; font-weight: 800; font-size: 14px; }
.head-clear [data-icon] { width: 18px; height: 18px; }
.head-clear:hover { color: #B42318; }
@media (max-width: 760px) {
  .head-tools.with-tray { flex-basis: auto; }
  .head-compare { padding: 0 6px 0 14px; } .hc-label { display: none; }
}

/* Photo d'un aliment (fiche IG) */
.gi-photo { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(150deg, #F3E8FF, #FFE9C7); }
.gi-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gi-photo-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #8A2BE2; font-size: 13px; }
.gi-photo-empty [data-icon] { width: 28px; height: 28px; }
.gi-photo-num { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); }
.gi-photo-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px;
  background: linear-gradient(180deg, transparent, rgba(20, 8, 40, .55)); }
.gi-photo-credit { font-size: 11.5px; color: #fff; } .gi-photo-credit a { color: #fff; }

/* Dialogue « Mon repas » */
dialog:has(.meal-dlg) { width: min(640px, calc(100vw - 24px)); }
.meal-dlg { display: grid; gap: 12px; min-width: 0; }
.md-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.md-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #F1F2F5; }
.md-tab { border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--slate-2); cursor: pointer; }
.md-tab[aria-selected="true"] { background: #fff; color: #8A2BE2; box-shadow: 0 1px 4px rgba(17, 24, 39, .1); }
.md-list { display: grid; gap: 6px; max-height: min(340px, 42vh); overflow: auto; padding: 2px; }
.md-list[hidden] { display: none; }
.md-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 10px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line);
  background: #fff; border-radius: 14px; padding: 8px 10px; font: inherit; cursor: pointer; color: inherit; }
.md-item:hover { border-color: #C9A6F2; }
.md-item[aria-selected="true"] { border-color: #8A2BE2; background: #F8F1FF; box-shadow: 0 0 0 2px rgba(138, 43, 226, .18); }
.md-em { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: linear-gradient(150deg, #F3E8FF, #FFE9C7); }
.md-txt { display: grid; gap: 1px; min-width: 0; } .md-txt strong { font-size: 14.5px; } .md-txt small { color: var(--slate-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-check { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; color: transparent; border: 1.5px solid #D5DAE1; }
.md-check [data-icon] { width: 14px; height: 14px; }
.md-item[aria-selected="true"] .md-check { background: #8A2BE2; border-color: #8A2BE2; color: #fff; }
.md-all { font-size: 13px; color: var(--slate-2); display: flex; align-items: center; gap: 6px; }
.md-web { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
button.meal-line { width: 100%; text-align: left; font: inherit; cursor: pointer; }
button.meal-line:hover { background: rgba(255, 255, 255, .72); }
.ml-gi [data-icon] { width: 16px; height: 16px; }
.metric.glass-orange a.m-label { text-decoration: none; color: #3B2200; }
button.m-arrow { border: 0; cursor: pointer; font: inherit; }
@media (max-width: 760px) { .md-tab { font-size: 11.5px; padding: 8px 2px; white-space: nowrap; letter-spacing: -.01em; } .md-web { grid-template-columns: minmax(0, 1fr); } }
.auto-pill { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: #FFF1D6; color: #9A5B00; vertical-align: 2px; }
.link-bar { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: #F8F1FF; }
.link-bar p { margin: 0; font-size: 13px; }

/* ---------- v0.15 : fond de marque (connexion, invitation) et onboarding ---------- */
.brand-bg { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(60% 50% at 15% 10%, rgba(255, 255, 255, .22), transparent 70%),
  radial-gradient(50% 60% at 90% 90%, rgba(80, 0, 160, .25), transparent 70%),
  linear-gradient(90deg, #F2AA3C 0%, #D88C4C 30%, #B66C7E 62%, #8A2BE2 100%); }
.login-page .login-card { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 30px 80px -30px rgba(60, 10, 90, .55); }
.login-page .login-logo { display: none; }
.login-page .login-card::before { content: ''; display: block; height: 58px; margin: 4px auto 6px; width: 190px; background: url('/brand/logo.png') center / contain no-repeat; }
.login-alt { margin: 4px 0 0; font-size: 13.5px; color: var(--slate-2); } .login-alt a { color: #8A2BE2; font-weight: 700; }

.onb { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: clamp(12px, 4vw, 48px); }
.onb-card { width: min(860px, 100%); min-height: min(680px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto 1fr auto; gap: 18px;
  padding: clamp(20px, 4vw, 44px); border-radius: 30px; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 40px 100px -40px rgba(60, 10, 90, .6); }
.onb-top { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 14px; }
.onb-logo { width: 170px; }
.onb-progress { width: min(420px, 100%); height: 6px; border-radius: 999px; background: rgba(138, 43, 226, .12); overflow: hidden; }
.onb-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #FFA500, #8A2BE2); transition: width .45s ease; }
.onb-count { font-size: 12px; font-weight: 700; color: var(--slate-2); letter-spacing: .04em; }
.onb-step { display: grid; align-content: center; min-width: 0; }
/* Le bloc de la question : verre clair translucide, comme sur la maquette */
.onb-q { display: grid; gap: 14px; width: min(620px, 100%); justify-self: center; padding: clamp(18px, 3vw, 30px); border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55), rgba(248, 241, 255, .45)); border: 1px solid rgba(138, 43, 226, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px -26px rgba(138, 43, 226, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.onb-q.in-next { animation: onbIn .42s cubic-bezier(.2, .8, .2, 1); } .onb-q.in-prev { animation: onbBack .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes onbIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes onbBack { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
.onb-num { font-size: 13px; font-weight: 800; color: #8A2BE2; }
.onb-q h1 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.02em; }
.onb-sub { margin: 0; color: var(--slate-2); font-size: 15.5px; line-height: 1.5; }
.onb-body { display: grid; gap: 14px; margin-top: 6px; }
.onb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.onb-field { display: grid; gap: 6px; } .onb-field > span { font-weight: 700; font-size: 14px; } .onb-field small { color: var(--slate-2); font-size: 12.5px; }
.onb-field input, .onb-field textarea { width: 100%; font: inherit; font-size: 18px; padding: 12px 2px; border: 0; border-bottom: 2px solid rgba(138, 43, 226, .25);
  background: transparent; color: var(--ink, #1F2937); border-radius: 0; outline: none; transition: border-color .2s; }
.onb-field textarea { font-size: 16px; resize: vertical; }
.onb-field input:focus, .onb-field textarea:focus { border-bottom-color: #8A2BE2; }
.onb-field input::placeholder, .onb-field textarea::placeholder { color: #B6A9C9; }
.onb-code { letter-spacing: .25em; text-transform: uppercase; font-weight: 700; }
.onb-label { margin: 6px 0 -4px; font-weight: 700; font-size: 14px; }
.onb-choices { display: grid; gap: 10px; } .onb-choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.onb-choices.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .onb-choices.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.onb-choice { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 15px; font-weight: 600; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  color: #3B2463; background: rgba(255, 255, 255, .7); border: 1.5px solid rgba(138, 43, 226, .22); transition: background .15s, border-color .15s, transform .1s; }
.onb-choice:hover { border-color: #8A2BE2; background: #fff; } .onb-choice:active { transform: scale(.98); }
.onb-choice kbd { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: inherit; font-size: 12px; font-weight: 800;
  border: 1.5px solid rgba(138, 43, 226, .35); color: #8A2BE2; background: #fff; }
.onb-choice[aria-pressed="true"] { background: #8A2BE2; border-color: #8A2BE2; color: #fff; box-shadow: 0 10px 24px -12px rgba(138, 43, 226, .8); }
.onb-choice[aria-pressed="true"] kbd { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .6); color: #fff; }
.onb-emoji { font-size: 18px; }
.onb-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #3F3354; line-height: 1.45; }
.onb-consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(138, 43, 226, .07); font-weight: 600; cursor: pointer; }
.onb-consent input { width: 20px; height: 20px; accent-color: #8A2BE2; flex: none; margin-top: 2px; }
.onb-recap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.onb-recap > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .75); min-width: 0; }
.onb-recap small { color: var(--slate-2); } .onb-recap strong { overflow-wrap: anywhere; }
.onb-error { margin: 0; color: #B42318; font-weight: 600; font-size: 14px; }
.onb-error[hidden] { display: none; }
.onb-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onb-nav .btn { min-width: 130px; justify-content: center; }
.onb-back { background: transparent; border-color: transparent; box-shadow: none; }
.onb-hint { font-size: 12.5px; color: var(--slate-2); }
@media (hover: none) { .onb-hint { visibility: hidden; } .onb-choice kbd { display: none; } }
@media (max-width: 640px) {
  .onb { padding: 0; place-items: stretch; }
  .onb-card { border-radius: 0; min-height: 100dvh; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); }
  .onb-step { align-content: start; }
  .onb-q { padding: 18px 14px; }
  .onb-row, .onb-recap { grid-template-columns: minmax(0, 1fr); }
  .onb-choices.cols-3, .onb-choices.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onb-hint { display: none; }
  .onb-nav { position: sticky; bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .onb-q.in-next, .onb-q.in-prev { animation: none; } }
.onb-q:focus { outline: none; }
.invite-box { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: linear-gradient(150deg, #F6EEFF, #FFF4E3); border: 1px solid rgba(138, 43, 226, .15); }
.invite-code { font-size: 30px; font-weight: 800; letter-spacing: .14em; color: #8A2BE2; }
.onb-choices.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.onb-choices.cols-5 .onb-choice { justify-content: center; padding: 10px 6px; }
.onb-sport { display: grid; gap: 8px; padding-bottom: 6px; }
@media (max-width: 640px) { .onb-choices.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .onb-choices.cols-5 .onb-choice { font-size: 13px; } }

/* Bloc « Mon sport » */
.sport-card { display: flex; flex-direction: column; gap: 12px; }
.sport-list { display: grid; gap: 6px; }
.sport-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #F7F8FA; }
.sport-em { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: linear-gradient(150deg, #F3E8FF, #FFE9C7); }
.sport-name { font-weight: 700; } .sport-freq { font-size: 13px; color: var(--slate-2); white-space: nowrap; }
.sport-vol { display: grid; gap: 6px; font-size: 14px; }
.sport-bar { height: 8px; border-radius: 999px; background: rgba(138, 43, 226, .12); overflow: hidden; }
.sport-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFA500, #8A2BE2); }
.sport-impact { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(150deg, #F6EEFF, #FFF4E3); }
.sport-impact .pill-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.sport-obs { margin: 0; font-size: 13.5px; line-height: 1.45; }
.sport-warn { margin: 0; font-size: 12.5px; color: #8A3B00; background: #FFF1D6; padding: 8px 10px; border-radius: 10px; }
.sport-impact details { font-size: 12.5px; color: var(--slate-2); } .sport-impact details p { margin: 6px 0 0; }
.sport-empty { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 20px 6px; }
.sport-big { font-size: 40px; }
.sport-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr); gap: 8px; }
.review-explore { margin-bottom: 20px; }
@media (max-width: 760px) { .sport-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sport-edit select:first-child { grid-column: 1 / -1; } }
/* Accès bêta */
.beta-pill { justify-self: center; display: inline-flex; align-items: center; gap: 6px; margin-top: -2px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #8A2BE2; background: rgba(138, 43, 226, .08); border: 1px solid rgba(138, 43, 226, .25); text-decoration: none; letter-spacing: .02em; }
.beta-pill:hover { background: rgba(138, 43, 226, .14); }
.beta-pill[hidden] { display: none; }
.beta-banner { margin: 12px 24px 0; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; background: linear-gradient(90deg, #F6EEFF, #FFF4E3); border: 1px solid rgba(138, 43, 226, .2); }
.beta-banner b { color: #fff; background: #8A2BE2; border-radius: 999px; padding: 2px 8px; margin-right: 6px; font-size: 12px; }
.beta-banner a { color: #8A2BE2; font-weight: 700; margin-left: 6px; }
.beta-banner[hidden] { display: none; }
.beta-box { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: #F7F8FA; }
@media (max-width: 760px) { .beta-banner { margin: 8px 12px 0; } }

/* Bloc partagé : sport (haut) + humeur du jour (bas) */
.sport-card.split { gap: 0; }
.sport-half { display: flex; flex-direction: column; gap: 10px; }
.split .sport-row { padding: 6px 10px; } .split .sport-em { width: 30px; height: 30px; font-size: 16px; }
.split-sep { height: 1px; margin: 16px -4px; background: linear-gradient(90deg, transparent, rgba(138, 43, 226, .25), transparent); }
.mood { display: grid; gap: 10px; }
.mood-hist { display: inline-flex; gap: 2px; font-size: 13px; letter-spacing: 1px; }
.mood-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mood-btn { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 14px; border: 1.5px solid transparent; background: #F7F8FA; cursor: pointer; font: inherit;
  transition: transform .12s, background .15s, border-color .15s; }
.mood-btn:hover { transform: translateY(-2px); background: #F3E8FF; }
.mood-e { font-size: 26px; line-height: 1; filter: grayscale(.25); transition: filter .15s, transform .15s; }
.mood-btn small { font-size: 11px; color: var(--slate-2); font-weight: 600; }
.mood-btn[aria-checked="true"] { background: linear-gradient(150deg, #F6EEFF, #FFF1DB); border-color: #8A2BE2; box-shadow: 0 8px 18px -10px rgba(138, 43, 226, .7); }
.mood-btn[aria-checked="true"] .mood-e { filter: none; transform: scale(1.12); }
.mood-btn[aria-checked="true"] small { color: #8A2BE2; }
.mood-acts { display: grid; gap: 6px; }
.mood-act { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #F7F8FA; font-size: 13.5px; font-weight: 600; }
.mood-act > div { display: grid; gap: 3px; }
.mood-act-em { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: #fff; }
.mood-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mood-link { justify-self: start; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: #8A2BE2; cursor: pointer; text-decoration: none; }
.mood-link:hover { text-decoration: underline; }
.mood-note { margin: 0; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: #FFF1D6; color: #7A4300; }
.mood-note.strong { background: #F3E8FF; color: #4B1580; font-weight: 600; }
.mood-help { margin: 0; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: #FDECEC; color: #8A1C1C; }
.mood-help a { color: inherit; font-weight: 800; }
.breath { display: grid; justify-items: center; gap: 14px; padding: 10px 0 4px; }
.breath-circle { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, 0) 45%), linear-gradient(150deg, #FFA500, #8A2BE2);
  box-shadow: 0 20px 40px -18px rgba(138, 43, 226, .8); transform: scale(.7); transition: transform 5s ease-in-out; }
.breath-circle.in { transform: scale(1.15); } .breath-circle.out { transform: scale(.7); }
.breath-label { font-size: 20px; font-weight: 800; color: #3B2463; }
.breath-clock { font-variant-numeric: tabular-nums; color: var(--slate-2); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .breath-circle { transition: none; } }
