/* ===== Panel : composants (cartes, chiffres, pastilles, tableaux, graphiques, toasts) ===== */

/* ---------- Boutons et champs ---------- */
.Btn .Icon { width: 13px; height: 13px; }
.BtnPrimary { background: var(--Brand); color: var(--BrandInk); }
.BtnPrimary:hover { background: color-mix(in srgb, var(--Brand) 86%, var(--Bg)); }
.BtnPrimary:active { background: color-mix(in srgb, var(--Brand) 76%, var(--Bg)); }
.Btn:disabled { opacity: .5; cursor: default; transform: none; }

.TextBtn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--Muted); white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
}
.TextBtn:hover { color: var(--Ink); }

.Field { display: grid; gap: 6px; }
.Field > span { font-size: 13px; color: var(--Muted); }
.Input {
  height: 36px; width: 100%; padding: 0 10px;
  border: 0; border-radius: var(--RadiusControl); outline: none;
  background: var(--Chip); color: var(--Ink);
}
.Input::placeholder { color: var(--Muted); }
.Input:hover { background: var(--ChipHover); }
/* Champ actif : contour fin + anneau large et doux (ce n'est pas une ombre) */
.Input:focus { background: var(--PanelSolid); box-shadow: inset 0 0 0 1px var(--Line), 0 0 0 3px color-mix(in srgb, var(--Platinum) 22%, transparent); }
.FormError, .FormMessage { margin: 0; font-size: 13px; }
.FormError, .FormMessage.IsError { color: var(--Accent); }
.FormMessage.IsOk { color: var(--Good); }


/* ---------- Cartes ---------- */
.Card { min-width: 0; padding: 18px; background: var(--PanelSolid); border-radius: var(--Radius); }
.CardHead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.CardHead h2 { margin: 0; font-size: 15px; }
.CardTotal { margin-left: 8px; color: var(--Muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.CardTools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }


/* ---------- Chiffres clés ---------- */
.Tiles { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 16px; }
.Tiles.TilesFour { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.Tile {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 18px; background: var(--PanelSolid); border-radius: var(--Radius);
  color: inherit; text-decoration: none;
}
a.Tile:hover { background: color-mix(in srgb, var(--PanelSolid) 60%, var(--Chip)); }
.TileLabel { font-size: 13px; color: var(--Muted); }
.TileValue { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.HeroValue { font-size: 48px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; }
.TileMeta { font-size: 12px; min-height: 18px; min-width: 0; overflow-wrap: anywhere; }
/* Variations des tuiles : peuvent passer à la ligne sur petit écran au lieu de déborder */
.TileMeta .Delta { white-space: normal; align-items: flex-start; }
.TileMeta .Delta .Icon { margin-top: 3px; }
.Tile .TileValue { overflow: hidden; text-overflow: ellipsis; }
.Tile.IsAlert .TileValue { color: var(--Accent); }

@media (max-width: 1100px) {
  .Tiles, .Tiles.TilesFour { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .Tile.Hero { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .Tiles { gap: 8px; }
  .Tile { padding: 12px; }
  .TileValue { font-size: 22px; }
  .HeroValue { font-size: 40px; }
}


/* ---------- Pastilles rouges (compteurs) ---------- */
.Badge {
  /* Chiffre centré sur sa vraie hauteur (capitales), avec la même marge en haut et en bas */
  display: inline-block; box-sizing: border-box; min-width: 18px; padding: 5px 5px;
  border-radius: 999px; text-align: center; vertical-align: middle;
  background: var(--Accent); color: var(--AccentInk);
  font-size: 11px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
  text-box: trim-both cap alphabetic;
}
.Badge[hidden] { display: none !important; }
/* Pastille de la cloche : posée sur le coin haut-droit, détachée de l'icône par un anneau couleur fond */
.BadgeCorner { position: absolute; top: 0; right: -4px; min-width: 16px; padding: 0; font-size: 10px; pointer-events: none; box-shadow: 0 0 0 2px var(--Bg); }


/* ---------- Statuts et variations ---------- */
.Status { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--Muted); }
.Status .Icon { width: 12px; height: 12px; }
.Status.IsPaid, .Status.IsApproved { color: var(--Good); }
.Status.IsOverdue, .Status.IsRefused { color: var(--Accent); }
.Status.IsSoon { color: var(--Ink); }
.Delta { display: inline-flex; align-items: center; gap: 4px; color: var(--Muted); white-space: nowrap; }
.Delta .Icon { width: 10px; height: 10px; }
.Delta.IsGood { color: var(--Good); }
.Delta.IsBad { color: var(--Accent); }
.Dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--C); }


/* ---------- Avatars (ronds) ---------- */
.Avatar {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--Chip); color: var(--Muted);
}
.Avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.Avatar .Icon { width: 50%; height: 50%; }
.AvatarSmall { width: 28px; height: 28px; }
.AvatarLarge { width: 64px; height: 64px; }
.AvatarHuge { width: 96px; height: 96px; }


/* ---------- Liens vers les réseaux (icône seule, sans fond) ---------- */
.Networks { display: flex; flex-wrap: wrap; gap: 2px; }
.NetworkLink {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--RadiusControl); color: var(--Muted); text-decoration: none;
}
.NetworkLink .Icon { width: 16px; height: 16px; }
.NetworkLink:hover { color: var(--Ink); background: var(--Chip); }


