/* ============================================================================
 * rk.css — Kit de style v2 Rosmerta (couleurs, composants, zéro natif, graphiques, navigation)
 * Chargé par le site APRÈS styles.css et par les démos locales. Préfixe .rk- pour éviter toute
 * collision avec styles.css. Direction : « précieux / haut de gamme ».
 *
 * Palette source (validée par Maxime le 2026-09-26) :
 *   Dark Slate Grey #3B5249 · Sage Green #709775 · Dry Sage #A4B494
 *   Cinnamon Wood  #BE6E46 · Light Bronze #DB995A
 * Police : Geist (texte + chiffres tabulaires), Geist Mono (codes/ISIN),
 *          Syne conservée uniquement pour le logo « Rosmerta ».
 *
 * Organisation :
 *   1. Palette brute      2. Tokens sémantiques (sombre)   3. Thème clair
 *   4. Alias de compatibilité avec styles.css (migration étape 3a)
 *   5. Base               6. Composants                     7. Accessibilité
 * ==========================================================================*/

/* ─── 1. Palette brute (ne pas utiliser directement dans les composants) ── */
:root {
  /* Vert ardoise — profondeur, fonds */
  --slate-950: #0B100E;
  --slate-900: #111815;
  --slate-850: #151E1A;
  --slate-800: #1A2521;
  --slate-700: #243330;
  --slate-600: #2F433C;
  --slate-500: #3B5249; /* source */
  --slate-300: #7E918A;
  /* Sauge — marque Rosmerta */
  --sage-700: #4D6B52;
  --sage-600: #5E8263;
  --sage-500: #709775; /* source */
  --sage-400: #8AAE8E;
  --sage-300: #A4B494; /* source « Dry Sage » */
  --sage-200: #C6D0B9;
  --sage-100: #E4E9DC;
  /* Bronze / cannelle — le « précieux » */
  --bronze-700: #8F4E2F;
  --bronze-600: #A65B37;
  --bronze-500: #BE6E46; /* source « Cinnamon Wood » */
  --bronze-400: #DB995A; /* source « Light Bronze » */
  --bronze-300: #E9B887;
  --bronze-100: #F6E6D3;
  /* Neutres chauds (ivoire) */
  --ivory-50:  #FFFDF9;
  --ivory-100: #F7F4EC;
  --ivory-200: #EEE9DD;
  --ivory-300: #E2DBCB;
}

/* ─── 2. Tokens sémantiques — thème SOMBRE (défaut, comme le site) ─────── */
:root {
  color-scheme: dark;

  /* Surfaces : 4 niveaux de profondeur */
  --rk-bg:        var(--slate-950);   /* fond de page */
  --rk-surface:   var(--slate-900);   /* cartes */
  --rk-surface-2: var(--slate-850);   /* cartes imbriquées, en-têtes de tableau */
  --rk-surface-3: var(--slate-800);   /* champs, survol, boutons secondaires */
  --rk-inset:     #0E1412;            /* creux (inputs, pistes de barres) */

  /* Bordures (filets fins, typiques du haut de gamme) */
  --rk-line:        rgba(214, 224, 200, .08);
  --rk-line-strong: rgba(214, 224, 200, .15);
  --rk-hairline-gold: linear-gradient(90deg, transparent, rgba(219,153,90,.55), transparent);

  /* Texte */
  --rk-text:    #ECEEE6;   /* ivoire froid */
  --rk-text-2:  #C3CABE;   /* texte secondaire lisible */
  --rk-muted:   #929D8F;   /* labels (contraste ≥ 6:1 sur surface) */
  --rk-faint:   #66715F;   /* décoratif uniquement (axes, séparateurs) */

  /* Marque (sauge) */
  --rk-brand:        var(--sage-400);
  --rk-brand-strong: var(--sage-300);
  --rk-brand-soft:   rgba(138, 174, 142, .12);

  /* Accent précieux (bronze) — actions principales, mises en avant */
  --rk-accent:        var(--bronze-400);
  --rk-accent-strong: var(--bronze-300);
  --rk-accent-soft:   rgba(219, 153, 90, .12);
  --rk-on-accent:     #1E140B;
  --rk-on-brand:      #0E1412;  /* texte sur fond --rk-brand (sauge) */
  --rk-accent-grad:   linear-gradient(180deg, #E4A96E 0%, #D08B4E 100%);

  /* Sémantique financière */
  --rk-pos:      #A6CB9C;  /* gain  */
  --rk-pos-soft: rgba(166, 203, 156, .12);
  --rk-neg:      #E8836E;  /* perte */
  --rk-neg-soft: rgba(232, 131, 110, .12);
  --rk-warn:     #E0B062;
  --rk-warn-soft: rgba(224, 176, 98, .12);
  --rk-info:     #8FB0C4;
  --rk-info-soft: rgba(143, 176, 196, .12);

  /* Couleurs par véhicule (10 teintes terreuses, distinctes deux à deux) */
  --c-pea:     #8AAE8E;  /* sauge */
  --c-cto:     #7FA3C0;  /* bleu ardoise */
  --c-av:      #A898C6;  /* lavande poudrée */
  --c-crypto:  #E39A5B;  /* bronze */
  --c-livrets: #BFCB9E;  /* sauge sèche */
  --c-pee:     #5FB0A8;  /* sarcelle */
  --c-per:     #D596AA;  /* vieux rose */
  --c-metaux:  #D8BE6A;  /* or */
  --c-immo:    #C8784F;  /* cannelle */
  --c-credits: #D9695F;  /* brique */
  --c-exotiques: #8C9FB0; /* acier */

  /* Graphiques */
  --rk-chart-line: var(--sage-300);
  --rk-chart-fill-top: rgba(138, 174, 142, .30);
  --rk-chart-fill-bottom: rgba(138, 174, 142, 0);
  --rk-chart-grid: rgba(214, 224, 200, .06);

  /* Typographie */
  --rk-font:      'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rk-font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --rk-font-logo: 'Syne', 'Geist', sans-serif;
  --rk-fs-xs: 11px; --rk-fs-sm: 12px; --rk-fs-md: 14px; --rk-fs-lg: 16px;
  --rk-fs-xl: 20px; --rk-fs-2xl: 28px; --rk-fs-hero: clamp(34px, 6vw, 48px);

  /* Formes */
  --rk-r-xs: 6px; --rk-r-sm: 8px; --rk-r-md: 10px; --rk-r-lg: 14px; --rk-r-xl: 20px; --rk-r-pill: 999px;
  /* Espacements (échelle 4 px) */
  --rk-s1: 4px; --rk-s2: 8px; --rk-s3: 12px; --rk-s4: 16px; --rk-s5: 20px; --rk-s6: 24px; --rk-s8: 32px; --rk-s10: 40px;
  /* Ombres (profondes et douces) */
  --rk-shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.30);
  --rk-shadow-2: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.60);
  --rk-shadow-3: 0 24px 60px -20px rgba(0,0,0,.75);
  /* Logo (couleur de marque fixe, ne suit pas le thème) */
  --rk-logo: #3A7549;
  /* Mouvement */
  --rk-ease: cubic-bezier(.2, .7, .2, 1); --rk-dur: .18s;
  /* Focus */
  --rk-focus: 0 0 0 2px var(--rk-bg), 0 0 0 4px var(--rk-accent);
}

/* ─── 3. Thème CLAIR — « papier ivoire », ardoise + cannelle ───────────── */
:root[data-theme="light"] {
  color-scheme: light;

  --rk-bg:        var(--ivory-100);
  --rk-surface:   var(--ivory-50);
  --rk-surface-2: #FAF7F1;
  --rk-surface-3: var(--ivory-200);
  --rk-inset:     #F2EEE5;

  --rk-line:        rgba(59, 82, 73, .12);
  --rk-line-strong: rgba(59, 82, 73, .22);
  --rk-hairline-gold: linear-gradient(90deg, transparent, rgba(190,110,70,.55), transparent);

  --rk-text:   #18211E;
  --rk-text-2: #3A4541;
  --rk-muted:  #5B665F;
  --rk-faint:  #9AA39B;

  --rk-brand:        var(--slate-500);
  --rk-brand-strong: #2C3F38;
  --rk-brand-soft:   rgba(59, 82, 73, .08);

  --rk-accent:        var(--bronze-600);
  --rk-accent-strong: var(--bronze-700);
  --rk-accent-soft:   rgba(190, 110, 70, .10);
  --rk-on-accent:     #FFFDF9;
  --rk-on-brand:      #FFFDF9;  /* texte sur fond --rk-brand (ardoise) */
  --rk-accent-grad:   linear-gradient(180deg, #B4653F 0%, #9A5331 100%);

  --rk-pos:      #3A7549;
  --rk-pos-soft: rgba(58, 117, 73, .10);
  --rk-neg:      #B0412E;
  --rk-neg-soft: rgba(176, 65, 46, .09);
  --rk-warn:     #93620F;
  --rk-warn-soft: rgba(176, 120, 20, .10);
  --rk-info:     #3E6A85;
  --rk-info-soft: rgba(62, 106, 133, .09);

  /* Véhicules : versions plus soutenues pour tenir sur l'ivoire */
  --c-pea:     #5E8263;
  --c-cto:     #4F7797;
  --c-av:      #7C6AA3;
  --c-crypto:  #C77A3A;
  --c-livrets: #8E9A62;
  --c-pee:     #2F8A82;
  --c-per:     #B06582;
  --c-metaux:  #B0922E;
  --c-immo:    #A65B37;
  --c-credits: #B8483E;
  --c-exotiques: #62768A;

  --rk-chart-line: var(--slate-500);
  --rk-chart-fill-top: rgba(112, 151, 117, .28);
  --rk-chart-fill-bottom: rgba(112, 151, 117, 0);
  --rk-chart-grid: rgba(59, 82, 73, .08);

  --rk-shadow-1: 0 1px 2px rgba(40, 50, 40, .06);
  --rk-shadow-2: 0 1px 2px rgba(40, 50, 40, .05), 0 12px 32px -14px rgba(40, 50, 40, .18);
  --rk-shadow-3: 0 24px 60px -24px rgba(40, 50, 40, .30);
}

/* ─── 4. Alias de compatibilité (étape 3a : coller dans :root de styles.css)
 *     Les anciens noms pointent vers les nouveaux → le site existant bascule
 *     sur la nouvelle palette sans toucher au HTML. */
:root {
  --bg: var(--rk-bg);
  --bg2: var(--rk-surface);
  --bg3: var(--rk-surface-3);
  --card: var(--rk-surface);
  --border: var(--rk-line);
  --border2: var(--rk-line-strong);
  --text: var(--rk-text);
  --muted: var(--rk-muted);
  --accent: var(--rk-brand);
  --accent2: var(--rk-brand-strong);
  --pos: var(--rk-pos);
  --red: var(--rk-neg);
  --amber: var(--rk-warn);
  --info: var(--rk-info);
  --font-display: var(--rk-font);
  --font-mono: var(--rk-font);
}

/* ─── 5. Base ──────────────────────────────────────────────────────────── */
.rk-body {
  margin: 0;
  background: var(--rk-bg); /* fond uni (dégradés retirés, demande de Maxime 2026-09-26) */
  color: var(--rk-text);
  font-family: var(--rk-font);
  font-size: var(--rk-fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
:root[data-theme="light"] .rk-body { background: var(--rk-bg); }
.rk-body *, .rk-body *::before, .rk-body *::after { box-sizing: border-box; }
.rk-num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rk-mono { font-family: var(--rk-font-mono); font-size: .92em; }

/* Titres */
.rk-h1 { font-size: var(--rk-fs-2xl); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
.rk-h2 { font-size: var(--rk-fs-xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
.rk-h3 { font-size: var(--rk-fs-lg); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.rk-eyebrow {
  font-size: var(--rk-fs-xs); font-weight: 500; text-transform: uppercase;
  letter-spacing: .12em; color: var(--rk-muted);
}
.rk-text-2 { color: var(--rk-text-2); }
.rk-muted  { color: var(--rk-muted); }
.rk-pos    { color: var(--rk-pos); }
.rk-neg    { color: var(--rk-neg); }

/* Logo : Syne conservée pour l'identité */
.rk-logo { font-family: var(--rk-font-logo); font-weight: 700; font-size: 20px; letter-spacing: -.01em; color: var(--rk-text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.rk-logo-mark { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--rk-line-strong); }
/* « smerta » : vert Rosmerta #3A7549 imposé (demande de Maxime), identique dans les deux thèmes */
.rk-logo b { color: var(--rk-logo); font-weight: 700; }

/* ─── 6. Composants ────────────────────────────────────────────────────── */

/* 6.1 Carte */
.rk-card {
  background: var(--rk-surface);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r-lg);
  box-shadow: var(--rk-shadow-1);
  padding: var(--rk-s6);
}
.rk-card--flush { padding: 0; overflow: hidden; }
.rk-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--rk-s3); flex-wrap: wrap; margin-bottom: var(--rk-s5); }

/* 6.2 Carte patrimoine (hero) — filet bronze + dégradé ardoise */
.rk-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 240px at 0% 0%, rgba(112, 151, 117, .16), transparent 70%),
    linear-gradient(180deg, var(--rk-surface-2), var(--rk-surface));
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r-xl);
  box-shadow: var(--rk-shadow-2);
  padding: var(--rk-s8);
}
.rk-hero::before { content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: var(--rk-hairline-gold); }
.rk-hero-value {
  font-size: var(--rk-fs-hero); font-weight: 600; letter-spacing: -.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; margin: var(--rk-s2) 0 var(--rk-s3);
}
.rk-hero-value small { font-size: .5em; font-weight: 500; color: var(--rk-muted); letter-spacing: -.01em; }
.rk-hero-meta { display: flex; align-items: center; gap: var(--rk-s3); flex-wrap: wrap; color: var(--rk-muted); font-size: var(--rk-fs-sm); }
.rk-hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--rk-s5);
  margin-top: var(--rk-s6); padding-top: var(--rk-s6); border-top: 1px solid var(--rk-line);
}

/* 6.3 KPI */
.rk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--rk-s3); }
.rk-kpi { display: flex; flex-direction: column; gap: 6px; }
.rk-kpi-label { font-size: var(--rk-fs-sm); color: var(--rk-muted); display: inline-flex; align-items: center; gap: 6px; }
.rk-kpi-value { font-size: var(--rk-fs-xl); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rk-kpi-sub { font-size: var(--rk-fs-sm); color: var(--rk-muted); }
.rk-kpi--tile { background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); padding: var(--rk-s5); box-shadow: var(--rk-shadow-1); }

/* 6.4 Pastille de variation */
.rk-delta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px 3px 7px; border-radius: var(--rk-r-pill);
  font-size: var(--rk-fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rk-delta svg { width: 10px; height: 10px; }
.rk-delta--up   { color: var(--rk-pos); background: var(--rk-pos-soft); }
.rk-delta--down { color: var(--rk-neg); background: var(--rk-neg-soft); }
.rk-delta--flat { color: var(--rk-muted); background: var(--rk-surface-3); }

/* 6.5 Boutons */
.rk-btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--rk-r-md);
  font: 500 var(--rk-fs-md)/1 var(--rk-font); letter-spacing: -.005em; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; user-select: none;
  transition: background var(--rk-dur) var(--rk-ease), border-color var(--rk-dur), color var(--rk-dur),
              box-shadow var(--rk-dur), transform .08s;
}
.rk-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.rk-btn:active:not(:disabled) { transform: translateY(1px); }
.rk-btn:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-btn:disabled, .rk-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* Principal : bronze (1 seul par écran) */
.rk-btn--primary {
  background: var(--rk-accent-grad); color: var(--rk-on-accent);
  border-color: rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.25), 0 6px 18px -8px rgba(219,153,90,.55);
}
.rk-btn--primary:hover:not(:disabled) { filter: brightness(1.06); }
/* Marque : sauge/ardoise (actions de navigation, confirmations secondaires) */
.rk-btn--brand {
  background: linear-gradient(180deg, var(--sage-500), var(--sage-600)); color: #F7FAF5;
  border-color: rgba(0,0,0,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.2);
}
:root[data-theme="light"] .rk-btn--brand { background: linear-gradient(180deg, #45605A, var(--slate-500)); }
.rk-btn--brand:hover:not(:disabled) { filter: brightness(1.07); }
/* Secondaire */
.rk-btn--secondary { background: var(--rk-surface-3); color: var(--rk-text); border-color: var(--rk-line-strong); box-shadow: var(--rk-shadow-1); }
.rk-btn--secondary:hover:not(:disabled) { border-color: color-mix(in srgb, var(--rk-accent) 45%, var(--rk-line-strong)); }
/* Discret */
.rk-btn--ghost { background: transparent; color: var(--rk-text-2); }
.rk-btn--ghost:hover:not(:disabled) { background: var(--rk-surface-3); color: var(--rk-text); }
/* Danger */
.rk-btn--danger { background: var(--rk-neg-soft); color: var(--rk-neg); border-color: color-mix(in srgb, var(--rk-neg) 30%, transparent); }
.rk-btn--danger:hover:not(:disabled) { background: var(--rk-neg); color: var(--rk-bg); }
/* Tailles */
.rk-btn--sm { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--rk-r-sm); }
.rk-btn--lg { --h: 46px; padding: 0 22px; font-size: 15px; border-radius: var(--rk-r-lg); }
.rk-btn--block { width: 100%; }
.rk-btn--icon { width: var(--h); padding: 0; }
/* Chargement */
.rk-btn[aria-busy="true"] { color: transparent !important; position: relative; pointer-events: none; }
.rk-btn[aria-busy="true"]::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--rk-on-accent); border-right-color: transparent; animation: rk-spin .7s linear infinite;
}
.rk-btn--secondary[aria-busy="true"]::after { border-color: var(--rk-text); border-right-color: transparent; }
@keyframes rk-spin { to { transform: rotate(360deg); } }

/* 6.6 Contrôle segmenté (périodes, vues) */
.rk-seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--rk-inset); border: 1px solid var(--rk-line); border-radius: var(--rk-r-md);
}
.rk-seg button {
  border: 0; background: transparent; color: var(--rk-muted); cursor: pointer;
  font: 500 13px/1 var(--rk-font); padding: 7px 12px; border-radius: 7px;
  transition: background var(--rk-dur), color var(--rk-dur), box-shadow var(--rk-dur);
}
.rk-seg button:hover { color: var(--rk-text); }
.rk-seg button:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-seg button[aria-pressed="true"] {
  background: var(--rk-surface-3); color: var(--rk-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 3px rgba(0,0,0,.35), 0 0 0 1px var(--rk-line-strong);
}
:root[data-theme="light"] .rk-seg button[aria-pressed="true"] { background: var(--rk-surface); box-shadow: 0 1px 3px rgba(40,50,40,.12), 0 0 0 1px var(--rk-line); }

/* 6.7 Onglets soulignés (navigation de page) */
.rk-tabs { display: flex; gap: var(--rk-s5); border-bottom: 1px solid var(--rk-line); overflow-x: auto; scrollbar-width: none; }
.rk-tabs a, .rk-tabs button {
  position: relative; padding: 12px 2px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: 500 var(--rk-fs-md)/1 var(--rk-font); color: var(--rk-muted); text-decoration: none;
}
.rk-tabs [aria-selected="true"], .rk-tabs [aria-current="page"] { color: var(--rk-text); }
.rk-tabs [aria-selected="true"]::after, .rk-tabs [aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rk-accent);
}
.rk-tabs :focus-visible { outline: none; box-shadow: var(--rk-focus); border-radius: 4px; }

/* 6.8 Barre de navigation */
.rk-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--rk-s6); padding: 12px var(--rk-s6);
  background: color-mix(in srgb, var(--rk-bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rk-line);
}
.rk-nav-links { display: flex; gap: 2px; margin-right: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rk-nav-links::-webkit-scrollbar { display: none; }
.rk-nav-links a { white-space: nowrap; padding: 8px 12px; border-radius: var(--rk-r-sm); color: var(--rk-muted); text-decoration: none; font-weight: 500; font-size: 14px; transition: color var(--rk-dur), background var(--rk-dur); }
.rk-nav-links a:hover { color: var(--rk-text); background: var(--rk-surface-3); }
.rk-nav-links a[aria-current="page"] { color: var(--rk-text); background: var(--rk-surface-3); box-shadow: inset 0 0 0 1px var(--rk-line); }
@media (max-width: 760px) { .rk-nav-links { display: none; } }

/* 6.9 Champs de saisie */
.rk-field { display: flex; flex-direction: column; gap: 6px; }
.rk-label { font-size: 13px; font-weight: 500; color: var(--rk-text-2); }
.rk-hint  { font-size: var(--rk-fs-sm); color: var(--rk-muted); }
.rk-input, .rk-select {
  height: 40px; width: 100%; padding: 0 12px;
  background: var(--rk-inset); color: var(--rk-text);
  border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md);
  font: 400 var(--rk-fs-md)/1 var(--rk-font); font-variant-numeric: tabular-nums;
  transition: border-color var(--rk-dur), box-shadow var(--rk-dur), background var(--rk-dur);
}
.rk-input::placeholder { color: var(--rk-faint); }
.rk-input:hover, .rk-select:hover { border-color: color-mix(in srgb, var(--rk-text) 25%, transparent); }
.rk-input:focus, .rk-select:focus { outline: none; border-color: var(--rk-accent); box-shadow: 0 0 0 3px var(--rk-accent-soft); }
.rk-input[aria-invalid="true"] { border-color: var(--rk-neg); box-shadow: 0 0 0 3px var(--rk-neg-soft); }
.rk-field-err { font-size: var(--rk-fs-sm); color: var(--rk-neg); }
.rk-input-affix { position: relative; }
.rk-input-affix .rk-input { padding-right: 36px; text-align: right; }
.rk-input-affix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--rk-muted); pointer-events: none; }
.rk-select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23929D8F' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

/* 6.10 Interrupteur + cases */
.rk-switch { display: inline-flex; align-items: center; gap: var(--rk-s3); cursor: pointer; font-size: var(--rk-fs-md); }
.rk-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-switch span { position: relative; width: 38px; height: 22px; border-radius: var(--rk-r-pill); background: var(--rk-surface-3); border: 1px solid var(--rk-line-strong); transition: background var(--rk-dur); flex-shrink: 0; }
.rk-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--rk-text-2); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform var(--rk-dur) var(--rk-ease), background var(--rk-dur); }
.rk-switch input:checked + span { background: var(--rk-accent); border-color: var(--rk-accent); }
.rk-switch input:checked + span::after { transform: translateX(16px); background: #FFFDF9; }
.rk-switch input:focus-visible + span { box-shadow: var(--rk-focus); }
.rk-check { display: inline-flex; align-items: center; gap: var(--rk-s2); font-size: var(--rk-fs-md); cursor: pointer; }
.rk-check input { accent-color: var(--rk-accent); width: 16px; height: 16px; cursor: pointer; }

/* 6.11 Badges / chips */
.rk-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border-radius: var(--rk-r-xs); font-size: var(--rk-fs-xs); font-weight: 500; letter-spacing: .02em;
  background: var(--rk-surface-3); color: var(--rk-text-2); border: 1px solid var(--rk-line);
}
.rk-badge--brand  { background: var(--rk-brand-soft); color: var(--rk-brand); border-color: transparent; }
.rk-badge--accent { background: var(--rk-accent-soft); color: var(--rk-accent); border-color: transparent; }
.rk-badge--premium {
  background: linear-gradient(135deg, rgba(219,153,90,.18), rgba(190,110,70,.08));
  color: var(--rk-accent-strong); border-color: rgba(219,153,90,.35);
}
:root[data-theme="light"] .rk-badge--premium { color: var(--bronze-700); }
.rk-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rk-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--rk-r-pill); border: 1px solid var(--rk-line-strong); background: transparent;
  font: 500 13px/1 var(--rk-font); color: var(--rk-text-2); cursor: pointer;
  transition: border-color var(--rk-dur), background var(--rk-dur), color var(--rk-dur);
}
.rk-chip:hover { color: var(--rk-text); border-color: color-mix(in srgb, var(--rk-text) 30%, transparent); }
.rk-chip[aria-pressed="true"] { background: var(--rk-accent-soft); border-color: color-mix(in srgb, var(--rk-accent) 50%, transparent); color: var(--rk-accent); }
.rk-chip:focus-visible { outline: none; box-shadow: var(--rk-focus); }

