    /* ── THEME : TECH (défaut) ── */
    :root {
      --bg: #0a0c12;
      --surface: #10141f;
      --surface2: #161b2e;
      --surface3: #1c2236;
      --border: rgba(99,179,237,0.12);
      --accent: #3b82f6;
      --accent2: #06b6d4;
      --accent3: #8b5cf6;
      --text: #e2e8f0;
      --muted: #64748b;
      --glow: 0 0 18px rgba(59,130,246,0.25);
    }

    /* ── THEME : KAKI ── */
    [data-theme="kaki"] {
      --bg: #100e08;
      --surface: #1a170f;
      --surface2: #231f13;
      --surface3: #2c271a;
      --border: rgba(210,180,100,0.2);
      --accent: #c8a84a;
      --accent2: #e8c86a;
      --accent3: #8c6e32;
      --text: #f0e8d0;
      --muted: #9a8a6a;
      --glow: 0 0 24px rgba(200,168,74,0.3);
    }
    [data-theme="kaki"] body {
      background-image:
        radial-gradient(ellipse 60% 40% at 70% 0%, rgba(200,168,74,0.09) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 10% 80%, rgba(140,110,50,0.07) 0%, transparent 50%);
    }
    [data-theme="kaki"] h1 {
      color: var(--accent2);
      text-shadow: 0 0 14px rgba(232,200,106,0.5), 0 0 40px rgba(200,168,74,0.2);
      letter-spacing: 0.16em;
    }
    [data-theme="kaki"] .card { background: rgba(26,23,15,0.8); }
    [data-theme="kaki"] .card:hover { border-color: var(--accent); }
    [data-theme="kaki"] .ia-widget { border-color: rgba(200,168,74,0.25); }
    [data-theme="kaki"] .btn-primary { background: linear-gradient(135deg, #c8a84a, #8c6e32); }
    [data-theme="kaki"] .time-display { color: var(--accent2); text-shadow: 0 0 16px rgba(232,200,106,0.5), 0 0 40px rgba(200,168,74,0.25); }
    [data-theme="kaki"] .header-date-sep { background: linear-gradient(90deg, transparent, var(--accent2), transparent); opacity: 0.4; }

    /* ── THEME : OCÉAN ── */
    [data-theme="ocean"] {
      --bg: #030d1a; --surface: #071828; --surface2: #0c2240; --surface3: #102a50;
      --border: rgba(0,180,255,0.14); --accent: #0099cc; --accent2: #00d4ff;
      --accent3: #00ffcc; --text: #d0eeff; --muted: #4a88aa;
      --glow: 0 0 20px rgba(0,212,255,0.28);
    }
    [data-theme="ocean"] body { background-image: radial-gradient(ellipse 60% 40% at 70% 0%, rgba(0,180,255,0.08) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 10% 80%, rgba(0,255,200,0.06) 0%, transparent 50%); }

    /* ── THEME : FORÊT ── */
    [data-theme="foret"] {
      --bg: #070f07; --surface: #0e1a0e; --surface2: #152415; --surface3: #1a2e1a;
      --border: rgba(80,160,80,0.16); --accent: #3a9a3a; --accent2: #5cbf5c;
      --accent3: #c8a840; --text: #d8eed8; --muted: #5a8a5a;
      --glow: 0 0 18px rgba(80,180,80,0.25);
    }
    [data-theme="foret"] body { background-image: radial-gradient(ellipse 60% 40% at 70% 0%, rgba(60,160,60,0.08) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 10% 80%, rgba(200,168,64,0.06) 0%, transparent 50%); }

    /* ── THEME : CRÉPUSCULE ── */
    [data-theme="sunset"] {
      --bg: #0f0810; --surface: #1c0f1e; --surface2: #28162a; --surface3: #321c36;
      --border: rgba(200,80,180,0.16); --accent: #c040a0; --accent2: #ff6b35;
      --accent3: #ffc107; --text: #f5e0f0; --muted: #906080;
      --glow: 0 0 22px rgba(200,64,160,0.3);
    }
    [data-theme="sunset"] body { background-image: radial-gradient(ellipse 60% 40% at 80% 0%, rgba(200,64,160,0.1) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 5% 90%, rgba(255,107,53,0.08) 0%, transparent 50%); }
    [data-theme="sunset"] .btn-primary { background: linear-gradient(135deg, #c040a0, #ff6b35); }

    /* ── THEME : GRAPHITE ── */
    [data-theme="graphite"] {
      --bg: #080808; --surface: #121212; --surface2: #1c1c1c; --surface3: #242424;
      --border: rgba(255,255,255,0.08); --accent: #9e9e9e; --accent2: #e0e0e0;
      --accent3: #616161; --text: #f5f5f5; --muted: #606060;
      --glow: 0 0 14px rgba(224,224,224,0.18);
    }
    [data-theme="graphite"] h1 { color: #e0e0e0; text-shadow: 0 0 8px rgba(224,224,224,0.3); }
    [data-theme="graphite"] .btn-primary { background: linear-gradient(135deg, #424242, #757575); }

    /* ── THEME : RUBIS ── */
    [data-theme="rubis"] {
      --bg: #0f0305; --surface: #1a050a; --surface2: #240810; --surface3: #2e0b15;
      --border: rgba(200,30,60,0.18); --accent: #c41e3a; --accent2: #ff4060;
      --accent3: #ff8090; --text: #fce8ec; --muted: #8a5060;
      --glow: 0 0 22px rgba(200,30,60,0.35);
    }
    [data-theme="rubis"] body { background-image: radial-gradient(ellipse 60% 40% at 70% 0%, rgba(200,30,60,0.1) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 10% 80%, rgba(255,64,96,0.06) 0%, transparent 50%); }
    [data-theme="rubis"] .btn-primary { background: linear-gradient(135deg, #c41e3a, #ff4060); }

    /* ── THEME : AURORE ── */
    [data-theme="aurore"] {
      --bg: #040a0a; --surface: #071414; --surface2: #0a1e1e; --surface3: #0d2828;
      --border: rgba(0,230,120,0.14); --accent: #00e676; --accent2: #7c4dff;
      --accent3: #40c4ff; --text: #e0f7f0; --muted: #4a8a80;
      --glow: 0 0 22px rgba(0,230,118,0.28);
    }
    [data-theme="aurore"] body { background-image: radial-gradient(ellipse 50% 40% at 80% 0%, rgba(124,77,255,0.1) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 10% 80%, rgba(0,230,118,0.08) 0%, transparent 50%), radial-gradient(ellipse 30% 20% at 50% 50%, rgba(64,196,255,0.05) 0%, transparent 60%); }
    [data-theme="aurore"] .btn-primary { background: linear-gradient(135deg, #00e676, #7c4dff); }
    [data-theme="aurore"] h1 { color: var(--accent); text-shadow: 0 0 12px rgba(0,230,118,0.4); }

    /* ── THEME : MAXIMALISTE ── */
    [data-theme="max"] {
      --bg: #0d0014;
      --surface: #18002a;
      --surface2: #210038;
      --surface3: #2a0048;
      --border: rgba(255,0,120,0.2);
      --accent: #ff0080;
      --accent2: #00f0d0;
      --accent3: #ffe000;
      --text: #ffffff;
      --muted: #b07cd8;
      --glow: 0 0 28px rgba(255,0,128,0.4);
    }
    [data-theme="max"] body {
      background-image:
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(255,0,128,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 5% 90%, rgba(0,240,208,0.1) 0%, transparent 50%),
        radial-gradient(ellipse 30% 30% at 50% 50%, rgba(255,224,0,0.04) 0%, transparent 60%);
    }
    [data-theme="max"] .card:hover,
    [data-theme="max"] .ia-widget { border-color: rgba(255,0,128,0.35); }
    [data-theme="max"] .ia-tab.active { color: var(--accent2); border-bottom-color: var(--accent2); }
    [data-theme="max"] .btn-primary { background: linear-gradient(135deg, #ff0080, #ffe000); }
    [data-theme="max"] .logo-badge img { filter: drop-shadow(0 0 6px rgba(255,0,128,0.6)); }
    [data-theme="max"] .weather-wrap { border-color: rgba(0,240,208,0.2); }
    [data-theme="max"] .time-display { color: var(--accent2); }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    /* ── TRANSITIONS DE THÈME ── */
    body, .card, .ia-widget, .weather-wrap, .link-item, .market-card,
    .ia-panel, .ia-tab, .btn-ghost, .btn-primary, .btn-open-all,
    .lock-card, .theme-btn, header, .time-display, h1 {
      transition: background-color 0.35s ease, border-color 0.35s ease,
                  color 0.35s ease, box-shadow 0.35s ease;
    }

    /* ── SCROLLBAR CUSTOM ── */
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      min-height: 100vh;
      padding: 28px 32px 48px;
      background-image:
        radial-gradient(ellipse 60% 40% at 70% 0%, rgba(59,130,246,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 10% 80%, rgba(139,92,246,0.06) 0%, transparent 50%);
    }

    /* ─── HEADER ─── */
    header {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      margin-bottom: 20px;
      gap: 0;
    }

    .header-left  { display: flex; align-items: center; gap: 14px; }

    .logo-badge {
      width: 42px; height: 42px;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: var(--glow);
      flex-shrink: 0;
    }
    .logo-badge img {
      width: 100%; height: 100%; object-fit: cover;
    }

    h1 {
      font-family: 'Orbitron', monospace;
      font-size: 1.3rem; font-weight: 700; letter-spacing: 0.12em;
      color: var(--accent2);
      text-shadow: 0 0 10px var(--accent2), 0 0 25px rgba(6,182,212,0.3);
    }

    .tagline { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

    .header-center {
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      text-align: center;
    }
    .header-date-main {
      font-family: 'Orbitron', monospace; font-size: 2rem; font-weight: 700;
      letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent2);
      text-shadow: 0 0 16px var(--accent2), 0 0 40px rgba(6,182,212,0.25);
      font-variant-numeric: tabular-nums; line-height: 1;
    }
    .header-date-sub {
      font-family: 'Orbitron', monospace; font-size: 0.75rem; font-weight: 400;
      letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent2);
      opacity: 0.6;
    }
    .header-right  { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

    .time-display {
      font-family: 'Orbitron', monospace;
      font-size: 2.6rem; font-weight: 700; letter-spacing: 0.08em;
      color: var(--accent2);
      text-shadow: 0 0 16px var(--accent2), 0 0 40px rgba(6,182,212,0.25);
      font-variant-numeric: tabular-nums; line-height: 1;
      animation: clock-glow 3s ease-in-out infinite;
    }
    .time-display .sec {
      font-size: 1.3rem; font-weight: 400; opacity: 0.5;
      vertical-align: baseline; letter-spacing: 0.06em;
    }
    .time-display .colon {
      opacity: 1; animation: colon-pulse 1s step-end infinite; margin: 0 2px;
    }
    .header-date-sep {
      width: 100%; height: 1px;
      background: linear-gradient(90deg, transparent, var(--accent2), transparent);
      opacity: 0.3; margin: 4px 0;
    }
    .date-display {
      font-size: 0.7rem; color: var(--muted); letter-spacing: 0.12em;
      font-family: 'Orbitron', monospace; font-weight: 400;
      text-transform: uppercase;
    }
    @keyframes colon-pulse {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0.2; }
    }
    @keyframes clock-glow {
      0%, 100% { text-shadow: 0 0 12px var(--accent2), 0 0 30px rgba(6,182,212,0.3); }
      50%       { text-shadow: 0 0 18px var(--accent2), 0 0 50px rgba(6,182,212,0.5); }
    }
    [data-theme="kaki"] .time-display { color: var(--accent2); text-shadow: 0 0 12px var(--accent2), 0 0 30px rgba(107,140,82,0.3); }
    [data-theme="max"]  .time-display { color: var(--accent2); text-shadow: 0 0 14px var(--accent2), 0 0 40px rgba(0,240,208,0.5); }

    .date-display { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; font-family: 'Orbitron', monospace; font-weight: 400; }

    /* ─── WEATHER ─── */
    /* ─── MÉTÉO ─── */
    .weather-wrap {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 14px; margin-bottom: 20px; overflow: hidden;
      cursor: pointer;
    }
    .weather-bar {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 18px; flex-wrap: wrap; user-select: none;
    }
    .weather-chevron {
      margin-left: auto; color: var(--muted); font-size: 0.8rem;
      transition: transform 0.25s; flex-shrink: 0;
    }
    .weather-wrap.open .weather-chevron { transform: rotate(180deg); }

    .weather-icon { font-size: 1.6rem; line-height: 1; }
    .weather-temp { font-size: 1.4rem; font-weight: 300; color: #e2e8f0; font-variant-numeric: tabular-nums; }
    .weather-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
    .weather-details { display: flex; flex-direction: column; gap: 2px; }
    .weather-desc { font-size: 0.82rem; color: var(--text); font-weight: 500; }
    .weather-sub { font-size: 0.72rem; color: var(--muted); }
    .weather-extras { display: flex; gap: 16px; }
    .weather-extra-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
    .weather-extra-val { font-size: 0.85rem; font-weight: 500; color: var(--text); }
    .weather-extra-lbl { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
    .weather-loading { font-size: 0.82rem; color: var(--muted); }

    .weather-detail-panel {
      display: none; border-top: 1px solid var(--border); padding: 16px 18px;
    }
    .weather-wrap.open .weather-detail-panel { display: block; }

    .forecast-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px;
      margin-bottom: 16px;
    }
    .forecast-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 8px; text-align: center;
      display: flex; flex-direction: column; gap: 4px; align-items: center;
      cursor: pointer; transition: border-color 0.15s, background 0.15s;
    }
    .forecast-card:hover { border-color: var(--accent2); background: rgba(6,182,212,0.08); }
    .forecast-card.selected { border-color: var(--accent2); background: rgba(6,182,212,0.12); }

    /* Carte horaire */
    .hourly-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 9px; padding: 8px 10px; text-align: center;
      display: flex; flex-direction: column; gap: 3px; align-items: center;
      min-width: 52px; flex-shrink: 0;
    }
    .hourly-time { font-size: 0.62rem; color: var(--muted); font-weight: 600; }
    .hourly-icon { font-size: 1.1rem; line-height: 1; }
    .hourly-temp { font-size: 0.82rem; font-weight: 600; color: var(--text); }
    .hourly-rain { font-size: 0.6rem; color: #60a5fa; }
    .hourly-wind { font-size: 0.58rem; color: var(--muted); }
    .fc-day  { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
    .fc-icon { font-size: 1.4rem; line-height: 1; }
    .fc-max  { font-size: 0.9rem; font-weight: 600; color: var(--text); }
    .fc-min  { font-size: 0.72rem; color: var(--muted); }
    .fc-rain { font-size: 0.65rem; color: #60a5fa; }

    .weather-stats {
      display: flex; flex-wrap: wrap; gap: 10px;
    }
    .weather-stat {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 9px; padding: 9px 14px;
      display: flex; flex-direction: column; gap: 3px; min-width: 90px;
    }
    .ws-label { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
    .ws-val   { font-size: 0.9rem; font-weight: 600; color: var(--text); }

    /* ─── IA WIDGET ─── */
    .ia-widget {
      background: rgba(16,20,31,0.72);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(139,92,246,0.25);
      border-radius: 16px;
      margin-bottom: 20px;
      overflow: hidden;
    }

    /* ── DOTS ANIMÉS ── */
    @keyframes livePulse {
      0%,100% { box-shadow: 0 0 0 0 currentColor; opacity:1; }
      50%      { box-shadow: 0 0 0 4px transparent; opacity:0.7; }
    }
    span[id$="StatusDot"][style*="#34d399"] { animation: livePulse 2s infinite; color: #34d399; }

    /* ── SPARKLINE ── */
    .market-sparkline { margin-top: 4px; opacity: 0.75; }

    /* ── HORLOGE COCKPIT ── */
    .time-display {
      font-family: 'Orbitron', monospace;
      font-size: 2.2rem; font-weight: 400; letter-spacing: 0.06em;
      color: var(--accent2); font-variant-numeric: tabular-nums; line-height: 1;
      text-shadow: 0 0 12px var(--accent2), 0 0 30px rgba(6,182,212,0.25);
    }
    .time-display .sec {
      font-size: 1.2rem; opacity: 0.6; vertical-align: baseline;
    }
    .time-display .colon {
      animation: blinkColon 1s step-start infinite;
    }
    @keyframes blinkColon { 50% { opacity:0; } }

    .ia-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
      scrollbar-width: none;
      cursor: pointer;
    }
    .ia-tabs::-webkit-scrollbar { display: none; }

    .ia-tab {
      display: flex; flex-direction: column; align-items: center; gap: 5px;
      padding: 12px 16px;
      color: var(--muted); cursor: pointer; border: none; background: none;
      border-bottom: 2px solid transparent;
      transition: all 0.18s; white-space: nowrap; flex-shrink: 0;
    }
    .ia-tab svg { width: 17px; height: 17px; stroke: currentColor; fill: none; transition: color 0.18s; }
    .ia-tab span { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
    .ia-tab:hover { color: var(--text); }
    .ia-tab.active { color: var(--accent3); border-bottom-color: var(--accent3); }

    .ia-panel { display: none; padding: 20px; }
    .ia-panel.active { display: block; }

    /* ─── RANGE BUTTONS ─── */
    .range-btn {
      padding: 3px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 600;
      border: 1px solid var(--border); background: var(--surface2);
      color: var(--muted); cursor: pointer; transition: all 0.15s; font-family: inherit;
    }
    .range-btn:hover { border-color: rgba(59,130,246,0.4); color: var(--text); }
    .range-btn.active { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.5); color: #93c5fd; }

    /* ─── TICKER BUTTONS ─── */
    .ticker-grid { display:flex; flex-wrap:wrap; gap:6px; }
    .ticker-btn {
      padding: 5px 11px; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
      border: 1px solid var(--border); background: var(--surface2);
      color: var(--muted); cursor: pointer; transition: all 0.15s; font-family: inherit;
    }
    .ticker-btn:hover { border-color: rgba(59,130,246,0.4); color: var(--text); }
    .ticker-btn.active {
      background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.5);
      color: #93c5fd;
    }

    /* ─── MARCHÉS ─── */
    .market-section-title {
      font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--muted); margin-bottom: 8px; margin-top: 16px;
    }
    .market-section-title:first-child { margin-top: 0; }

    .market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 4px; }

    /* ── CARTE HÉRO (première de chaque section) ── */
    .market-grid .market-card:first-child {
      grid-column: 1 / -1;
      flex-direction: row; align-items: center; gap: 14px;
      padding: 14px 16px;
      border-color: var(--accent); background: rgba(59,130,246,0.07);
    }
    .market-grid .market-card:first-child.card-up  { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.08); }
    .market-grid .market-card:first-child.card-down { border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.07); }
    .market-grid .market-card:first-child .market-name  { font-size: 0.8rem; font-weight: 600; color: var(--text); min-width: 54px; }
    .market-grid .market-card:first-child .market-price { font-size: 1.4rem; font-weight: 700; flex: 1; }
    .market-grid .market-card:first-child .market-change { font-size: 0.9rem; }
    .market-grid .market-card:first-child .market-sparkline { margin: 0; }

    .market-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 12px;
      display: flex; flex-direction: column; gap: 4px;
      cursor: pointer; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
      position: relative; overflow: hidden;
    }
    .market-card::before {
      content: ''; position: absolute; inset: 0; opacity: 0;
      transition: opacity 0.3s;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      z-index: 0;
    }
    .market-card:hover { border-color: var(--accent); box-shadow: var(--glow); }
    .market-card > * { position: relative; z-index: 1; }
    .market-card.card-up   { border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.06); }
    .market-card.card-down { border-color: rgba(248,113,113,0.2);  background: rgba(248,113,113,0.05); }
    .market-card.card-up:hover   { box-shadow: 0 0 14px rgba(52,211,153,0.25); }
    .market-card.card-down:hover { box-shadow: 0 0 14px rgba(248,113,113,0.2); }

    .market-name { font-size: 0.72rem; color: var(--muted); }
    .market-price { font-size: 1rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
    .market-change { font-size: 0.78rem; font-weight: 500; }
    .market-change.up { color: #34d399; }
    .market-change.down { color: #f87171; }

    .market-tickers-input {
      display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap;
    }

    /* ─── HYPOTHÈQUE ─── */
    .calc-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px; margin-bottom: 16px;
    }

    .calc-field label {
      display: block; font-size: 0.68rem; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px;
    }

    .calc-field input, .calc-field select {
      width: 100%; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; padding: 8px 10px; color: var(--text);
      font-size: 0.88rem; outline: none; font-family: inherit;
    }
    .calc-field input:focus, .calc-field select:focus { border-color: var(--accent); }
    .calc-field select option { background: #1c2236; }

    .calc-results {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 10px; margin-top: 12px;
    }

    .calc-result-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 14px;
    }
    .calc-result-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
    .calc-result-val { font-size: 1.1rem; font-weight: 600; color: var(--accent2); font-variant-numeric: tabular-nums; }
    .calc-result-sub { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

    .cmhc-warning {
      margin-top: 10px; padding: 8px 12px;
      background: rgba(251,146,60,0.1); border: 1px solid rgba(251,146,60,0.25);
      border-radius: 8px; font-size: 0.78rem; color: #fdba74;
    }

    /* ─── NOTES ─── */
    .notes-area {
      width: 100%; height: 220px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: 10px;
      padding: 12px 14px; color: var(--text); font-size: 0.88rem;
      font-family: inherit; resize: none; outline: none; line-height: 1.6;
    }
    .notes-area:focus { border-color: rgba(99,179,237,0.3); }
    .notes-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
    .notes-hint { font-size: 0.7rem; color: var(--muted); }

    /* ─── CONVERTISSEUR ─── */
    .conv-tabs {
      display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
    }
    .conv-tab-btn {
      padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
      border: 1px solid var(--border); background: var(--surface2);
      color: var(--muted); cursor: pointer; transition: all 0.15s;
    }
    .conv-tab-btn.active { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); color: #60a5fa; }

    .conv-panel { display: none; }
    .conv-panel.active { display: block; }

    .conv-row {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    .conv-input {
      flex: 1; min-width: 100px;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; padding: 9px 12px; color: var(--text);
      font-size: 1rem; outline: none; font-variant-numeric: tabular-nums;
    }
    .conv-input:focus { border-color: var(--accent); }
    .conv-label { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
    .conv-result {
      flex: 1; min-width: 100px;
      background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.15);
      border-radius: 8px; padding: 9px 12px;
      font-size: 1rem; color: #93c5fd; font-variant-numeric: tabular-nums;
    }
    .conv-select {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; padding: 9px 10px; color: var(--text); font-size: 0.85rem;
      outline: none; cursor: pointer;
    }
    .conv-select option { background: #1c2236; }
    .conv-rate { font-size: 0.72rem; color: var(--muted); margin-top: 8px; }

    /* ─── RECHERCHE ─── */
    .search-input-wrap {
      display: flex; gap: 8px; margin-bottom: 14px;
    }
    .search-input {
      flex: 1; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 14px;
      color: var(--text); font-size: 0.95rem; outline: none; font-family: inherit;
    }
    .search-input:focus { border-color: var(--accent); }

    .search-targets { display: flex; flex-wrap: wrap; gap: 8px; }

    .search-target-btn {
      display: flex; align-items: center; gap: 7px;
      padding: 7px 13px; border-radius: 9px;
      border: 1px solid var(--border); background: var(--surface2);
      color: var(--text); font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
    }
    .search-target-btn:hover { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }
    .search-target-btn img { width: 16px; height: 16px; border-radius: 3px; }

    /* ─── SHARED BUTTONS ─── */
    .btn-primary {
      padding: 8px 16px; border-radius: 9px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      border: none; color: #fff; font-size: 0.82rem; font-weight: 600;
      cursor: pointer; transition: opacity 0.18s; white-space: nowrap;
    }
    .btn-primary:hover { opacity: 0.85; }
    .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

    .btn-ghost {
      padding: 7px 13px; border-radius: 8px;
      border: 1px solid var(--border); background: var(--surface2);
      color: var(--muted); font-size: 0.78rem; cursor: pointer; transition: all 0.15s;
    }
    .btn-ghost:hover { color: var(--text); border-color: rgba(99,179,237,0.3); }

    /* ─── LINK GRID ─── */
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
      gap: 20px;
    }

    .card {
      background: rgba(16,20,31,0.72);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border);
      border-radius: 16px; padding: 20px;
      transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
      animation: cardEnter 0.45s cubic-bezier(0.23,1,0.32,1) both;
    }
    .card:nth-child(1){animation-delay:.04s} .card:nth-child(2){animation-delay:.08s}
    .card:nth-child(3){animation-delay:.12s} .card:nth-child(4){animation-delay:.16s}
    .card:nth-child(5){animation-delay:.20s} .card:nth-child(6){animation-delay:.24s}
    .card:nth-child(7){animation-delay:.28s} .card:nth-child(8){animation-delay:.32s}
    .card:nth-child(9){animation-delay:.36s}
    @keyframes cardEnter {
      from { opacity:0; transform:translateY(14px) scale(0.98); }
      to   { opacity:1; transform:translateY(0)    scale(1); }
    }
    .card:hover {
      border-color: var(--accent);
      box-shadow: var(--glow), 0 0 0 1px var(--accent) inset;
      transform: translateY(-3px);
    }

    .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .card-header-left { display: flex; align-items: center; gap: 10px; }

    .card-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }

    .card-title { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

    .btn-open-all {
      display: flex; align-items: center; justify-content: center;
      width: 26px; height: 26px; border-radius: 7px;
      border: 1px solid rgba(99,179,237,0.2); background: rgba(59,130,246,0.08);
      color: #60a5fa; font-size: 1rem; cursor: pointer; transition: all 0.18s; flex-shrink: 0;
    }
    .btn-open-all:hover { background: rgba(59,130,246,0.2); border-color: rgba(99,179,237,0.5); color: #93c5fd; }

    .link-list { display: flex; flex-direction: column; gap: 5px; }

    .link-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 11px; border-radius: 10px; text-decoration: none;
      color: var(--text); background: var(--surface2); border: 1px solid transparent;
      transition: all 0.18s; font-size: 0.87rem; font-weight: 500;
    }
    .link-item:hover { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

    .link-favicon { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; object-fit: contain; background: var(--surface); }

    .blue   { background: rgba(59,130,246,0.15); }
    .cyan   { background: rgba(6,182,212,0.15); }
    .purple { background: rgba(139,92,246,0.15); }
    .green  { background: rgba(16,185,129,0.15); }
    .rose   { background: rgba(244,63,94,0.15); }
    .orange { background: rgba(249,115,22,0.15); }

    footer {
      margin-top: 40px; text-align: center;
      font-size: 11px; color: var(--muted); letter-spacing: 0.1em;
    }
    footer::before {
      content: ''; display: block; width: 120px; height: 1px; margin: 0 auto 14px;
      background: linear-gradient(90deg, transparent, var(--muted), transparent);
      opacity: 0.4;
    }

    /* ── LOCK SCREEN ── */
    #lockScreen {
      position: fixed; inset: 0; z-index: 9999;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      flex-direction: column;
      /* Vignette cinématique */
      background-image:
        radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(0,0,0,0.7) 100%),
        radial-gradient(ellipse 60% 40% at 70% 10%, rgba(59,130,246,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 20% 80%, rgba(139,92,246,0.05) 0%, transparent 50%);
    }
    .lock-card {
      background: rgba(16,20,31,0.85);
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border: 1px solid var(--border);
      border-radius: 20px; padding: 40px 36px; width: 100%; max-width: 360px;
      display: flex; flex-direction: column; align-items: center; gap: 20px;
      box-shadow: var(--glow), 0 24px 64px rgba(0,0,0,0.5);
      animation: lockIn 0.6s cubic-bezier(0.23,1,0.32,1) both;
    }
    @keyframes lockIn {
      from { opacity:0; transform:scale(0.92) translateY(16px); filter:blur(6px); }
      to   { opacity:1; transform:scale(1)    translateY(0);     filter:blur(0); }
    }
    .lock-logo {
      width: 96px; height: 96px; border-radius: 22px; overflow: hidden;
      box-shadow: var(--glow), 0 0 0 2px var(--accent), 0 16px 48px rgba(0,0,0,0.5);
      animation: glitchLogo 0.8s 0.3s cubic-bezier(0.23,1,0.32,1) both;
    }
    @keyframes glitchLogo {
      0%   { transform:scaleY(0.05) skewX(-8deg); filter:blur(6px) brightness(3); opacity:0; }
      40%  { transform:scaleY(1.06) skewX(2deg);  filter:blur(1px) brightness(1.4); opacity:1; }
      60%  { transform:scaleY(0.97) skewX(-1deg); }
      80%  { transform:scaleY(1.02); }
      100% { transform:scaleY(1) skewX(0); filter:blur(0) brightness(1); }
    }
    .lock-logo img { width: 100%; height: 100%; object-fit: cover; }
    .lock-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }
    .lock-sub   { font-size: 0.75rem; color: var(--muted); text-align: center; }

    .lock-input {
      width: 100%; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 11px 14px; color: var(--text);
      font-size: 1rem; outline: none; font-family: inherit; letter-spacing: 0.06em;
      text-align: center;
    }
    .lock-input:focus { border-color: var(--accent); }

    .lock-remember {
      display: flex; align-items: center; gap: 8px;
      font-size: 0.8rem; color: var(--muted); cursor: pointer; user-select: none;
    }
    .lock-remember input { accent-color: var(--accent); cursor: pointer; }

    .lock-error {
      font-size: 0.78rem; color: #f87171; min-height: 18px; text-align: center;
    }

    .lock-setup-hint {
      font-size: 0.72rem; color: var(--muted); text-align: center; line-height: 1.5;
    }

    /* Bouton verrou dans header */
    .btn-lock {
      background: rgba(6,182,212,0.06);
      border: 1px solid rgba(6,182,212,0.18);
      border-radius: 8px; color: var(--accent2);
      cursor: pointer; padding: 6px 8px;
      transition: all 0.2s; line-height: 1;
      display: flex; align-items: center; justify-content: center;
    }
    .btn-lock:hover {
      background: rgba(6,182,212,0.15);
      border-color: var(--accent2);
      box-shadow: 0 0 12px rgba(6,182,212,0.35);
    }
    .btn-lock svg { display: block; }

    /* ── THEME SWITCHER ── */
    .theme-switcher {
      display: flex; align-items: center; justify-content: center;
      gap: 8px; margin-top: 20px; flex-wrap: wrap;
    }
    .theme-switcher-label {
      font-size: 0.6rem; color: var(--muted); text-transform: uppercase;
      letter-spacing: 0.12em; margin-right: 6px;
    }
    .theme-btn {
      width: 28px; height: 28px; border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer; transition: all 0.2s;
      position: relative; padding: 0; background: none;
    }
    .theme-btn:hover { transform: scale(1.2); }
    .theme-btn.active {
      border-color: var(--text);
      box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
      transform: scale(1.15);
    }
    .theme-btn[title]::after {
      content: attr(title);
      position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
      background: var(--surface); border: 1px solid var(--border);
      color: var(--text); font-size: 0.65rem; padding: 3px 8px;
      border-radius: 6px; white-space: nowrap; pointer-events: none;
      opacity: 0; transition: opacity 0.15s; font-family: inherit;
    }
    .theme-btn:hover::after { opacity: 1; }
    .theme-swatch {
      width: 100%; height: 100%; border-radius: 50%; display: block;
    }

    /* ─── SPINNER ─── */
    /* ─── EMAILS ─── */
    .email-connect-wrap {
      display: flex; flex-direction: column; align-items: center; gap: 14px;
      padding: 24px 0; text-align: center;
    }
    .email-connect-wrap p { font-size: 0.82rem; color: var(--muted); max-width: 320px; line-height: 1.5; }

    .email-key-row {
      display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap;
    }
    .email-key-input {
      flex: 1; min-width: 200px; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; padding: 7px 12px; color: var(--text);
      font-size: 0.8rem; font-family: monospace; outline: none;
    }
    .email-key-input:focus { border-color: var(--accent3); }

    .email-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
    }
    .email-meta { font-size: 0.7rem; color: var(--muted); }

    .email-summary {
      background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.2);
      border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
      font-size: 0.84rem; color: var(--text); line-height: 1.6; white-space: pre-wrap;
    }
    .email-summary-label {
      font-size: 0.62rem; color: var(--accent3); text-transform: uppercase;
      letter-spacing: 0.1em; margin-bottom: 6px; font-weight: 600;
    }

    .email-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
    .email-list::-webkit-scrollbar { width: 3px; }
    .email-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

    .email-item {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 9px; padding: 9px 12px; cursor: default;
      transition: border-color 0.15s;
    }
    .email-item:hover { border-color: rgba(139,92,246,0.3); }
    .email-item.unread { border-left: 3px solid var(--accent3); }

    .email-from   { font-size: 0.75rem; color: var(--accent3); font-weight: 600; margin-bottom: 2px; }
    .email-subj   { font-size: 0.85rem; color: var(--text); font-weight: 500; margin-bottom: 3px; }
    .email-snip   { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }
    .email-date   { font-size: 0.68rem; color: var(--muted); float: right; margin-top: -18px; }

    .spinner {
      display: inline-block; width: 14px; height: 14px;
      border: 2px solid rgba(255,255,255,0.2);
      border-top-color: #fff; border-radius: 50%;
      animation: spin 0.6s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.3; }
    }

    /* ════════════════════════════════
       MOBILE — iPhone portrait ≤480px
    ════════════════════════════════ */
    @media (max-width: 480px) {

      body { padding: 14px 12px 36px; }

      /* Header : logo+clock sur 1 ligne, date en dessous */
      header {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 0;
      }
      .header-left  { grid-column: 1; grid-row: 1; }
      .header-right { grid-column: 2; grid-row: 1; gap: 6px; }
      .header-center {
        grid-column: 1 / -1; grid-row: 2;
        align-items: flex-start; text-align: left;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 6px;
      }

      /* Fontes réduites */
      h1               { font-size: 1rem; letter-spacing: 0.1em; }
      .tagline         { display: none; }
      .time-display    { font-size: 1.6rem; }
      .time-display .sec { font-size: 0.85rem; }
      .header-date-main { font-size: 1.1rem; }
      .header-date-sub  { font-size: 0.58rem; }
      .logo-badge       { width: 32px; height: 32px; border-radius: 8px; }

      /* Météo compacte */
      .weather-bar      { padding: 8px 12px; gap: 8px; }
      .weather-icon     { font-size: 1.2rem; }
      .weather-temp     { font-size: 1rem; }
      .weather-extras   { gap: 10px; }

      /* Onglets scrollables et plus compacts */
      .ia-tab           { padding: 10px 10px; }
      .ia-tab svg       { width: 15px; height: 15px; }
      .ia-tab span      { font-size: 0.5rem; letter-spacing: 0.05em; }
      .ia-panel         { padding: 14px; }

      /* Marchés : empile les colonnes */
      #panel-markets > div:first-child { flex-direction: column !important; }
      #panel-markets > div:last-child  { flex-direction: column !important; }

      /* Cartes marché */
      .market-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
      .market-grid .market-card:first-child .market-price { font-size: 1.1rem; }
      .market-grid .market-card:first-child { padding: 10px 12px; }

      /* Graphique : hauteur réduite */
      #miniChartWrap iframe { height: 180px !important; }

      /* Grille de liens : 1 colonne */
      .grid { grid-template-columns: 1fr; gap: 12px; }
      .card { padding: 14px; border-radius: 12px; }

      /* Convertisseur */
      .conv-row { flex-direction: column; }
      .conv-input, .conv-result { min-width: unset; width: 100%; }

      /* Calc hypothèque */
      .calc-grid    { grid-template-columns: 1fr 1fr; }
      .calc-results { grid-template-columns: 1fr 1fr; }

      /* Notes */
      .notes-area { height: 160px; }

      /* Recherche */
      .search-targets { gap: 6px; }
      .search-target-btn { font-size: 0.75rem; padding: 6px 10px; }

      /* Theme switcher */
      .theme-switcher { gap: 6px; }
      .theme-btn { width: 24px; height: 24px; }

      /* Footer */
      footer { font-size: 10px; }

      /* Lock screen */
      .lock-card { padding: 28px 20px; }
      .lock-logo { width: 72px; height: 72px; }
    }

    /* iPhone SE et très petits écrans */
    @media (max-width: 375px) {
      .time-display    { font-size: 1.3rem; }
      .header-date-main { font-size: 0.9rem; }
      .ia-tab span     { display: none; }
      .ia-tab          { padding: 10px 8px; }
    }

    /* ── SKELETON LOADERS ── */
    .skeleton {
      background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
      border-radius: 6px;
    }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .skeleton-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 12px;
      display: flex; flex-direction: column; gap: 6px;
    }
    .skeleton-line { height: 10px; }
    .skeleton-line.sm { width: 40%; }
    .skeleton-line.md { width: 65%; }
    .skeleton-line.lg { width: 80%; height: 18px; }

    .grid .card { cursor: grab; }
    .grid .card:active { cursor: grabbing; }

    /* ── MODE ÉDITION ── */
    .btn-edit-mode {
      background: none; border: 1px solid var(--border); border-radius: 8px;
      color: var(--muted); cursor: pointer; padding: 6px 8px;
      transition: all 0.2s; display: flex; align-items: center; gap: 5px;
      font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
    }
    .btn-edit-mode:hover, .btn-edit-mode.active {
      color: var(--accent2); border-color: var(--accent2);
      background: rgba(6,182,212,0.08);
    }
    .link-item-wrap { position: relative; display: flex; flex-direction: column; gap: 4px; }
    .link-edit-row {
      display: flex; align-items: center; gap: 4px; padding: 0 2px;
    }
    .link-move-select {
      flex: 1; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 6px; padding: 3px 6px; color: var(--muted);
      font-size: 0.68rem; outline: none; cursor: pointer;
    }
    .link-move-select:focus { border-color: var(--accent); }
    .btn-delete-link {
      background: none; border: none; color: var(--muted); cursor: pointer;
      font-size: 1rem; padding: 0 4px; transition: color 0.15s; line-height:1;
    }
    .btn-delete-link:hover { color: #f87171; }
    .btn-add-link {
      width: 100%; padding: 7px; border-radius: 9px; border: 1px dashed var(--border);
      background: none; color: var(--accent); cursor: pointer; font-size: 0.82rem;
      font-family: inherit; transition: all 0.15s; text-align: center; margin-top: 2px;
    }
    .btn-add-link:hover { background: rgba(59,130,246,0.08); border-color: var(--accent); }
    .btn-delete-cat {
      background: none; border: none; color: var(--muted); cursor: pointer;
      font-size: 0.9rem; padding: 3px 5px; transition: color 0.15s; line-height:1;
      border-radius: 5px;
    }
    .btn-delete-cat:hover { color: #f87171; background: rgba(248,113,113,0.1); }
    .card-add-new {
      border: 1px dashed var(--border) !important; background: transparent !important;
      display: flex; align-items: center; justify-content: center;
      min-height: 80px; cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
    }
    .card-add-new:hover { border-color: var(--accent) !important; background: rgba(59,130,246,0.05) !important; }