/* ---------- Onglets et sélecteurs ---------- */
/* Onglets de page : même contrôle segmenté que la barre du haut et « Graphique / Tableau » */
.Tabs { display: inline-flex; gap: 2px; margin-bottom: 12px; padding: 2px; border-radius: var(--RadiusControl); background: var(--Chip); }
.Tabs > .SlideIndicator { background: var(--Raised); }
.Tabs button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 0; border-radius: var(--RadiusInner); background: none; cursor: pointer; color: var(--Muted); font-weight: 500;
}
.Tabs button:not(.IsOn):hover { color: var(--Ink); }
.Tabs button.IsOn { color: var(--Ink); }
/* Compteur : pastille ronde, chiffre centré sur sa vraie hauteur */
.Tabs .Count {
  display: inline-block; box-sizing: border-box; min-width: 18px; padding: 5px 5px;
  border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  text-box: trim-both cap alphabetic;
  background: var(--ChipActive); color: var(--Ink);
}
.Tabs .Count.IsAlert { background: var(--Accent); color: var(--AccentInk); }

/* Même hauteur que le combo de période (28 px) */
.ViewSwitch, .Picker { display: inline-flex; flex: none; gap: 2px; height: 28px; padding: 2px; border-radius: var(--RadiusControl); background: var(--Chip); }
.ViewSwitch button, .Picker button { height: 24px; padding: 0 8px; border: 0; border-radius: var(--RadiusInner); background: none; cursor: pointer; font-size: 12px; color: var(--Muted); white-space: nowrap; }
.ViewSwitch button:not(.IsOn):hover, .Picker button:not(.IsOn):hover { color: var(--Ink); }
.ViewSwitch button.IsOn, .Picker button.IsOn { color: var(--Ink); }
.ViewSwitch > .SlideIndicator, .Picker > .SlideIndicator { background: var(--Raised); }


/* ---------- Tableaux ---------- */
.TableScroll { overflow-x: auto; }
.Table { width: 100%; border-collapse: collapse; font-size: 13px; }
.Table th { padding: 0 8px 8px; font-size: 12px; font-weight: 500; color: var(--Muted); text-align: left; }
.Table th.Num { text-align: right; }
.Table td { padding: 9px 8px; border-top: 1px solid var(--Edge); vertical-align: middle; }
.Table td:first-child, .Table th:first-child { padding-left: 0; }
.Table td:last-child, .Table th:last-child { padding-right: 0; }
.Table td > span { display: block; }
.Table td .Status, .Table td .Delta { display: inline-flex; }
.Table tr.IsDone td { color: var(--Muted); }
.Table tfoot th { padding-top: 10px; border-top: 1px solid var(--Edge); font-size: 13px; color: var(--Ink); font-weight: 600; }
.Table tfoot th.Muted { color: var(--Muted); font-weight: 400; }
.Table tr.IsCurrent td { color: var(--Muted); }