/* 6.12 Barre d'allocation + légende */
.rk-alloc { display: flex; height: 10px; gap: 3px; border-radius: var(--rk-r-pill); overflow: hidden; }
.rk-alloc > span { display: block; height: 100%; border-radius: 2px; transition: filter var(--rk-dur); }
.rk-alloc > span:hover { filter: brightness(1.15); }
.rk-legend { list-style: none; padding: 0; margin: var(--rk-s5) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--rk-s2) var(--rk-s6); }
.rk-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--rk-line); }
.rk-legend .rk-legend-name { color: var(--rk-text-2); margin-right: auto; }
.rk-legend .rk-legend-pct { color: var(--rk-muted); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }
.rk-legend .rk-legend-val { font-weight: 500; font-variant-numeric: tabular-nums; }

/* 6.13 Progression (plafond, objectif) */
.rk-progress { height: 6px; border-radius: var(--rk-r-pill); background: var(--rk-inset); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rk-line); }
.rk-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sage-500), var(--rk-brand-strong)); transition: width .6s var(--rk-ease); }
.rk-progress--accent > span { background: var(--rk-accent-grad); }
.rk-progress--warn > span { background: var(--rk-warn); }

/* 6.14 Carte véhicule */
.rk-vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--rk-s3); }
.rk-vehicle {
  --vc: var(--c-pea);
  position: relative; display: flex; flex-direction: column; gap: var(--rk-s3);
  padding: var(--rk-s5); border-radius: var(--rk-r-lg);
  background: var(--rk-surface); border: 1px solid var(--rk-line); box-shadow: var(--rk-shadow-1);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: border-color var(--rk-dur), transform var(--rk-dur) var(--rk-ease), box-shadow var(--rk-dur);
}
.rk-vehicle::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--vc); opacity: .9; }
.rk-vehicle:hover { border-color: color-mix(in srgb, var(--vc) 40%, var(--rk-line)); transform: translateY(-2px); box-shadow: var(--rk-shadow-2); }
.rk-vehicle:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-vehicle-head { display: flex; align-items: center; gap: 10px; }
.rk-vehicle-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--vc) 16%, transparent); color: var(--vc); }
.rk-vehicle-ico svg { width: 16px; height: 16px; }
.rk-vehicle-name { font-weight: 600; font-size: 14px; }
.rk-vehicle-sub { font-size: var(--rk-fs-sm); color: var(--rk-muted); }
.rk-vehicle-value { font-size: 22px; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.rk-vehicle-foot { display: flex; justify-content: space-between; align-items: center; font-size: var(--rk-fs-sm); color: var(--rk-muted); }

/* 6.15 Tableau des positions */
.rk-table-wrap { overflow-x: auto; }
.rk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.rk-table th {
  position: sticky; top: 0; z-index: 1; background: var(--rk-surface-2);
  text-align: left; font-weight: 500; font-size: var(--rk-fs-xs); color: var(--rk-muted);
  text-transform: uppercase; letter-spacing: .1em; padding: 12px var(--rk-s5);
  border-bottom: 1px solid var(--rk-line); white-space: nowrap;
}
.rk-table td { padding: 14px var(--rk-s5); border-bottom: 1px solid var(--rk-line); vertical-align: middle; }
.rk-table tbody tr { transition: background var(--rk-dur); }
.rk-table tbody tr:hover { background: color-mix(in srgb, var(--rk-accent) 4%, transparent); }
.rk-table tbody tr:last-child td { border-bottom: 0; }
.rk-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-asset { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.rk-asset-logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  background: var(--rk-surface-3); color: var(--rk-text-2); border: 1px solid var(--rk-line);
}
.rk-asset-name { font-weight: 500; line-height: 1.3; }
.rk-asset-meta { font-size: var(--rk-fs-sm); color: var(--rk-muted); font-family: var(--rk-font-mono); }
.rk-spark { width: 80px; height: 28px; display: block; margin-left: auto; }
/* Mobile : chaque ligne devient une carte (td[data-label]) */
@media (max-width: 640px) {
  .rk-table--cards thead { display: none; }
  .rk-table--cards, .rk-table--cards tbody { display: block; }
  .rk-table--cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--rk-s3); padding: var(--rk-s4) var(--rk-s5); border-bottom: 1px solid var(--rk-line); }
  .rk-table--cards td { display: block; padding: 0; border: 0; }
  .rk-table--cards td:first-child { grid-column: 1 / -1; margin-bottom: 6px; }
  .rk-table--cards td.num { text-align: left; }
  .rk-table--cards td.num:nth-child(odd) { text-align: right; } /* 2e colonne de la carte */
  .rk-table--cards td[data-label]::before { content: attr(data-label); display: block; color: var(--rk-muted); font-size: var(--rk-fs-xs); text-transform: uppercase; letter-spacing: .08em; }
  .rk-table--cards .rk-hide-m { display: none; }
}

/* 6.16 Graphique (conteneur) */
.rk-chart { position: relative; width: 100%; height: 260px; }
.rk-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rk-chart-legend { display: flex; gap: var(--rk-s5); font-size: var(--rk-fs-sm); color: var(--rk-muted); }
.rk-chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rk-chart-legend i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.rk-chart-tip {
  position: absolute; pointer-events: none; padding: 10px 12px; min-width: 150px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md);
  box-shadow: var(--rk-shadow-3); font-size: var(--rk-fs-sm); transform: translate(-50%, calc(-100% - 14px));
}
.rk-chart-tip b { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* 6.17 Alertes */
.rk-alert {
  --c: var(--rk-info); --bgc: var(--rk-info-soft);
  display: flex; gap: var(--rk-s3); align-items: flex-start;
  padding: var(--rk-s3) var(--rk-s4); border-radius: var(--rk-r-md);
  background: var(--bgc); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  font-size: 13.5px; line-height: 1.55; color: var(--rk-text-2);
}
.rk-alert svg { width: 18px; height: 18px; color: var(--c); flex-shrink: 0; margin-top: 1px; }
.rk-alert b { color: var(--rk-text); font-weight: 600; }
.rk-alert--ok   { --c: var(--rk-pos);  --bgc: var(--rk-pos-soft); }
.rk-alert--warn { --c: var(--rk-warn); --bgc: var(--rk-warn-soft); }
.rk-alert--err  { --c: var(--rk-neg);  --bgc: var(--rk-neg-soft); }

/* 6.18 Toast */
.rk-toast-zone { position: fixed; bottom: var(--rk-s6); right: var(--rk-s4); left: var(--rk-s4); display: flex; flex-direction: column; align-items: flex-end; gap: var(--rk-s2); z-index: 2000; pointer-events: none; }
.rk-toast {
  display: inline-flex; align-items: center; gap: var(--rk-s3); pointer-events: auto;
  padding: 12px 16px; border-radius: var(--rk-r-lg);
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
  font-size: 14px; animation: rk-in .28s var(--rk-ease);
}
.rk-toast svg { width: 18px; height: 18px; color: var(--rk-pos); }
@keyframes rk-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* 6.19 Modale */
.rk-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--rk-s4);
  background: rgba(5, 8, 7, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: rk-fade .2s; }
:root[data-theme="light"] .rk-overlay { background: rgba(30, 40, 35, .35); }
.rk-overlay[hidden] { display: none; }
.rk-modal {
  position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--rk-surface); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-xl);
  box-shadow: var(--rk-shadow-3); padding: var(--rk-s8); animation: rk-in .25s var(--rk-ease);
}
.rk-modal::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--rk-hairline-gold); }
.rk-modal-close { position: absolute; top: 16px; right: 16px; }
.rk-modal-foot { display: flex; justify-content: flex-end; gap: var(--rk-s2); margin-top: var(--rk-s6); }
@keyframes rk-fade { from { opacity: 0; } }

/* 6.20 Squelette, état vide, infobulle */
.rk-skel {
  border-radius: var(--rk-r-xs);
  background: linear-gradient(90deg, var(--rk-surface-3) 25%, color-mix(in srgb, var(--rk-text) 7%, var(--rk-surface-3)) 50%, var(--rk-surface-3) 75%);
  background-size: 200% 100%; animation: rk-shimmer 1.4s infinite linear;
}
@keyframes rk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.rk-empty { text-align: center; padding: var(--rk-s10) var(--rk-s6); border: 1px dashed var(--rk-line-strong); border-radius: var(--rk-r-lg); }
.rk-empty-ico { width: 52px; height: 52px; margin: 0 auto var(--rk-s4); border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--rk-accent-soft), var(--rk-brand-soft)); color: var(--rk-accent); border: 1px solid var(--rk-line); }
.rk-empty-ico svg { width: 22px; height: 22px; }
.rk-empty p { color: var(--rk-muted); font-size: 13px; max-width: 340px; margin: 6px auto var(--rk-s5); }
.rk-tip { position: relative; display: inline-flex; }
.rk-tip > button { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--rk-line-strong); background: transparent; color: var(--rk-muted); font: 600 10px/1 var(--rk-font); cursor: help; padding: 0; }
.rk-tip > button:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-tip [role="tooltip"] {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 260px; padding: 10px 12px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md); box-shadow: var(--rk-shadow-3);
  font-size: var(--rk-fs-sm); line-height: 1.5; color: var(--rk-text-2); text-transform: none; letter-spacing: 0; font-weight: 400;
  opacity: 0; visibility: hidden; transition: opacity var(--rk-dur), transform var(--rk-dur) var(--rk-ease); z-index: 10; pointer-events: none;
}
.rk-tip:hover [role="tooltip"], .rk-tip:focus-within [role="tooltip"] { opacity: 1; visibility: visible; transform: translateX(-50%); }

/* ─── 7. Accessibilité ─────────────────────────────────────────────────── */
.rk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .rk-body *, .rk-body *::before, .rk-body *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================================
 * 8. ZÉRO NATIF — remplacements des éléments du navigateur (rk-ui.js)
 *    Règle : aucun rendu natif visible (calendrier, liste, infobulle title,
 *    confirm/alert/prompt, bulles de validation, curseurs, cases, fichiers,
 *    barres de défilement, autoremplissage).
 * ==========================================================================*/

/* 8.1 Barres de défilement fines, assorties au thème */
.rk-body { scrollbar-width: thin; scrollbar-color: var(--rk-line-strong) transparent; }
.rk-body ::-webkit-scrollbar { width: 10px; height: 10px; }
.rk-body ::-webkit-scrollbar-track { background: transparent; }
.rk-body ::-webkit-scrollbar-thumb { background: var(--rk-line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.rk-body ::-webkit-scrollbar-thumb:hover { background-color: var(--rk-muted); }
.rk-body ::selection { background: color-mix(in srgb, var(--rk-accent) 32%, transparent); color: var(--rk-text); }

/* 8.2 Autoremplissage (fond jaune/bleu du navigateur) neutralisé */
.rk-body input:-webkit-autofill,
.rk-body input:-webkit-autofill:hover,
.rk-body input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--rk-text);
  box-shadow: 0 0 0 1000px var(--rk-inset) inset;
  caret-color: var(--rk-text);
  transition: background-color 9999s;
}

/* 8.3 Nombres : flèches natives masquées */
.rk-body input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.rk-body input[type="number"]::-webkit-inner-spin-button,
.rk-body input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 8.4 Cases à cocher et boutons radio maison (CSS seul) */
.rk-body input[type="checkbox"]:not(.rk-switch input),
.rk-body input[type="radio"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex-shrink: 0; cursor: pointer;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--rk-inset); border: 1.5px solid var(--rk-line-strong);
  display: inline-grid; place-content: center; vertical-align: -4px;
  transition: background var(--rk-dur), border-color var(--rk-dur), box-shadow var(--rk-dur);
}
.rk-body input[type="radio"] { border-radius: 50%; }
.rk-body input[type="checkbox"]:not(.rk-switch input)::after {
  content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .15s var(--rk-ease);
  background: var(--rk-on-accent);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.rk-body input[type="radio"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rk-on-accent); transform: scale(0); transition: transform .15s var(--rk-ease); }
.rk-body input[type="checkbox"]:checked:not(.rk-switch input),
.rk-body input[type="radio"]:checked { background: var(--rk-accent); border-color: var(--rk-accent); }
.rk-body input[type="checkbox"]:checked:not(.rk-switch input)::after,
.rk-body input[type="radio"]:checked::after { transform: scale(1); }
.rk-body input[type="checkbox"]:indeterminate { background: var(--rk-accent); border-color: var(--rk-accent); }
.rk-body input[type="checkbox"]:indeterminate:not(.rk-switch input)::after { transform: scale(1); clip-path: inset(40% 5% 40% 5%); }
.rk-body input[type="checkbox"]:hover:not(:checked),
.rk-body input[type="radio"]:hover:not(:checked) { border-color: var(--rk-muted); }
.rk-body input[type="checkbox"]:focus-visible,
.rk-body input[type="radio"]:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-body input[type="checkbox"]:disabled,
.rk-body input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }
.rk-radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.rk-radio-row label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* 8.5 Curseur (input range) — piste remplie via --rk-pct (mis à jour par rk-ui.js) */
.rk-body input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0;
  --rk-pct: 50%;
}
.rk-body input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--rk-accent) 0 var(--rk-pct), var(--rk-inset) var(--rk-pct) 100%);
  box-shadow: inset 0 0 0 1px var(--rk-line);
}
.rk-body input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--rk-inset); box-shadow: inset 0 0 0 1px var(--rk-line); }
.rk-body input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--rk-accent); }
.rk-body input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: #FFFDF9; border: 2px solid var(--rk-accent); box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .12s var(--rk-ease);
}
.rk-body input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #FFFDF9; border: 2px solid var(--rk-accent); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.rk-body input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.rk-body input[type="range"]:focus-visible { outline: none; }
.rk-body input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--rk-focus); }
.rk-range-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rk-range-val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 8.6 Surcouche commune : popover (bureau) / panneau bas (mobile ≤ 640 px) */
.rk-pop {
  position: fixed; z-index: 100010; /* au-dessus des modales du site (9000 à 99999) */ min-width: 220px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-lg);
  box-shadow: var(--rk-shadow-3); padding: 6px; animation: rk-pop-in .16s var(--rk-ease);
}
@keyframes rk-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.rk-sheet-scrim { position: fixed; inset: 0; z-index: 100009; background: rgba(5, 8, 7, .55); animation: rk-fade .2s; }
:root[data-theme="light"] .rk-sheet-scrim { background: rgba(30, 40, 35, .3); }
.rk-sheet-title { display: none; font-weight: 600; font-size: 15px; padding: 0 6px 10px; }
@media (max-width: 640px) {
  .rk-pop.rk-pop--sheet {
    left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; max-height: 78dvh; overflow: auto;
    border-radius: var(--rk-r-xl) var(--rk-r-xl) 0 0; border-bottom: 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
    animation: rk-sheet-in .26s var(--rk-ease);
  }
  .rk-pop.rk-pop--sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--rk-line-strong); margin: 4px auto 10px; }
  .rk-pop--sheet .rk-sheet-title { display: block; }
}
@keyframes rk-sheet-in { from { transform: translateY(100%); } }

/* 8.7 Liste déroulante (remplace <select>) */
.rk-sel-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.rk-sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px; padding: 0 12px;
  background: var(--rk-inset); color: var(--rk-text); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md);
  font: 400 var(--rk-fs-md)/1 var(--rk-font); text-align: left; cursor: pointer;
  transition: border-color var(--rk-dur), box-shadow var(--rk-dur);
}
.rk-sel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-sel-btn svg { width: 14px; height: 14px; color: var(--rk-muted); flex-shrink: 0; transition: transform var(--rk-dur); }
.rk-sel-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.rk-sel-btn:hover { border-color: color-mix(in srgb, var(--rk-text) 25%, transparent); }
.rk-sel-btn:focus-visible, .rk-sel-btn[aria-expanded="true"] { outline: none; border-color: var(--rk-accent); box-shadow: 0 0 0 3px var(--rk-accent-soft); }
.rk-sel-btn:disabled { opacity: .5; cursor: not-allowed; }
.rk-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.rk-list-group { padding: 10px 10px 4px; font-size: var(--rk-fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--rk-muted); }
.rk-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--rk-r-sm);
  font-size: 14px; color: var(--rk-text-2); cursor: pointer; user-select: none;
}
.rk-opt[aria-selected="true"] { color: var(--rk-text); font-weight: 500; }
.rk-opt[aria-selected="true"]::after { content: ""; margin-left: auto; width: 14px; height: 14px; flex-shrink: 0; background: var(--rk-accent);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.rk-opt.is-active { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-opt[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.rk-opt mark { background: none; color: var(--rk-accent); font-weight: 600; }
.rk-opt-sub { margin-left: auto; font-size: 12px; color: var(--rk-muted); font-family: var(--rk-font-mono); }
.rk-list-search { position: sticky; top: 0; padding: 2px 2px 6px; background: var(--rk-surface-2); }
.rk-list-search .rk-input { height: 36px; font-size: 13px; }
.rk-list-empty { padding: 14px 10px; font-size: 13px; color: var(--rk-muted); text-align: center; }
@media (max-width: 640px) { .rk-pop--sheet .rk-list { max-height: none; } .rk-pop--sheet .rk-opt { padding: 13px 10px; font-size: 15px; } }

/* 8.8 Calendrier (remplace input date / month) */
.rk-date { position: relative; }
.rk-date .rk-input { padding-right: 40px; }
.rk-date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: var(--rk-r-sm); background: transparent; color: var(--rk-muted); cursor: pointer; display: grid; place-items: center; }
.rk-date-btn:hover { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-date-btn:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-date-btn svg { width: 16px; height: 16px; }
.rk-cal { width: 300px; padding: 12px; }
.rk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rk-cal-title { border: 0; background: none; color: var(--rk-text); font: 600 14px/1 var(--rk-font); padding: 8px 10px; border-radius: var(--rk-r-sm); cursor: pointer; text-transform: capitalize; }
.rk-cal-title:hover { background: var(--rk-surface-3); }
.rk-cal-nav { width: 32px; height: 32px; border: 0; border-radius: var(--rk-r-sm); background: none; color: var(--rk-text-2); cursor: pointer; display: grid; place-items: center; }
.rk-cal-nav:hover { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-cal-nav svg { width: 16px; height: 16px; }
.rk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rk-cal-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rk-cal-dow { font-size: 11px; color: var(--rk-muted); text-align: center; padding: 6px 0; font-weight: 500; }
.rk-cal-cell {
  height: 36px; border: 0; border-radius: var(--rk-r-sm); background: none; color: var(--rk-text-2);
  font: 400 13px/1 var(--rk-font); font-variant-numeric: tabular-nums; cursor: pointer; position: relative;
  transition: background .12s, color .12s;
}
.rk-cal-grid--3 .rk-cal-cell { height: 44px; text-transform: capitalize; }
.rk-cal-cell:hover { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-cal-cell.is-out { color: var(--rk-faint); }
.rk-cal-cell.is-today { color: var(--rk-accent); font-weight: 600; }
.rk-cal-cell.is-today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.rk-cal-cell.is-sel { background: var(--rk-accent-grad); color: var(--rk-on-accent); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.rk-cal-cell.is-sel::after { background: var(--rk-on-accent); }
.rk-cal-cell:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-cal-cell:disabled { opacity: .3; cursor: not-allowed; background: none; }
.rk-cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rk-line); }
@media (max-width: 640px) { .rk-pop--sheet.rk-cal { width: auto; } .rk-pop--sheet .rk-cal-cell { height: 44px; font-size: 15px; } }

/* 8.9 Infobulle flottante (remplace l'attribut title) */
.rk-ftip {
  position: fixed; z-index: 100020; pointer-events: none; max-width: 280px; width: max-content;
  padding: 8px 11px; border-radius: var(--rk-r-sm);
  background: var(--rk-surface-2); color: var(--rk-text); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
  font: 400 12.5px/1.45 var(--rk-font); opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s var(--rk-ease);
}
:root[data-theme="light"] .rk-ftip { background: #1E2825; color: #F2F0E8; border-color: transparent; }
.rk-ftip.is-on { opacity: 1; transform: none; }

/* 8.10 Dépôt de fichier (remplace input file) */
.rk-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 28px 20px; border: 1.5px dashed var(--rk-line-strong); border-radius: var(--rk-r-lg); background: var(--rk-inset);
  cursor: pointer; transition: border-color var(--rk-dur), background var(--rk-dur);
}
.rk-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rk-drop:hover, .rk-drop.is-over { border-color: var(--rk-accent); background: var(--rk-accent-soft); }
.rk-drop:focus-within { border-color: var(--rk-accent); box-shadow: 0 0 0 3px var(--rk-accent-soft); }
.rk-drop-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--rk-surface-3); color: var(--rk-accent); margin-bottom: 4px; }
.rk-drop-ico svg { width: 18px; height: 18px; }
.rk-drop b { font-weight: 600; font-size: 14px; }
.rk-drop u { color: var(--rk-accent); text-decoration: none; font-weight: 500; }
.rk-drop small { color: var(--rk-muted); font-size: 12px; }
.rk-drop-file { display: none; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 10px; border-radius: var(--rk-r-sm); background: var(--rk-surface-3); font-size: 13px; color: var(--rk-text); }
.rk-drop.has-file .rk-drop-file { display: inline-flex; }

/* 8.11 Erreur de validation (remplace la bulle native) */
.rk-invalid-msg { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--rk-fs-sm); color: var(--rk-neg); }
.rk-invalid-msg::before { content: "!"; width: 14px; height: 14px; border-radius: 50%; background: var(--rk-neg); color: var(--rk-bg); font-size: 10px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }

/* 8.12 Boîtes de dialogue (remplacent confirm / alert / prompt) */
.rk-dlg-scrim { position: fixed; inset: 0; z-index: 100030; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 7, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: rk-fade .18s; }
:root[data-theme="light"] .rk-dlg-scrim { background: rgba(30, 40, 35, .35); }
.rk-dlg {
  position: relative; width: min(440px, 100%); background: var(--rk-surface); border: 1px solid var(--rk-line-strong);
  border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3); padding: 28px 28px 24px; animation: rk-in .22s var(--rk-ease);
}
.rk-dlg::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--rk-hairline-gold); }
.rk-dlg-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--rk-accent-soft); color: var(--rk-accent); }
.rk-dlg-ico svg { width: 20px; height: 20px; }
.rk-dlg--danger .rk-dlg-ico { background: var(--rk-neg-soft); color: var(--rk-neg); }
.rk-dlg--danger::before { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rk-neg) 60%, transparent), transparent); }
.rk-dlg-title { font-size: 18px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; }
.rk-dlg-msg { color: var(--rk-text-2); font-size: 14px; line-height: 1.6; margin: 0; white-space: pre-line; }
.rk-dlg-msg b { color: var(--rk-text); }
.rk-dlg-field { margin-top: 18px; }
.rk-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.rk-btn--danger-solid { background: var(--rk-neg); color: #FFFDF9; border-color: rgba(0,0,0,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(0,0,0,.25); }
:root:not([data-theme="light"]) .rk-btn--danger-solid { color: #1C0D09; }
.rk-btn--danger-solid:hover:not(:disabled) { filter: brightness(1.06); }
@media (max-width: 640px) {
  .rk-dlg-scrim { place-items: end stretch; padding: 0; }
  .rk-dlg { width: 100%; border-radius: var(--rk-r-xl) var(--rk-r-xl) 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); animation: rk-sheet-in .26s var(--rk-ease); }
  .rk-dlg-foot { flex-direction: column-reverse; }
  .rk-dlg-foot .rk-btn { width: 100%; --h: 46px; }
}

/* 8.13 Toast enrichi (types + action) */
.rk-toast--err svg { color: var(--rk-neg); }
.rk-toast--info svg { color: var(--rk-info); }
.rk-toast--warn svg { color: var(--rk-warn); }
.rk-toast-action { margin-left: 8px; border: 0; background: none; color: var(--rk-accent); font: 600 13px/1 var(--rk-font); cursor: pointer; padding: 6px 4px; border-radius: 6px; }
.rk-toast-action:focus-visible { outline: none; box-shadow: var(--rk-focus); }

/* ============================================================================
 * 9. GRAPHIQUES (Chart.js) — rk-charts.js
 * ==========================================================================*/
.rk-chart-box { position: relative; width: 100%; height: 260px; }
.rk-chart-box--sm { height: 200px; }
.rk-chart-box--lg { height: 320px; }
.rk-chart-box--spark { height: 56px; }
.rk-charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 12px; }
.rk-chart-card { background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); padding: 20px; box-shadow: var(--rk-shadow-1); min-width: 0; }
.rk-chart-card--wide { grid-column: 1 / -1; }
.rk-chart-card h4 { margin: 0; font-size: 14px; font-weight: 600; }
.rk-chart-card .rk-chart-meta { margin: 2px 0 14px; font-size: 12px; color: var(--rk-muted); }
.rk-chart-card .rk-chart-meta code { font-family: var(--rk-font-mono); font-size: 11px; }
.rk-chart-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* Infobulle HTML des graphiques (tooltip.external) */
.rk-ctip {
  position: absolute; z-index: 20; pointer-events: none; min-width: 180px; max-width: 300px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md);
  box-shadow: var(--rk-shadow-3); padding: 10px 12px; font: 400 12.5px/1.4 var(--rk-font); color: var(--rk-text-2);
  opacity: 0; transition: opacity .12s, left .08s linear, top .08s linear;
}
.rk-ctip.is-on { opacity: 1; }
.rk-ctip-title { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--rk-muted); margin-bottom: 8px; }
.rk-ctip-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.rk-ctip-row i { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.rk-ctip-row .l { margin-right: auto; padding-right: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-ctip-row .v { color: var(--rk-text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-ctip-row.is-solo .v { font-size: 15px; letter-spacing: -.01em; }
.rk-ctip-row.is-sub { padding-left: 16px; font-size: 12px; color: var(--rk-muted); }
.rk-ctip-row.is-sub .v { font-weight: 500; color: var(--rk-text-2); }
.rk-ctip-sep { height: 1px; background: var(--rk-line); margin: 7px 0; }
.rk-ctip .is-pos .v { color: var(--rk-pos); }
.rk-ctip .is-neg .v { color: var(--rk-neg); }
.rk-ctip-foot .rk-ctip-row .l { color: var(--rk-text); font-weight: 500; }

/* Légende HTML externe (remplace la légende canvas, cliquable pour masquer) */
.rk-clegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--rk-text-2); }
.rk-clegend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; color: inherit; font: inherit; cursor: pointer; border-radius: 4px; transition: opacity var(--rk-dur); }
.rk-clegend button[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }
.rk-clegend button:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-clegend i { width: 8px; height: 8px; border-radius: 3px; }
.rk-clegend i.is-line { height: 2px; width: 14px; border-radius: 2px; }
.rk-clegend i.is-dash { height: 2px; width: 14px; border-radius: 0; }
.rk-clegend b { font-weight: 600; color: var(--rk-text); font-variant-numeric: tabular-nums; }

/* ============================================================================
 * 10. STRUCTURE DU SITE — menus, tiroir mobile, connexion, cookies, pied de page
 * ==========================================================================*/

/* 10.1 Menu déroulant (portefeuille, utilisateur) */
.rk-menu { min-width: 240px; }
.rk-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--rk-r-sm);
  background: none; color: var(--rk-text-2); font: 500 14px/1.2 var(--rk-font); text-align: left; cursor: pointer; text-decoration: none;
}
.rk-menu-item:hover, .rk-menu-item.is-active { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-menu-item:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-menu-item[aria-current="page"] { color: var(--rk-text); background: var(--rk-surface-3); }
.rk-menu-item svg { width: 16px; height: 16px; color: var(--rk-muted); }
.rk-menu-item small { margin-left: auto; color: var(--rk-muted); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }
.rk-menu-item--danger, .rk-menu-item--danger svg { color: var(--rk-neg); }
.rk-menu-item--danger:hover { background: var(--rk-neg-soft); color: var(--rk-neg); }
.rk-menu-sep { height: 1px; background: var(--rk-line); margin: 6px 4px; }
.rk-menu-head { padding: 8px 10px 10px; display: flex; gap: 10px; align-items: center; }
.rk-menu-head b { display: block; font-size: 14px; font-weight: 600; }
.rk-menu-head span { font-size: 12px; color: var(--rk-muted); }
.rk-nav-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: var(--rk-r-sm); background: none; color: var(--rk-muted); font: 500 14px/1 var(--rk-font); cursor: pointer; white-space: nowrap; }
.rk-nav-trigger:hover, .rk-nav-trigger[aria-expanded="true"] { color: var(--rk-text); background: var(--rk-surface-3); }
.rk-nav-trigger:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-nav-trigger svg { width: 12px; height: 12px; transition: transform var(--rk-dur); }
.rk-nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.rk-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--rk-font); color: #F6E6D3;
  background: linear-gradient(145deg, var(--sage-600), var(--slate-500)); box-shadow: 0 0 0 1px var(--rk-line-strong); border: 0; cursor: pointer; flex-shrink: 0; padding: 0; }
