/* 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: linear-gradient(140deg, #8FB2DD, #418CBA); 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], 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; }

/* ---------- 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; }
.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; }
  .sections a.nav-soon { 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, .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, .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, .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, .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; }
}