/* ---------- Graphiques (style « live stats » du projet Blackjack) ---------- */
.ChartBox { position: relative; height: 240px; }
.ChartBox canvas { cursor: crosshair; }
/* Valeur survolée : petite étiquette en bas à droite du tracé */
.ChartReadout {
  position: absolute; right: 8px; bottom: 6px; max-width: 70%;
  padding: 3px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 12px; border-radius: var(--RadiusInner); background: var(--Chip); color: var(--Ink); pointer-events: none;
}
.ChartReadout { opacity: 0; transition: opacity var(--Fade); }
.ChartReadout.IsShown { opacity: 1; }
.NetworkLink .Icon { width: 15px; height: 15px; }
.ChartReadout b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ChartReadout span { color: var(--Muted); }
.ChartRange { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--Muted); }
.ChartTable { max-height: 300px; overflow: auto; }
.ChartTable .Table thead th { position: sticky; top: 0; background: var(--PanelSolid); z-index: 1; }
.ChartTable .Table td { white-space: nowrap; padding-top: 7px; padding-bottom: 7px; }


/* ---------- Notifications (cloche) ---------- */
.Dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  display: flex; flex-direction: column;
  width: 360px; max-height: min(70vh, 520px); overflow: hidden;
  background: var(--PanelSolid); border-radius: var(--Radius); box-shadow: var(--Float);
}
.DropdownHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--Edge); }
.DropdownHead h2 { margin: 0; font-size: 14px; }
.DropdownBody { overflow: auto; overscroll-behavior: contain; }
.DropdownBody .Empty { margin: 0; padding: 20px 14px; }
.DropdownFoot { display: block; padding: 10px 14px; border-top: 1px solid var(--Edge); text-align: center; }
.NotificationItem {
  position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 10px;
  padding: 10px 26px 10px 14px; text-decoration: none;
}
.NotificationItem + .NotificationItem { border-top: 1px solid var(--Edge); }
.NotificationItem:hover { background: var(--Chip); }
.NotificationItem > .Icon { margin-top: 3px; color: var(--Muted); }
.NotificationText { display: grid; gap: 1px; min-width: 0; }
.NotificationItem .Text { transition: font-variation-settings 220ms ease, opacity 220ms ease; }
.NotificationItem.IsUnread .Text { font-weight: 600; }
.NotificationItem.IsReading .Text { font-weight: 400; }
/* Non lue : un point rouge ; au survol du point, il devient une coche ronde qui marque comme lu */
.ReadDot {
  position: absolute; top: 9px; right: 4px;
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--Ink); cursor: pointer;
  transition: background-color var(--Fade), transform 140ms var(--Ease), opacity 200ms ease;
}
.ReadDot > * { grid-area: 1 / 1; transition: transform 200ms var(--Ease), opacity 160ms ease; }
.ReadDot i { width: 7px; height: 7px; border-radius: 50%; background: var(--Accent); }
.ReadDot .Icon { width: 11px; height: 11px; opacity: 0; transform: scale(.4); }
.ReadDot:hover { background: var(--ChipHover); }
.ReadDot:hover i { opacity: 0; transform: scale(.4); }
.ReadDot:hover .Icon { opacity: 1; transform: none; }
.NotificationItem.IsReading .ReadDot { opacity: 0; transform: scale(.6); pointer-events: none; }


/* ---------- Toasts ---------- */
.Toasts { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 340px; height: 0; }