.rk-avatar:focus-visible { outline: none; box-shadow: var(--rk-focus); }

/* 10.2 Tiroir de navigation mobile (remplace .sidebar) */
.rk-drawer-scrim { position: fixed; inset: 0; z-index: 900; background: rgba(5,8,7,.55); opacity: 0; pointer-events: none; transition: opacity .25s; }
.rk-drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.rk-drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 901; width: min(320px, 86vw); display: flex; flex-direction: column;
  background: var(--rk-surface); border-right: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
  transform: translateX(-102%); transition: transform .28s var(--rk-ease); padding: 16px; overflow-y: auto; visibility: hidden; }
.rk-drawer.is-open { transform: none; visibility: visible; }
.rk-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rk-drawer-sec { font-size: var(--rk-fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--rk-muted); padding: 16px 10px 6px; }
.rk-drawer .rk-menu-item { padding: 11px 10px; }
.rk-drawer-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rk-line); display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.rk-burger { display: none !important; }
@media (max-width: 760px) { .rk-burger { display: inline-flex !important; } .rk-nav .rk-nav-hide-m { display: none; } }

/* 10.3 Sélecteur de thème (remplace l'interrupteur ☀️/🌙) */
.rk-theme-seg button { display: inline-grid; place-items: center; padding: 6px 9px; }
.rk-theme-seg svg { width: 15px; height: 15px; }

/* 10.4 Carte de connexion / inscription */
.rk-auth { width: min(420px, 100%); }
.rk-auth-sub { color: var(--rk-muted); font-size: 14px; margin: 6px 0 24px; }
.rk-btn--oauth { width: 100%; background: var(--rk-surface-3); color: var(--rk-text); border-color: var(--rk-line-strong); --h: 44px; }
.rk-btn--oauth:hover { border-color: color-mix(in srgb, var(--rk-text) 30%, transparent); }
.rk-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--rk-muted); font-size: 12px; }
.rk-divider::before, .rk-divider::after { content: ""; flex: 1; height: 1px; background: var(--rk-line); }
.rk-auth-foot { text-align: center; font-size: 13px; color: var(--rk-muted); margin-top: 20px; }
.rk-link { color: var(--rk-accent); text-decoration: none; font-weight: 500; border-radius: 3px; }
.rk-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.rk-link:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-pw { position: relative; }
.rk-pw .rk-input { padding-right: 44px; }
.rk-pw .rk-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.rk-pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.rk-pw-meter span { height: 4px; border-radius: 4px; background: var(--rk-inset); box-shadow: inset 0 0 0 1px var(--rk-line); transition: background var(--rk-dur); }
.rk-pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--rk-neg); box-shadow: none; }
.rk-pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--rk-warn); box-shadow: none; }
.rk-pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--rk-brand); box-shadow: none; }
.rk-pw-meter[data-score="4"] span { background: var(--rk-pos); box-shadow: none; }

/* 10.5 Bandeau cookies */
.rk-cookie {
  display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; max-width: 560px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3);
}
.rk-cookie--fixed { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1500; margin-left: auto; animation: rk-in .3s var(--rk-ease); }
.rk-cookie p { margin: 0 0 12px; font-size: 13px; color: var(--rk-text-2); line-height: 1.55; }

/* 10.6 Calendrier des versements (dividendes) */
.rk-timeline-head { display: flex; justify-content: space-between; padding: 8px 16px; background: var(--rk-surface-2); border-bottom: 1px solid var(--rk-line);
  font-size: var(--rk-fs-xs); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--rk-muted); }
.rk-timeline-row { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rk-line); }
.rk-timeline-row:last-child { border-bottom: 0; }
.rk-timeline-row.is-next { background: color-mix(in srgb, var(--rk-accent) 6%, transparent); }
.rk-date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--rk-surface-3); border: 1px solid var(--rk-line); line-height: 1; }
.rk-date-chip b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-date-chip span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--rk-muted); margin-top: 3px; }
.is-next .rk-date-chip { border-color: color-mix(in srgb, var(--rk-accent) 45%, transparent); background: var(--rk-accent-soft); }
.is-next .rk-date-chip span { color: var(--rk-accent); }
.rk-timeline-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .rk-timeline-row { grid-template-columns: 48px 1fr auto; } .rk-timeline-row .rk-badge { display: none; } }

/* 10.7 Pied de page */
.rk-footer { margin-top: 64px; padding: 40px 0 24px; border-top: 1px solid var(--rk-line); }
.rk-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.rk-footer h5 { margin: 0 0 12px; font-size: var(--rk-fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--rk-muted); }
.rk-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rk-footer a { color: var(--rk-text-2); text-decoration: none; font-size: 13px; }
.rk-footer a:hover { color: var(--rk-text); }
.rk-footer p { color: var(--rk-muted); font-size: 13px; line-height: 1.6; max-width: 320px; }
.rk-footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rk-line); font-size: 12px; color: var(--rk-muted); }
@media (max-width: 760px) { .rk-footer-grid { grid-template-columns: 1fr 1fr; } }

/* 10.8 Statuts (admin, synchronisation) */
.rk-actions { display: inline-flex; gap: 4px; }
.rk-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rk-text-2); white-space: nowrap; }
.rk-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--rk-muted)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--rk-muted)) 20%, transparent); }
.rk-status--ok { --c: var(--rk-pos); } .rk-status--wait { --c: var(--rk-warn); } .rk-status--err { --c: var(--rk-neg); }

/* 10.9 Simulateur */
.rk-sim { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 12px; }
.rk-sim-form { display: grid; gap: 22px; align-content: start; }
.rk-sim-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .rk-sim { grid-template-columns: 1fr; } .rk-sim-result { grid-template-columns: 1fr 1fr; } }

/* ============================================================================
 * 11. NAVIGATION v2 — barre du haut (2 états), barre du bas mobile, pied de page
 *     Validé par Maxime le 2026-09-26 : bouton central « + », Budget et Fiscal
 *     regroupés dans « Outils », pied de page avec « À propos » + e-mail.
 * ==========================================================================*/

/* 11.1 Barre du haut de l'app */
.rk-appnav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 20px; height: 64px; padding: 0 24px;
  background: color-mix(in srgb, var(--rk-bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: height .2s var(--rk-ease), border-color .2s, box-shadow .2s;
}
.rk-appnav.is-scrolled { height: 56px; border-bottom-color: var(--rk-line); box-shadow: 0 8px 24px -18px rgba(0,0,0,.6); }
.rk-appnav--static { position: relative; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.rk-appnav-links { display: flex; align-items: center; gap: 2px; height: 100%; margin-right: auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.rk-appnav-links::-webkit-scrollbar { display: none; }
.rk-appnav-links > a, .rk-appnav-links > button {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px;
  border: 0; background: none; color: var(--rk-muted); font: 500 14px/1 var(--rk-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color var(--rk-dur);
}
.rk-appnav-links > a:hover, .rk-appnav-links > button:hover, .rk-appnav-links > button[aria-expanded="true"] { color: var(--rk-text); }
.rk-appnav-links > [aria-current="page"], .rk-appnav-links > .is-current { color: var(--rk-text); }
.rk-appnav-links > [aria-current="page"]::after, .rk-appnav-links > .is-current::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--rk-accent);
}
.rk-appnav-links > button svg { width: 12px; height: 12px; transition: transform var(--rk-dur); }
.rk-appnav-links > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.rk-appnav-links :focus-visible { outline: none; box-shadow: var(--rk-focus); border-radius: 6px; }
.rk-appnav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rk-appnav-actions .rk-btn { flex-shrink: 0; }
.rk-appnav-actions .rk-btn--ghost { color: var(--rk-text-2); }
.rk-appnav-sep { width: 1px; height: 20px; background: var(--rk-line-strong); margin: 0 6px; }
.rk-appnav .rk-logo { flex-shrink: 0; }
/* Largeur intermédiaire : libellés des actions masqués (icônes seules) */
/* Seuls les boutons « icône + libellé » passent en icône seule (pas « Se connecter » / « Créer un compte ») */
@media (max-width: 1100px) { .rk-appnav-actions .rk-lbl { display: none; } .rk-appnav-actions .rk-btn--sm:has(.rk-lbl) { width: 32px; padding: 0; } }
/* Tablette : thème retiré de la barre (disponible dans le menu, le menu du compte et le pied de page), liens resserrés */
@media (max-width: 1000px) {
  .rk-appnav { gap: 12px; padding: 0 16px; }
  .rk-appnav-actions .rk-theme-seg, .rk-appnav-actions .rk-appnav-sep { display: none; }
  .rk-appnav-links > a, .rk-appnav-links > button { padding: 0 8px; }
  .rk-appnav-links > [aria-current="page"]::after, .rk-appnav-links > .is-current::after { left: 8px; right: 8px; }
}
/* Petite tablette : « Se connecter » en icône seule */
@media (max-width: 880px) { .rk-appnav-actions .rk-lbl-t { display: none; } .rk-appnav-actions .rk-btn--sm:has(.rk-lbl-t) { width: 32px; padding: 0; } }
/* Mobile : logo + avatar seulement (la navigation passe dans la barre du bas) */
@media (max-width: 760px) {
  .rk-appnav { height: 56px; padding: 0 16px; gap: 12px; }
  .rk-appnav-links, .rk-appnav-actions > :not(.rk-avatar):not(.rk-keep-m) { display: none; }
  .rk-appnav .rk-logo { margin-right: auto; }
}

/* 11.2 Barre du bas (mobile ≤ 760 px) */
.rk-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  display: none; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--rk-surface) 88%, transparent);
  backdrop-filter: saturate(150%) blur(18px); -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-top: 1px solid var(--rk-line);
  box-shadow: 0 -10px 30px -20px rgba(0,0,0,.6);
  transition: transform .25s var(--rk-ease);
}
@media (max-width: 760px) { .rk-tabbar { display: grid; } }
.rk-tabbar--in { position: absolute; display: grid; }              /* aperçu dans un cadre de téléphone */
.rk-kb .rk-tabbar:not(.rk-tabbar--in) { transform: translateY(110%); } /* clavier ouvert */
.rk-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
  border: 0; background: none; color: var(--rk-muted); text-decoration: none; cursor: pointer; padding: 0;
  font: 500 11px/1.1 var(--rk-font); letter-spacing: .01em; -webkit-tap-highlight-color: transparent;
  min-width: 0; white-space: nowrap; overflow: visible;
}
.rk-tab-ico { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .2s var(--rk-ease), color .2s; }
.rk-tab-ico svg { width: 21px; height: 21px; }
.rk-tab[aria-current="page"], .rk-tab[aria-expanded="true"] { color: var(--rk-text); }
.rk-tab[aria-current="page"] .rk-tab-ico { background: var(--rk-accent-soft); color: var(--rk-accent); }
.rk-tab[aria-expanded="true"] .rk-tab-ico { background: var(--rk-surface-3); }
.rk-tab:active .rk-tab-ico { transform: scale(.94); }
.rk-tab:focus-visible { outline: none; }
.rk-tab:focus-visible .rk-tab-ico { box-shadow: var(--rk-focus); }
/* Bouton central « + » */
.rk-tab--add { justify-content: flex-end; }
.rk-tab--add .rk-tab-ico {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 18px;
  background: var(--rk-accent-grad); color: var(--rk-on-accent);
  box-shadow: 0 0 0 5px var(--rk-bg), inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -8px rgba(219,153,90,.6);
  transition: transform .2s var(--rk-ease), border-radius .2s;
}
.rk-tab--add .rk-tab-ico svg { width: 24px; height: 24px; transition: transform .25s var(--rk-ease); }
.rk-tab--add[aria-expanded="true"] .rk-tab-ico { background: var(--rk-accent-grad); color: var(--rk-on-accent); }
.rk-tab--add[aria-expanded="true"] .rk-tab-ico svg { transform: rotate(45deg); }
.rk-tab--add .rk-tab-lbl { margin-top: 2px; }
/* Espace réservé en bas de page pour ne rien masquer */
@media (max-width: 760px) {
  .rk-has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rk-has-tabbar .rk-toast-zone { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* Panneau « Ajouter » : grille d'actions */
.rk-add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px; }
.rk-add-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--rk-r-md);
  border: 1px solid var(--rk-line); background: var(--rk-surface); color: var(--rk-text-2); font: 500 12.5px/1.25 var(--rk-font); text-align: center; cursor: pointer;
}
.rk-add-item:hover, .rk-add-item:focus-visible { border-color: color-mix(in srgb, var(--rk-accent) 45%, var(--rk-line)); color: var(--rk-text); outline: none; }
.rk-add-item span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--rk-accent)) 15%, transparent); color: var(--c, var(--rk-accent)); }
.rk-add-item svg { width: 19px; height: 19px; }
.rk-pop .rk-add-grid { width: 340px; }
@media (max-width: 640px) { .rk-pop--sheet .rk-add-grid { width: auto; } }

/* Aperçu téléphone (démo) */
.kd-phones { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.kd-phone { position: relative; width: 340px; max-width: 100%; height: 600px; border-radius: 40px; overflow: hidden; background: var(--rk-bg);
  border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3), 0 0 0 8px var(--rk-surface-2), 0 0 0 9px var(--rk-line-strong); }
.kd-phone-top { display: flex; align-items: center; justify-content: space-between; padding: 40px 16px 10px; border-bottom: 1px solid var(--rk-line); }
.kd-phone-body { padding: 16px; display: grid; gap: 10px; }
.kd-phone-cap { text-align: center; font-size: 12px; color: var(--rk-muted); margin-top: 14px; }

/* 11.3 Pied de page v2 */
.rk-sitefooter { margin-top: 72px; border-top: 1px solid var(--rk-line); position: relative; }
.rk-sitefooter::before { content: ""; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; background: var(--rk-hairline-gold); }
.rk-sitefooter-top { display: grid; grid-template-columns: minmax(240px, 1.3fr) 3fr; gap: 48px; padding: 48px 0 32px; }
.rk-sitefooter-brand p { margin: 14px 0 18px; color: var(--rk-text-2); font-size: 14px; line-height: 1.6; max-width: 320px; }
.rk-sitefooter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.rk-sitefooter-mail { display: inline-flex; align-items: center; gap: 8px; color: var(--rk-text); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 6px; }
.rk-sitefooter-mail svg { width: 16px; height: 16px; color: var(--rk-accent); }
.rk-sitefooter-mail:hover { color: var(--rk-accent); }
.rk-sitefooter-mail:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-sitefooter-social { display: flex; gap: 8px; margin-top: 16px; }
.rk-sitefooter-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--rk-surface-3); border: 1px solid var(--rk-line); color: var(--rk-text-2); transition: color var(--rk-dur), border-color var(--rk-dur); }
.rk-sitefooter-social a:hover { color: var(--rk-text); border-color: var(--rk-line-strong); }
.rk-sitefooter-social a:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-sitefooter-social svg { width: 18px; height: 18px; }
.rk-sitefooter-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.rk-fcol-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; margin: 0 0 14px; border: 0; background: none; cursor: default;
  font: 500 var(--rk-fs-xs)/1 var(--rk-font); text-transform: uppercase; letter-spacing: .12em; color: var(--rk-muted); text-align: left;
}
.rk-fcol-head svg { display: none; width: 16px; height: 16px; transition: transform var(--rk-dur); }
.rk-fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rk-fcol a { color: var(--rk-text-2); text-decoration: none; font-size: 14px; border-radius: 4px; transition: color var(--rk-dur); }
.rk-fcol a:hover { color: var(--rk-text); }
.rk-fcol a:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-sitefooter-bottom { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--rk-line); font-size: 12.5px; color: var(--rk-muted); }
.rk-sitefooter-bottom .rk-grow { margin-right: auto; }
.rk-sitefooter-bottom a { color: var(--rk-text-2); text-decoration: none; }
.rk-sitefooter-bottom a:hover { color: var(--rk-text); }
@media (max-width: 900px) { .rk-sitefooter-top { grid-template-columns: 1fr; gap: 32px; } }
/* Mobile : colonnes en rubriques repliables */
@media (max-width: 640px) {
  .rk-sitefooter-top { padding: 36px 0 16px; }
  .rk-sitefooter-cols { grid-template-columns: 1fr; gap: 0; }
  .rk-fcol { border-bottom: 1px solid var(--rk-line); }
  .rk-fcol-head { margin: 0; padding: 16px 0; cursor: pointer; font-size: 12px; color: var(--rk-text-2); }
  .rk-fcol-head svg { display: block; }
  .rk-fcol-head[aria-expanded="true"] svg { transform: rotate(180deg); }
  .rk-fcol ul { display: none; padding: 0 0 16px; gap: 14px; }
  .rk-fcol-head[aria-expanded="true"] + ul { display: grid; }
  .rk-sitefooter-bottom { flex-direction: column; align-items: flex-start; }
}
/* Variante compacte (pages de l'app connectée) */
.rk-sitefooter--compact { margin-top: 48px; }
.rk-sitefooter--compact .rk-sitefooter-bottom { border-top: 0; padding: 18px 0 24px; }
.rk-sitefooter--compact .rk-logo { font-size: 16px; }
.rk-sitefooter--compact .rk-logo-mark { width: 22px; height: 22px; border-radius: 6px; }
.rk-sitefooter-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 640px) { .rk-sitefooter--compact .rk-sitefooter-bottom { align-items: center; text-align: center; } .rk-sitefooter-inline { justify-content: center; } }

/* 11.4 Barre du haut de la démo : compacte au défilement */
.rk-nav { transition: padding .2s var(--rk-ease), box-shadow .2s; }
.rk-nav.is-scrolled { padding-top: 8px; padding-bottom: 8px; box-shadow: 0 8px 24px -18px rgba(0,0,0,.6); }

/* ============================================================================
 * 12. PAGE D'ACCUEIL v2 (accueil-v2.html) — préfixe .rk-lp-
 *     Visuels = aperçus vivants HTML/SVG (validé par Maxime le 2026-09-26),
 *     aucun Chart.js sur l'accueil (performance / SEO).
 * ==========================================================================*/
.rk-lp { overflow-x: clip; }
.rk-lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.rk-lp-sec { padding: 96px 0; position: relative; }
.rk-lp-sec--tight { padding: 56px 0; }
.rk-lp-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.rk-lp-head--left { margin-left: 0; text-align: left; }
.rk-lp-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--rk-accent); }
.rk-lp-kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.rk-lp-h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 14px 0 14px; }
.rk-lp-lead { font-size: 17px; line-height: 1.6; color: var(--rk-text-2); margin: 0; }
.rk-lp-grad { background: linear-gradient(100deg, var(--rk-text) 20%, var(--rk-accent) 60%, var(--rk-brand-strong) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 760px) { .rk-lp-sec { padding: 64px 0; } .rk-lp-wrap { padding: 0 16px; } .rk-lp-head { margin-bottom: 32px; } .rk-lp-lead { font-size: 16px; } }

/* Apparition au défilement */
/* Masqué seulement quand le script est actif (.rk-reveal-ready posé par accueil.js) : visible sans JS */
.rk-reveal-ready .rk-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--rk-ease), transform .7s var(--rk-ease); }
.rk-reveal-ready .rk-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rk-reveal { opacity: 1; transform: none; transition: none; } }

