/* Structure iOS (maquette audit-ios) : barre de feuille, alerte, annulation. Chargé après anneau.css. */

/* ---------- Barre de feuille : Annuler · Titre · Action ---------- */
.modal-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 8px 4px;
}
.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}
.sheet-side { display: flex; align-items: center; min-width: 0; }
.sheet-right { justify-content: flex-end; }
.modal-header .sheet-btn {
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 0 10px;
  background: none;
  border-radius: 8px;
  color: var(--tint);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
}
.modal-header .sheet-btn:hover { background: none; color: var(--tint); }
.modal-header .sheet-btn:focus-visible { outline: 2px solid var(--tint); }
.modal-header .sheet-action { font-weight: 600; }
.modal-header .sheet-action:disabled { opacity: 0.4; cursor: default; }
/* Le bouton du corps devenu action de la barre */
.btn.promoted { display: none !important; }

@media (max-width: 768px) {
  .modal-header { padding-top: 18px; }
}

/* ---------- Alerte de confirmation (270 pt, boutons côte à côte) ---------- */
.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--veil);
  animation: alert-fade 0.15s ease-out;
}
.alert {
  width: 270px;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 8px 30px var(--shadow-color);
  animation: alert-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.alert-text { padding: 18px 16px 16px; }
.alert-title { font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -0.022em; }
.alert-detail { margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--label2); }
.alert-actions { display: flex; border-top: 0.5px solid var(--sep); }
.alert-btn {
  flex: 1;
  min-height: 44px;
  background: none;
  color: var(--tint);
  font-size: 17px;
  letter-spacing: -0.022em;
}
.alert-btn + .alert-btn { border-left: 0.5px solid var(--sep); }
.alert-btn:hover { background: var(--fill); }
.alert-btn:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.alert-ok { font-weight: 600; }
.alert-ok.danger { color: var(--red); }
@keyframes alert-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes alert-pop { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: none; } }

/* ---------- Toast avec action (Supprimé · Annuler) ---------- */
.toast { display: flex; align-items: center; gap: 16px; }
.toast-action {
  background: none;
  color: var(--tint);
  font-weight: 600;
  padding: 4px 2px;
  white-space: nowrap;
}
.toast-action:focus-visible { outline: 2px solid var(--tint); border-radius: 4px; }

/* ---------- Mouvement réduit : fondu seul ---------- */
@media (prefers-reduced-motion: reduce) {
  .alert, .alert-overlay { animation: alert-fade 0.1s linear; }
}

/* ======================= Journal ======================= */

/* Plus de barre du haut : date, poids et « + » vivent dans la page ; elle ne reste que pour quitter le mode spectateur */
.navbar { display: none; }
body.spectating .navbar { display: flex; }
body.spectating .navbar .navbar-left, body.spectating .navbar .navbar-center, body.spectating #btn-add { display: none; }

.page-head { display: flex; flex-direction: column; margin: 0 0 4px; }
.page-nav { height: 44px; display: flex; align-items: center; justify-content: flex-end; }
.glass-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--tint);
}
.glass-btn svg { width: 20px; height: 20px; }
.glass-btn:hover { background: color-mix(in srgb, var(--tint) 14%, var(--fill)); }
.glass-btn:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.large-title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.37px; color: var(--label); margin: 0; }

/* Semaine : lettre, mini anneau, numéro */
.week { margin: 6px 0 14px; }
.week-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.week-month { display: inline-flex; align-items: center; gap: 4px; padding: 6px 4px; background: none; color: var(--tint); font-weight: 600; font-size: 15px; text-transform: capitalize; border-radius: 8px; }
.week-month svg { width: 7px; height: 12px; }
.week-nav { display: flex; gap: 4px; }
.week-nav button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--tint); }
.week-nav button:hover { background: var(--tint-bg); }
.week-nav svg { width: 16px; height: 16px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; background: none; border-radius: 10px; color: var(--label2); font-size: 11px; }
.week-day:hover { background: var(--fill); }
.week-day:focus-visible { outline: 2px solid var(--tint); }
.week-dow { text-transform: uppercase; }
.ring-week { --rs: 30px; width: var(--rs); height: var(--rs); }
.week-num { font-size: 13px; color: var(--label2); font-variant-numeric: tabular-nums; }
.week-day.today .week-num { color: var(--tint); }
.week-day.on .week-num { color: var(--label); font-weight: 700; }
.week-day.on .week-dow { color: var(--label); font-weight: 600; }