/* Pile de toasts (Stack.js) : --Y décalage, --S taille, --Dir sens (1 vers le bas, -1 vers le haut) */
.StackItem {
  position: absolute;
  transform: translate(var(--Tx, 0), calc(var(--Y, 0px) * var(--Dir, 1) + var(--Shift, 0px))) scale(calc(var(--S, 1) * var(--Pop, 1)));
  transition: opacity 220ms ease, transform 380ms var(--Ease), background-color var(--Fade);
  will-change: transform;
}
.StackItem > * { transition: opacity 220ms ease; }
.StackItem.IsFolded > * { opacity: 0; }   /* carte derrière : seul son bord dépasse */
/* Entrée sans scale : le calque (will-change) est dessiné à la taille réelle dès le départ */
.StackItem.IsEntering { opacity: 0; --Shift: calc(-14px * var(--Dir, 1)); }
.StackItem.IsLeaving { opacity: 0 !important; --Shift: calc(-6px * var(--Dir, 1)); --Pop: .94; pointer-events: none; }
.Toast {
  display: grid; grid-template-columns: 14px 1fr 24px; align-items: start; gap: 10px;
  bottom: 0; right: 0; width: 100%; --Dir: -1; transform-origin: bottom center;
  padding: 12px 10px 12px 12px; cursor: pointer;
  background: var(--PanelSolid); border-radius: var(--Radius); box-shadow: var(--Float);
}
.Toast:hover { background: color-mix(in srgb, var(--PanelSolid) 55%, var(--Chip)); }
.Toast > .Icon { margin-top: 3px; color: var(--Muted); }
.ToastText { display: grid; gap: 2px; min-width: 0; }
.ToastText strong { font-weight: 600; }
.Toast .CloseBtn { margin-top: -2px; }


/* ---------- Période des graphiques (combo + calendrier des mois) ---------- */
.FilterRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.Combo { position: relative; }
.ComboButton {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; font-size: 12px;
  border: 0; border-radius: var(--RadiusControl); background: var(--Chip); color: var(--Ink); cursor: pointer; white-space: nowrap;
  transition: background-color var(--Fade), transform 140ms var(--Ease), width 300ms var(--Ease);
}
.ComboValue { display: inline-block; }
.ComboButton:hover, .ComboButton.IsOn { background: var(--ChipHover); }
.ComboButton .Icon { width: 13px; height: 13px; color: var(--Muted); }
.ComboButton .Icon:last-child { width: 10px; height: 10px; }
.ComboPanel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 25;
  /* Aussi large que l'option la plus longue, jamais plus étroit que le bouton */
  width: max-content; min-width: 100%; overflow: hidden;
  background: var(--PanelSolid); border-radius: var(--Radius); box-shadow: var(--Float);
}
.ComboOptions { display: grid; padding: 4px 0; }
.ComboOption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 7px 12px; border: 0; background: none; color: var(--Ink); cursor: pointer; text-align: left; font-size: 12px; white-space: nowrap;
}
.ComboOption:hover { background: var(--Chip); }
/* Option choisie : texte en gras (fondu au changement, Period.js) et coche ronde pleine qui apparaît */
.ComboOption.IsOn > span { font-weight: 600; }
.ComboOption .Icon { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: opacity 180ms ease, transform 220ms var(--Ease); }
.ComboOption.IsOn .Icon { opacity: 1; transform: none; }
.MonthPicker { display: grid; gap: 10px; padding: 10px 12px 12px; border-top: 1px solid var(--Edge); }
.YearLabel { display: block; margin-bottom: 4px; font-size: 12px; color: var(--Muted); }
.MonthGrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
.MonthCell { height: 28px; padding: 0; border: 0; border-radius: var(--RadiusInner); background: none; color: var(--Ink); font-size: 12px; cursor: pointer; }
.MonthCell:hover:not(:disabled) { background: var(--ChipHover); }
.MonthCell:disabled { color: var(--Faint); cursor: default; }
.MonthCell.IsInRange { background: var(--Chip); }
.MonthCell.IsEdge, .MonthCell.IsEdge:hover { background: var(--Brand); color: var(--BrandInk); }