/* 12.1 En-tête (hero) */
.rk-lp-hero { position: relative; padding: 72px 0 88px; isolation: isolate; }
.rk-lp-hero::before { /* halo ardoise + bronze */
  content: ""; position: absolute; inset: -120px 0 auto; height: 720px; pointer-events: none; z-index: -1;
  background: radial-gradient(700px 380px at 20% 20%, rgba(112, 151, 117, .22), transparent 70%), radial-gradient(600px 360px at 85% 10%, rgba(219, 153, 90, .12), transparent 70%);
}
.rk-lp-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.rk-lp-h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; margin: 20px 0 22px; text-wrap: balance; }
.rk-lp-h1 em { font-style: normal; color: var(--rk-accent); }
.rk-lp-hero-sub { font-size: 18px; line-height: 1.6; color: var(--rk-text-2); max-width: 540px; margin: 0 0 32px; }
.rk-lp-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.rk-lp-trust { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--rk-text-2); }
.rk-lp-trust li { display: inline-flex; align-items: center; gap: 7px; }
.rk-lp-trust svg { width: 16px; height: 16px; color: var(--rk-pos); }
@media (max-width: 960px) { .rk-lp-hero-grid { grid-template-columns: 1fr; gap: 48px; } .rk-lp-hero { padding: 40px 0 64px; } }
@media (max-width: 480px) { .rk-lp-ctas .rk-btn { width: 100%; } .rk-lp-hero-sub { font-size: 16px; } }

/* Aperçu vivant du tableau de bord */
.rk-lp-mock { position: relative; }
.rk-lp-window {
  position: relative; border-radius: 22px; padding: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--rk-surface-2), var(--rk-surface));
  border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3), 0 0 0 1px rgba(0,0,0,.2);
}
.rk-lp-window::before { content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: var(--rk-hairline-gold); }
.rk-lp-window-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rk-lp-dots { display: flex; gap: 6px; }
.rk-lp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rk-line-strong); }
.rk-lp-mock-value { font-size: clamp(30px, 4vw, 40px); font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; margin: 8px 0 10px; }
.rk-lp-mock-value small { font-size: .5em; color: var(--rk-muted); font-weight: 500; }
.rk-lp-mock-chart { height: 150px; margin: 18px -6px 14px; }
.rk-lp-mock-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rk-lp-draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: rk-lp-draw 2.2s .3s var(--rk-ease) forwards; }
.rk-lp-fade { opacity: 0; animation: rk-fade-in 1s 1.2s forwards; }
@keyframes rk-lp-draw { to { stroke-dashoffset: 0; } }
@keyframes rk-fade-in { to { opacity: 1; } }
.rk-lp-mock-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 14px; font-size: 12.5px; }
.rk-lp-mock-legend span { display: flex; align-items: center; gap: 8px; color: var(--rk-text-2); }
.rk-lp-mock-legend b { margin-left: auto; font-weight: 600; color: var(--rk-text); font-variant-numeric: tabular-nums; }
/* Cartes flottantes */
.rk-lp-float {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3); font-size: 13px;
  animation: rk-lp-float 6s ease-in-out infinite;
}
.rk-lp-float b { display: block; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.rk-lp-float small { color: var(--rk-muted); font-size: 12px; }
.rk-lp-float-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.rk-lp-float-ico svg { width: 18px; height: 18px; }
.rk-lp-float--a { left: -40px; bottom: -30px; }
.rk-lp-float--b { right: -28px; top: -46px; animation-delay: -3s; min-width: 210px; display: block; }
@keyframes rk-lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 1100px) { .rk-lp-float--a { left: -8px; } .rk-lp-float--b { right: -8px; } }
@media (max-width: 480px) { .rk-lp-float--a { left: 12px; bottom: -34px; } .rk-lp-float--b { display: none; } }
@media (prefers-reduced-motion: reduce) { .rk-lp-float { animation: none; } .rk-lp-draw { animation: none; stroke-dashoffset: 0; } .rk-lp-fade { animation: none; opacity: 1; } }

/* Sélecteur d'accroche (démo uniquement) */
.kd-variants { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--rk-line-strong); background: var(--rk-surface); font-size: 12px; color: var(--rk-muted); width: fit-content; }

/* 12.2 Bandeau des enveloppes */
.rk-lp-band { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rk-lp-chip { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rk-line); background: var(--rk-surface); font-size: 14px; color: var(--rk-text-2); box-shadow: var(--rk-shadow-1); }
.rk-lp-chip i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent); }

/* 12.3 Chiffres clés */
.rk-lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rk-line); border-radius: 20px; background: var(--rk-surface); overflow: hidden; }
.rk-lp-stat { padding: 32px 24px; text-align: center; }
.rk-lp-stat + .rk-lp-stat { border-left: 1px solid var(--rk-line); }
.rk-lp-stat b { display: block; font-size: clamp(32px, 4vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.rk-lp-stat b span { color: var(--rk-accent); }
.rk-lp-stat p { margin: 10px 0 0; color: var(--rk-muted); font-size: 14px; }
@media (max-width: 760px) { .rk-lp-stats { grid-template-columns: 1fr 1fr; } .rk-lp-stat:nth-child(3) { border-left: 0; } .rk-lp-stat:nth-child(n+3) { border-top: 1px solid var(--rk-line); } .rk-lp-stat { padding: 24px 12px; } }

/* 12.4 Mosaïque de fonctionnalités */
.rk-lp-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.rk-lp-tile {
  grid-column: span 2; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 20px; overflow: hidden;
  background: var(--rk-surface); border: 1px solid var(--rk-line); box-shadow: var(--rk-shadow-1);
  transition: border-color var(--rk-dur), transform .3s var(--rk-ease), box-shadow .3s;
}
.rk-lp-tile:hover { border-color: var(--rk-line-strong); transform: translateY(-3px); box-shadow: var(--rk-shadow-2); }
.rk-lp-tile--4 { grid-column: span 4; }
.rk-lp-tile--3 { grid-column: span 3; }
.rk-lp-tile h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.rk-lp-tile p { margin: 0; color: var(--rk-text-2); font-size: 14px; line-height: 1.6; }
.rk-lp-tile-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--rk-accent)) 14%, transparent); color: var(--c, var(--rk-accent)); }
.rk-lp-tile-ico svg { width: 19px; height: 19px; }
.rk-lp-tile-vis { margin-top: auto; padding-top: 14px; }
.rk-lp-tile .rk-link { font-size: 14px; }
@media (max-width: 960px) { .rk-lp-bento { grid-template-columns: repeat(2, 1fr); } .rk-lp-tile, .rk-lp-tile--3, .rk-lp-tile--4 { grid-column: span 1; } .rk-lp-tile--4 { grid-column: span 2; } }
@media (max-width: 600px) { .rk-lp-bento { grid-template-columns: 1fr; } .rk-lp-tile--4 { grid-column: span 1; } .rk-lp-tile { padding: 22px; } }
/* Mini-visuels des tuiles */
.rk-lp-mini-rows { display: grid; gap: 6px; }
.rk-lp-mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--rk-inset); border: 1px solid var(--rk-line); font-size: 13px; }
.rk-lp-mini-row b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-lp-mini-row .rk-delta { padding: 1px 7px; font-size: 11.5px; }
.rk-lp-vehgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.rk-lp-mini-row { min-width: 0; }
.rk-lp-hero-grid > *, .rk-lp-feature > *, .rk-lp-privacy > *, .rk-lp-bento > * { min-width: 0; }
.rk-lp-bars { display: flex; align-items: flex-end; gap: 5px; height: 76px; }
.rk-lp-bars span { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--rk-brand); opacity: .85; transform-origin: bottom; transition: opacity var(--rk-dur); }
.rk-lp-bars span:hover { opacity: 1; background: var(--rk-accent); }
.rk-lp-bars-lbl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--rk-muted); margin-top: 6px; }
.rk-lp-expo { display: grid; gap: 9px; }
.rk-lp-expo div { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--rk-text-2); }
.rk-lp-expo em { font-style: normal; text-align: right; font-weight: 600; color: var(--rk-text); font-variant-numeric: tabular-nums; }
.rk-lp-expo i { display: block; height: 7px; border-radius: 7px; background: var(--rk-inset); overflow: hidden; }
.rk-lp-expo i::after { content: ""; display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c, var(--rk-brand)); }
.rk-lp-tax { display: grid; gap: 8px; font-size: 13px; }
.rk-lp-tax div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--rk-inset); border: 1px solid var(--rk-line); }
.rk-lp-tax b { font-variant-numeric: tabular-nums; }
.rk-lp-tax .is-total { background: var(--rk-accent-soft); border-color: color-mix(in srgb, var(--rk-accent) 30%, transparent); color: var(--rk-text); }
.rk-lp-tax .is-total b { color: var(--rk-accent); }
.rk-lp-ring { display: flex; align-items: center; gap: 18px; }
.rk-lp-ring svg { width: 92px; height: 92px; flex-shrink: 0; transform: rotate(-90deg); }
.rk-lp-ring ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--rk-text-2); }
.rk-lp-ring li { display: flex; gap: 8px; align-items: center; }
.rk-lp-ring li b { margin-left: 8px; color: var(--rk-text); font-variant-numeric: tabular-nums; }

/* 12.5 Blocs « Conçu pour y voir clair » */
.rk-lp-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.rk-lp-feature + .rk-lp-feature { margin-top: 96px; }
.rk-lp-feature--rev .rk-lp-feature-text { order: 2; }
.rk-lp-feature h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; margin: 12px 0 14px; }
.rk-lp-feature p { color: var(--rk-text-2); font-size: 16px; line-height: 1.65; margin: 0 0 20px; }
.rk-lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rk-lp-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--rk-text-2); }
.rk-lp-checks svg { width: 18px; height: 18px; color: var(--rk-pos); flex-shrink: 0; margin-top: 2px; }
.rk-lp-panel { border-radius: 20px; padding: 24px; background: linear-gradient(180deg, var(--rk-surface-2), var(--rk-surface)); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-2); }
@media (max-width: 900px) { .rk-lp-feature { grid-template-columns: 1fr; gap: 32px; } .rk-lp-feature--rev .rk-lp-feature-text { order: 0; } .rk-lp-feature + .rk-lp-feature { margin-top: 64px; } }
.rk-lp-donut { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rk-lp-donut svg { width: 180px; height: 180px; flex-shrink: 0; }
.rk-lp-donut svg circle[data-tip] { cursor: pointer; transition: stroke-width .2s; }
.rk-lp-donut svg circle[data-tip]:hover { stroke-width: 26; }
.rk-lp-donut ul { flex: 1; min-width: 180px; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.rk-lp-donut li { display: flex; align-items: center; gap: 10px; color: var(--rk-text-2); }
.rk-lp-donut li b { margin-left: auto; color: var(--rk-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-lp-treemap { display: grid; grid-template-columns: 2fr 1.2fr 1fr; grid-template-rows: 90px 70px 60px; gap: 4px; }
.rk-lp-treemap div { border-radius: 8px; padding: 10px; font-size: 12px; font-weight: 600; color: #0E1412; display: flex; flex-direction: column; justify-content: space-between; }
.rk-lp-treemap div span { font-weight: 500; opacity: .75; }
.rk-lp-devices { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 0; }
.rk-lp-device { border: 1.5px solid var(--rk-line-strong); background: var(--rk-surface-3); border-radius: 12px; padding: 12px; display: grid; gap: 6px; align-content: start; }
.rk-lp-device--lap { width: 220px; height: 140px; border-radius: 12px 12px 4px 4px; }
.rk-lp-device--phone { width: 78px; height: 150px; border-radius: 18px; }
.rk-lp-device i { display: block; height: 7px; border-radius: 4px; background: var(--rk-line-strong); }
.rk-lp-device i.is-acc { background: var(--rk-accent); width: 60%; }
.rk-lp-sync { display: grid; place-items: center; gap: 6px; color: var(--rk-accent); font-size: 11px; font-weight: 500; text-align: center; }
.rk-lp-sync svg { width: 26px; height: 26px; animation: rk-spin 6s linear infinite; }
@media (prefers-reduced-motion: reduce) { .rk-lp-sync svg { animation: none; } }

/* 12.6 Tableau comparatif */
.rk-lp-compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.rk-lp-compare-wrap { overflow-x: auto; border-radius: 20px; border: 1px solid var(--rk-line); background: var(--rk-surface); }
.rk-lp-compare th, .rk-lp-compare td { padding: 16px 20px; text-align: center; border-bottom: 1px solid var(--rk-line); }
.rk-lp-compare th:first-child, .rk-lp-compare td:first-child { text-align: left; color: var(--rk-text-2); }
.rk-lp-compare tbody th { font-weight: 500; }
.rk-lp-compare thead th { font-size: 13px; font-weight: 500; color: var(--rk-muted); padding-top: 22px; }
.rk-lp-compare thead th.is-us { color: var(--rk-text); font-size: 15px; font-weight: 600; }
.rk-lp-compare .is-us { background: color-mix(in srgb, var(--rk-accent) 6%, transparent); position: relative; }
.rk-lp-compare thead .is-us { border-radius: 16px 16px 0 0; }
.rk-lp-compare tbody tr:last-child td { border-bottom: 0; }
.rk-lp-compare svg { width: 20px; height: 20px; vertical-align: middle; }
.rk-lp-yes { color: var(--rk-pos); } .rk-lp-no { color: var(--rk-neg); opacity: .85; } .rk-lp-mid { color: var(--rk-warn); }
.rk-lp-compare small { display: block; font-size: 12px; color: var(--rk-muted); margin-top: 2px; }
@media (max-width: 640px) { .rk-lp-compare th, .rk-lp-compare td { padding: 12px 10px; font-size: 13px; } }
@media (max-width: 480px) { .rk-lp-compare th, .rk-lp-compare td { padding: 11px 6px; font-size: 12.5px; } .rk-lp-compare td small { display: none; } .rk-lp-compare thead th { font-size: 12px; } }

/* 12.7 Confidentialité (schéma) */
.rk-lp-privacy { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.rk-lp-flow { display: grid; gap: 14px; }
.rk-lp-node { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--rk-surface); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-1); }
.rk-lp-node b { display: block; font-size: 15px; font-weight: 600; }
.rk-lp-node small { color: var(--rk-muted); font-size: 13px; }
.rk-lp-node-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: var(--rk-brand-soft); color: var(--rk-brand); }
.rk-lp-node-ico svg { width: 20px; height: 20px; }
.rk-lp-node--opt { border-style: dashed; }
.rk-lp-node--no { opacity: .75; background: var(--rk-neg-soft); border-color: color-mix(in srgb, var(--rk-neg) 30%, transparent); }
.rk-lp-node--no .rk-lp-node-ico { background: transparent; color: var(--rk-neg); }
.rk-lp-node--no b { text-decoration: line-through; text-decoration-color: var(--rk-neg); }
.rk-lp-link { display: flex; align-items: center; gap: 8px; padding-left: 38px; font-size: 12px; color: var(--rk-muted); }
.rk-lp-link::before { content: ""; width: 2px; height: 22px; background: repeating-linear-gradient(180deg, var(--rk-line-strong) 0 4px, transparent 4px 7px); margin-right: 6px; }
@media (max-width: 900px) { .rk-lp-privacy { grid-template-columns: 1fr; gap: 32px; } }

/* 12.8 FAQ */
.rk-lp-faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--rk-line); }
.rk-lp-q { border-bottom: 1px solid var(--rk-line); }
.rk-lp-q h3 { margin: 0; }
.rk-lp-q button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 22px 4px; border: 0; background: none; color: var(--rk-text); font: 500 17px/1.4 var(--rk-font); text-align: left; cursor: pointer; }
.rk-lp-q button:focus-visible { outline: none; box-shadow: var(--rk-focus); border-radius: 8px; }
.rk-lp-q button span.rk-lp-q-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--rk-line-strong); color: var(--rk-muted); transition: transform .25s var(--rk-ease), background .2s, color .2s; }
.rk-lp-q button span.rk-lp-q-ico svg { width: 14px; height: 14px; }
.rk-lp-q button[aria-expanded="true"] span.rk-lp-q-ico { transform: rotate(45deg); background: var(--rk-accent); color: var(--rk-on-accent); border-color: var(--rk-accent); }
.rk-lp-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--rk-ease); }
.rk-lp-a > div { overflow: hidden; }
.rk-lp-a p { margin: 0; padding: 0 44px 22px 4px; color: var(--rk-text-2); font-size: 15px; line-height: 1.7; }
.rk-lp-q.is-open .rk-lp-a { grid-template-rows: 1fr; }
@media (max-width: 640px) { .rk-lp-q button { font-size: 16px; padding: 18px 2px; } .rk-lp-a p { padding-right: 8px; } }

/* 12.9 Appel final */
.rk-lp-cta {
  position: relative; overflow: hidden; text-align: center; padding: 72px 32px; border-radius: 28px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(219, 153, 90, .16), transparent 70%), linear-gradient(180deg, var(--rk-surface-2), var(--rk-surface));
  border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
}
.rk-lp-cta::before { content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: var(--rk-hairline-gold); }
.rk-lp-cta .rk-lp-ctas { justify-content: center; margin: 28px 0 0; }
.rk-lp-cta .rk-lp-lead { max-width: 560px; margin: 0 auto; }
@media (max-width: 640px) { .rk-lp-cta { padding: 48px 20px; border-radius: 22px; } }

/* ============================================================================
 * 13. INTÉGRATION AU SITE (body.rk-body.rk-site) — phase 1 du restylage
 * ==========================================================================*/
/* Garde les métriques de texte historiques du site (16 px, interligne auto) :
   seules la police et les couleurs changent, pas la mise en page. */
.rk-body.rk-site { font-size: 16px; line-height: normal; font-variant-numeric: tabular-nums; }
/* Logo : « smerta » en vert Rosmerta #3A7549 (décision de Maxime), styles en ligne écrasés */
.rk-site .nav-brand, .rk-site .sidebar-brand { font-family: var(--rk-font-logo) !important; letter-spacing: -.01em; }

/* ============================================================================
 * 14. NAVIGATION DU SITE (phase 3) — surcharge des classes historiques
 *     (nav, .nav-tab, .nav-dropdown*, .nav-share-btn, #nav-auth-badge,
 *     .sidebar*) sans changer leurs noms : navigation.js / storage.js /
 *     supabase-auth.js continuent de fonctionner à l'identique.
 * ==========================================================================*/
.rk-site > nav:not(.rk-tabbar):not(.rk-appnav) {
  height: 64px; padding: 0 24px; gap: 6px; flex-wrap: nowrap;
  background: color-mix(in srgb, var(--rk-bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent; transition: height .2s var(--rk-ease), border-color .2s, box-shadow .2s;
}
.rk-site > nav:not(.rk-tabbar):not(.rk-appnav).is-scrolled { height: 56px; border-bottom-color: var(--rk-line); box-shadow: 0 8px 24px -18px rgba(0,0,0,.6); }
.rk-site .nav-brand { font-size: 1.3rem; padding: 6px 10px; margin: -6px 0 -6px -10px; border-radius: 10px; }
.rk-site .nav-brand:hover { background: var(--rk-surface-3); box-shadow: none; transform: none; }
.rk-site .nav-brand span:first-of-type { color: var(--rk-text) !important; }
.rk-site .nav-brand span:last-of-type { color: var(--rk-text) !important; }
.rk-site .nav-divider { height: 20px; background: var(--rk-line-strong); margin: 0 12px; }
.rk-site .nav-tabs { gap: 2px; height: 100%; align-items: center; }
.rk-site .nav-tabs > .nav-dropdown { height: 100%; display: flex; align-items: center; }
.rk-site .nav-tab {
  display: inline-flex; align-items: center; gap: 6px; height: 64px; padding: 0 12px; border: 0; border-radius: 0; background: none;
  color: var(--rk-muted); font: 500 14px/1 var(--rk-font); white-space: nowrap; transition: color var(--rk-dur);
}
.rk-site > nav:not(.rk-tabbar):not(.rk-appnav).is-scrolled .nav-tab { height: 56px; }
.rk-site .nav-tab:hover:not(.active) { border: 0; background: none; color: var(--rk-text); }
.rk-site .nav-tab.active { background: none; color: var(--rk-text); }
.rk-site .nav-tab.active::after { left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--rk-accent); }
.rk-site .nav-tab:focus-visible { outline: none; box-shadow: inset var(--rk-focus); border-radius: 8px; }
.rk-site .nav-dropdown-arrow { font-size: 8px; margin-left: 2px; opacity: .8; }
.rk-site .rk-tools-trigger[aria-expanded="true"] { color: var(--rk-text); }
.rk-site .rk-tools-trigger[aria-expanded="true"] .nav-dropdown-arrow { transform: rotate(180deg); }
.rk-site .rk-hidden-tab { display: none !important; }
/* Menu déroulant « Portefeuille » */
.rk-site .nav-dropdown-menu {
  top: calc(100% - 4px); min-width: 240px; padding: 6px; gap: 1px; border-radius: var(--rk-r-lg);
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
  animation: rk-pop-in .16s var(--rk-ease);
}
.rk-site .nav-dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: var(--rk-r-sm);
  color: var(--rk-text-2); font: 500 14px/1.2 var(--rk-font);
}
.rk-site .nav-dropdown-item:hover { border: 0; background: var(--rk-surface-3); color: var(--rk-text); }
.rk-site .nav-dropdown-item.active { border: 0; background: var(--rk-surface-3); color: var(--rk-text); }
.rk-site .nav-dropdown-item::before, .rk-site .sidebar-nav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--rk-line-strong); }
.rk-site [data-page="dashboard"]::before { background: var(--c-pea) !important; }
.rk-site [data-page="cto"]::before { background: var(--c-cto) !important; }
.rk-site [data-page="av"]::before { background: var(--c-av) !important; }
.rk-site [data-page="crypto"]::before { background: var(--c-crypto) !important; }
.rk-site [data-page="livrets"]::before { background: var(--c-livrets) !important; }
.rk-site [data-page="pee"]::before { background: var(--c-pee) !important; }
.rk-site [data-page="per"]::before { background: var(--c-per) !important; }
.rk-site [data-page="metaux"]::before { background: var(--c-metaux) !important; }
.rk-site [data-page="exotiques"]::before { background: var(--c-exotiques) !important; }
.rk-site [data-page="immo"]::before { background: var(--c-immo) !important; }
.rk-site [data-page="credits"]::before { background: var(--c-credits) !important; }
/* Boutons d'action (Partager, Feedback, Se connecter…) : style « discret » du kit */
.rk-site .nav-share-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; margin-left: 4px;
  border: 1px solid transparent; border-radius: var(--rk-r-sm); background: none; color: var(--rk-text-2);
  font: 500 13px/1 var(--rk-font); white-space: nowrap;
}
.rk-site .nav-share-btn:hover { background: var(--rk-surface-3); color: var(--rk-text); border-color: transparent; }
.rk-site .nav-share-btn.is-accent { color: var(--rk-text-2); border-color: transparent; }
.rk-site .nav-share-btn.is-accent:hover { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-site .nav-share-btn svg { width: 15px; height: 15px; }
/* Bouton principal (« Créer un compte », « Inscription / Connexion » de la démo) : bronze */
.rk-site > nav:not(.rk-tabbar):not(.rk-appnav) .nav-share-btn[onclick*="signup"], .rk-site #nav-auth-btn[data-guest-mode="signup"] {
  background: var(--rk-accent-grad) !important; color: var(--rk-on-accent) !important; border: 1px solid rgba(0,0,0,.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.25); font-weight: 600 !important; filter: none !important;
}
.rk-site > nav:not(.rk-tabbar):not(.rk-appnav) .nav-share-btn[onclick*="signup"]:hover, .rk-site #nav-auth-btn[data-guest-mode="signup"]:hover { filter: brightness(1.06) !important; }
/* Avatar (compte connecté) */
.rk-site #nav-auth-badge {
  width: 32px !important; height: 32px !important; margin-left: 8px !important; font: 600 12px/1 var(--rk-font) !important;
  background: linear-gradient(145deg, var(--sage-600), var(--slate-500)) !important; color: #F6E6D3 !important;
  box-shadow: 0 0 0 1px var(--rk-line-strong);
}
.rk-site .rk-nav-theme { margin-left: 8px; flex-shrink: 0; }
@media (max-width: 1100px) { .rk-site .nav-share-btn-label { display: none; } .rk-site > nav:not(.rk-tabbar):not(.rk-appnav) { padding: 0 16px; } .rk-site .nav-tab { padding: 0 9px; } .rk-site .nav-tab.active::after { left: 9px; right: 9px; } }
@media (max-width: 960px) { .rk-site .rk-nav-theme { display: none; } }
/* Mobile : logo + actions essentielles ; la navigation passe dans la barre du bas */
@media (max-width: 768px) {
  .rk-site > nav:not(.rk-tabbar):not(.rk-appnav) { height: 56px; padding: 0 12px 0 16px; flex-wrap: nowrap; }
  .rk-site .nav-burger { display: none !important; }
  .rk-site .nav-brand { margin-right: auto; font-size: 1.15rem; }
  .rk-site .nav-share-btn { padding: 0 9px; margin-left: 2px; }
  .rk-site .nav-share-btn.is-accent:not([onclick*="signup"]):not(#nav-auth-btn) { display: none !important; } /* Feedback : accessible via le menu du compte */
  .rk-site .rk-tabbar { display: grid; }
  .rk-site.rk-has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* Barre latérale (ouverte par « Menu ») : tiroir du kit */
.rk-site .sidebar {
  display: flex; flex-direction: column; width: min(320px, 86vw); padding: 16px; z-index: 990;
  background: var(--rk-surface); border-right: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-3);
  transform: translateX(-102%); transition: transform .28s var(--rk-ease);
}
.rk-site .sidebar.open { transform: none; }
.rk-site .sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rk-site .sidebar-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; margin: 0; padding: 0; pointer-events: none; }
.rk-site .sidebar-logo { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 1px var(--rk-line-strong); }
.rk-site .sidebar-close { position: static; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: var(--rk-r-sm); color: var(--rk-text-2); font-size: 18px; }
.rk-site .sidebar-close:hover { background: var(--rk-surface-3); color: var(--rk-text); }
.rk-site .sidebar-nav li { border: 0; }
.rk-site .sidebar-sec { padding: 16px 10px 6px; font-size: var(--rk-fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--rk-muted); }
.rk-site .sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: var(--rk-r-sm); border-left: 0;
  color: var(--rk-text-2); font: 500 14px/1.2 var(--rk-font);
}
.rk-site .sidebar-nav a:hover { background: var(--rk-surface-3); color: var(--rk-text); border-left: 0; }
.rk-site .sidebar-nav a.active { background: var(--rk-surface-3); color: var(--rk-text); border-left: 0; }
.rk-site .sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rk-line); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--rk-muted); }
.rk-site .sidebar-overlay.open { background: rgba(5, 8, 7, .55); }