/* Poids : une ligne dans une carte */
.weight-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 0 18px;
  background: var(--card);
  border-radius: 14px;
}
.weight-label { font-size: 17px; letter-spacing: -0.022em; }
.weight-group .deficit-weight { display: flex; align-items: baseline; gap: 4px; margin: 0; padding: 0; border: none; background: none; cursor: text; }
.weight-group .deficit-weight input { font-size: 17px; font-weight: 600; text-align: right; color: var(--label); min-width: 5ch; }
.weight-group .deficit-weight .unit { font-size: 15px; color: var(--label2); }

/* Lignes : mangé · texte · kcal ; balayage gauche = Supprimer, droite = Copier */
.entry-item {
  display: block;
  position: relative;
  min-height: 60px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.entry-item + .entry-item::before { left: 57px; }
.entry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px;
  position: relative;
  z-index: 1;
  background: var(--card);
  touch-action: pan-y;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.entry-row:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.entry-item.entry-selected .entry-row { background: color-mix(in srgb, var(--tint) 7%, var(--card)); }
.entry-under {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 82px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.entry-under-del { right: 0; background: var(--red); }
.entry-under-copy { left: 0; background: var(--blue); }
.entry-item.swiping-left .entry-under-del, .entry-item.swiping-right .entry-under-copy { display: flex; }
.entry-under:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.entry-checkbox { width: 29px; height: 29px; border: none; border-radius: 7px; background: #8E8E93; margin: 0; position: relative; flex: none; }
.entry-checkbox:checked { background: var(--green); }
.entry-checkbox:checked::after { left: 10px; top: 5px; width: 8px; height: 14px; border-width: 0 3px 3px 0; }
.entry-checkbox:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.entry-info { gap: 1px; }
.entry-qty-inline { font-size: 15px; line-height: 20px; flex: 0 0 100%; }
.entry-macros { display: none; flex: 0 0 100%; color: var(--label2); font-size: 13px; margin: 0; }
.entry-macros span + span::before { content: '\00b7'; margin: 0 6px; color: var(--label3); font-weight: 600; }
.entry-kcal { font-weight: 400; color: var(--label2); font-size: 17px; }
.entry-chev { color: var(--chev); display: none; flex: none; }
.entry-hover { display: none; width: 30px; height: 30px; border-radius: 8px; background: none; color: var(--label2); place-items: center; flex: none; }
.entry-hover:hover { background: var(--fill); color: var(--label); }
.entry-hover-del:hover { color: var(--red); }
.entry-hover:focus-visible { outline: 2px solid var(--tint); }
@media (hover: hover) and (pointer: fine) {
  .entry-row:hover .entry-hover, .entry-row:focus-within .entry-hover { display: grid; }
  .entry-macros { display: block; }
}
@media (hover: none), (pointer: coarse) {
  .entry-chev { display: block; }
}

.consumption-panel { overflow: hidden; }
.panel-header h2 { font-size: 20px; letter-spacing: 0.38px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 24px 28px; text-align: center; color: var(--label2); }
.empty-state svg { color: var(--label2); margin-bottom: 8px; }
.empty-state strong { font-size: 20px; font-weight: 700; letter-spacing: 0.38px; color: var(--label); }
.empty-state span { font-size: 15px; }
.empty-action { margin-top: 10px; padding: 8px 14px; background: none; color: var(--tint); font-size: 17px; border-radius: 10px; }
.empty-action:hover { background: var(--tint-bg); }

/* Lien d'une feuille (Modifier l'aliment) */
.sheet-link { display: block; width: 100%; margin-top: 18px; padding: 12px; background: var(--card); color: var(--tint); font-size: 17px; border-radius: 12px; text-align: center; }
.sheet-link:hover { background: var(--fill); }

/* ======================= Barre d'onglets : 4 onglets égaux ======================= */
@media (max-width: 768px) {
  :root { --tabbar-h: calc(54px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { padding: 6px 4px env(safe-area-inset-bottom, 0px); align-items: flex-start; }
  .nav-tab { gap: 2px; font-size: 10px; }
  .nav-tab svg { width: 25px; height: 25px; }
  .main-content { padding: 6px 16px calc(var(--tabbar-h) + 16px); }
  .tab-dot::after { top: 2px; right: calc(50% - 20px); }
}
@media (min-width: 769px) {
  .main-content { max-width: 880px; }
}
.entry-checkbox-all { width: 22px; height: 22px; border-radius: 6px; margin: 0 6px 0 0; }
.entry-checkbox-all:checked::after { left: 7px; top: 3px; width: 6px; height: 11px; border-width: 0 2.5px 2.5px 0; }

/* ======================= Pages : Aliments, Stats, Moi ======================= */
.page[hidden] { display: none; }
.page-body { padding-bottom: 8px; }

/* Écrans poussés (Moi > Profil…) : barre « ‹ Parent · Titre · Action » ; la barre d'onglets reste visible */
.push-page {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: var(--tabbar-h, 0px);
  left: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.push-page.active { transform: none; }
.push-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: calc(env(safe-area-inset-top, 0px) + 2px) 8px 0;
  background: var(--bar);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--sep);
}
.push-bar h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.022em; text-align: center; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-left, .push-right { display: flex; align-items: center; min-width: 0; }
.push-right { justify-content: flex-end; }
.push-bar .modal-close.push-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 0 8px 0 4px;
  background: none;
  border-radius: 8px;
  color: var(--tint);
  font-size: 17px;
  letter-spacing: -0.022em;
  overflow: hidden;
  white-space: nowrap;
}
.push-chev { display: inline-flex; align-items: center; }
.push-chev svg { display: block; }
.push-back span:last-child { line-height: 1; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.push-bar .sheet-btn { min-height: 44px; padding: 0 10px; background: none; color: var(--tint); font-size: 17px; border-radius: 8px; }
.push-bar .sheet-action { font-weight: 600; }
.push-bar .sheet-action:disabled { opacity: 0.4; }
.push-back:focus-visible, .push-bar .sheet-btn:focus-visible { outline: 2px solid var(--tint); }
.push-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 24px; width: 100%; max-width: 640px; margin: 0 auto; }
@media (min-width: 769px) {
  .push-page { left: var(--sidebar-w); bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .push-page { transition: opacity 0.12s linear; transform: none; opacity: 0; }
  .push-page.active { opacity: 1; }
}

/* Moi : groupes inset, icônes de rangée */
.set-group { background: var(--card); border-radius: 12px; overflow: hidden; margin: 0 0 35px; }
.set-group + .set-group { margin-top: 0; }
.set-row, .set-account { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 16px; background: none; color: var(--label); font-size: 17px; letter-spacing: -0.022em; text-align: left; position: relative; }
.set-row + .set-row::before { content: ''; position: absolute; top: 0; left: 57px; right: 0; height: 0.5px; background: var(--sep); }
.set-row:hover, .set-account:hover { background: var(--fill); }
.set-row:focus-visible, .set-account:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.set-icon { display: grid; flex: none; }
.set-icon .sym { width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.set-icon .sym svg { width: 17px; height: 17px; }
.set-label { flex: 1; }
.set-value { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--label2); font-size: 17px; }
.set-chev { color: var(--chev); flex: none; }
.set-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.set-row-danger { justify-content: center; color: var(--red); }
.set-account { min-height: 76px; gap: 14px; }
div.set-account:hover { background: none; }
.profile-inline { margin-bottom: 24px; }
.set-avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 50%, #fff), var(--tint)); color: #fff; font-size: 24px; font-weight: 600; flex: none; }
.set-account-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.set-account-text strong { font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-account-text small { font-size: 15px; color: var(--label2); }
#page-me .page-body { max-width: 640px; }

/* Catalogue : groupe de lignes à balayage */
.item-group { background: var(--group); border-radius: 12px; overflow: hidden; }
.swipe-item { position: relative; overflow: hidden; }
.swipe-item .item-list-entry { border-radius: 0; position: relative; z-index: 1; touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; background: var(--group); }
.swipe-item + .swipe-item .item-list-entry::before { content: ''; position: absolute; top: 0; left: 60px; right: 0; height: 0.5px; background: var(--sep); }
.swipe-item .entry-under { width: 120px; }
.swipe-item.swiping-left .entry-under-del, .swipe-item.swiping-right .entry-under-copy { display: flex; }
.item-list-macros .macro-p, .item-list-macros .macro-l, .item-list-macros .macro-g { color: var(--label2); font-size: 15px; }
@media (hover: none), (pointer: coarse) {
  .item-list-add { display: none; }
}
#page-items .tabs { margin-bottom: 12px; }

/* Logo-mot de la barre latérale : le « o » en anneau, à la taille et à la hauteur du « o » du texte */
.tab-brand .wm-o { margin: 0 .03em 0 .04em; stroke-width: .25; }

/* ======================= Stats : une mesure par page ======================= */
.segc { display: flex; height: 32px; padding: 2px; margin: 4px 0 0; background: var(--fill); border-radius: 9px; }
.segc button { flex: 1; display: grid; place-items: center; min-width: 0; padding: 0 4px; border-radius: 7px; background: none; color: var(--label); font-size: 13px; font-weight: 500; white-space: nowrap; }
.segc button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); }
.segc button:focus-visible { outline: 2px solid var(--tint); outline-offset: 1px; }
.page-body .custom-range { margin: 12px 0 0; }
.stats-more { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.stat-head { padding: 18px 4px 0; }
.stat-cap { font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; }
.stat-big { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.37px; color: var(--label); }
.stat-unit { font-size: 17px; font-weight: 500; color: var(--label2); letter-spacing: 0; }
.stat-range { font-size: 13px; color: var(--label2); }
.stat-chart { margin: 8px 0 26px; }
.stat-chart .chart-container { background: none; border: none; padding: 0; border-radius: 0; }
.stat-chart canvas { height: 240px !important; }
.stat-chart .chart-square { max-width: 320px; margin: 0 auto; }
.stat-chart .chart-square canvas { height: auto !important; }
.stat-rows .set-row + .set-row::before { left: 16px; }
.stat-rows .set-row.on .set-label { font-weight: 600; }
.stat-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.stat-info { cursor: default; }
.stat-info:hover { background: none; }
.stat-export { color: var(--tint); }
.stat-export .set-value { color: var(--tint); }
.period-menu { min-width: 220px; }
.period-menu-item { display: flex; align-items: center; gap: 8px; }
.period-menu-item[aria-checked="true"]::after { content: '✓'; margin-left: auto; padding-left: 16px; color: var(--tint); }
.period-menu-sep { height: 0.5px; margin: 4px 8px; background: var(--sep); }
@media (min-width: 900px) {
  .stat-chart canvas { height: 300px !important; }
}

/* ======================= Ajout d'une consommation ======================= */
.segc button { cursor: pointer; }
.sheet-body .segc, .modal-body .segc { margin: 0 0 14px; }
.add-search-group { margin-bottom: 12px; }
.search-field { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; background: var(--fill); border-radius: 10px; }
.search-field .search-icon { display: grid; color: var(--label2); }
.search-field .search-icon svg { width: 16px; height: 16px; }
.search-field input.input, .search-field input.input:focus { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: none; box-shadow: none; outline: none; font-size: 17px; border-radius: 0; }
.search-clear { display: grid; place-items: center; flex: none; width: 17px; height: 17px; padding: 0; border-radius: 50%; background: var(--label2); color: var(--bg); }
.search-clear[hidden] { display: none; }
.search-clear svg { width: 9px; height: 9px; }
.search-results { margin-bottom: 4px; }
.search-result-item .ini { border-radius: 7px; width: 29px; height: 29px; font-size: 14px; }
.search-result-item.selected::after { content: '✓'; color: var(--tint); font-size: 18px; font-weight: 600; margin-left: 8px; }
.search-empty { padding: 12px 16px 0; color: var(--label2); font-size: 15px; }
.create-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px 12px; }
.create-query { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label2); font-size: 15px; }
.create-btn { flex: none; padding: 8px 0; background: none; color: var(--tint); font-size: 17px; }
.qty-cap { margin: 22px 16px 6px; font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qty-group { margin: 0; }
.qty-line { cursor: default; }
.qty-line:hover { background: none; }
.qty-line + .qty-line::before { left: 16px; }
.qty-line .set-label { flex: 1; }
.qty-line .qty-stepper { flex: none; width: 150px; background: var(--fill); border-radius: 9px; box-shadow: none; }
.qty-line .qty-step { width: 36px; height: 32px; font-size: 20px; border-radius: 9px; }
.qty-line .qty-input { font-size: 17px; font-weight: 600; padding: 0; }
.qty-line dk-select { flex: none; width: 150px; }
.qty-foot { margin: 8px 16px 0; font-size: 13px; color: var(--label2); }
.add-temp-group { margin: 22px 0 0; }
.add-temp-row { cursor: pointer; }
.add-temp-row .set-label { flex: 1; color: var(--tint); }
.add-temp-row + .add-temp-row::before { left: 16px; }

/* ======================= Connexion ======================= */
#login-screen .login-logo { width: 96px; height: 96px; border-radius: 22%; }
.login-group { background: var(--card); border-radius: 12px; overflow: hidden; }
.login-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; position: relative; font-size: 17px; letter-spacing: -0.022em; color: var(--label); }
.login-row + .login-row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
.login-row span { flex: none; width: 112px; }
#login-form .login-row input, #signup-form .login-row input, #forgot-form .login-row input, #reset-form .login-row input { flex: 1; min-width: 0; min-height: 0; padding: 0; background: none; border-radius: 0; font-size: 17px; text-align: right; }
#login-form .login-row input:focus, #signup-form .login-row input:focus, #forgot-form .login-row input:focus, #reset-form .login-row input:focus { box-shadow: none; outline: none; }
#login-form .btn-primary, #signup-form .btn-primary, #forgot-form .btn-primary, #reset-form .btn-primary { min-height: 50px; border-radius: 999px; font-size: 17px; font-weight: 600; }
.add-temp-group, .qty-group { background: var(--group); }

/* ======================= Profil en listes groupées, finitions ======================= */
.profile-section { background: none; padding: 0; margin: 0 0 24px; border-radius: 0; }
.profile-section-title { margin: 0 16px 6px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; color: var(--label2); }
.profile-rows { margin: 0; }
.profile-section .qty-foot { margin-bottom: 20px; }
.profile-section .qty-line { min-height: 44px; }
.profile-section .qty-line .set-label { flex: 1 1 auto; min-width: 0; font-size: 16px; }
.profile-section .line-input, .profile-section .line-input:focus { flex: none; width: 96px; min-height: 0; padding: 0; background: none; border: none; box-shadow: none; outline: none; text-align: right; font-size: 17px; color: var(--label); border-radius: 0; }
.profile-section .line-input:focus-visible { outline: 2px solid var(--tint); outline-offset: 4px; }
.profile-section .line-pair { display: flex; gap: 8px; }
.profile-section .line-pair .line-input { width: 52px; }
.profile-section dk-select.line-select { flex: none; width: auto; max-width: 48%; }
.profile-section .line-select .dk-select-trigger { background: none; min-height: 0; padding: 0; gap: 6px; color: var(--label2); font-size: 17px; justify-content: flex-end; }
.profile-section .line-value-strong { font-size: 17px; font-weight: 600; color: var(--label); }
.profile-deficit { margin: 0; padding: 12px 16px; }
.profile-deficit > label { font-size: 17px; font-weight: 400; color: var(--label); }
.profile-advanced { margin: 0; }
.profile-advanced > summary { padding: 12px 16px; }

/* Mouvement réduit : feuilles, menus et fenêtres apparaissent sans glisser */
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-overlay.active .modal { transition: none; transform: none; }
  .dk-menu, .dk-cal { animation: none; }
  .swipe-row, .entry-row { transition: none; }
}

/* ---------- Visite guidée : voile, zone éclairée et bulle ---------- */
.guide-root { position: fixed; inset: 0; z-index: 1000; }
.guide-blocker { position: absolute; inset: 0; }
.guide-spot {
  position: absolute;
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax var(--veil-guide, rgba(0, 0, 0, 0.55));
  pointer-events: none;
  transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.guide-bubble {
  position: absolute;
  width: 340px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: var(--card);
  color: var(--label);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  transition: left 0.3s ease, top 0.3s ease;
}
:root[data-theme="dark"] .guide-bubble { background: var(--group); }
.guide-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.guide-text { margin: 0 0 12px; font-size: 15px; line-height: 1.4; color: var(--label2); }
.guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-count { white-space: nowrap; font-size: 13px; color: var(--label2); font-variant-numeric: tabular-nums; }
.guide-actions { display: flex; align-items: center; gap: 4px; }
.guide-actions button { min-height: 36px; padding: 0 12px; border: none; border-radius: 10px; background: none; font: inherit; font-size: 15px; color: var(--tint); cursor: pointer; }
.guide-actions .guide-skip, .guide-actions .guide-back { color: var(--label2); }
.guide-actions .guide-next { background: var(--tint); color: #fff; font-weight: 600; padding: 0 16px; }
.guide-actions button:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
:root[data-theme="dark"] .guide-spot { --veil-guide: rgba(0, 0, 0, 0.72); }
.guide-spot.none { inset: 0; border-radius: 0; box-shadow: none; background: var(--veil-guide, rgba(0, 0, 0, 0.55)); }
@media (prefers-reduced-motion: reduce) {
  .guide-spot, .guide-bubble { transition: none; }
}

/* Interrupteur dans une rangée de réglages */
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--fill); transition: background 0.2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px var(--shadow-color); transition: transform 0.2s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