/* ---------- Choix d'une date (DatePicker.js) : même panneau que les combos ---------- */
.DateField { position: relative; }
.DateButton { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.DateButton .Icon { width: 14px; height: 14px; color: var(--Muted); }
.DateButton:hover, .DateButton.IsOn { background: var(--ChipHover); }
.DatePanel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; width: 264px; padding: 10px;
  background: var(--PanelSolid); border-radius: var(--Radius); box-shadow: var(--Float);
}
.DateHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.DateNav { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--RadiusControl); background: none; color: var(--Ink); cursor: pointer; }
.DateNav:hover:not(:disabled) { background: var(--Chip); }
.DateNav:disabled { color: var(--Faint); cursor: default; }
.DateNav .Icon { width: 12px; height: 12px; }
.DateGrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.DateWeekday { padding: 4px 0; font-size: 11px; text-align: center; color: var(--Muted); }
.DateCell { height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--Ink); font-size: 12.5px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color var(--Fade); }
.DateCell:hover:not(:disabled) { background: var(--ChipHover); }
.DateCell.IsOther { color: var(--Muted); }
.DateCell:disabled { color: var(--Faint); cursor: default; }
.DateCell.IsToday { font-weight: 700; }
.DateCell.IsOn, .DateCell.IsOn:hover { background: var(--Brand); color: var(--BrandInk); }
.DateFoot { display: flex; justify-content: flex-end; margin-top: 6px; }

/* ---------- Recherche avec suggestions ---------- */
.SearchBox { position: relative; width: min(340px, 100%); }
.SearchBox .Search { flex: none; width: 100%; height: 36px; }
.Suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 25; overflow: hidden; padding: 4px 0;
  background: var(--PanelSolid); border-radius: var(--Radius); box-shadow: var(--Float);
}
.Suggestion {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 8px 12px; text-decoration: none; cursor: pointer;
}
.Suggestion:hover, .Suggestion.IsActive { background: var(--Chip); }
.Suggestion .Avatar { width: 32px; height: 32px; }
.Suggestion > span:last-child { display: grid; min-width: 0; }
.Suggestion strong { font-weight: 600; }
.Suggestion mark { background: none; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.Suggestions .Empty { padding: 10px; font-size: 13px; }


/* ---------- États vides ---------- */
.EmptyState { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; color: var(--Muted); text-align: center; }
.EmptyState .Icon { width: 20px; height: 20px; }
.EmptyState p { margin: 0; }
.Empty { margin: 0; }


@media (max-width: 760px) {
  .Dropdown { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; }
  .Toasts { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .SearchBox { width: 100%; }
}

/* ---------- Icônes d'état (notifications, toasts) : vert / jaune / rouge ---------- */
.ToneIcon { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; }
.ToneIcon .Icon { width: 15px; height: 15px; }
.ToneIcon.IsGood { color: var(--Good); }
.ToneIcon.IsWarn { color: var(--Warn); }
.ToneIcon.IsBad { color: var(--Accent); }
.NotificationItem, .Toast { grid-template-columns: 16px minmax(0, 1fr); }
.Toast { grid-template-columns: 16px minmax(0, 1fr) 24px; }

/* Pastilles dessinées en tracés (Dom.CenterInk) : le SVG remplit exactement la pastille */
.Badge svg, .Tabs .Count svg { display: block; fill: currentColor; }
.Badge, .Tabs .Count { line-height: 0; }

/* ---------- Réglages : interrupteurs (carrés, le curseur glisse) ---------- */
.Switch {
  position: relative; flex: none; width: 34px; height: 20px; padding: 0;
  border: 0; border-radius: 999px; background: var(--ChipActive); cursor: pointer;
  transition: background-color var(--Fade), transform 140ms var(--Ease);
}
.Switch i {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--PanelSolid);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}
.Switch.IsOn { background: var(--Brand); }
.Switch.IsOn i { background: var(--BrandInk); }
.Switch.IsOn i { transform: translateX(14px); }
.SettingRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--Edge); font-size: 13px; }
.SettingMain { border-top: 0; font-weight: 600; }
.SettingGroup { transition: opacity var(--Fade); }
.SettingGroup > p { margin: 8px 0 2px; }
.SettingGroup.IsDisabled { opacity: .45; pointer-events: none; }
.DropdownTools { display: flex; align-items: center; gap: 6px; }
#QuietToggle { width: 26px; height: 26px; }
#QuietToggle .Icon { width: 14px; height: 14px; }
#QuietToggle.IsOn { color: var(--Ink); }