/* Pied de page injecté par refacto/footer.js (classe historique .site-footer conservée) */
.rk-site .site-footer.rk-sitefooter { padding: 0; margin: 72px 0 0; font-size: inherit; color: inherit; border-top: 1px solid var(--rk-line); }
.rk-site .site-footer.rk-sitefooter--compact { margin-top: 48px; }
.rk-site .rk-sitefooter .site-footer-icon { width: 38px; height: 38px; }
.rk-site .rk-sitefooter--compact .site-footer-icon { width: 32px; height: 32px; border-radius: 10px; }
.rk-site .rk-sitefooter--compact .site-footer-icon svg { width: 16px; height: 16px; }

/* La barre du bas est un <nav> : neutralise la règle globale « nav » de styles.css
   (sticky, top:0, fond, bordure, padding) */
.rk-site nav.rk-tabbar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; gap: 0; flex-wrap: nowrap;
  justify-content: initial; border-bottom: 0; background: color-mix(in srgb, var(--rk-surface) 88%, transparent); z-index: 800; }
@media (min-width: 769px) { .rk-site nav.rk-tabbar { display: none !important; } }

/* ============================================================================
 * 15. COMPOSANTS DU SITE (phase 4) — classes historiques de styles.css
 *     restylées au kit v2, sans renommage (HTML/JS inchangés).
 *     Règle : un seul bouton bronze par écran = l'action principale
 *     (.btn plein, .add-data-btn, .sim-btn) ; onglets = contrôle segmenté.
 * ==========================================================================*/
/* Boutons */
.rk-site .btn {
  min-height: 40px; padding: 0 16px; border-radius: var(--rk-r-md); border: 1px solid rgba(0,0,0,.18);
  background: var(--rk-accent-grad); color: var(--rk-on-accent); font: 500 14px/1 var(--rk-font); letter-spacing: -.005em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.25), 0 6px 18px -8px rgba(219,153,90,.5);
  transition: filter var(--rk-dur), transform .08s, box-shadow var(--rk-dur); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.rk-site .btn:hover { opacity: 1; filter: brightness(1.06); }
.rk-site .btn:active { transform: translateY(1px); }
.rk-site .btn:focus-visible, .rk-site .btn-sm:focus-visible, .rk-site .btn-ghost:focus-visible, .rk-site .add-data-btn:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-site .btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.rk-site .btn.btn-sm, .rk-site .btn-sm {
  min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--rk-r-sm);
  background: var(--rk-surface-3); color: var(--rk-text); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-1);
}
.rk-site .btn-sm:hover { opacity: 1; filter: none; color: var(--rk-text); border-color: color-mix(in srgb, var(--rk-accent) 45%, var(--rk-line-strong)); }
.rk-site .btn.btn-ghost, .rk-site .btn-ghost { background: transparent; color: var(--rk-text-2); border: 1px solid transparent; box-shadow: none; }
.rk-site .btn-ghost:hover { opacity: 1; filter: none; background: var(--rk-surface-3); color: var(--rk-text); border-color: transparent; }
.rk-site .btn.btn-danger, .rk-site .btn-danger { background: var(--rk-neg-soft); color: var(--rk-neg); border: 1px solid color-mix(in srgb, var(--rk-neg) 30%, transparent); box-shadow: none; }
.rk-site .btn-danger:hover { opacity: 1; filter: none; background: var(--rk-neg); color: var(--rk-bg); }
:root[data-theme="light"] .rk-site .btn.btn-sm, :root[data-theme="light"] .rk-site .btn.btn-ghost { color: var(--rk-text) !important; }
:root[data-theme="light"] .rk-site .btn.btn-danger { color: var(--rk-neg) !important; }
:root[data-theme="light"] .rk-site .btn.btn-danger:hover { color: #FFFDF9 !important; }
/* Bouton principal « Ajouter » de chaque page : bronze partout (remplace les
   accents codés en dur par page, cyan PEA, bleu CTO…). :is(#…) donne la
   spécificité nécessaire pour passer devant les règles #page-x .add-data-btn. */
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations, #page-parametres) .add-data-btn,
.rk-site .add-data-btn {
  min-height: 36px; padding: 0 14px; border-radius: var(--rk-r-md); border: 1px solid rgba(0,0,0,.18);
  background: var(--rk-accent-grad); color: var(--rk-on-accent); font: 500 13.5px/1 var(--rk-font);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.25);
}
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations, #page-parametres) .add-data-btn:hover,
.rk-site .add-data-btn:hover { opacity: 1; background: var(--rk-accent-grad); filter: brightness(1.06); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 16px -6px rgba(219,153,90,.55); }
:root[data-theme="light"] .rk-site .add-data-btn { color: var(--rk-on-accent) !important; }

/* Onglets de graphiques / bascules de vue : contrôle segmenté neutre */
.rk-site .chart-tabs, .rk-site .view-toggle { gap: 3px; flex-wrap: wrap; }
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn),
.rk-site .chart-tab, .rk-site .view-toggle-btn {
  min-height: 30px; padding: 0 12px; border-radius: var(--rk-r-sm); border: 1px solid var(--rk-line);
  background: transparent; color: var(--rk-muted); font: 500 12.5px/1 var(--rk-font); transition: background var(--rk-dur), color var(--rk-dur), border-color var(--rk-dur);
}
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn):hover:not(.active),
.rk-site .chart-tab:hover:not(.active), .rk-site .view-toggle-btn:hover:not(.active) { color: var(--rk-text); border-color: var(--rk-line-strong); background: transparent; }
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn).active,
.rk-site .chart-tab.active, .rk-site .view-toggle-btn.active {
  background: var(--rk-surface-3); color: var(--rk-text); border-color: var(--rk-line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 3px rgba(0,0,0,.3);
}
:root[data-theme="light"] .rk-site :is(.chart-tab, .view-toggle-btn).active { background: var(--rk-surface); box-shadow: 0 1px 3px rgba(40,50,40,.12); }

/* Champs de saisie (hors styles en ligne) */
.rk-site .input-group label { font-size: 13px; font-weight: 500; color: var(--rk-text-2); text-transform: none; letter-spacing: 0; }
.rk-site .input-group input, .rk-site .contact-input, .rk-site select, .rk-site textarea,
.rk-site input:is([type="text"], [type="number"], [type="email"], [type="password"], [type="search"], [type="tel"], [type="url"], :not([type])) {
  background-color: var(--rk-inset); color: var(--rk-text); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md);
  font-family: var(--rk-font); font-variant-numeric: tabular-nums;
}
.rk-site .input-group input { min-height: 40px; padding: 0 12px; font-size: 14px; }
.rk-site input::placeholder, .rk-site textarea::placeholder { color: var(--rk-faint); }
.rk-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, .rk-site select:focus, .rk-site textarea:focus {
  outline: none; border-color: var(--rk-accent) !important; box-shadow: 0 0 0 3px var(--rk-accent-soft);
}

/* Cartes de chiffres (.stat) et cartes de graphiques */
.rk-site .stat { background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); padding: 18px 20px; box-shadow: var(--rk-shadow-1); }
.rk-site .stat-label { font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--rk-muted); }
.rk-site .stat-value { font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.rk-site .stat-value.pos, .rk-site .stat-foot b.pos, .rk-site .td-pos { color: var(--rk-pos); }
.rk-site .stat-perf-tab.active { color: var(--rk-accent); }
.rk-site .chart-card { background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); padding: 24px; box-shadow: var(--rk-shadow-1); }
.rk-site .chart-card h3 { font-family: var(--rk-font); font-weight: 500; letter-spacing: .1em; color: var(--rk-muted); }

/* Tableaux */
.rk-site th { padding: 11px 14px; font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--rk-muted); border-bottom-color: var(--rk-line); }
.rk-site td { padding: 12px 14px; border-bottom-color: var(--rk-line); font-variant-numeric: tabular-nums; }
.rk-site tr:hover td { background: color-mix(in srgb, var(--rk-accent) 4%, transparent); }

/* Badges */
.rk-site .badge { border-radius: var(--rk-r-xs); padding: 3px 8px; font-weight: 500; }
.rk-site .badge-pos { background: var(--rk-pos-soft); color: var(--rk-pos); }
.rk-site .badge-neg { background: var(--rk-neg-soft); color: var(--rk-neg); }

/* Modales */
.rk-site .modal-overlay { background: rgba(5, 8, 7, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-theme="light"] .rk-site .modal-overlay { background: rgba(30, 40, 35, .35); }
.rk-site .modal-content { background: var(--rk-surface); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3); }
.rk-site .modal-content::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--rk-hairline-gold); pointer-events: none; }
.rk-site .modal-close { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: var(--rk-r-sm); color: var(--rk-text-2); font-size: 20px; }
.rk-site .modal-close:hover { background: var(--rk-surface-3); color: var(--rk-text); }
@media (max-width: 640px) { .rk-site .modal-content { border-radius: var(--rk-r-xl) var(--rk-r-xl) 0 0; } }

/* Simulateurs et formulaire de contact : puces / segment, bouton principal bronze */
.rk-site .sim-tab, .rk-site .contact-cat-btn {
  border-radius: var(--rk-r-pill); border: 1px solid var(--rk-line-strong); background: transparent; color: var(--rk-text-2); font-family: var(--rk-font); font-weight: 500;
}
.rk-site .sim-tab:hover, .rk-site .contact-cat-btn:hover { color: var(--rk-text); border-color: color-mix(in srgb, var(--rk-text) 30%, transparent); background: transparent; }
.rk-site .sim-tab.active, .rk-site .contact-cat-btn.active { background: var(--rk-accent-soft); border-color: color-mix(in srgb, var(--rk-accent) 50%, transparent); color: var(--rk-accent); font-weight: 600; }
:root[data-theme="light"] .rk-site .sim-tab.active, :root[data-theme="light"] .rk-site .contact-cat-btn.active { color: var(--rk-accent) !important; }
.rk-site .sim-btn { background: var(--rk-accent-grad); color: var(--rk-on-accent); border: 1px solid rgba(0,0,0,.18); border-radius: var(--rk-r-md); font-family: var(--rk-font); font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 18px -8px rgba(219,153,90,.5); }
.rk-site .sim-btn:hover { opacity: 1; filter: brightness(1.06); }
:root[data-theme="light"] .rk-site .sim-btn { color: var(--rk-on-accent) !important; }

/* Divers */
.rk-site .login-box { background: var(--rk-surface); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3); }
.rk-site .note { color: var(--rk-muted); border-top-color: var(--rk-line); }
.rk-site .section-sub { color: var(--rk-muted); }
.rk-site :where(button[onclick], a.btn[onclick]):hover { border-color: var(--rk-line-strong); }

/* ============================================================================
 * 16. STYLES EN DUR (phase 6)
 * ==========================================================================*/
/* Boutons « Enregistrer » des modales (action principale) : bronze, quelle que
   soit la couleur du véhicule écrite en ligne ou via une classe u-* !important */
.rk-site button[onclick^="save"] {
  background: var(--rk-accent-grad) !important; color: var(--rk-on-accent) !important; border: 1px solid rgba(0,0,0,.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.25) !important; font-family: var(--rk-font) !important; font-weight: 600 !important; border-radius: var(--rk-r-md) !important;
}
.rk-site button[onclick^="save"]:hover { filter: brightness(1.06); opacity: 1 !important; }

/* Accueil v2 dans le conteneur historique .page (max-width 1100px, padding 2rem) : pleine largeur,
   les sections gèrent leurs propres marges (.rk-lp-wrap) */
.rk-site #page-accueil.rk-lp { max-width: none; padding: 0; margin: 0; }
.rk-site #page-accueil.rk-lp > .rk-sitefooter { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
/* <nav> du pied de page : neutralise la règle globale « nav » de styles.css (sticky, padding, centrage) */
.rk-site .rk-sitefooter nav { position: static; top: auto; padding: 0; height: auto; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; z-index: auto; align-items: start; justify-content: initial; }
.rk-site .rk-sitefooter nav.rk-sitefooter-inline { align-items: center; }

/* ============================================================================
 * 17. RECETTE (phase 9) — éléments fixés en bas d'écran
 * ==========================================================================*/
/* Bandeau de consentement : carte flottante du kit (styles en ligne écrasés) */
.rk-site #rgpd-consent { left: 16px !important; right: 16px !important; bottom: 16px !important; max-width: 620px; margin-left: auto; padding: 18px 20px !important;
  background: var(--rk-surface-2) !important; border: 1px solid var(--rk-line-strong) !important; border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3) !important; }
.rk-site #rgpd-consent p { color: var(--rk-text-2) !important; }
.rk-site #rgpd-consent button { border-radius: var(--rk-r-md) !important; font-family: var(--rk-font) !important; }
.rk-site #rgpd-consent button[onclick="rgpdConsent(true)"] { background: var(--rk-accent-grad) !important; color: var(--rk-on-accent) !important; border: 1px solid rgba(0,0,0,.18) !important; }
@media (max-width: 768px) {
  .rk-site.rk-has-tabbar #rgpd-consent { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  .rk-site.rk-has-tabbar #div-demo-toast { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
  .rk-site.rk-has-tabbar .rk-toast-zone { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* Démo, petit écran : « ← Accueil » réduit à la flèche (aria-label conservé) pour laisser la place au bouton d'inscription */
@media (max-width: 480px) {
  .rk-site > nav a.nav-share-btn[href="index.html"] { font-size: 0; width: 36px; padding: 0; justify-content: center; margin-right: 4px !important; }
  .rk-site > nav a.nav-share-btn[href="index.html"]::before { content: "\2190"; font-size: 18px; }
  .rk-site #nav-auth-btn { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
}
/* Tablette (769–1000 px) : barre du haut compactée pour tout faire tenir (sans défilement des onglets, qui couperait le menu Portefeuille) */
@media (min-width: 769px) and (max-width: 1000px) {
  .rk-site > nav a.nav-share-btn[href="index.html"] { font-size: 0; width: 34px; padding: 0; justify-content: center; margin-right: 2px !important; }
  .rk-site > nav a.nav-share-btn[href="index.html"]::before { content: "\2190"; font-size: 18px; }
  .rk-site .nav-divider { display: none; }
  .rk-site .nav-tab { padding: 0 7px; font-size: 13px; }
  .rk-site .nav-tab.active::after { left: 7px; right: 7px; }
  .rk-site #nav-auth-btn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .rk-site .nav-share-btn { padding: 0 9px; }
}

/* ============================================================================
 * 18. ANALYSES v2 — carte Dividendes (vue d'ensemble)
 * ==========================================================================*/
.rk-site .rk-divcard { display: flex; flex-direction: column; gap: 16px; transition: border-color var(--rk-dur), box-shadow var(--rk-dur); }
.rk-site .rk-divcard:hover { border-color: var(--rk-line-strong); box-shadow: var(--rk-shadow-2); }
.rk-site .rk-divcard:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-divcard-head { display: flex; align-items: center; gap: 10px; }
.rk-divcard-head h3 { margin: 0 !important; }
.rk-divcard-more { margin-left: auto; font-size: 12.5px; color: var(--rk-muted); transition: color var(--rk-dur); }
.rk-divcard:hover .rk-divcard-more { color: var(--rk-accent); }
.rk-divcard-kpis { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.rk-divcard-lbl { font-size: 12px; color: var(--rk-muted); margin-bottom: 6px; }
.rk-divcard-val { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--rk-text) !important; }
.rk-divcard-val--main { font-size: 1.6rem; color: var(--rk-pos) !important; margin-bottom: 6px; }
.rk-divcard-rows { display: grid; gap: 2px; }
.rk-divcard-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rk-line); font-size: 13px; color: var(--rk-muted); }
.rk-divcard-row b { color: var(--rk-text); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.rk-divcard-chart { padding-top: 4px; }
.rk-divbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; height: 78px; align-items: end; }
.rk-divbar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; cursor: default; }
.rk-divbar-col { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; border-radius: 4px 4px 2px 2px;
  background: repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--rk-line) 70%, transparent) 7px 8px); }
.rk-divbar-col::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--rk-line-strong); }
.rk-divbar-col i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--rk-brand-strong), var(--rk-brand)); transition: filter var(--rk-dur); position: relative; z-index: 1; }
.rk-divbar.is-cur .rk-divbar-col i { background: var(--rk-accent-grad); }
.rk-divbar:hover .rk-divbar-col i { filter: brightness(1.12); }
.rk-divbar.is-future .rk-divbar-col { opacity: .45; }
.rk-divbar-lbl { font-size: 10.5px; color: var(--rk-muted); line-height: 1; }
.rk-divbar.is-cur .rk-divbar-lbl { color: var(--rk-accent); font-weight: 600; }

/* 18.2 Recherche de dividendes par société (Analyse > Dividendes) */
.rk-divsearch-box { position: relative; margin-bottom: 24px; }
.rk-divsearch-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--rk-muted); pointer-events: none; }
.rk-site #div-search-input { height: 52px; padding: 0 16px 0 46px; font-size: 15px; border-radius: var(--rk-r-lg); background-color: var(--rk-surface); box-shadow: var(--rk-shadow-1); }
.rk-divsearch-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200; margin: 0; padding: 6px; list-style: none; max-height: 340px; overflow-y: auto;
  background: var(--rk-surface-2); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-lg); box-shadow: var(--rk-shadow-3); }
.rk-divsearch-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--rk-r-sm); cursor: pointer; }
.rk-divsearch-item.is-active, .rk-divsearch-item:hover { background: var(--rk-surface-3); }
.rk-divsearch-logo, .rk-cohead-logo { flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; font-weight: 600; letter-spacing: .02em;
  background: linear-gradient(145deg, color-mix(in srgb, var(--rk-brand) 30%, var(--rk-surface-3)), var(--rk-surface-3)); color: var(--rk-text); border: 1px solid var(--rk-line); }
.rk-divsearch-logo { width: 34px; height: 34px; font-size: 12px; }
.rk-divsearch-id { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.rk-divsearch-id b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-divsearch-id small { font-size: 12px; color: var(--rk-muted); font-family: var(--rk-font-mono); }
.rk-divsearch-price { text-align: right; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-divsearch-price small { display: block; font-size: 11.5px; color: var(--rk-muted); font-weight: 400; }
.rk-divsearch-manual { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 4px; border-top: 1px solid var(--rk-line); border-radius: 0 0 var(--rk-r-sm) var(--rk-r-sm); font-size: 13px; color: var(--rk-muted); cursor: pointer; }
.rk-divsearch-manual:hover { color: var(--rk-text); background: var(--rk-surface-3); }
.rk-divsearch-empty { margin-top: 8px; }
.rk-cohead { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.rk-cohead-logo { width: 48px; height: 48px; font-size: 15px; border-radius: 14px; }
.rk-cohead-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rk-cohead-name { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.rk-cohead-codes { font-family: var(--rk-font-mono); font-size: 12.5px; color: var(--rk-muted); }
.rk-cogrid { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: 16px; align-items: start; margin-bottom: 12px; }
.rk-site .rk-cochart { margin-bottom: 0; }
.rk-cochart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rk-cochart-title { font-size: 13px; color: var(--rk-muted); }
.rk-cochart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--rk-muted); }
.rk-cochart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rk-cochart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.rk-cochart-legend i.is-past { background: var(--rk-brand); }
.rk-cochart-legend i.is-cur { background: var(--rk-accent); }
.rk-cochart-box { position: relative; height: 240px; }
.rk-cokpis { display: grid; gap: 12px; }
.rk-site .rk-cokpi { margin-bottom: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.rk-cokpi-lbl { font-size: 12.5px; color: var(--rk-muted); }
.rk-cokpi-val { font-size: 1.6rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rk-cokpi-unit { font-size: 13px; font-weight: 400; color: var(--rk-muted); letter-spacing: 0; }
.rk-cokpi-sub { font-size: 12px; color: var(--rk-muted); }
.rk-cokpi .rk-delta:empty { display: none; }
.rk-cokpi .rk-delta { align-self: flex-start; }
.rk-cokpi-rows { display: grid; gap: 2px; }
.rk-cokpi-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13px; color: var(--rk-muted); border-bottom: 1px solid var(--rk-line); }
.rk-cokpi-rows b { color: var(--rk-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-coown { font-size: 13px; margin-top: 4px; cursor: default; }
.rk-cosignal { text-align: right; margin: 4px 0 10px; font-size: 12.5px; }
.rk-site .rk-cocal { padding: 0; overflow: hidden; margin-bottom: 12px; }
.rk-cocal-head { padding: 14px 16px; border-bottom: 1px solid var(--rk-line); font-size: 14px; font-weight: 600; }
.rk-cocal-empty { padding: 20px; text-align: center; color: var(--rk-muted); font-size: 13px; }
@media (max-width: 860px) { .rk-cogrid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .rk-cohead-name { font-size: 19px; } .rk-site #div-search-input { height: 48px; font-size: 14px; } }

/* ===================================================================== * 19. HARMONISATION v2 (2026-09-26) — cartes, contrôles segmentés, centimes,
 *     boutons verts (thème clair), icônes, navigation des simulateurs
 * ==========================================================================*/
/* 19.1 Icônes au trait (remplacent les émojis) : <i class="rk-ico rk-ico--home" aria-hidden="true"></i>
   Masque CSS → prend la couleur du texte (currentColor), fonctionne dans le HTML comme dans les chaînes JS. */
.rk-ico { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.16em; flex-shrink: 0; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.rk-ico--trend { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E"); }
.rk-ico--trend-down { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l6 6 4-4 8 8'/%3E%3Cpath d='M15 17h6v-6'/%3E%3C/svg%3E"); }
.rk-ico--flame { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c1 4 5 6 5 11a5 5 0 0 1-10 0c0-2.5 1.5-4 2.5-5 .3 1.6 1 2.5 2 3 0-3.5.5-6 .5-9Z'/%3E%3C/svg%3E"); }
.rk-ico--coins { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='9' cy='7' rx='6' ry='3'/%3E%3Cpath d='M3 7v5c0 1.7 2.7 3 6 3s6-1.3 6-3V7'/%3E%3Cpath d='M9 15v2c0 1.7 2.7 3 6 3s6-1.3 6-3v-5c0-1.7-2.7-3-6-3'/%3E%3C/svg%3E"); }
.rk-ico--bank { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6'/%3E%3Cpath d='M5 10v8M9.5 10v8M14.5 10v8M19 10v8M3 20h18'/%3E%3C/svg%3E"); }
.rk-ico--repeat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 2l3 3-3 3'/%3E%3Cpath d='M4 11V9a4 4 0 0 1 4-4h12'/%3E%3Cpath d='M7 22l-3-3 3-3'/%3E%3Cpath d='M20 13v2a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E"); }
.rk-ico--receipt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2V3Z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E"); }
.rk-ico--scale { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M7 20h10M5 7h14'/%3E%3Cpath d='M5 7l-3 7a3 3 0 0 0 6 0L5 7ZM19 7l-3 7a3 3 0 0 0 6 0l-3-7Z'/%3E%3C/svg%3E"); }
.rk-ico--home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }
.rk-ico--bars { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-8M22 20H2'/%3E%3C/svg%3E"); }
.rk-ico--gem { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 12L2 9l4-6Z'/%3E%3Cpath d='M2 9h20M12 21 8 9l4-6 4 6-4 12'/%3E%3C/svg%3E"); }
.rk-ico--target { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.rk-ico--calc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 12h.01M12 12h.01M16 12h.01M8 16h.01M12 16h.01M16 16h.01'/%3E%3C/svg%3E"); }
.rk-ico--globe { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E"); }
.rk-ico--medal { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='15' r='6'/%3E%3Cpath d='M8.5 10 6 3h4l2 4 2-4h4l-2.5 7'/%3E%3C/svg%3E"); }
.rk-ico--doc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6v18h12V7l-4-4Z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.rk-ico--calendar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.rk-ico--pin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.3-7-12a7 7 0 0 1 14 0c0 5.7-7 12-7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E"); }
.rk-ico--shield { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Z'/%3E%3C/svg%3E"); }
.rk-ico--building { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2M11 21v-3h2v3'/%3E%3C/svg%3E"); }
.rk-ico--sun { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.rk-ico--moon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5Z'/%3E%3C/svg%3E"); }
.rk-ico--cookie { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9 3 3 0 0 1-3-3 3 3 0 0 1-3-3 3 3 0 0 1-3-3Z'/%3E%3Cpath d='M8.5 10.5h.01M9 15h.01M14 15.5h.01M12 12h.01'/%3E%3C/svg%3E"); }
.rk-ico--gear { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 7 19.4l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 13.7H3a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 4.6 7l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 10.3 3V3a2 2 0 1 1 4 0v.1A1.7 1.7 0 0 0 17 4.6l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0 1.2 2.9H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z'/%3E%3C/svg%3E"); }
.rk-ico--link { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.rk-ico--search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.rk-ico--bulb { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2V16h5v-.1c0-.8.4-1.5 1-2A6 6 0 0 0 12 3Z'/%3E%3C/svg%3E"); }
.rk-ico--eye { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.rk-ico--trash { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E"); }
.rk-ico--chat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.5 7.2L4 20l1-4.5A8 8 0 1 1 21 12Z'/%3E%3C/svg%3E"); }
.rk-ico--bolt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7l1-8Z'/%3E%3C/svg%3E"); }
.rk-ico--card { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2.5'/%3E%3Cpath d='M2.5 10h19M6 15h4'/%3E%3C/svg%3E"); }
.rk-ico--cloud { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.5-9 6 6 0 0 1 11.5 1.5A4 4 0 0 1 17.5 18H7Z'/%3E%3C/svg%3E"); }
.rk-ico--save { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h11l3 3v15H5V3Z'/%3E%3Cpath d='M8 3v5h7V3M8 21v-7h8v7'/%3E%3C/svg%3E"); }
.rk-ico--plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.rk-ico--wallet { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h15a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12'/%3E%3Cpath d='M16 13.5h.01'/%3E%3C/svg%3E"); }
.rk-ico--edit { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4ZM13.5 6.5l4 4'/%3E%3C/svg%3E"); }
.rk-ico--bug { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='7' width='10' height='13' rx='5'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0M3 13h4M17 13h4M4 8l3 2M20 8l-3 2M4 19l3-2M20 19l-3-2'/%3E%3C/svg%3E"); }
.rk-ico--mail { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.rk-ico--coin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M14.5 9a3 3 0 0 0-5 1c0 3 5 1 5 4a3 3 0 0 1-5 1M12 6v2M12 16v2'/%3E%3C/svg%3E"); }
.rk-ico--compass { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5 5-2Z'/%3E%3C/svg%3E"); }
.rk-ico--lock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.rk-ico--beach { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M12 21 8 9M4 8a8 8 0 0 1 14-2L4 8Z'/%3E%3C/svg%3E"); }
.rk-ico--signal { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12a10 10 0 0 1 14 0M8.5 15.5a5 5 0 0 1 7 0M12 19h.01'/%3E%3C/svg%3E"); }
.rk-ico--undo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-3'/%3E%3C/svg%3E"); }
.rk-site .stat-label .rk-ico, .rk-site h3 .rk-ico, .rk-site .sim-tab .rk-ico { margin-right: 6px; opacity: .85; }
.rk-ico-tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 18px;
  color: var(--vc, var(--rk-accent)); background: color-mix(in srgb, var(--vc, var(--rk-accent)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--vc, var(--rk-accent)) 28%, transparent); }
.rk-empty-big { font-size: 2.2rem; color: var(--rk-muted); display: block; margin: 0 auto .75rem; opacity: .7; }

/* 19.2 Cartes de chiffres (.stat) = tuile KPI du kit (.rk-kpi--tile) :
   libellé en casse normale, valeur 600 tabulaire, pied séparé d'un filet */
.rk-site .stat { padding: 20px; border-radius: var(--rk-r-lg); background: var(--rk-surface); border: 1px solid var(--rk-line); box-shadow: var(--rk-shadow-1);
  transition: border-color var(--rk-dur), box-shadow var(--rk-dur); }
.rk-site .stat:hover { border-color: var(--rk-line-strong); box-shadow: var(--rk-shadow-2); }
.rk-site .stat-label { font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--rk-muted); margin-bottom: 8px; }
.rk-site .stat-value { font-size: 1.45rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.rk-site .stat-sub { font-size: 12.5px; color: var(--rk-muted); margin-top: 6px; }
.rk-site .stat-foot { border-top-color: var(--rk-line); font-size: 12.5px; }
.rk-site .chart-card h3 { text-transform: none; letter-spacing: -.005em; font-size: 14px; font-weight: 600; color: var(--rk-text); }

/* 19.3 Centimes en retrait (posés par rk-nombres.js) */
.rk-cents { font-size: .55em; font-weight: 500; color: var(--rk-muted); letter-spacing: -.01em; margin-left: 1px; }
.stat-value.pos .rk-cents, .stat-value.neg .rk-cents { color: inherit; opacity: .7; }

/* 19.4 Carte patrimoine de la vue d'ensemble (= .rk-hero du kit) */
.rk-site .chart-card.rk-hero { background: radial-gradient(600px 240px at 0% 0%, rgba(112,151,117,.16), transparent 70%), linear-gradient(180deg, var(--rk-surface-2), var(--rk-surface));
  border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-2); padding: 28px 32px; }
.rk-site #ov-total-val.rk-hero-value { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 600; letter-spacing: -.035em; font-family: var(--rk-font); margin: 8px 0 16px; }
.rk-site #ov-hero-label { font-family: var(--rk-font) !important; letter-spacing: 0 !important; text-transform: none !important; font-size: 13px !important; }
@media (max-width: 560px) { .rk-site .chart-card.rk-hero { padding: 22px 20px; } }

/* 19.5 Bandeaux de période et bascules = contrôle segmenté du kit (.rk-seg) */
.rk-site .chart-tabs, .rk-site .view-toggle, .rk-site .sim-subtabs,
.rk-site :not(.rk-simnav-group):has(> .chart-tab + .chart-tab), .rk-site :has(> .view-toggle-btn + .view-toggle-btn) {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; width: fit-content; max-width: 100%;
  background: var(--rk-inset); border: 1px solid var(--rk-line); border-radius: var(--rk-r-md); gap: 2px !important;
}
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn),
.rk-site .chart-tab, .rk-site .view-toggle-btn, .rk-site .sim-subtabs .sim-tab {
  min-height: 30px; padding: 0 12px; border: 0 !important; border-radius: 7px; background: transparent; color: var(--rk-muted);
  font: 500 13px/1 var(--rk-font); box-shadow: none;
}
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn):hover:not(.active),
.rk-site .chart-tab:hover:not(.active), .rk-site .view-toggle-btn:hover:not(.active), .rk-site .sim-subtabs .sim-tab:hover:not(.active) { color: var(--rk-text); background: transparent; }
.rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse, #page-fiscal, #page-simulations) :is(.chart-tab, .view-toggle-btn).active,
.rk-site .chart-tab.active, .rk-site .view-toggle-btn.active, .rk-site .sim-subtabs .sim-tab.active {
  background: var(--rk-surface-3); color: var(--rk-text); font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 3px rgba(0,0,0,.35), 0 0 0 1px var(--rk-line-strong);
}
:root[data-theme="light"] .rk-site :is(.chart-tab, .view-toggle-btn, .sim-subtabs .sim-tab).active { background: var(--rk-surface); color: var(--rk-text) !important; box-shadow: 0 1px 3px rgba(40,50,40,.12), 0 0 0 1px var(--rk-line); }
.rk-site .chart-tab:focus-visible, .rk-site .view-toggle-btn:focus-visible { outline: none; box-shadow: var(--rk-focus); }
/* Sélecteurs de période des pages véhicule (Tout / 1 an / …) : même contrôle */
.rk-site .stat-perf-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--rk-inset); border: 1px solid var(--rk-line); border-radius: var(--rk-r-sm); }
.rk-site .stat-perf-tab { padding: 4px 8px; border-radius: 5px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.rk-site .stat-perf-tab:not(:last-child)::after { content: none; }
.rk-site .stat-perf-tab.active { color: var(--rk-text); background: var(--rk-surface-3); box-shadow: 0 0 0 1px var(--rk-line-strong); }
:root[data-theme="light"] .rk-site .stat-perf-tab.active { background: var(--rk-surface); }

/* 19.6 Boutons verts pleins : ardoise trop sombre en thème clair → vert #3A7549 */
:root[data-theme="light"] .rk-site :is(.u-accent-c17905-bd334c4, .u-accent-c17905-bd334c4-fw600-p7px16px159a2, button[style*="background:var(--accent)"], .contact-cat-btn.active, .rk-btn--brand) {
  background: #3A7549 !important; color: #FFFDF9 !important; border-color: #3A7549 !important;
}
:root[data-theme="light"] .rk-site :is(.u-accent-c17905-bd334c4, .u-accent-c17905-bd334c4-fw600-p7px16px159a2, button[style*="background:var(--accent)"], .rk-btn--brand):hover { background: #336842 !important; filter: none; }

/* 19.7 Navigation des simulateurs : groupes + icônes au trait (remplace la rangée de 12 puces à émojis) */
.rk-simnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rk-line); }
.rk-simnav-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rk-simnav-title { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rk-muted); padding: 0 4px 2px; }
.rk-site .rk-simnav .sim-tab { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; text-align: left;
  border-radius: var(--rk-r-md); border: 1px solid transparent; background: transparent; color: var(--rk-text-2); font: 500 13.5px/1.2 var(--rk-font); }
.rk-simnav .sim-tab .rk-simnav-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--rk-surface-3); color: var(--rk-muted); border: 1px solid var(--rk-line); font-size: 15px; }
.rk-simnav .sim-tab .rk-simnav-ic .rk-ico { width: 15px; height: 15px; padding: 0; margin: 0; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.rk-site .rk-simnav .sim-tab:hover { background: var(--rk-surface-3); color: var(--rk-text); border-color: transparent; }
.rk-site .rk-simnav .sim-tab.active { background: var(--rk-accent-soft); border-color: color-mix(in srgb, var(--rk-accent) 40%, transparent); color: var(--rk-text) !important; font-weight: 600; }
.rk-simnav .sim-tab.active .rk-simnav-ic { background: var(--rk-accent-grad); color: var(--rk-on-accent); border-color: transparent; }
@media (max-width: 900px) { .rk-simnav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .rk-simnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 20px; padding: 0 16px 14px; }
  .rk-simnav::-webkit-scrollbar { display: none; }
  .rk-simnav-group { flex-direction: row; flex-shrink: 0; }
  .rk-simnav-title { display: none; }
  .rk-site .rk-simnav .sim-tab { width: auto; white-space: nowrap; border-color: var(--rk-line-strong); border-radius: var(--rk-r-pill); padding: 0 12px 0 6px; min-height: 38px; }
  .rk-simnav .sim-tab .rk-simnav-ic { width: 26px; height: 26px; border-radius: 50%; }
}

/* 19.8 Carte Budget du mois (vue d'ensemble) — variante de la carte Dividendes */
.rk-budcard .rk-divcard-val--main { margin-bottom: 8px; }
.rk-budcard .rk-alloc { height: 8px; background: var(--rk-inset); }
.rk-budcard-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--rk-muted); }
.rk-budcard-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rk-budcard-legend i { width: 9px; height: 9px; border-radius: 3px; }
.rk-budcard-pct { color: var(--rk-muted); font-weight: 400; margin-left: 6px; font-size: 12px; }

/* 19.9 Barre du haut : Partager / Feedback = bouton secondaire du kit (.rk-btn--secondary.rk-btn--sm) */
.rk-site #nav-share-btn, .rk-site .nav-share-btn[aria-label="Feedback"] {
  background: var(--rk-surface-3); border: 1px solid var(--rk-line-strong); color: var(--rk-text); box-shadow: var(--rk-shadow-1); gap: 7px;
}
.rk-site #nav-share-btn:hover, .rk-site .nav-share-btn[aria-label="Feedback"]:hover {
  background: var(--rk-surface-3); color: var(--rk-text); border-color: color-mix(in srgb, var(--rk-accent) 45%, var(--rk-line-strong));
}
.rk-site #nav-share-btn svg, .rk-site .nav-share-btn[aria-label="Feedback"] svg { width: 15px; height: 15px; color: var(--rk-text-2); }
@media (max-width: 1100px) { .rk-site #nav-share-btn, .rk-site .nav-share-btn[aria-label="Feedback"] { width: 32px; padding: 0; justify-content: center; } }

/* 19.10 Cartes véhicules de la vue d'ensemble (.rk-vehicle du kit, cf. 6.14) */
.rk-site #ov-vehicles-grid.rk-vehicles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rk-vehicle { cursor: pointer; }
.rk-vehicle .rk-progress { margin-top: -2px; }
.rk-vehicle--add { align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 150px;
  border: 1px dashed var(--rk-line-strong); box-shadow: none; background: transparent; --vc: var(--rk-accent); }
.rk-vehicle--add::before { content: none; }
.rk-site #ov-scroll-left, .rk-site #ov-scroll-right { display: none !important; }
@media (max-width: 560px) { .rk-site #ov-vehicles-grid.rk-vehicles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rk-site #ov-vehicles-grid .rk-vehicle { padding: 14px; } .rk-site #ov-vehicles-grid .rk-vehicle-value { font-size: 17px; }
  .rk-site #ov-vehicles-grid .rk-vehicle-sub { display: none; } }

/* 19.11 Contrôle segmenté : élément sélectionné BLANC en thème clair (comme le kit),
   quelle que soit la règle #page-x qui le précède */
:root[data-theme="light"] .rk-site :is(.chart-tab, .view-toggle-btn, .sim-subtabs .sim-tab, .stat-perf-tab).active {
  background: #FFFFFF !important; color: var(--rk-text) !important; font-weight: 500;
  box-shadow: 0 1px 2px rgba(40,50,40,.10), 0 1px 4px rgba(40,50,40,.08) !important;
}
:root[data-theme="light"] .rk-site :is(.chart-tabs, .view-toggle, .sim-subtabs, .stat-perf-tabs),
:root[data-theme="light"] .rk-site :has(> .chart-tab + .chart-tab),
:root[data-theme="light"] .rk-site :has(> .view-toggle-btn + .view-toggle-btn) { background: #EFEAE0; border-color: rgba(59,82,73,.10); }

/* 19.12 Boutons .btn recoloriés en fond clair par une classe utilitaire (u-*bg3*) :
   le texte blanc du bouton principal devenait illisible en thème clair */
.rk-site .btn[class*="-bg3-"], .rk-site .btn[class*="u-bg3"] {
  background: var(--rk-surface-3) !important; color: var(--rk-text) !important; border: 1px solid var(--rk-line-strong) !important; box-shadow: var(--rk-shadow-1);
}
/* Bouton plein rouge (ex. « Ajouter » une dépense du budget) : texte blanc garanti dans les deux thèmes */
.rk-site .btn.rk-btn-negsolid { background: var(--rk-neg) !important; color: #FFFDF9 !important; border: 1px solid transparent !important; }
.rk-site .btn.rk-btn-negsolid:hover { filter: brightness(1.08); }

.rk-ico--upload { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M5 20h14'/%3E%3C/svg%3E"); }
.rk-drop-ico .rk-ico { font-size: 18px; }
/* input masqué dans les zones d'import des modales : ne pas étendre à toute la zone */
.rk-drop input[type="file"][style*="display:none"] { display: none; }

/* 19.13 Simulateurs */
/* Calendrier : la marge basse du .sim-field passe sur le conteneur, l'icône reste centrée */
.rk-date:has(> .sim-field) { margin-bottom: .85rem; }
.rk-date > .sim-field, .rk-date > input.sim-field { margin-bottom: 0 !important; }
/* Contrôle segmenté pleine largeur (Lump sum / DCA, Historique / Estimation) */
.rk-site .chart-tabs.rk-seg-full { display: flex !important; width: 100% !important; }
.rk-site .chart-tabs.rk-seg-full > .chart-tab { flex: 1; min-height: 34px; white-space: nowrap; }

/* 19.14 Recherche dividendes : le graphique prend la hauteur de la colonne des 3 cartes */
.rk-cogrid { align-items: stretch; }
.rk-site .rk-cochart { display: flex; flex-direction: column; }
.rk-cochart-box { flex: 1 1 auto; height: auto; min-height: 240px; }
@media (max-width: 860px) { .rk-cochart-box { flex: none; height: 240px; } }

/* 19.15 Tableau des positions (kit v2, cf. 6.15) — généré par RK.posCells() */
.rk-site .rk-postable { font-size: 14px; }
.rk-site .rk-postable th { background: transparent; padding: 12px 16px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--rk-muted); font-weight: 500; }
.rk-site .rk-postable td { padding: 14px 16px; vertical-align: middle; }
.rk-site .rk-postable th.num, .rk-site .rk-postable td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk-site .rk-postable td:last-child { width: 1%; white-space: nowrap; }
.rk-site .rk-postable .rk-asset { min-width: 180px; }
.rk-site .rk-postable .rk-asset-logo { width: 34px; height: 34px; border-radius: 10px; }
.rk-strong { font-weight: 600; color: var(--rk-text); }
.rk-muted { color: var(--rk-muted); }
.rk-pv { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.2; color: var(--rk-text-2); }
.rk-pv small { font-size: 12px; }
.rk-pv.is-pos { color: var(--rk-pos); }
.rk-pv.is-neg { color: var(--rk-neg); }
.rk-site .rk-postable tr.pos-row:hover { outline: none; }
.rk-site .rk-postable tr.pos-row:hover td { background: color-mix(in srgb, var(--rk-accent) 5%, transparent); }
@media (max-width: 760px) { .rk-site .rk-postable th:nth-child(4), .rk-site .rk-postable td:nth-child(4), .rk-site .rk-postable th:nth-child(7), .rk-site .rk-postable td:nth-child(7) { display: none; } }

/* 19.16 Cartes de résultats des simulateurs = tuile KPI du kit (couleurs via simKitColor) */
.rk-site .sim-kpi { background: var(--rk-surface); border: 1px solid var(--rk-line) !important; border-radius: var(--rk-r-lg); padding: 14px 16px; box-shadow: var(--rk-shadow-1); }
.rk-site .sim-kpi[style*="--kc"] { box-shadow: inset 0 2px 0 var(--kc), var(--rk-shadow-1); }
.rk-site .sim-kpi-label { font-size: 12.5px; color: var(--rk-muted); font-weight: 500; }
.rk-site .sim-kpi-value { font-family: var(--rk-font); font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rk-site .sim-kpi-sub { font-size: 12px; color: var(--rk-muted); }

/* 19.17 Bouton plein rouge : prioritaire sur la règle « texte sombre » du thème clair */
:root .rk-site .btn.btn-sm.rk-btn-negsolid, :root .rk-site .btn.rk-btn-negsolid { background: var(--rk-neg) !important; color: #0B100E !important; border-color: transparent !important; } /* sombre : texte noir */
:root[data-theme="light"] .rk-site .btn.btn-sm.rk-btn-negsolid, :root[data-theme="light"] .rk-site .btn.rk-btn-negsolid { color: #FFFDF9 !important; } /* clair : texte blanc */

/* 19.18 Carte patrimoine de la vue d'ensemble : fond uni (sans dégradé) */
.rk-site .chart-card.rk-hero { background: var(--rk-surface) !important; }

/* 19.19 Écran de chargement (kit v2) : logotype + barre de progression bronze */
#app-loading-overlay { background: var(--rk-bg, var(--bg)); }
.alo-inner { gap: 16px; }
.alo-word { font-family: 'Syne', var(--rk-font); font-weight: 700; font-size: 34px; letter-spacing: -.01em; color: var(--rk-text); animation: alo-in .5s var(--rk-ease, ease) both; }
.alo-sm { color: #3A7549; }
.alo-bar { position: relative; width: 160px; height: 3px; border-radius: 3px; background: var(--rk-line-strong); overflow: hidden; }
.alo-bar span { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: var(--rk-accent-grad, var(--rk-accent)); animation: alo-slide 1.1s cubic-bezier(.65,0,.35,1) infinite; }
.alo-txt { font-size: 13px; color: var(--rk-muted); animation: alo-in .5s .15s both; }
@keyframes alo-slide { from { left: -40%; } to { left: 100%; } }
@keyframes alo-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .alo-bar span { animation: none; left: 0; width: 100%; opacity: .6; } }

/* 19.20 En-tête du budget : titre sur une ligne, sélecteur de mois compact */
.rk-site #page-budget .section-head { align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.rk-site #page-budget .section-title { white-space: nowrap; }
.rk-site #page-budget .rk-budget-month { width: auto; min-width: 170px; max-width: 220px; flex: 0 0 auto; margin: 0; }
.rk-site #page-budget .section-head .add-data-btn { white-space: nowrap; }

/* 19.21 Modale Feedback */
.rk-fb-head { display: flex; align-items: center; gap: 12px; }
.rk-fb-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; font-family: var(--rk-font); }
.rk-fb-head p { margin: 2px 0 0; font-size: 13px; color: var(--rk-muted); }
.rk-fb-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.rk-site .rk-fb .contact-cat-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--rk-r-pill); font-size: 13px; }
.rk-site .rk-fb label { font-size: 13px !important; font-weight: 500; color: var(--rk-text-2) !important; text-transform: none !important; letter-spacing: 0 !important; }
.rk-site .rk-fb #contact-corr-fields { background: var(--rk-inset) !important; border-color: var(--rk-line) !important; border-radius: var(--rk-r-lg) !important; }
.rk-site .rk-fb .sim-field { background: var(--rk-inset); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md); min-height: 40px; font-family: var(--rk-font); }
.rk-site .rk-fb textarea.sim-field { padding: 10px 12px; }
/* Catégorie active = puce du kit (.rk-chip[aria-pressed]), prioritaire sur le vert plein du thème clair */
:root .rk-site .rk-fb .contact-cat-btn.active, :root[data-theme="light"] .rk-site .rk-fb .contact-cat-btn.active {
  background: var(--rk-accent-soft) !important; border-color: color-mix(in srgb, var(--rk-accent) 50%, transparent) !important; color: var(--rk-accent) !important; }

/* ============================================================================
 * 20. MODALE DE POSITIONS (rk-positions.js) — onglets Opération / Mes positions
 * ==========================================================================*/
.rk-ps-overlay { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 7, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: rk-fade .2s; }
:root[data-theme="light"] .rk-ps-overlay { background: rgba(30, 40, 35, .35); }
.rk-ps { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  background: var(--rk-surface); border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-xl); box-shadow: var(--rk-shadow-3);
  overflow: hidden; animation: rk-in .25s var(--rk-ease); font-family: var(--rk-font); color: var(--rk-text); }
.rk-ps::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--rk-hairline-gold); }
.rk-ps-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rk-line); flex-wrap: wrap; }
.rk-ps-tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: var(--vc);
  background: color-mix(in srgb, var(--vc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--vc) 28%, transparent); }
.rk-ps-tile svg { width: 17px; height: 17px; }
.rk-ps-titles h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.rk-ps-titles p { margin: 1px 0 0; font-size: 12.5px; color: var(--rk-muted); }
.rk-ps-tabs { margin-left: auto; display: inline-flex; gap: 2px; padding: 3px; background: var(--rk-inset); border: 1px solid var(--rk-line); border-radius: var(--rk-r-md); }
.rk-ps-tabs button { border: 0; background: none; color: var(--rk-muted); font: 500 13px var(--rk-font); padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.rk-ps-tabs button[aria-selected="true"] { background: var(--rk-surface-3); color: var(--rk-text); box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px var(--rk-line-strong); }
:root[data-theme="light"] .rk-ps-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(40,50,40,.12), 0 0 0 1px var(--rk-line); }
.rk-ps-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--rk-text-2); font-size: 20px; cursor: pointer; }
.rk-ps-x:hover { background: var(--rk-surface-3); }
.rk-ps-body { padding: 18px 20px; display: grid; gap: 14px; overflow-y: auto; }
.rk-ps-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--rk-line); background: var(--rk-surface-2); flex-wrap: wrap; }
.rk-ps-foot .rk-btn svg { width: 15px; height: 15px; }
.rk-ps-sp { margin-right: auto; font-size: 12.5px; color: var(--rk-muted); }
.rk-ps-del { color: var(--rk-neg) !important; }
.rk-ps-hint { font-size: 12.5px; color: var(--rk-muted); }
.rk-ps-err { font-size: 13px; color: var(--rk-neg); background: var(--rk-neg-soft); border-radius: var(--rk-r-md); padding: 8px 12px; }
.rk-ps-search { position: relative; }
.rk-ps-search > svg { position: absolute; left: 12px; top: 20px; transform: translateY(-50%); width: 16px; height: 16px; color: var(--rk-muted); z-index: 1; pointer-events: none; }
.rk-ps-search .rk-input { padding-left: 38px; height: 44px; }
.rk-ps-held { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rk-ps-held-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--rk-r-md); border: 1px solid var(--rk-line); background: var(--rk-surface); color: inherit; text-align: left; cursor: pointer; font: inherit; min-width: 0; }
.rk-ps-held-item:hover { border-color: var(--rk-line-strong); background: var(--rk-surface-2); }
.rk-ps-held-item > span:last-child { min-width: 0; display: grid; }
.rk-ps-held-item b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-ps-held-item small { font-size: 12px; color: var(--rk-muted); }
.rk-ps-asset { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--rk-r-lg); background: var(--rk-surface-2); border: 1px solid var(--rk-line); }
.rk-ps-asset-id { display: grid; gap: 1px; min-width: 0; }
.rk-ps-asset-id b { font-weight: 600; }
.rk-ps-price { margin-left: auto; display: grid; justify-items: end; gap: 2px; }
.rk-ps-price b { font-size: 17px; font-weight: 600; }
.rk-ps-modes { display: flex; width: 100%; }
.rk-ps-modes button { flex: 1; }
.rk-ps-modes button:disabled { opacity: .4; cursor: not-allowed; }
:root[data-theme="light"] .rk-ps-modes button[aria-pressed="true"] { background: #fff; }
.rk-ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rk-ps-preview { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); overflow: hidden; }
.rk-ps-preview > div { padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.rk-ps-preview > div + div { border-left: 1px solid var(--rk-line); }
.rk-ps-preview small { font-size: 12px; color: var(--rk-muted); }
.rk-ps-preview b { font-size: 15.5px; font-weight: 600; }
.rk-ps-list { border: 1px solid var(--rk-line); border-radius: var(--rk-r-lg); overflow: hidden; }
.rk-ps-lrow { display: grid; grid-template-columns: minmax(0, 1.7fr) 96px 120px 32px; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rk-line); }
.rk-ps-lrow:last-child { border-bottom: 0; }
.rk-ps-lrow.is-head { background: var(--rk-surface-2); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--rk-muted); padding-block: 9px; }
.rk-ps-lrow.is-dirty { background: color-mix(in srgb, var(--rk-accent) 6%, transparent); }
.rk-ps-lrow .rk-input { height: 34px; }
.rk-ps-lrow .rk-asset { min-width: 0; }
.rk-ps-lrow .rk-asset-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-ps-rm { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--rk-muted); cursor: pointer; font-size: 17px; }
.rk-ps-rm:hover { background: var(--rk-neg-soft); color: var(--rk-neg); }
.rk-ps-add { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed var(--rk-line-strong); border-radius: var(--rk-r-lg);
  background: none; color: var(--rk-text-2); font: 500 13.5px var(--rk-font); cursor: pointer; }
.rk-ps-add svg { width: 16px; height: 16px; }
.rk-ps-add:hover { border-color: var(--rk-accent); color: var(--rk-accent); }
@media (max-width: 560px) {
  .rk-ps-overlay { padding: 0; place-items: end stretch; }
  .rk-ps { width: 100%; max-height: 92dvh; border-radius: var(--rk-r-xl) var(--rk-r-xl) 0 0; }
  .rk-ps-tabs { margin-left: 0; order: 3; width: 100%; } .rk-ps-tabs button { flex: 1; }
  .rk-ps-preview { grid-template-columns: 1fr; } .rk-ps-preview > div + div { border-left: 0; border-top: 1px solid var(--rk-line); }
  .rk-ps-lrow { grid-template-columns: minmax(0, 1fr) 76px 30px; } .rk-ps-lrow > :nth-child(3) { display: none; }
  .rk-ps-foot .rk-btn--primary { flex: 1; }
}
.rk-ps-tile .rk-ico { font-size: 17px; }
.rk-ps-manual { display: flex; gap: 8px; }
.rk-ps-manual .rk-input { flex: 1; }
.rk-ps-lrow .no-affix .rk-input { padding-right: 12px; text-align: left; }

/* ============================================================================
 * 21. STANDARD DES MODALES (2026-09-26) — toutes les modales historiques
 *     (.modal-content) alignées sur la modale de positions (§20) :
 *     en-tête uni, titre sans mot coloré, libellés en casse normale,
 *     champs identiques, bouton principal bronze, fermer discret.
 * ==========================================================================*/
/* En-tête */
.rk-site .modal-content > div:first-child:has(.u-disp-fsr110-fw800-ls002eme47a3) {
  background: var(--rk-surface-2) !important; padding: 16px 20px !important; border-bottom: 1px solid var(--rk-line) !important; }
.rk-site .u-disp-fsr110-fw800-ls002eme47a3 { font: 600 17px/1.3 var(--rk-font) !important; letter-spacing: -.01em !important; color: var(--rk-text); }
.rk-site .u-disp-fsr110-fw800-ls002eme47a3 span { color: var(--rk-muted) !important; font-weight: 500 !important; }
.rk-site .modal-content > div:first-child:has(.u-disp-fsr110-fw800-ls002eme47a3) [class*="u-fs11-muted"] { font-size: 12.5px !important; letter-spacing: 0 !important; }
.rk-site .modal-content > div:first-child .u-flex-12:has(.u-disp-fsr110-fw800-ls002eme47a3) > div:first-child:not(:has(.u-disp-fsr110-fw800-ls002eme47a3)):not(:has(input)) {
  width: 36px; height: 36px; border-radius: 10px !important; background: var(--rk-surface-3) !important; border: 1px solid var(--rk-line) !important; color: var(--rk-text-2); }
.rk-site .modal-content > div:first-child:has(.u-disp-fsr110-fw800-ls002eme47a3) button[aria-label="Fermer"],
.rk-site .modal-content [class*="u-bg2-bd9dc44-muted-fs18"] {
  width: 32px; height: 32px; padding: 0 !important; display: grid; place-items: center; border: 0 !important; background: none !important;
  border-radius: 8px !important; color: var(--rk-text-2) !important; font-size: 20px !important; }
.rk-site .modal-content [class*="u-bg2-bd9dc44-muted-fs18"]:hover { background: var(--rk-surface-3) !important; }
.rk-site .modal-content .section-head .section-title { font: 600 17px/1.3 var(--rk-font); letter-spacing: -.01em; }

/* Libellés et en-têtes de colonnes : casse normale */
.rk-site .modal-content :is(.u-label, label[class*="u-fs10-upper"], label[class*="u-fs11-muted"], [class*="u-fs10-upper-ls06em"], .form-group > label) {
  font-size: 12.5px !important; font-weight: 500 !important; color: var(--rk-text-2) !important; text-transform: none !important; letter-spacing: 0 !important; }

/* Champs (corps des modales uniquement : l'en-tête garde ses propres champs, ex. date d'ouverture) */
.rk-site .modal-content > :not(:first-child) :is(input[type="text"], input[type="number"], input[type="email"], input:not([type]), textarea, select, .rk-sel-btn, .rk-date > input:not([type="hidden"])) {
  background-color: var(--rk-inset) !important; color: var(--rk-text) !important; border: 1px solid var(--rk-line-strong) !important;
  border-radius: var(--rk-r-md) !important; font-family: var(--rk-font) !important; font-size: 14px !important; min-height: 38px; box-sizing: border-box; }
.rk-site .modal-content > :not(:first-child) :is(input[type="text"], input[type="number"], input:not([type]), .rk-date > input:not([type="hidden"])) { padding: 0 12px !important; }
.rk-site .modal-content > :not(:first-child) textarea { padding: 10px 12px !important; }
.rk-site .modal-content > :not(:first-child) :is(input, textarea, select):focus { border-color: var(--rk-accent) !important; box-shadow: 0 0 0 3px var(--rk-accent-soft) !important; outline: none; }

/* Bouton principal des modales : bronze (même règle que la modale de positions) */
.rk-site .modal-content :is(.u-accent-c17905-bd334c4, .u-accent-c17905-bd334c4-fw600-p7px16px159a2, #df-save-btn),
:root[data-theme="light"] .rk-site .modal-content :is(.u-accent-c17905-bd334c4, .u-accent-c17905-bd334c4-fw600-p7px16px159a2, #df-save-btn),
.rk-site .modal-content button[onclick^="save"], :root[data-theme="light"] .rk-site .modal-content button[onclick^="save"] {
  background: var(--rk-accent-grad) !important; color: var(--rk-on-accent) !important; border: 1px solid rgba(0,0,0,.18) !important;
  min-height: 38px; padding: 0 16px !important; border-radius: var(--rk-r-md) !important; font: 600 14px var(--rk-font) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 18px -8px rgba(190,110,70,.55) !important; }
/* Boutons secondaires des modales (Effacer, Annuler…) : secondaire du kit, même hauteur */
.rk-site .modal-content .btn.btn-sm:not(.btn-danger):not([class*="u-accent"]):not(.rk-btn-negsolid) { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* 20.2 Assistant en 2 étapes (proposition C) */
.rk-ps-steps { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rk-muted); }
.rk-ps-steps span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rk-ps-steps i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 600; background: var(--rk-surface-3); color: var(--rk-muted); }
.rk-ps-steps .is-on { color: var(--rk-text); font-weight: 500; }
.rk-ps-steps .is-on i { background: var(--rk-accent-grad); color: var(--rk-on-accent); }
.rk-ps-steps .is-ok i { background: var(--rk-pos-soft); color: var(--rk-pos); }
.rk-ps-steps hr { flex: 1; border: 0; border-top: 1px solid var(--rk-line-strong); margin: 0; }
.rk-ps-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rk-ps-chips .rk-chip:disabled { opacity: .4; cursor: not-allowed; }
.rk-ps-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rk-ps-fees { max-width: 220px; }
.rk-ps-recap { border-radius: var(--rk-r-lg); background: var(--rk-surface-2); border: 1px solid var(--rk-line); padding: 14px 16px; display: grid; gap: 8px; }
.rk-ps-recap > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--rk-text-2); }
.rk-ps-recap b { color: var(--rk-text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.rk-ps-recap b.rk-pv.is-pos { color: var(--rk-pos); } .rk-ps-recap b.rk-pv.is-neg { color: var(--rk-neg); }
.rk-ps-recap .is-total { border-top: 1px solid var(--rk-line); padding-top: 8px; font-size: 15px; color: var(--rk-text); }
.rk-ps-price .rk-chip { height: 28px; margin-top: 2px; }
@media (max-width: 560px) { .rk-ps-fees { max-width: none; } }

/* ============================================================================
 * 22. RESPONSIVE (2026-09-26)
 * ==========================================================================*/
/* Menu Portefeuille (barre du bas) : page courante mise en évidence */
.rk-menu-item.is-current { background: var(--rk-surface-3); color: var(--rk-text); font-weight: 600; }
.rk-menu-here { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--rk-accent); background: var(--rk-accent-soft); padding: 2px 8px; border-radius: var(--rk-r-pill); }

@media (max-width: 640px) {
  /* 1 · 3 — Contrôles segmentés compacts : une seule ligne, défilement horizontal si besoin */
  .rk-site .chart-tabs:not(.rk-seg-full), .rk-site .view-toggle, .rk-site .sim-subtabs,
  .rk-site :not(.rk-simnav-group):has(> .chart-tab + .chart-tab):not(.rk-seg-full), .rk-site :has(> .view-toggle-btn + .view-toggle-btn) {
    flex-wrap: nowrap !important; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rk-site :is(.chart-tabs, .view-toggle, .sim-subtabs)::-webkit-scrollbar { display: none; }
  .rk-site :is(#page-dashboard, #page-cto, #page-av, #page-crypto, #page-livrets, #page-pee, #page-per, #page-metaux, #page-exotiques, #page-immo, #page-credits, #page-overview, #page-dividendes, #page-budget, #page-analyse) :is(.chart-tab, .view-toggle-btn),
  .rk-site .chart-tab, .rk-site .view-toggle-btn { flex: 0 0 auto; min-height: 30px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
  /* Vue d'ensemble : légende + bascule de l'évolution sur deux lignes propres */
  #page-overview .chart-card > .u-flex-aic-jcsb-wrap-gap8-mbr100 { gap: 10px; }

  /* 2 — Vue d'ensemble : blocs côte à côte empilés, rien ne dépasse */
  .rk-site #page-overview .ov-col2 { grid-template-columns: minmax(0, 1fr) !important; }
  .rk-site #page-overview .ov-col2 > * { min-width: 0; }
  .rk-site #page-overview .rk-divcard-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  /* 4 — Positions : carte lisible (titre + suppression, puis 3 colonnes de chiffres) */
  .rk-site .rk-postable tbody tr { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px;
    padding: 14px !important; margin-bottom: 10px; background: var(--rk-surface) !important; border: 1px solid var(--rk-line) !important; border-radius: var(--rk-r-lg) !important; }
  .rk-site .rk-postable tbody td { display: flex !important; flex-direction: column; align-items: flex-start !important; justify-content: flex-start;
    gap: 2px; padding: 0 !important; border: 0 !important; text-align: left !important; white-space: normal; font-size: 14px; }
  .rk-site .rk-postable tbody td:first-child { border: 0 !important; margin: 0; padding: 0 !important; font-size: inherit; }
  .rk-site .rk-postable tbody td::before { display: block !important; content: ""; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--rk-muted); margin: 0; }
  .rk-site .rk-postable tbody td:first-child::before { display: none !important; }
  .rk-site .rk-postable tbody td:nth-child(2)::before { content: "Quantité" !important; }
  .rk-site .rk-postable tbody td:nth-child(3)::before { content: "PRU" !important; }
  .rk-site .rk-postable tbody td:nth-child(4)::before { content: "Cours" !important; }
  .rk-site .rk-postable tbody td:nth-child(5)::before { content: "Valorisation" !important; }
  .rk-site .rk-postable tbody td:nth-child(6)::before { content: "+/- value" !important; }
  .rk-site .rk-postable tbody td:nth-child(7)::before { content: "Poids" !important; }
  .rk-site .rk-postable tbody td:nth-child(4), .rk-site .rk-postable tbody td:nth-child(7) { display: flex !important; }
  .rk-site .rk-postable .rk-pv { align-items: flex-start; }
  .rk-site .rk-postable .rk-asset { min-width: 0; }
  .rk-site .rk-postable .rk-asset-name { white-space: normal; line-height: 1.3; }
  /* Assurance-vie (colonnes Support, Contrat, Investi, Valorisation, +/- value, Poids) */
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(2)::before { content: "Contrat" !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(3)::before { content: "Investi" !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(4)::before { content: "Valorisation" !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(5)::before { content: "+/- value" !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(6)::before { content: "Poids" !important; }
  .rk-site #exotiques-positions-wrap .rk-postable tbody td:nth-child(2)::before { content: "Achat" !important; }
  .rk-site #exotiques-positions-wrap .rk-postable tbody td:nth-child(3)::before { content: "Prix d'achat" !important; }

  /* 5 — Modale Livrets : nom sur toute la largeur, puis solde / taux / inclus / supprimer */
  .rk-site #lv-rows-container { gap: 12px !important; }
  .rk-site #lv-rows-container .lv-input-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24px 30px !important; gap: 8px !important;
    padding-bottom: 12px; border-bottom: 1px solid var(--rk-line); }
  .rk-site #lv-rows-container .lv-input-row:last-child { border-bottom: 0; padding-bottom: 0; }
  .rk-site #lv-rows-container .lv-row-livret { grid-column: 1 / -1; }
  .rk-site #lv-rows-container .lv-input-row input { min-height: 42px !important; font-size: 15px !important; }
  .rk-site #livrets-modal .u-bg2-bd9dc44-r12-ovhidden > div:first-child { display: none !important; } /* en-têtes : remplacés par les indications des champs */
  .rk-site #livrets-modal .modal-content > div:first-child { flex-wrap: wrap; }
}

/* Logo = écriture seule (plus d'image), sans espace entre « Ro » et « smerta » */
.rk-site .sidebar-brand, .rk-logo { gap: 0 !important; }

@media (max-width: 640px) {
  /* 1 · 2 · 5 — Graphiques côte à côte (Crédits, Dividendes, Budget…) : empilés, rien ne dépasse */
  .rk-site .page [class*="u-grid-grid4ea93"], .rk-site .page [style*="grid-template-columns:1fr 1fr"], .rk-site .page [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important; }
  .rk-site .page [class*="u-grid-grid4ea93"] > *, .rk-site .page .chart-card { min-width: 0; }
  .rk-site .page .chart-wrap, .rk-site .page [class*="u-posrelative-h"] { max-width: 100%; }
  .rk-site .page canvas { max-width: 100% !important; }

  /* 4 — Modale Budget : Entrées puis Sorties empilées, champs aérés, listes lisibles */
  .rk-site #budget-modal [class*="u-grid-grid4ea93"] { grid-template-columns: minmax(0, 1fr) !important; }
  .rk-site #budget-modal .admin-form { padding: 16px !important; }
  .rk-site #budget-modal .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 10px !important; }
  .rk-site #budget-modal .form-row.u-grid85256 { grid-template-columns: minmax(0, 1fr) !important; }
  .rk-site #budget-modal .form-group input { min-height: 44px !important; font-size: 15px !important; }
  .rk-site #budget-modal .form-actions .btn { width: 100%; min-height: 44px; font-size: 15px; justify-content: center; }
  .rk-site #budget-modal .table-wrap { max-height: none !important; }
  .rk-site #budget-modal table { font-size: 14px; }
  .rk-site #budget-modal td, .rk-site #budget-modal th { padding: 10px 8px !important; }
}
/* Bascules segmentées toujours horizontales (une ancienne règle mobile passait certains blocs en colonne) */
.rk-site .view-toggle, .rk-site .chart-tabs, .rk-site #ov-kpi-scope-toggle { flex-direction: row !important; }

/* ============================================================================
 * 23. MOBILE (2026-09-26) — cartes de positions v2, modales en panneau bas, Sankey
 * ==========================================================================*/
/* Croix de fermeture de la modale de positions : toujours à droite */
.rk-ps-x { margin-left: auto; }
.rk-ps-tabs + .rk-ps-x { margin-left: 0; }

@media (max-width: 640px) {
  /* 1 — Carte de position : identité à gauche, valorisation + plus-value à droite,
         puis une bande de 4 détails (Quantité · PRU · Cours · Poids). La suppression
         se fait dans la fiche (clic sur la carte), plus de × dans la liste. */
  .rk-site .rk-postable tbody tr { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 10px !important; padding: 14px 16px !important; }
  .rk-site .rk-postable tbody td:nth-child(1) { grid-area: 1 / 1 / 3 / 3 !important; padding: 0 !important; align-self: center; }
  .rk-site .rk-postable tbody td:nth-child(5) { grid-area: 1 / 3 / 2 / 5 !important; align-items: flex-end !important; font-size: 16px; }
  .rk-site .rk-postable tbody td:nth-child(6) { grid-area: 2 / 3 / 3 / 5 !important; align-items: flex-end !important; margin-top: 2px; }
  .rk-site .rk-postable tbody td:nth-child(5)::before, .rk-site .rk-postable tbody td:nth-child(6)::before { display: none !important; }
  .rk-site .rk-postable tbody td:nth-child(6) .rk-pv { flex-direction: row; align-items: baseline; gap: 6px; }
  .rk-site .rk-postable tbody td:nth-child(6) .rk-pv small { font-size: 12px; opacity: .9; }
  .rk-site .rk-postable tbody td:nth-child(2) { grid-area: 3 / 1 !important; }
  .rk-site .rk-postable tbody td:nth-child(3) { grid-area: 3 / 2 !important; }
  .rk-site .rk-postable tbody td:nth-child(4) { grid-area: 3 / 3 !important; }
  .rk-site .rk-postable tbody td:nth-child(7) { grid-area: 3 / 4 !important; align-items: flex-end !important; }
  .rk-site .rk-postable tbody td:nth-child(n+2):nth-child(-n+4), .rk-site .rk-postable tbody td:nth-child(7) {
    margin-top: 12px; padding-top: 10px !important; border-top: 1px solid var(--rk-line) !important; font-size: 13px; color: var(--rk-text-2); }
  .rk-site .rk-postable tbody td:nth-child(n+2)::before { font-size: 10px !important; letter-spacing: .06em !important; }
  .rk-site .rk-postable tbody td:nth-child(8) { display: none !important; }
  .rk-site .rk-postable .rk-asset { gap: 10px; }
  .rk-site .rk-postable .rk-asset-logo { width: 32px; height: 32px; font-size: 11px; }
  .rk-site .rk-postable .rk-asset-name { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rk-site .rk-postable .rk-asset-meta { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* Assurance-vie : Support · (Contrat, Investi) · Valorisation · +/- value · Poids · × */
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(4) { grid-area: 1 / 3 / 2 / 5 !important; align-items: flex-end !important; border-top: 0 !important; margin-top: 0; padding-top: 0 !important; font-size: 16px; color: var(--rk-text); }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(4)::before { display: none !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(5) { grid-area: 2 / 3 / 3 / 5 !important; font-size: 13px; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(2) { grid-area: 3 / 1 / 4 / 3 !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(3) { grid-area: 3 / 3 !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(6) { grid-area: 3 / 4 !important; align-items: flex-end !important; margin-top: 12px; padding-top: 10px !important; border-top: 1px solid var(--rk-line) !important; font-size: 13px; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(6)::before { display: block !important; content: "Poids" !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(5)::before { display: none !important; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(7) { display: none !important; }
  .rk-site #exotiques-positions-wrap .rk-postable tbody td:nth-child(2) { grid-area: 3 / 1 / 4 / 2 !important; }
  .rk-site #exotiques-positions-wrap .rk-postable tbody td:nth-child(3) { grid-area: 3 / 2 / 4 / 4 !important; }
  .rk-site #exotiques-positions-wrap .rk-postable tbody tr { grid-template-columns: 1.3fr 1.2fr 1fr .8fr !important; }

  /* 2 — Modale de positions : titre à gauche, × à droite, onglets dessous */
  .rk-ps-head { flex-wrap: wrap; }
  .rk-ps-titles { flex: 1; min-width: 0; }
  .rk-ps-x { order: 2; margin-left: auto !important; }
  .rk-ps-tabs { order: 3; }

  /* 3 — Toutes les modales sortent du bas de l'écran (panneau) */
  .rk-site .modal-overlay.open { display: flex !important; flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0 !important; overflow: hidden; }
  .rk-site [id$="-modal"][style*="position:fixed"], .rk-site #immo-form-overlay, .rk-site #credit-form-overlay {
    align-items: flex-end !important; justify-content: stretch !important; padding: 0 !important; }
  .rk-site .modal-overlay.open > .modal-content, .rk-site [id$="-modal"][style*="position:fixed"] > div, .rk-site #immo-form-overlay > .modal-content, .rk-site #credit-form-overlay > .modal-content {
    width: 100% !important; max-width: none !important; margin: 0 !important; max-height: 92dvh !important; overflow-y: auto !important;
    border-radius: var(--rk-r-xl) var(--rk-r-xl) 0 0 !important; border-bottom: 0 !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important; animation: rk-sheet-up .28s var(--rk-ease); }
  .rk-site .modal-overlay.open > .modal-content::after, .rk-site #immo-form-overlay > .modal-content::after, .rk-site #credit-form-overlay > .modal-content::after,
  .rk-ps::after { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--rk-line-strong); }
  .rk-ps { animation: rk-sheet-up .28s var(--rk-ease); padding-bottom: env(safe-area-inset-bottom); }

  /* 4 — Sankey : aperçu compact + bouton plein écran (paysage) */
  .rk-sankey-box { height: 300px !important; }
  .rk-sankey-fs-btn { display: flex !important; }
}
@keyframes rk-sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rk-site .modal-content, .rk-ps { animation: none !important; } }
@media (max-width: 640px) {
  .rk-site .rk-postable tbody td:nth-child(1) { overflow: hidden; min-width: 0; }
  .rk-site .rk-postable .rk-asset > div { min-width: 0; flex: 1; }
  .rk-site .rk-postable tbody td:nth-child(5), .rk-site .rk-postable tbody td:nth-child(6) { white-space: nowrap; }
  .rk-site .rk-postable tbody td:nth-child(7) { justify-content: flex-start !important; }
  .rk-site .rk-postable tbody tr { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) !important; }
}
@media (max-width: 640px) {
  /* Carte de position v3 : [identité] / [valorisation · plus-value] / [quantité · PRU · cours · poids] */
  .rk-site .rk-postable tbody tr { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .rk-site .rk-postable tbody td:nth-child(1) { grid-area: 1 / 1 / 2 / 5 !important; }
  .rk-site .rk-postable tbody td:nth-child(5) { grid-area: 2 / 1 / 3 / 3 !important; align-items: flex-start !important; margin-top: 10px; font-size: 18px; letter-spacing: -.01em; }
  .rk-site .rk-postable tbody td:nth-child(6) { grid-area: 2 / 3 / 3 / 5 !important; align-items: flex-end !important; justify-content: flex-end !important; margin-top: 10px; }
  .rk-site .rk-postable .rk-asset-name { -webkit-line-clamp: 1; }
}
@media (max-width: 640px) {
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(4) { grid-area: 2 / 1 / 3 / 3 !important; align-items: flex-start !important; margin-top: 10px; font-size: 18px; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(5) { grid-area: 2 / 3 / 3 / 5 !important; align-items: flex-end !important; margin-top: 10px; white-space: nowrap; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(5) .rk-pv { flex-direction: row; align-items: baseline; gap: 6px; }
  .rk-site :is(#av-pos-table, #exotiques-positions-wrap) .rk-postable tbody td:nth-child(6) { font-size: 13px; }
}

/* Sankey plein écran (mobile) */
.rk-sankey-fs-btn { display: none; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 14px;
  border: 1px solid var(--rk-line-strong); border-radius: var(--rk-r-md); background: var(--rk-surface-2, transparent); color: var(--rk-text);
  font: 500 13px/1 var(--rk-font, inherit); cursor: pointer; }
.rk-sankey-fs { position: fixed; inset: 0; z-index: 10000; background: var(--rk-bg); display: flex; flex-direction: column; }
.rk-sankey-fs-in { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.rk-sankey-fs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-weight: 600; font-size: 15px; color: var(--rk-text); }
.rk-sankey-fs-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rk-line-strong); background: transparent; color: var(--rk-text); font-size: 20px; line-height: 1; cursor: pointer; }
.rk-sankey-fs-c { position: relative; flex: 1; min-height: 0; }

/* En-tête public (pages SEO / simulateurs) : boutons de connexion toujours visibles sur mobile */
@media (max-width: 520px) {
  .rk-site > nav .nav-share-btn { padding: 0 9px !important; font-size: 12px !important; letter-spacing: 0 !important; min-width: 0 !important; flex-shrink: 0; margin-left: 4px !important; }
  .rk-site > nav .nav-brand { flex-shrink: 0; }
  .rk-site > nav .rk-theme-seg { margin-left: 6px !important; }
  .rk-site > nav .rk-theme-seg button[aria-pressed="true"] { display: none; } /* un seul bouton : bascule vers l'autre thème */
}
@media (max-width: 400px) { .rk-site > nav .nav-share-btn { padding: 0 7px !important; font-size: 11.5px !important; } .rk-site > nav .rk-theme-seg { margin-left: 2px !important; } .rk-site > nav .rk-theme-seg button { width: 26px !important; } }
@media (max-width: 430px) {
  .rk-site > nav .nav-share-btn[onclick*="signup"] { font-size: 0 !important; }
  .rk-site > nav .nav-share-btn[onclick*="signup"]::after { content: "S'inscrire"; font-size: 12px; }
  .rk-site > nav #nav-auth-btn[data-guest-mode="login"] { font-size: 0 !important; }
  .rk-site > nav #nav-auth-btn[data-guest-mode="login"]::after { content: "Connexion"; font-size: 12px; }
}

/* Composition (donut + liste) — Métaux, Biens exotiques */
.rk-compo { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; }
.rk-compo-donut { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.rk-compo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.rk-compo-center small { font-size: 11.5px; color: var(--rk-muted); }
.rk-compo-center b { font: 600 20px/1.2 var(--rk-font); color: var(--rk-text); font-variant-numeric: tabular-nums; margin: 2px 0; }
.rk-compo-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rk-compo-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 58px; grid-template-rows: auto 4px; column-gap: 10px; row-gap: 6px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rk-line); }
.rk-compo-row:last-child { border-bottom: 0; }
.rk-compo-dot { width: 10px; height: 10px; border-radius: 3px; }
.rk-compo-name { font-size: 13.5px; color: var(--rk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-compo-val { font-size: 13px; color: var(--rk-text); font-variant-numeric: tabular-nums; font-weight: 500; }
.rk-compo-pc { font-size: 12.5px; color: var(--rk-muted); text-align: right; font-variant-numeric: tabular-nums; }
.rk-compo-bar { grid-column: 2 / -1; height: 4px; border-radius: 4px; background: var(--rk-surface-3, rgba(127,127,127,.15)); overflow: hidden; }
.rk-compo-bar i { display: block; height: 100%; border-radius: 4px; }
@media (max-width: 640px) { .rk-compo { grid-template-columns: minmax(0, 1fr); gap: 16px; } .rk-compo-donut { width: 190px; height: 190px; } }

/* Mobile : les bascules (%/€, vue) passent à droite quand elles tombent sous le titre */
@media (max-width: 760px) {
  .rk-site .chart-card div:has(> .view-toggle):not(.view-toggle) { margin-left: auto; justify-content: flex-end; }
  .rk-site .chart-card :not(div:has(> .view-toggle)) > .view-toggle:only-of-type { margin-left: auto; }
}

/* Fiche fiscale repliable (fermée par défaut) */
.rk-site .chart-card.rk-fold:not(.is-open) > :not(.rk-fold-head) { display: none !important; }
.rk-site .chart-card.rk-fold > .rk-fold-head { cursor: pointer; margin-bottom: 0 !important; gap: 12px; user-select: none; }
.rk-site .chart-card.rk-fold.is-open > .rk-fold-head { margin-bottom: 1rem !important; }
.rk-site .rk-fold-head:focus-visible { outline: none; box-shadow: var(--rk-focus); border-radius: var(--rk-r-sm); }
.rk-fold-chev { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--rk-line-strong); display: inline-flex; align-items: center; justify-content: center; margin-left: auto; transition: transform var(--rk-dur, .2s); }
.rk-fold-chev::before { content: ""; width: 7px; height: 7px; border-right: 1.75px solid var(--rk-muted); border-bottom: 1.75px solid var(--rk-muted); transform: translateY(-2px) rotate(45deg); }
.rk-fold.is-open .rk-fold-chev { transform: rotate(180deg); }
/* 18.3 Revenus passifs (Analyse) */
.rk-pkpis { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.rk-site .rk-pkpi { margin-bottom: 0; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.rk-pkpi--main { background: radial-gradient(420px 180px at 0% 0%, color-mix(in srgb, var(--rk-brand) 16%, transparent), transparent 70%), var(--rk-surface) !important; }
.rk-pkpi-lbl { font-size: 12.5px; color: var(--rk-muted); }
.rk-pkpi-val { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--rk-text); }
.rk-pkpi--main .rk-pkpi-val { font-size: 2rem; color: var(--rk-pos); }
.rk-pkpi-sub { font-size: 12px; color: var(--rk-muted); }
.rk-site .rk-pchart { margin-bottom: 16px; }
.rk-pchart-head, .rk-ptable-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rk-pchart-head h3, .rk-ptable-head h3 { margin: 0 !important; }
.rk-pchart-head .rk-clegend { margin: 0; }
.rk-pchart-box { position: relative; height: 240px; }
.rk-site .rk-ptable { padding: 0; overflow: hidden; }
.rk-ptable-head { padding: 18px 20px 6px; margin: 0; }
.rk-ptable-head .rk-muted { font-size: 12.5px; }
.rk-mdots { display: inline-grid; grid-template-columns: repeat(12, 18px); gap: 3px; }
.rk-mdots i { height: 18px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 500;
  background: var(--rk-inset); color: var(--rk-faint); border: 1px solid var(--rk-line); }
.rk-mdots i.on { background: var(--rk-brand-soft); color: var(--rk-brand); border-color: color-mix(in srgb, var(--rk-brand) 40%, transparent); }
.rk-ptable-empty { padding: 40px 16px !important; text-align: center; }
.rk-ptable-empty-title { font-size: 15px; font-weight: 600; color: var(--rk-text); margin-bottom: 8px; }
.rk-ptable-empty-text { font-size: 13px; color: var(--rk-muted); margin-bottom: 16px; }
@media (max-width: 960px) { .rk-pkpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .rk-pkpis { grid-template-columns: 1fr; } .rk-mdots { grid-template-columns: repeat(12, 1fr); } }
/* 18.3b Revenus passifs — mobile (2026-09-26) : fiche compacte 3 lignes, tuiles en grille de 2 */
.rk-ptd-meta { display: none; }
@media (max-width: 640px) {
  .rk-ptable .rk-table--cards tr { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 16px; align-items: start; }
  .rk-ptable .rk-table--cards td:first-child { grid-column: 1; margin-bottom: 0; min-width: 0; }
  .rk-site .rk-ptable .rk-table--cards td { padding: 0; border: 0; }  /* annule le padding des cellules de tableau */
  .rk-ptable .rk-asset { gap: 10px; min-width: 0; }
  .rk-ptable .rk-asset-logo { width: 32px; height: 32px; font-size: 11px; }
  .rk-ptd-id { min-width: 0; }
  .rk-ptable .rk-asset-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rk-ptd-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12.5px; color: var(--rk-muted); font-variant-numeric: tabular-nums; }
  .rk-ptd-meta .rk-badge { font-size: 11px; padding: 1px 7px; }
  .rk-ptable .rk-table--cards td.rk-ptd-total { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  .rk-ptable .rk-table--cards td.rk-ptd-total b { font-size: 15px; }
  .rk-ptable .rk-table--cards td.rk-ptd-total::before { content: none; }
  .rk-ptable .rk-table--cards td.rk-ptd-total::after { content: "par an"; display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--rk-muted); }
  .rk-ptable .rk-table--cards td.rk-ptd-mois { grid-column: 1 / -1; }
  .rk-ptable .rk-table--cards td.rk-ptd-mois::before { content: none; }
  .rk-ptd-mois .rk-mdots { display: grid; width: 100%; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
  .rk-ptd-mois .rk-mdots i { height: 22px; font-size: 10px; }
}
@media (max-width: 560px) {
  .rk-passifs .rk-pkpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rk-passifs .rk-pkpi--main, .rk-passifs .rk-pkpi:nth-child(3) { grid-column: 1 / -1; }
  .rk-passifs .rk-pkpi:nth-child(3) { order: 1; }  /* « Reçu » + progression sous les deux petites tuiles */
  .rk-site .rk-passifs .rk-pkpi { padding: 14px 16px; gap: 6px; }
  .rk-passifs .rk-pkpi-val { font-size: 1.2rem; }
  .rk-passifs .rk-pkpi--main .rk-pkpi-val { font-size: 1.75rem; }
  .rk-passifs .rk-pkpi-lbl, .rk-passifs .rk-pkpi-sub { font-size: 12px; }
  .rk-passifs .rk-pchart-box { height: 200px; }
}

/* 18.4 Diversification sectorielle et exposition géographique (Analyse) */
.rk-alloc-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.rk-alloc-toolbar .rk-sel-btn { width: auto; min-width: 220px; }
.rk-pkpi-val--txt { font-size: 1.15rem !important; line-height: 1.25; }
.rk-pkpi-unit { font-size: 13px; font-weight: 400; color: var(--rk-muted); }
.rk-alloc-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; margin-bottom: 12px; }
.rk-site .rk-alloc-card, .rk-site .rk-conc { margin-bottom: 0; }
.rk-alloc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.rk-alloc-head h3, .rk-conc h3 { margin: 0 !important; }
.rk-alloc-total { font-size: 12.5px; color: var(--rk-muted); }
.rk-alloc-total b { color: var(--rk-text); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rk-alloc--lg { height: 12px; margin-bottom: 16px; }
.rk-alloc-legend:empty { display: none; }
.rk-alloc-list { display: grid; gap: 2px; }
.rk-alloc-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(60px, 120px) auto 52px 16px; align-items: center; gap: 10px; width: 100%;
  padding: 10px 8px; border: 0; border-radius: var(--rk-r-sm); background: none; color: var(--rk-text); font: 400 13.5px/1.2 var(--rk-font); text-align: left; cursor: pointer; }
.rk-alloc-row:hover, .rk-alloc-row[aria-expanded="true"] { background: var(--rk-surface-3); }
.rk-alloc-row:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-alloc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rk-alloc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-alloc-track { height: 6px; border-radius: 6px; background: var(--rk-inset); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rk-line); }
.rk-alloc-track > span { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width .5s var(--rk-ease); }
.rk-alloc-track--sm { height: 4px; width: 60px; }
.rk-alloc-amt { font-size: 12.5px; color: var(--rk-muted); font-variant-numeric: tabular-nums; text-align: right; }
.rk-alloc-pct { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.rk-alloc-chev { width: 14px; height: 14px; color: var(--rk-muted); transition: transform var(--rk-dur); }
.rk-alloc-row[aria-expanded="true"] .rk-alloc-chev { transform: rotate(90deg); color: var(--rk-text); }
.rk-alloc-item.is-muted .rk-alloc-name, .rk-alloc-item.is-muted .rk-alloc-pct { color: var(--rk-muted); }
.rk-alloc-item.is-muted .rk-alloc-dot, .rk-alloc-item.is-muted .rk-alloc-track > span { opacity: .45; }
.rk-alloc-panel-in { margin: 2px 8px 8px 28px; padding: 4px 0; border-left: 2px solid color-mix(in srgb, var(--c) 45%, transparent); }
.rk-alloc-pos { display: grid; grid-template-columns: minmax(0, 1fr) 60px auto; align-items: center; gap: 12px; padding: 8px 12px; }
.rk-alloc-pos + .rk-alloc-pos { border-top: 1px solid var(--rk-line); }
.rk-alloc-pos-id { min-width: 0; }
.rk-alloc-pos-id b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-alloc-pos-id small, .rk-alloc-pos-val small { font-size: 11.5px; color: var(--rk-muted); }
.rk-alloc-pos-id small { font-family: var(--rk-font-mono); }
.rk-alloc-pos-val { text-align: right; }
.rk-alloc-pos-val b { display: block; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.rk-alloc-pos-empty { padding: 10px 12px; font-size: 12.5px; color: var(--rk-muted); }
/* Carte Concentration : score + jauge + indice HHI */
.rk-conc { display: flex; flex-direction: column; gap: 14px; }
.rk-conc-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rk-conc-score > span:first-child { font-size: 2rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rk-conc-score small { font-size: 14px; font-weight: 400; color: var(--rk-muted); }
.rk-conc-label { font-size: 13px; color: var(--rk-text-2); }
.rk-gauge { position: relative; padding: 7px 0; }
.rk-gauge-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--rk-neg) 0%, var(--rk-warn) 35%, var(--rk-pos) 70%, var(--rk-pos) 100%); opacity: .85; }
.rk-gauge-cursor { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--rk-text); border: 3px solid var(--rk-surface); box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: left .5s var(--rk-ease); }
.rk-gauge-scale, .rk-conc-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--rk-muted); }
.rk-conc-hhi { padding-top: 14px; border-top: 1px solid var(--rk-line); display: flex; flex-direction: column; gap: 8px; }
.rk-conc-hhi-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rk-muted); }
.rk-conc-hhi-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.rk-conc-hhi-val b { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-conc-hhi-val span { font-size: 12.5px; color: var(--rk-muted); }
.rk-conc-bar > span.is-ok { background: var(--rk-pos); }
.rk-conc-bar > span.is-warn { background: var(--rk-warn); }
.rk-conc-bar > span.is-err { background: var(--rk-neg); }
.rk-conc-desc { margin: 0; font-size: 13px; color: var(--rk-text-2); }
.rk-badge--lvl-ok { background: var(--rk-pos-soft); color: var(--rk-pos); border-color: transparent; }
.rk-badge--lvl-warn { background: var(--rk-warn-soft); color: var(--rk-warn); border-color: transparent; }
.rk-badge--lvl-err { background: var(--rk-neg-soft); color: var(--rk-neg); border-color: transparent; }
/* 18.5 Exposition géographique : pastille code pays, carte, infobulle, zones */
.rk-alloc-list--flags .rk-alloc-row { grid-template-columns: 28px minmax(0, 1fr) minmax(60px, 120px) auto 52px 16px; }
.rk-geo-code { width: 28px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 600 10.5px/1 var(--rk-font-mono); letter-spacing: .03em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.rk-geo-code .rk-ico { font-size: 12px; }
.rk-geo-map-card { display: flex; flex-direction: column; }
.rk-geo-map { position: relative; width: 100%; flex: 1; min-height: 200px; display: flex; align-items: center; border-radius: var(--rk-r-md); background: var(--rk-inset); overflow: hidden; }
.rk-geo-svg { width: 100%; height: auto; display: block; cursor: grab; }
.rk-geo-svg:active { cursor: grabbing; }
.rk-geo-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--rk-muted); }
.rk-geo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rk-geo-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rk-geo-tip { position: absolute; z-index: 10; display: none; pointer-events: none; padding: 8px 11px; border-radius: var(--rk-r-sm); white-space: nowrap;
  background: var(--rk-surface-3); border: 1px solid var(--rk-line-strong); box-shadow: var(--rk-shadow-2); font-size: 12.5px; color: var(--rk-text); }
.rk-geo-tip b { font-weight: 600; }
.rk-geo-tip small { display: block; margin-top: 2px; font-size: 12px; color: var(--rk-muted); font-variant-numeric: tabular-nums; }
.rk-geo-reset { position: absolute; top: 8px; right: 8px; z-index: 5; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--rk-line-strong); background: var(--rk-surface-3); color: var(--rk-text-2); }
.rk-geo-reset:hover { color: var(--rk-text); }
.rk-geo-reset:focus-visible { outline: none; box-shadow: var(--rk-focus); }
.rk-geo-reset svg { width: 15px; height: 15px; }
.rk-geo-nomap { min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; font-size: 13px; color: var(--rk-muted); }
.rk-geo-nomap .rk-ico { font-size: 22px; opacity: .7; }
.rk-geo-nomap b { color: var(--rk-text); font-weight: 600; }
.rk-zone-list { display: grid; gap: 2px; }
@media (hover: none) { .rk-geo-hint { display: none; } }
.rk-zone-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(40px, 110px) 52px; align-items: center; gap: 10px; padding: 9px 8px; font-size: 13.5px; }
@media (max-width: 560px) { .rk-alloc-list--flags .rk-alloc-row { grid-template-columns: 28px minmax(0, 1fr) auto 16px; } }
@media (max-width: 960px) { .rk-alloc-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .rk-alloc-row { grid-template-columns: 10px minmax(0, 1fr) auto 16px; }
  .rk-alloc-row .rk-alloc-track, .rk-alloc-row .rk-alloc-amt { display: none; }
  .rk-alloc-pos { grid-template-columns: minmax(0, 1fr) auto; }
  .rk-alloc-pos .rk-alloc-track { display: none; }
}

/* 19.14 Cours périmé dans les tableaux de positions (2026-09-26) */
.rk-stale { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--rk-warn); cursor: help; }

/* 19.15 Admin : panneau « Anomalies de données » (2026-09-27) */
.rk-anom { margin: 12px 24px 4px; padding: 14px 16px; border-radius: var(--rk-r-md); border: 1px solid color-mix(in srgb, var(--rk-warn) 35%, transparent);
  background: color-mix(in srgb, var(--rk-warn) 7%, var(--rk-surface)); }
.rk-anom.is-ok { border-color: var(--rk-line); background: var(--rk-surface); }
.rk-anom-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.rk-anom-head .rk-muted { font-size: 12px; margin-left: auto; }
.rk-anom-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 20px; margin-top: 12px; max-height: 260px; overflow: auto; }
.rk-anom-sec h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--rk-text); }
.rk-anom-sec ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--rk-text-2); display: grid; gap: 3px; }
@media (max-width: 560px) { .rk-anom { margin: 10px 12px 4px; } }