/* ---------- Export du mois ---------- */
.ExportCombo .ComboPanel { left: auto; right: 0; }
.ExportPanel .ComboOptions { max-height: 280px; overflow: hidden auto; }
.ExportActions { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--Edge); }

/* ---------- Fenêtres (ajout d'une modèle, saisie, mensualité, confirmation) ---------- */
.Overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: 10vh 16px 16px; overflow-y: auto; background: rgba(8, 8, 8, .5); }
.DialogBox { width: min(520px, 100%); display: grid; gap: 16px; padding: 22px; border-radius: 14px; box-shadow: var(--Float); }
.DialogBox .CardHead { margin-bottom: 0; }
.DialogBody { display: grid; gap: 12px; }
.DialogBody p { margin: 0; }
.FieldRow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.FieldRowThree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .FieldRow, .FieldRowThree { grid-template-columns: minmax(0, 1fr); } }
.Field > span .Icon { width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.FieldInline { grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
.NetworkAdd { display: flex; gap: 16px; }
.NetworkAdd:not(:has(button:not([hidden]))) { display: none; }
/* Pseudo + lien « Vérifier » dans le champ, à droite */
.ProfileInput { position: relative; display: block; min-width: 0; }
.ProfileInput:has(.ProfileCheck:not([hidden])) .Input { padding-right: 68px; }
.ProfileCheck { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); font-size: 12px; color: var(--Muted); text-decoration: underline; text-underline-offset: 3px; }
.ProfileCheck:hover { color: var(--Ink); }
.BtnDanger { background: var(--Accent); color: var(--AccentInk); }
.BtnDanger:hover { background: color-mix(in srgb, var(--Accent) 86%, #000); }
.ColorPicker { display: flex; flex-wrap: wrap; gap: 6px; }
.ColorSwatch { position: relative; cursor: pointer; }
.ColorSwatch input { position: absolute; opacity: 0; pointer-events: none; }
.ColorSwatch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--Swatch); border: 2px solid transparent; }
.ColorSwatch input:checked + i { border-color: var(--PanelSolid); outline: 2px solid var(--Ink); }
.ColorSwatch input:focus-visible + i { outline: 2px solid var(--Ink); }

/* ---------- Double authentification ---------- */
.QrBox { justify-self: start; width: 224px; max-width: 100%; padding: 0; overflow: hidden; border-radius: var(--RadiusControl); background: #fff; line-height: 0; }
.QrBox svg { width: 100%; height: auto; }
.SecretKey { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; user-select: all; word-break: break-all; }
.CodeInput { font-variant-numeric: tabular-nums; letter-spacing: .3em; font-size: 16px; }
#TwoFactorForm { display: grid; gap: 12px; }

/* ---------- Ouverture des fenêtres et menus : fondu + léger glissement ----------
   Dom.Show / Dom.Hide posent .Fadeable puis .IsShown : l'opacité vient de Layout.css,
   on y ajoute un léger glissement (pas de scale : voir .DialogBox). */
/* Pas de scale et will-change permanent : le texte est dessiné une seule fois, à sa taille réelle,
   sur son propre calque. Avec un scale, le navigateur le redessinait à la fin de l'animation
   et il se décalait d'un pixel. */
.Overlay .DialogBox { transform: translateY(8px); transition: transform 260ms var(--Ease); will-change: transform; }
.Overlay.IsShown .DialogBox { transform: none; }
.Dropdown.Fadeable, .ComboPanel.Fadeable, .Suggestions.Fadeable, .DatePanel.Fadeable {
  transform: translateY(-4px); will-change: transform, opacity;
  transition: opacity var(--Fade), transform 220ms var(--Ease), background-color var(--Fade);
}
.Dropdown { transform-origin: top right; }
.ComboPanel, .Suggestions { transform-origin: top left; }
.ExportCombo .ComboPanel { transform-origin: top right; }
.Dropdown.IsShown, .ComboPanel.IsShown, .Suggestions.IsShown, .DatePanel.IsShown { transform: none; }
.DatePanel { transform-origin: top left; }
