/* ═══════════════════════════════════════════════════════════
   BidIQ — Dark Fintech Theme
   Indigo + Emerald + Red semantic · Linear/Vercel-inspired
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS — Primitives ─── */
:root {
    /* Slate surfaces (darkest → lightest) */
    --slate-950: #0B0F1A;
    --slate-900: #111827;
    --slate-850: #182031;
    --slate-800: #1F2937;
    --slate-750: #252F42;
    --slate-700: #374151;
    --slate-600: #4B5563;
    --slate-500: #6B7280;
    --slate-400: #9CA3AF;
    --slate-300: #D1D5DB;
    --slate-100: #F3F4F6;

    /* Indigo accent */
    --indigo-700: #4338CA;
    --indigo-600: #4F46E5;
    --indigo-500: #6366F1;
    --indigo-400: #818CF8;
    --indigo-300: #A5B4FC;
    --indigo-soft: rgba(99, 102, 241, 0.15);
    --indigo-soft-strong: rgba(99, 102, 241, 0.25);

    /* Emerald (success/go) */
    --emerald-500: #10B981;
    --emerald-400: #34D399;
    --emerald-300: #6EE7B7;
    --emerald-soft: rgba(16, 185, 129, 0.15);
    --emerald-soft-strong: rgba(16, 185, 129, 0.25);

    /* Red (urgent/danger) */
    --red-500: #EF4444;
    --red-400: #F87171;
    --red-300: #FCA5A5;
    --red-soft: rgba(239, 68, 68, 0.15);
    --red-soft-strong: rgba(239, 68, 68, 0.25);

    /* Amber (warning) */
    --amber-500: #F59E0B;
    --amber-400: #FBBF24;
    --amber-soft: rgba(245, 158, 11, 0.15);
    --amber-soft-strong: rgba(245, 158, 11, 0.25);

    /* Cyan (info/veille) */
    --cyan-500: #06B6D4;
    --cyan-400: #22D3EE;
    --cyan-soft: rgba(6, 182, 212, 0.15);
    --cyan-soft-strong: rgba(6, 182, 212, 0.25);

    /* ─── Tokens sémantiques (utilisés partout dans l'app) ─── */

    /* Backgrounds */
    --bg-page: var(--slate-900);
    --bg-surface: var(--slate-800);
    --bg-surface-hover: var(--slate-750);
    --bg-surface-inset: var(--slate-850);
    --bg-sidebar: var(--slate-850);
    --bg-navbar: var(--slate-950);

    /* Borders */
    --border-subtle: var(--slate-700);
    --border-default: var(--slate-600);
    --border-accent: var(--indigo-500);
    --border-accent-soft: rgba(99, 102, 241, 0.3);
    --border-success-soft: rgba(16, 185, 129, 0.3);
    --border-danger-soft: rgba(239, 68, 68, 0.3);
    --border-info-soft: rgba(6, 182, 212, 0.3);

    /* Text */
    --text-primary: var(--slate-100);
    --text-secondary: var(--slate-300);
    --text-tertiary: var(--slate-400);
    --text-muted: var(--slate-500);

    /* Semantic accents */
    --accent-primary: var(--indigo-500);
    --accent-success: var(--emerald-500);
    --accent-warning: var(--amber-500);
    --accent-danger: var(--red-500);
    --accent-info: var(--cyan-500);

    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Spacing */
    --sidebar-width: 240px;
    --navbar-height: 56px;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows — dark-aware */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-subtle);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--indigo-500);
    --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
    --shadow-focus: 0 0 0 3px var(--indigo-soft);

}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bg-page { background: var(--bg-page); }

/* ─── Selection + Scrollbars + Focus rings (dark-aware) ─── */
::selection { background: var(--indigo-soft-strong); color: var(--text-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--slate-900); }
::-webkit-scrollbar-thumb { background: var(--slate-700); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-600); }
* { scrollbar-color: var(--slate-700) var(--slate-900); }

*:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: 4px;
}

/* Tabular numbers pour chiffres financiers */
.stat-number,
.opp-pill-score,
.opp-score,
.detail-value-mono,
.meta-id,
.tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

/* ═══════════════════════════════════════════
   NAVBAR — Dark navy bar
   ═══════════════════════════════════════════ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--navbar-height);
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    height: 100%;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.navbar-brand-icon { display: none; }

.navbar-brand-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.navbar-brand-text .brand-highlight {
    color: var(--indigo-400);
    font-style: italic;
}

.navbar-brand-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--indigo-soft);
    color: var(--indigo-300);
    border: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-plan {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--emerald-soft);
    color: var(--emerald-400);
    border: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.navbar-user {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.navbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--indigo-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.navbar-divider {
    width: 1px;
    height: 22px;
    background: var(--border-subtle);
}

/* Live indicator (réutilisable hors navbar) */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--emerald-500);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */

.layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    flex-shrink: 0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 18px 14px 6px;
}
.sidebar-section-label + .sidebar-link { margin-top: 2px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    position: relative;
}

.sidebar-link svg {
    opacity: 0.7;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.sidebar-link:hover svg { opacity: 1; color: var(--indigo-400); }

.sidebar-link.active {
    background: var(--indigo-soft);
    color: var(--indigo-300);
    font-weight: 600;
}
.sidebar-link.active svg { opacity: 1; color: var(--indigo-400); }
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: var(--indigo-500);
    border-radius: 0 3px 3px 0;
}

.sidebar-link .badge-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--indigo-soft);
    color: var(--indigo-300);
}

.sidebar-link-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
}
.sidebar-link-toggle .sidebar-chevron {
    margin-left: auto;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.15s;
}
.sidebar-link-toggle:hover .sidebar-chevron { opacity: 1; }
.sidebar-link-toggle .sidebar-chevron.sidebar-chevron-open {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0 6px 16px;
    padding-left: 12px;
    border-left: 1px solid var(--border-subtle);
}

.sidebar-sublink {
    font-size: 12px;
    padding: 7px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.sidebar-sublink:hover {
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
}
.sidebar-sublink.active {
    color: var(--indigo-300);
    background: var(--indigo-soft);
    font-weight: 600;
}

[x-cloak] { display: none !important; }

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-org {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── MAIN CONTENT ─── */
.main-content {
    flex: 1;
    padding: 32px 40px;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg-page);
}

/* ═══════════════════════════════════════════
   AUTH / LOGIN
   ═══════════════════════════════════════════ */

.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-navbar);
    position: relative;
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-elevated);
    animation: card-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: var(--bg-navbar);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.auth-brand {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 6px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */

.form-group { margin-bottom: 22px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    border-color: var(--indigo-500);
    background: var(--slate-900);
    box-shadow: var(--shadow-focus);
}

textarea.form-input { resize: vertical; min-height: 90px; line-height: 1.5; }
select.form-input { cursor: pointer; appearance: none; -webkit-appearance: none;
    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='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--indigo-600);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
    background: var(--indigo-500);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
    background: var(--bg-surface-hover);
    border-color: var(--indigo-500);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-tertiary);
    border: none;
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.btn-full { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; }

.btn-icon {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

.btn-save {
    background: var(--indigo-600);
    color: #fff;
    border: none;
}
.btn-save:hover { background: var(--indigo-500); }

/* ─── BADGES — système centralisé ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
    border: 1px solid transparent;
}
.badge-primary { background: var(--indigo-soft);  color: var(--indigo-300); }
.badge-success { background: var(--emerald-soft); color: var(--emerald-400); }
.badge-warning { background: var(--amber-soft);   color: var(--amber-500); }
.badge-danger  { background: var(--red-soft);     color: var(--red-400); }
.badge-info    { background: var(--cyan-soft);    color: var(--cyan-500); }
.badge-neutral { background: var(--bg-surface-inset); color: var(--text-tertiary); border-color: var(--border-subtle); }
.badge-mono {
    font-family: var(--font-mono);
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: 10px;
}

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.source-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: right;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   HOME — HERO + SUBMISSIONS (Phase 2 refonte UX)
   ═══════════════════════════════════════════ */

.home-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-inset) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, var(--indigo-soft) 0%, transparent 70%);
    opacity: 0.35;
    pointer-events: none;
}
.home-hero-greeting {
    position: relative;
    z-index: 1;
}
.home-hero-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0 0 2px;
}
.home-hero-date {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: capitalize;
    margin: 0;
}
.home-hero-stats {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.hero-stat {
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    transition: all 0.18s ease;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    text-align: center;
}
.hero-stat:focus { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.hero-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--border-default);
}
.hero-stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.hero-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.25;
    font-weight: 600;
}
.hero-stat-new .hero-stat-value { color: var(--accent-primary); }
.hero-stat-new { border-color: rgba(99, 102, 241, 0.2); background: var(--indigo-soft); }
.hero-stat-urgent .hero-stat-value { color: #EF4444; }
.hero-stat-urgent { border-color: rgba(239, 68, 68, 0.25); background: rgba(239, 68, 68, 0.06); }
.hero-stat-follow .hero-stat-value { color: #F59E0B; }
.hero-stat-follow { border-color: rgba(245, 158, 11, 0.25); background: rgba(245, 158, 11, 0.06); }

/* ─── HOME SECTIONS (Mes soumissions / Nouveaux) ─── */
.home-submissions,
.home-new-section {
    margin-bottom: 22px;
}
.home-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}
.home-section-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    text-transform: uppercase;
}
.home-section-title svg { color: var(--accent-primary); width: 15px; height: 15px; }
.home-section-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-surface-inset);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ─── SUBMISSION ROWS (Mes soumissions en cours) ─── */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.submission-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: all 0.15s;
}
.submission-row:hover {
    border-color: var(--border-default);
    background: var(--bg-surface-hover);
}
.submission-urgent {
    border-left: 3px solid #EF4444;
    background: linear-gradient(90deg, rgba(239,68,68,0.04) 0%, var(--bg-surface) 30%);
}
.submission-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    justify-self: center;
}
.submission-status-dot.status-interested { background: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.submission-status-dot.status-submitted { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.submission-main { min-width: 0; }
.submission-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.submission-meta span { display: inline-flex; align-items: center; }
.submission-deadline .deadline-urgent { color: #EF4444; font-weight: 700; }
.submission-state {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.status-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.status-pill-interested {
    background: var(--indigo-soft);
    color: var(--accent-primary);
    border: 1px solid rgba(99,102,241,0.25);
}
.status-pill-submitted {
    background: rgba(245,158,11,0.12);
    color: #F59E0B;
    border: 1px solid rgba(245,158,11,0.3);
}
.submission-hint {
    font-size: 11px;
    color: var(--text-muted);
}
.submission-amount {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-surface-inset);
    padding: 2px 8px;
    border-radius: 6px;
}
.submission-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.submissions-empty {
    padding: 18px 16px;
    text-align: center;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    color: var(--text-muted);
}
.submissions-empty svg { color: var(--text-muted); opacity: 0.5; margin-bottom: 6px; width: 22px; height: 22px; }
.submissions-empty-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.submissions-empty-sub { font-size: 11px; color: var(--text-muted); }

/* ─── FILTRES AVANCES (toggle repliable) ─── */
.home-filters-toggle { margin-bottom: 16px; }
.filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.filters-toggle-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-accent-soft);
}
.filters-toggle-btn.active {
    background: var(--indigo-soft);
    color: var(--accent-primary);
    border-color: rgba(99,102,241,0.35);
}
.filters-toggle-badge {
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.filters-toggle-chevron { transition: transform 0.2s ease; }
.filters-toggle-chevron.open { transform: rotate(180deg); }
.home-filters-panel { margin-top: 12px; }

/* ─── FOOTER HOME (links + live status) ─── */
.home-footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}
.home-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.home-footer-link:hover { color: var(--text-secondary); }
.home-footer-status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.status-dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* Responsive home hero */
@media (max-width: 1100px) {
    .home-hero { grid-template-columns: 1fr; padding: 24px; }
    .home-hero-stats { justify-content: stretch; }
    .hero-stat { flex: 1; min-width: 0; }
}
@media (max-width: 640px) {
    .home-hero-title { font-size: 22px; }
    .home-hero-stats { flex-direction: column; }
    .submission-row { grid-template-columns: 10px 1fr; }
    .submission-actions { grid-column: 1 / -1; margin-top: 8px; }
}

/* Animation card-flash (scroll from Mes soumissions → carte) */
@keyframes card-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
    50% { box-shadow: 0 0 0 4px rgba(99,102,241,0.4); }
}
.tender-card.card-flash { animation: card-flash 1.2s ease-in-out 2; }

/* ═══════════════════════════════════════════
   STATS GRID (legacy - gardee pour autres pages)
   ═══════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

/* Colored top accent bar */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.stat-gold::before { background: var(--accent-primary); }
.stat-card.stat-green::before { background: var(--accent-success); }
.stat-card.stat-blue::before { background: var(--accent-info); }
.stat-card.stat-red::before { background: var(--accent-danger); }

.stat-card-icon {
    display: none;
}

.stat-label-top {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-label-top.gold { color: var(--accent-primary); }
.stat-label-top.green { color: var(--accent-success); }
.stat-label-top.blue { color: var(--accent-info); }
.stat-label-top.red { color: var(--accent-danger); }

.stat-number {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 3px;
    font-weight: 500;
}

/* En layout 5-col (colonnes etroites), on reduit encore pour eviter le wrap des montants */
.stats-grid-5 .stat-number {
    font-size: 20px;
    letter-spacing: -0.3px;
}
.stats-grid-5 .stat-card {
    padding: 12px 14px;
}
.stats-grid-5 .stat-label {
    font-size: 11px;
}

/* ═══════════════════════════════════════════
   PROFILE BAR
   ═══════════════════════════════════════════ */

.profile-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 5px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.profile-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-chip {
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    text-decoration: none;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.profile-chip:hover {
    background: var(--bg-surface-inset);
    color: var(--text-secondary);
}

.profile-chip.active {
    background: var(--bg-navbar);
    color: var(--text-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.filter-input::placeholder { color: var(--text-muted); }
.filter-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--indigo-soft);
}

.filter-select {
    padding: 8px 28px 8px 10px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9aaa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.15s;
}

.filter-select:focus {
    border-color: var(--accent-primary);
}

/* ─── Custom category dropdown ─── */
.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.15s;
    user-select: none;
}
.custom-select:hover { border-color: var(--border-default); }
.custom-select:focus-within { border-color: var(--accent-primary); }

.custom-select-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    min-width: 100%;
    width: max-content;
    max-width: 480px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: 4px;
}

.custom-select-option {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    transition: background 0.1s;
}
.custom-select-option:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.custom-select-option.active {
    background: var(--indigo-600);
    color: #fff;
}
.custom-select-option strong {
    font-weight: 700;
}

/* Category count badge inside dropdown */
.custom-select-option {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cat-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--indigo-600);
    background: var(--indigo-soft);
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ─── Active filter indicators ─── */
.filter-input.filter-active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-primary);
    box-shadow: inset 3px 0 0 var(--accent-primary), 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-select.filter-active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    font-weight: 700;
    color: var(--indigo-600);
    box-shadow: inset 3px 0 0 var(--accent-primary), 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.custom-select.filter-active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    color: var(--indigo-600);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent-primary), 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-bar.has-filters {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--border-accent-soft), var(--shadow-card);
}

.filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--border-danger-soft);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-danger);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-clear:hover {
    background: var(--red-soft);
}

.filter-clear-count {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    background: var(--accent-danger);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 2px;
}

/* ─── Filter banner (replaces filter-tags) ─── */
.filter-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: var(--bg-navbar);
    border-radius: var(--radius-md);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
    animation: banner-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes banner-enter {
    from { opacity: 0; transform: translateY(-6px); }
}

.filter-banner-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.filter-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    border-radius: 6px;
    color: var(--bg-navbar);
}

.filter-banner-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary);
    white-space: nowrap;
}

.filter-banner-sep {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
}

.filter-banner-result {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.filter-banner-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
}

.filter-chip-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-chip strong {
    font-weight: 700;
    color: var(--indigo-300);
}

.filter-chip-x {
    font-size: 14px;
    line-height: 1;
    color: var(--text-tertiary);
    margin-left: 2px;
}

.filter-chip:hover .filter-chip-x {
    color: var(--accent-danger);
}

.filter-banner-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-banner-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-danger);
    color: #fff;
}

/* ── Watch profile banner ── */
.watch-profile-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: var(--indigo-soft);
    border: 1px solid var(--border-accent-soft);
    border-radius: var(--radius-md);
}
.wpb-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.wpb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: var(--accent-primary);
    border-radius: 6px;
    color: #fff;
}
.wpb-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--indigo-600);
}
.wpb-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}
.wpb-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.wpb-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 5px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border, #374151);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1;
}
.wpb-chip-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}
.wpb-chip strong {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1;
}
.wpb-edit {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.wpb-edit:hover {
    text-decoration: underline;
}

/* (filter-tags replaced by filter-banner) */

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* ═══════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
}

.section-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════
   TENDER CARDS
   ═══════════════════════════════════════════ */

.tender-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 1100px) {
    .tender-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1700px) {
    .tender-list { grid-template-columns: repeat(3, 1fr); }
}

/* ─── TENDER CARD SHELL (3-level surface) ─── */
.tender-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ─── NUMERO D'ORDRE DE CARTE (inline chip en prefix du titre) ─── */
.tender-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 22px;
    padding: 0 8px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--indigo-soft);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    border-radius: 6px;
    user-select: none;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}
.tender-card.is-new {
    border-left: 3px solid var(--indigo-500);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.25);
}
.tender-card.is-recent {
    border-left: 3px solid rgba(99, 102, 241, 0.45);
}

.tender-card:hover {
    border-color: var(--indigo-500);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--indigo-500);
    transform: translateY(-1px);
}

.tender-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 22px 14px;
    background: var(--bg-surface);
}

.tender-info { flex: 1; min-width: 0; }

.tender-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--indigo-300);
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.tender-card:hover .tender-title {
    color: #C7D2FE;
}

.tender-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.meta-city {
    background: var(--bg-surface-inset);
    color: var(--text-tertiary);
    border: 1px solid var(--border-subtle);
}

.meta-muni {
    background: var(--emerald-soft);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.meta-gouv {
    background: var(--cyan-soft);
    color: var(--cyan-400);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.meta-id {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    padding: 3px 8px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    letter-spacing: 0;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

/* ── Freshness bar (top of card) ── */
.freshness-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.freshness-bar.fresh-new {
    background: linear-gradient(90deg, var(--indigo-600) 0%, var(--indigo-500) 100%);
    color: #fff;
    animation: flash-new 1.2s ease-in-out 2;
}
.freshness-bar.fresh-new svg {
    stroke: #fff;
    flex-shrink: 0;
}
.freshness-bar.fresh-new .freshness-age {
    margin-left: auto;
    font-weight: 600;
    font-size: 11px;
    opacity: 0.85;
    letter-spacing: 0;
    text-transform: none;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.freshness-bar.fresh-recent {
    background: var(--indigo-soft);
    color: var(--indigo-300);
    border-bottom: 1px solid rgba(99, 102, 241, 0.25);
}
.freshness-bar.fresh-recent svg {
    stroke: var(--indigo-300);
    flex-shrink: 0;
}
.freshness-bar.fresh-old {
    background: var(--bg-surface-inset);
    padding: 5px 22px;
    border-bottom: 1px solid var(--border-subtle);
}
.freshness-age-only {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
}

@keyframes flash-new {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: inset 0 0 24px 0 rgba(255, 255, 255, 0.12); }
}

.tender-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.saved-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--emerald-soft);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Body (surface-inset — niveau 2 de la 3-level surface strategy) */
.tender-card-body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface-inset);
}

.tender-detail {
    padding: 14px 20px;
}
.tender-detail + .tender-detail {
    border-left: 1px solid rgba(55, 65, 81, 0.4);
}

.detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-weight: 700;
}

.detail-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.detail-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* ─── AI EXPLANATION ─── */
.ai-explanation {
    padding: 14px 22px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-inset);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0) 60%);
    border-left: 3px solid var(--indigo-500);
}
.ai-explanation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ai-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--indigo-500);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.2;
}
.ai-explanation-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ai-confidence {
    font-size: 11px;
    font-weight: 700;
    color: var(--indigo-300);
    margin-left: auto;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.ai-explanation-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

/* ─── OPPORTUNITY SCORE PILL ─── */
.opp-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    line-height: 1.2;
    flex-shrink: 0;
    background: var(--bg-surface-inset);
    border: 1.5px solid var(--border-subtle);
}
.opp-pill-score {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.opp-pill-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1px;
}
.opp-fort {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--emerald-400);
}
.opp-moyen {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--amber-500);
}
.opp-faible {
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

/* ─── OPPORTUNITY SIGNALS PANEL (wrapped in <details>) ─── */
.opp-signals-details {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-inset);
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0) 55%);
}
.opp-signals-details[open] .opp-signals-summary-chevron {
    transform: rotate(180deg);
}
.opp-signals-summary {
    list-style: none;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.opp-signals-summary::-webkit-details-marker,
.opp-signals-summary::marker { display: none; }
.opp-signals-summary:hover {
    background: rgba(99, 102, 241, 0.06);
}
.opp-signals-summary-icon {
    color: var(--indigo-400);
    flex-shrink: 0;
}
.opp-signals-summary-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.opp-signals-summary-preview {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.opp-signals-summary-chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.opp-signals-panel {
    padding: 4px 22px 18px;
}
.opp-signals-header {
    display: none;
}

/* Signal cards as rows (dense, readable) */
.opp-signals-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}
.opp-signal-card {
    padding: 10px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    background: transparent;
}
.opp-signal-card:last-child {
    border-bottom: none;
}
.opp-signal-card.opp-signal-fort,
.opp-signal-card.opp-signal-moyen,
.opp-signal-card.opp-signal-faible {
    background: transparent;
}

.opp-signal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 10px;
}
.opp-signal-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.opp-signal-score-badge {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    min-width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.opp-signal-fort .opp-signal-score-badge { color: var(--emerald-400); }
.opp-signal-moyen .opp-signal-score-badge { color: var(--amber-500); }
.opp-signal-faible .opp-signal-score-badge { color: var(--text-muted); }

/* Signal bar (fintech style: 4px, tabular positioning) */
.opp-signal-bar {
    height: 4px;
    background: rgba(75, 85, 99, 0.4);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.opp-signal-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-fort { background: var(--emerald-500); }
.bar-moyen { background: var(--amber-500); }
.bar-faible { background: var(--slate-600); }

.opp-signal-detail {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* AI explanation inside signals */
.opp-signal-ai {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0 0;
    border-top: 1px dashed var(--border-subtle);
    margin-top: 4px;
}
.opp-signal-ai-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* ─── DOCUMENT ANALYSIS ─── */
.doc-analysis-section {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-inset);
}
.doc-analysis {
    padding: 14px 22px;
}
.doc-description {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 12px;
    font-weight: 500;
}
.doc-details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.doc-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.3;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface-inset);
}
.doc-detail-chip svg {
    flex-shrink: 0;
    color: var(--text-muted);
}
.chip-mandatory {
    border-color: rgba(239, 68, 68, 0.3);
    background: var(--red-soft);
}
.chip-mandatory svg { color: var(--red-400); }
.chip-optional {
    border-color: rgba(6, 182, 212, 0.3);
    background: var(--cyan-soft);
}
.chip-optional svg { color: var(--cyan-400); }
.chip-rbq {
    border-color: rgba(99, 102, 241, 0.3);
    background: var(--indigo-soft);
}
.chip-rbq svg { color: var(--indigo-300); }
.chip-neutral {}
.doc-detail-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.doc-detail-value {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
/* Contact chip : nom + email + phone sur des lignes separees */
.doc-detail-contact {
    align-items: flex-start;
    gap: 10px;
    min-width: 260px;
}
.doc-detail-contact > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.doc-detail-contact .contact-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}
.doc-detail-contact .contact-email,
.doc-detail-contact .contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--indigo-300);
    text-decoration: none;
    line-height: 1.3;
    word-break: break-word;
    transition: color 0.15s;
}
.doc-detail-contact .contact-email svg,
.doc-detail-contact .contact-phone svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.doc-detail-contact .contact-email:hover,
.doc-detail-contact .contact-phone:hover {
    color: #C7D2FE;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.doc-trade-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.doc-trade-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: var(--indigo-soft);
    color: var(--indigo-300);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Sections (caracteristiques, composition, points critiques) */
.doc-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.doc-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.doc-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Caracteristiques techniques — 2 colonnes label / valeur */
.doc-specs-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
    font-size: 12.5px;
}
.doc-specs-grid dt {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
}
.doc-specs-grid dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

/* Composition toiture — 2 colonnes arrachement / installation */
.doc-composition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.doc-composition-col {
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.doc-composition-old {
    border-left: 3px solid var(--red-500);
}
.doc-composition-new {
    border-left: 3px solid var(--emerald-500);
}
.doc-composition-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}
.doc-composition-old .doc-composition-header {
    color: var(--red-400);
}
.doc-composition-new .doc-composition-header {
    color: var(--emerald-400);
}
.doc-composition-list {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: decimal;
}
.doc-composition-list li {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.doc-composition-list li::marker {
    color: var(--text-muted);
    font-weight: 600;
}
@media (max-width: 720px) {
    .doc-composition-grid {
        grid-template-columns: 1fr;
    }
}

/* Points critiques du devis */
.doc-critical-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.doc-critical-list li {
    position: relative;
    padding: 8px 12px 8px 28px;
    margin-bottom: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-surface-inset);
    border-left: 3px solid var(--accent-warning);
    border-radius: var(--radius-sm);
}
.doc-critical-list li::before {
    content: "!";
    position: absolute;
    left: 10px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-warning);
    color: var(--slate-900);
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-special-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.doc-note-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: var(--red-soft);
    color: var(--red-400);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Placeholder / on-demand button */
.doc-analysis-placeholder {
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-inset);
    border-top: 1px solid var(--border-subtle);
}
.btn-doc-analyze {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--indigo-300);
    background: var(--indigo-soft);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-doc-analyze:hover {
    background: var(--indigo-soft-strong);
    border-color: var(--indigo-500);
    color: var(--text-primary);
}
.doc-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.doc-spinner-ring {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--indigo-400);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.doc-analysis-error {
    padding: 10px 22px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── NOTICE DETAIL (API SEAO) ─── */
.notice-detail {
    /* Reuses .doc-analysis base styles */
}
.notice-scope {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 14px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
    /* Scrollbar discrete */
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) transparent;
}
.notice-scope::-webkit-scrollbar { width: 6px; }
.notice-scope::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
.notice-scope p {
    margin: 0 0 6px;
}
.notice-scope p:last-child {
    margin-bottom: 0;
}
.notice-scope strong, .notice-scope b {
    font-weight: 700;
    color: var(--text-primary);
}
.notice-scope a {
    color: var(--indigo-300);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.notice-email {
    color: var(--indigo-300);
    text-decoration: none;
    font-weight: 500;
}
.notice-email:hover {
    text-decoration: underline;
}

/* ─── DOCUMENTS GROUPED LIST ─── */
.notice-docs {
    padding-top: 10px;
    margin-bottom: 8px;
    border-top: 1px solid var(--border-subtle);
}
.notice-docs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.notice-docs-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
}
.notice-docs-label svg { color: var(--accent-primary); }
.notice-docs-total {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-surface-inset);
    padding: 2px 8px;
    border-radius: 10px;
}
.notice-docs-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.notice-docs-toggle:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-accent-soft);
}
.notice-docs-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--bg-surface-inset);
    border-radius: 8px;
}
.notice-docs-group {
    min-width: 0;
}
.notice-docs-group-title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--accent-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
}
.notice-docs-group-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.notice-docs-group-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--border-subtle);
}
.notice-docs-group-list li:last-child {
    border-bottom: none;
}
.notice-docs-group-list .doc-name {
    color: var(--text-secondary);
    line-height: 1.35;
    word-break: break-word;
    min-width: 0;
    flex: 1;
}
.notice-docs-group-list .doc-pages {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
}
.notice-calendar {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-top: 8px;
    font-size: 12px;
    border-top: 1px solid var(--border-subtle);
}
.notice-calendar-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    white-space: nowrap;
}
.notice-calendar-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Keyword tags */
.keyword-tags {
    padding: 10px 22px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: var(--bg-surface);
}

.keyword-tag {
    display: inline-block;
    background: var(--bg-surface-inset);
    color: var(--text-tertiary);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--border-subtle);
}

.cat-tag {
    display: inline-block;
    background: var(--bg-surface-inset);
    color: var(--text-secondary);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid var(--border-subtle);
    font-weight: 600;
}

/* Footer — back to surface level (niveau 1) */
.tender-card-footer {
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.tender-card-footer .btn-outline {
    font-size: 12px;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
    background: transparent;
}
.tender-card-footer .btn-outline:hover {
    background: var(--bg-surface-inset);
    border-color: var(--indigo-500);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   PHASE 5 : RESUMÉ COMPACT + DRAWER DETAILS
   ═══════════════════════════════════════════ */

/* Resume visuel : info gauche + score droite */
.tender-summary {
    padding: 14px 22px 16px;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.summary-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
}
.summary-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ligne acheteur (lien gros et present) */
.summary-buyer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--indigo-300);
    text-decoration: none;
    line-height: 1.3;
}
.summary-buyer svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.summary-buyer:hover {
    color: #C7D2FE;
    text-decoration: underline;
}

/* Ligne echeance */
.summary-deadline-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.summary-deadline-row svg { color: var(--text-muted); flex-shrink: 0; }
.summary-deadline-days {
    font-weight: 600;
    color: var(--text-secondary);
}
.summary-deadline-days.deadline-critical {
    color: #EF4444;
    font-weight: 700;
}
.summary-deadline-days.deadline-soon {
    color: #F59E0B;
    font-weight: 700;
}

/* Description du projet */
.summary-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 4px 0;
    overflow-wrap: anywhere;
}

/* Tags type travaux + type batiment (deduits du titre/acheteur) */
.summary-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 4px 0;
}
.summary-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-transform: uppercase;
}
.summary-tag.tag-travaux {
    background: var(--indigo-500);
    color: #fff;
    border: 1px solid var(--indigo-500);
}
.summary-tag.tag-batiment {
    background: #F59E0B;
    color: #1f1408;
    border: 1px solid #F59E0B;
}

/* Calendrier de realisation (depuis notice) */
.summary-calendar {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bloc detail technique (depuis pdf_analysis si dispo) */
.summary-tech {
    margin: 6px 0;
    padding: 8px 10px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 6px;
}
.summary-tech-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #10B981;
    margin-bottom: 5px;
}
.summary-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tech-chip {
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-surface-inset);
    padding: 3px 9px;
    border-radius: 4px;
    line-height: 1.4;
}
.tech-chip strong {
    color: #10B981;
    font-weight: 700;
    margin-right: 4px;
}

/* Stats compactes (grille 2 colonnes) */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 14px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
}
.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.summary-stat .stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.summary-stat .stat-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.summary-stat .stat-value-strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Bloc score : cercle gauge + label */
.summary-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    min-width: 110px;
}
.score-circle {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.score-svg {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}
.score-bg-ring {
    fill: none;
    stroke: var(--bg-surface-inset);
    stroke-width: 3;
}
.score-fg-ring {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.4s ease;
}
.score-fort .score-fg-ring { stroke: #10B981; }
.score-moyen .score-fg-ring { stroke: #F59E0B; }
.score-faible .score-fg-ring { stroke: #EF4444; }
.score-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.score-number {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.score-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-tertiary);
    margin-left: 1px;
}
.score-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.score-fort .score-label { color: #10B981; }
.score-moyen .score-label { color: #F59E0B; }
.score-faible .score-label { color: #EF4444; }
.score-caption {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Signaux explicatifs : 3-4 mini barres */
.summary-signals {
    margin-top: 4px;
    padding: 10px 14px;
    background: var(--bg-surface-inset);
    border-radius: 8px;
}
.summary-signals-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.summary-signals-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
}
.mini-signal {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.mini-signal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
}
.mini-signal-label {
    color: var(--text-secondary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.mini-signal-score {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}
.mini-signal-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
}
.mini-signal-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.mini-signal-fort .mini-signal-bar-fill { background: linear-gradient(90deg, #059669, #10B981); }
.mini-signal-moyen .mini-signal-bar-fill { background: linear-gradient(90deg, #D97706, #F59E0B); }
.mini-signal-faible .mini-signal-bar-fill { background: linear-gradient(90deg, #DC2626, #EF4444); }

/* Responsive : sur cartes etroites (mobile + grid 2 col), score passe au-dessus */
@media (max-width: 640px) {
    .summary-grid { grid-template-columns: 1fr; }
    .summary-score { flex-direction: row; min-width: 0; padding: 0; }
    .score-circle { width: 70px; height: 70px; }
    .score-svg { width: 70px; height: 70px; }
    .score-number { font-size: 18px; }
    .summary-signals-list { grid-template-columns: 1fr; }
}

/* Drawer details (hidden par defaut) */
.tender-details-drawer {
    border-top: 1px dashed var(--border-subtle);
    background: var(--bg-surface-inset);
}
[x-cloak] { display: none !important; }

/* Footer secondaire dans le drawer (Voir SEAO + Intelligence concurrentielle) */
.tender-card-footer-secondary {
    padding: 14px 22px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

/* Bouton Toggle "Voir details" / "Masquer details" */
.btn-toggle-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface-inset);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.btn-toggle-details:hover {
    background: var(--indigo-soft);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--indigo-300);
}
.btn-toggle-details.is-open {
    background: var(--indigo-soft);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--indigo-300);
}

/* Urgency indicators */
.urgency-critical { color: var(--red-400) !important; font-weight: 700; }
.urgency-warning { color: var(--amber-500) !important; font-weight: 700; }
.urgency-ok { color: var(--emerald-400) !important; }

/* ─── Stagger animation for cards ─── */
.tender-card {
    animation: fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tender-card:nth-child(1) { animation-delay: 0.03s; }
.tender-card:nth-child(2) { animation-delay: 0.06s; }
.tender-card:nth-child(3) { animation-delay: 0.09s; }
.tender-card:nth-child(4) { animation-delay: 0.12s; }
.tender-card:nth-child(5) { animation-delay: 0.15s; }
.tender-card:nth-child(n+6) { animation-delay: 0.18s; }

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ═══════════════════════════════════════════
   SCORE RING (SVG)
   ═══════════════════════════════════════════ */

.score-ring-container {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.score-ring-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 4;
}

.score-ring-fill {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-ring-fill.high { stroke: var(--accent-success); }
.score-ring-fill.medium { stroke: var(--accent-primary); }
.score-ring-fill.low { stroke: var(--accent-danger); }

.score-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
}

/* ═══════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg-surface-inset);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

.empty-notice {
    padding: 12px 16px;
    background: var(--indigo-soft);
    color: var(--indigo-600);
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 24px;
    border: 1px solid var(--border-accent-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════ */

.flash-container { margin-bottom: 20px; }

.flash {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: flash-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes flash-enter {
    from { opacity: 0; transform: translateY(-8px); }
}

.flash-error {
    background: var(--red-soft);
    color: var(--accent-danger);
    border: 1px solid var(--border-danger-soft);
}
.flash-info {
    background: var(--cyan-soft);
    color: var(--accent-info);
    border: 1px solid var(--border-info-soft);
}
.flash-success {
    background: var(--emerald-soft);
    color: var(--accent-success);
    border: 1px solid var(--border-success-soft);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-navbar);
    border-top: 1px solid var(--border-subtle);
    margin-top: 40px;
}

.app-footer a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 150ms;
}
.app-footer a:hover { color: var(--indigo-400); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

.mobile-menu { display: none; }

@media (max-width: 1024px) {
    .main-content { padding: 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-menu { display: block; }

    .sidebar {
        position: fixed;
        top: var(--navbar-height);
        left: calc(-1 * var(--sidebar-width));
        height: calc(100vh - var(--navbar-height));
        z-index: 90;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
    }
    .sidebar-open { left: 0; }

    .main-content { padding: 16px; }
    .tender-card-body { grid-template-columns: repeat(2, 1fr); }
    .navbar-user { display: none; }
    .navbar-divider { display: none; }
    .page-title { font-size: 22px; }

    .page-header { flex-direction: column; gap: 8px; }
    .page-header-right { align-self: flex-start; }
    .source-label { text-align: left; }

    .filter-search { min-width: 100%; }
}

@media (max-width: 480px) {
    .main-content { padding: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
    .tender-card-body { grid-template-columns: 1fr; }
    .profile-bar { flex-wrap: wrap; }
    .profile-label { width: 100%; }

    .page-title { font-size: 20px; }
    .navbar-inner { padding: 0 12px; }
    .navbar-brand-text { font-size: 14px; }
    .navbar-brand-badge { font-size: 9px; padding: 2px 6px; }

}

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection color */
::selection {
    background: var(--indigo-soft-strong);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   PROFILE PAGES (Buyer & Competitor)
   ═══════════════════════════════════════════ */

.profile-page { max-width: 1100px; }

.profile-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.profile-breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
}
.profile-breadcrumb a:hover { color: var(--accent-primary); }
.breadcrumb-sep { margin: 0 6px; }

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}
.profile-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.profile-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
}
.profile-filter-badge {
    background: var(--indigo-soft);
    color: var(--indigo-600);
    border: 1px solid var(--border-accent-soft);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.profile-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.profile-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.profile-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.profile-table th {
    font-weight: 600;
    color: var(--text-tertiary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border-subtle);
    text-align: left;
}
.profile-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.profile-table tbody tr:hover { background: var(--bg-surface-inset); }
.profile-table-scroll { overflow-x: auto; }

.rank-cell {
    font-weight: 700;
    color: var(--accent-primary);
    width: 32px;
}

.buyer-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-accent-soft);
    transition: color 0.15s, border-color 0.15s;
}
.buyer-link:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.mini-bar-track {
    height: 6px;
    background: var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
}
.mini-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    min-width: 4px;
}

.method-bars { display: flex; flex-direction: column; gap: 8px; }
.method-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 50px;
    align-items: center;
    gap: 12px;
}
.method-bar-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: capitalize;
}
.method-bar-track {
    height: 8px;
    background: var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
}
.method-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--indigo-300));
    border-radius: 4px;
    min-width: 4px;
}
.method-bar-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: right;
}

.trend-bars { display: flex; flex-direction: column; gap: 10px; }
.trend-bar-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 12px;
}
.trend-bar-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.trend-bar-track {
    height: 10px;
    background: var(--border-subtle);
    border-radius: 5px;
    overflow: hidden;
}
.trend-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--indigo-300));
    border-radius: 5px;
    min-width: 4px;
}
.trend-bar-stat {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.nowrap { white-space: nowrap; }

/* ── My History Banner (Buyer Profile) ── */
.my-history-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241,0.08) 0%, rgba(99, 102, 241,0.03) 100%);
    border: 1px solid var(--border-accent-soft);
    border-left: 4px solid var(--accent-primary);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.my-history-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.my-history-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--indigo-600);
}
.my-history-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.my-history-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.my-history-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.my-history-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.my-history-details {
    margin-top: 16px;
}
.my-history-details summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo-600);
    cursor: pointer;
    user-select: none;
}
.my-history-details summary:hover { color: var(--accent-primary); }
.result-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.result-won {
    background: rgba(22,163,74,0.12);
    color: #10B981;
}
.result-lost {
    background: rgba(220,38,38,0.08);
    color: #dc2626;
}

.btn-save-active {
    background: var(--indigo-soft);
    border-color: var(--border-accent-soft);
    color: var(--indigo-600);
}

/* Competitor search */
.search-page { max-width: 800px; }
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--indigo-soft);
}
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-result-card:hover {
    border-color: var(--border-accent-soft);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}
.search-result-name {
    font-weight: 600;
    font-size: 14px;
}
.search-result-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.search-result-stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--indigo-600);
    font-weight: 600;
    white-space: nowrap;
}

/* Registres badges */
.registre-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.registre-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.registre-badge-rbq { background: var(--emerald-soft); color: var(--accent-success); border: 1px solid var(--border-success-soft); }
.registre-badge-rena { background: var(--red-soft); color: var(--accent-danger); border: 1px solid var(--border-danger-soft); }
.registre-badge-req { background: var(--cyan-soft); color: var(--accent-info); border: 1px solid var(--border-info-soft); }

@media (max-width: 768px) {
    .profile-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-header { flex-direction: column; }
    .method-bar-row { grid-template-columns: 100px 1fr 40px; }
}

/* ═══════════════════════════════════════════
   PREDICTION PANEL — Intelligence Concurrentielle
   Light theme — matches B2 Institutional warm palette
   ═══════════════════════════════════════════ */

/* Button */
.btn-pred {
    background: var(--indigo-soft-strong);
    color: var(--indigo-600);
    border: 1px solid var(--border-accent-soft);
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-pred:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}
.btn-pred svg { stroke: currentColor; }

/* Container */
.pred-container {
    position: relative;
    min-height: 0;
}
.pred-container:empty { display: none; }
.pred-container.pred-collapsed { display: none; }

/* Spinner */
.pred-spinner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    color: var(--indigo-600);
    font-size: 0.85rem;
    font-weight: 500;
}
.pred-spinner.htmx-request { display: flex; }

.pred-spinner-ring {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: pred-spin 0.8s linear infinite;
}
@keyframes pred-spin {
    to { transform: rotate(360deg); }
}

/* Panel — light warm background, matches tender-card style */
.pred-panel {
    border-top: 3px solid var(--accent-primary);
    background: var(--bg-surface-inset);
    border-radius: 0 0 var(--radius-lg, 10px) var(--radius-lg, 10px);
    margin-top: 0;
    padding: 0;
    animation: pred-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pred-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
}

.pred-panel.pred-error {
    border-top-color: var(--accent-danger);
}

/* Header — two-line with subtitle */
.pred-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 22px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.pred-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pred-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
}
.pred-subtitle {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    line-height: 1.3;
}
.pred-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pred-header-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

/* Help toggle button (?) */
.pred-help-toggle {
    background: none;
    border: 1px solid var(--border-default);
    color: var(--text-tertiary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.pred-help-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--indigo-600);
    background: var(--indigo-soft);
}

/* Help panel — explains all metrics */
.pred-help {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 22px;
}
.pred-help-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.pred-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}
.pred-help-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.pred-help-icon {
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--text-primary);
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 3px 8px;
    flex-shrink: 0;
    text-align: center;
    min-width: 48px;
    line-height: 1.3;
}
.pred-help-icon-gold {
    color: var(--indigo-600);
    border-color: var(--border-accent-soft);
    background: var(--indigo-soft);
}
.pred-help-icon-green {
    color: var(--accent-success);
    border-color: var(--border-success-soft);
    background: var(--emerald-soft);
    font-size: 0.6rem;
    letter-spacing: 0.3px;
}
.pred-help-icon-badge {
    color: var(--accent-success);
    border-color: var(--border-success-soft);
    background: var(--emerald-soft);
    font-size: 0.65rem;
}
.pred-help-item strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1px;
}
.pred-help-item span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.pred-help-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Help toggle active state */
.pred-help-toggle-active {
    border-color: var(--accent-primary);
    color: var(--indigo-600);
    background: var(--indigo-soft);
}

/* Help icon variant for combined probability */
.pred-help-icon-accent {
    color: var(--text-primary);
    border-color: var(--border-default);
    background: var(--bg-surface-inset);
    font-weight: 800;
}

/* Empty state */
.pred-empty {
    padding: 12px 22px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* Bidder rows */
.pred-list {
    padding: 4px 14px 8px;
}
.pred-row {
    display: grid;
    grid-template-columns: 32px 1fr 90px;
    gap: 14px;
    align-items: start;
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}
.pred-row:hover {
    background: var(--bg-surface);
}
.pred-row:last-child { border-bottom: none; }

.pred-rank {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    color: var(--indigo-600);
    text-align: center;
    padding-top: 1px;
}

/* Progress bar — now inside info column */
.pred-bar-wrap {
    height: 6px;
    background: var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
    margin: 6px 0 8px;
    cursor: help;
}
.pred-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--indigo-300));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Info column */
.pred-info {
    min-width: 0;
}
.pred-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.pred-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* RBQ licence category tags */
.pred-licence-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}
.pred-licence-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 2px;
    white-space: nowrap;
}
.pred-licence-tag {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    background: var(--emerald-soft);
    color: var(--accent-success);
    border: 1px solid var(--border-success-soft);
    line-height: 1.4;
    white-space: nowrap;
}
.pred-licence-more {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    background: var(--bg-surface-inset);
    color: var(--text-tertiary);
    border: 1px solid var(--border-default);
    line-height: 1.4;
    cursor: help;
    position: relative;
}
.pred-badge-rena {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--red-soft);
    color: var(--accent-danger);
    border: 1px solid var(--border-danger-soft);
    flex-shrink: 0;
    line-height: 1.4;
    cursor: help;
}

/* Legacy — kept for backward compat, no longer rendered */
.pred-stats-line {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.pred-stats-line > span + span:not(.pred-breakdown)::before {
    content: "·";
    margin-right: 6px;
    color: var(--text-muted);
}
.pred-breakdown {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    margin-left: 2px;
}
.pred-metrics-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.pred-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 5px;
    font-size: 0.73rem;
    cursor: help;
    transition: border-color 0.15s;
}
.pred-pill:hover {
    border-color: var(--border-accent-soft);
}
.pred-pill-label {
    color: var(--text-secondary);
    font-weight: 500;
}
.pred-pill-value {
    font-weight: 700;
    color: var(--text-primary);
}
.pred-pill-value-gold {
    color: var(--indigo-600);
}
.pred-pill-confidence-elevee {
    color: var(--accent-success);
    font-weight: 700;
}
.pred-pill-confidence-moyenne {
    color: var(--indigo-600);
    font-weight: 700;
}
.pred-pill-confidence-faible {
    color: var(--text-muted);
    font-weight: 700;
}

/* ── Verdict badge (categoric label next to name) ── */
.pred-verdict {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1.4;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    white-space: nowrap;
}
.pred-verdict-high {
    background: var(--emerald-soft);
    color: var(--accent-success);
    border: 1px solid var(--border-success-soft);
}
.pred-verdict-medium {
    background: var(--indigo-soft);
    color: var(--indigo-600);
    border: 1px solid var(--border-accent-soft);
}
.pred-verdict-low {
    background: rgba(100, 149, 237, 0.08);
    color: #22D3EE;
    border: 1px solid rgba(100, 149, 237, 0.2);
}
.pred-verdict-minimal {
    background: var(--bg-surface-inset);
    color: var(--text-muted);
    border: 1px solid var(--border-default);
}

/* ── Natural language stat line ── */
.pred-stat-line {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

/* ── Confidence dots (under hero score) ── */
.pred-confidence-dots {
    font-size: 0.85rem;
    letter-spacing: 2px;
    line-height: 1;
    margin-top: 3px;
    cursor: help;
}
.pred-conf-elevee {
    color: var(--accent-success);
}
.pred-conf-moyenne {
    color: var(--indigo-600);
}
.pred-conf-faible {
    color: var(--text-muted);
}

/* ── Detail panel (expanded "Pourquoi?") ── */
.pred-detail-panel {
    margin-top: 8px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
}
.pred-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}
.pred-detail-metric {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pred-detail-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pred-detail-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pred-detail-value-gold {
    color: var(--indigo-600);
}
.pred-detail-timeline {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pred-detail-timeline-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pred-detail-reasons {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}
.pred-detail-confidence {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.73rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Help panel 2-col variant */
.pred-help-grid-2col {
    grid-template-columns: 1fr 1fr;
}
.pred-help-icon-dots {
    color: var(--accent-success);
    border-color: var(--border-success-soft);
    background: var(--emerald-soft);
    letter-spacing: 2px;
    font-size: 0.75rem;
}

/* Reasons toggle */
.pred-reasons-toggle {
    background: none;
    border: none;
    color: var(--indigo-600);
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.pred-reasons-toggle:hover { text-decoration: underline; }
.pred-reasons-toggle svg { transition: transform 0.2s; }

.pred-reasons {
    margin-top: 6px;
    padding-left: 2px;
}
.pred-reason {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 3px;
}
.pred-reason-bullet {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 5px;
}
.pred-reason-detail {
    color: var(--text-tertiary);
}

/* Hero score — single dominant number on the right */
.pred-hero-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding-top: 2px;
}
.pred-hero-number {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}
.pred-hero-unit {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.pred-hero-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Footer */
.pred-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 10px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.pred-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}
.pred-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

/* ── Bid Analytics Section ── */
.bid-analytics-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}
.ba-block {
    flex: 1 1 360px;
    min-width: 0;
    padding: 14px 18px 12px;
    background: var(--bg-surface);
}
.ba-block-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}
.ba-block-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}
.ba-behavior-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: auto;
}
.ba-behavior-strict {
    background: rgba(34, 197, 94, 0.12);
    color: #10B981;
}
.ba-behavior-predominant {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
}
.ba-behavior-multi {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}
.ba-behavior-qualite {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.ba-metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
}
.ba-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 80px;
    min-width: 0;
}
.ba-metric-value {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.ba-metric-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    max-width: 100%;
}
.ba-behavior-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-top: 2px;
    border-top: 1px solid var(--border-subtle);
}
.ba-spread-range {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
    word-break: normal;
    overflow-wrap: break-word;
}
.ba-spread-label {
    color: var(--text-muted);
    white-space: nowrap;
}
.ba-spread-values strong {
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
}

/* HTMX indicator integration */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: flex; }
.htmx-request.htmx-indicator { display: flex; }

/* Responsive */
@media (max-width: 768px) {
    .pred-row {
        grid-template-columns: 28px 1fr 80px;
        gap: 10px;
        padding: 12px 10px;
    }
    .pred-help-grid,
    .pred-help-grid-2col { grid-template-columns: 1fr; }
    .pred-footer { flex-direction: column; }
    .pred-detail-grid { grid-template-columns: 1fr; gap: 8px; }
    .bid-analytics-section { flex-direction: column; }
    .ba-metrics-row { flex-wrap: wrap; gap: 12px; }
    .pred-hero-number { font-size: 1.3rem; }
    .pred-verdict { font-size: 0.55rem; padding: 2px 6px; }
}

@media (max-width: 480px) {
    .pred-row {
        grid-template-columns: 24px 1fr 70px;
        gap: 6px;
        padding: 10px 8px;
    }
    .pred-bar-wrap { display: none; }
    .pred-name { font-size: 0.82rem; }
    .pred-header { padding: 10px 14px 8px; }
    .pred-list { padding: 0 6px; }
    .pred-help-grid,
    .pred-help-grid-2col { grid-template-columns: 1fr; }
    .pred-detail-grid { grid-template-columns: 1fr; gap: 6px; }
    .pred-hero-number { font-size: 1.1rem; }
    .pred-confidence-dots { font-size: 0.75rem; }
    .pred-verdict { font-size: 0.5rem; }
    [data-tip]::after, [data-tip]::before { display: none !important; }
}

/* ── Custom tooltips ── */
[data-tip] {
    position: relative;
    cursor: help;
}

/* Tooltip arrow */
[data-tip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-navbar);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 101;
}

/* Tooltip body */
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-navbar);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 8px 24px rgba(30, 30, 45, 0.25);
    white-space: normal;
    width: max-content;
    max-width: 320px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

[data-tip]:hover::before,
[data-tip]:hover::after {
    opacity: 1;
}

/* Right-aligned tooltips for hero score (prevent overflow) */
.pred-hero-score[data-tip]::after {
    left: auto;
    right: 0;
    transform: none;
}
.pred-hero-score[data-tip]::before {
    left: auto;
    right: 20px;
    transform: none;
}

/* Info icon indicator inside pills */
.pred-tip-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.15s;
    margin-left: 1px;
}
.pred-pill:hover .pred-tip-icon {
    color: var(--indigo-600);
}

/* Dotted underline on hoverable values */
.pred-pill-value {
    border-bottom: 1px dotted var(--border-default);
    padding-bottom: 1px;
}
.pred-pill:hover .pred-pill-value {
    border-bottom-color: var(--accent-primary);
}

/* Hero score hover indicator */
.pred-hero-score {
    border-bottom: 2px dotted transparent;
    padding-bottom: 4px;
    transition: border-color 0.15s;
}
.pred-hero-score:hover {
    border-bottom-color: var(--accent-primary);
}
.pred-hero-score:hover .pred-hero-number {
    color: var(--indigo-600);
}

/* Confidence dots tooltip — position below, right-aligned */
.pred-confidence-dots[data-tip]::after {
    bottom: auto;
    top: calc(100% + 10px);
    left: auto;
    right: 0;
    transform: none;
    max-width: 220px;
}
.pred-confidence-dots[data-tip]::before {
    bottom: auto;
    top: 100%;
    left: auto;
    right: 10px;
    transform: none;
    border-top-color: transparent;
    border-bottom-color: var(--bg-navbar);
}

/* Badge & licence tooltips — position below */
.pred-badge-rena[data-tip]::after,
.pred-licence-more[data-tip]::after {
    bottom: auto;
    top: calc(100% + 10px);
}
.pred-badge-rena[data-tip]::before,
.pred-licence-more[data-tip]::before {
    bottom: auto;
    top: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--bg-navbar);
}

/* ═══════════════════════════════════════════
   PRICING + BILLING
   ═══════════════════════════════════════════ */

.pricing-page {
    width: min(1120px, 94vw);
    margin: 32px auto;
}

.pricing-header {
    text-align: center;
    margin-bottom: 26px;
}

.pricing-header h1 {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.pricing-grid-tight {
    margin-top: 18px;
}

.pricing-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px 20px;
}

.pricing-card.featured {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.pricing-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--bg-navbar);
    background: var(--accent-primary);
}

.pricing-card h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 8px;
}

.pricing-price {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 18px;
    display: grid;
    gap: 8px;
}

.pricing-features li {
    color: var(--text-secondary);
    font-size: 14px;
}

.pricing-footer {
    margin-top: 18px;
    text-align: center;
}

.pricing-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
}

.pricing-footer a:hover {
    color: var(--text-primary);
}

.signup-card {
    max-width: 520px;
}

.billing-page {
    display: grid;
    gap: 16px;
}

.billing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 18px;
}

.billing-card h2 {
    font-family: var(--font-display);
    font-size: 21px;
    margin-bottom: 10px;
}

.billing-row {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.billing-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.billing-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.billing-muted {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.billing-note {
    margin-top: 12px;
    background: var(--indigo-soft);
    border: 1px solid var(--border-accent-soft);
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
}

.billing-warning {
    margin-top: 12px;
    background: var(--amber-soft);
    border: 1px solid var(--border-accent-soft);
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
}

.billing-usage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.billing-usage-item {
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.plan-badge-trial,
.plan-badge-essential,
.plan-badge-premium {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.plan-badge-trial {
    color: var(--text-secondary);
    background: #1F2937;
    border: 1px solid var(--border-default);
}

.plan-badge-essential {
    color: var(--accent-info);
    background: var(--cyan-soft);
    border: 1px solid var(--border-info-soft);
}

.plan-badge-premium {
    color: var(--indigo-600);
    background: var(--indigo-soft);
    border: 1px solid var(--border-accent-soft);
}

.subscription-status-active,
.subscription-status-trialing,
.subscription-status-past_due,
.subscription-status-canceled,
.subscription-status-unpaid,
.subscription-status-incomplete,
.subscription-status-incomplete_expired,
.subscription-status-none {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.subscription-status-active,
.subscription-status-trialing {
    color: var(--accent-success);
    background: var(--emerald-soft);
    border: 1px solid var(--border-success-soft);
}

.subscription-status-past_due {
    color: #4338CA;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.subscription-status-canceled,
.subscription-status-unpaid,
.subscription-status-incomplete_expired {
    color: var(--accent-danger);
    background: var(--red-soft);
    border: 1px solid var(--border-danger-soft);
}

.subscription-status-incomplete,
.subscription-status-none {
    color: var(--text-secondary);
    background: #1F2937;
    border: 1px solid var(--border-default);
}

@media (max-width: 960px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .billing-usage-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── FORM LOADING OVERLAY ─── */
.form-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: inherit;
    z-index: 10;
    animation: overlay-fade-in 0.2s ease;
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: form-spin 0.7s linear infinite;
}

@keyframes form-spin {
    to { transform: rotate(360deg); }
}

.form-loading-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
}

.form-loading-subtext {
    font-size: 0.78rem;
    color: var(--text-secondary, #64748b);
    margin-top: -8px;
}

/* NEQ hint on signup */
.neq-signup-hint {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-secondary, #64748b);
}

/* ═══════════════════════════════════════════
   ONBOARDING WIZARD
   ═══════════════════════════════════════════ */

.onboarding-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.progress-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--border, #374151);
    color: var(--text-secondary, #64748b);
    background: var(--bg-surface);
    transition: all 0.2s;
}
.progress-step.active .progress-circle {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
}
.progress-step.done .progress-circle {
    border-color: var(--accent-success);
    background: var(--accent-success);
    color: #fff;
}
.progress-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
}
.progress-step.active .progress-label {
    color: var(--indigo-600);
    font-weight: 600;
}

.onboarding-step { margin-bottom: 24px; }
.onboarding-step h2 {
    font-family: var(--font-display, 'Outfit');
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.onboarding-subtitle {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}
.onboarding-hint {
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    margin-bottom: 10px;
}

/* Search input group */
.search-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.search-input-group .form-input { flex: 1; }
.search-input-group .btn { white-space: nowrap; }

/* NEQ trust notice */
.neq-trust-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(16, 185, 129, 0.06);
    border-left: 3px solid var(--accent-success);
    padding: 12px 14px;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 8px;
}
.neq-trust-notice svg { flex-shrink: 0; margin-top: 2px; }
.neq-fallback-hint {
    color: var(--text-secondary, #64748b);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 16px;
}

/* DNA result card */
.dna-result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border, #374151);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md, 8px);
    padding: 20px;
    margin-top: 16px;
}
.dna-hero { margin-bottom: 16px; }
.dna-hero h3 {
    font-family: var(--font-display, 'Outfit');
    font-size: 1.15rem;
    margin: 6px 0 0;
}
.dna-subtitle {
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    margin-top: 4px;
}
.dna-badge {
    display: inline-block;
    background: var(--indigo-soft);
    color: var(--indigo-600);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}
.dna-badge-dim {
    background: var(--bg-page, #111827);
    color: var(--text-secondary, #64748b);
}
.dna-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.dna-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-page, #111827);
    border-radius: var(--radius-sm, 4px);
}
.dna-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono');
    color: var(--text-primary, #1F2937);
}
.dna-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.dna-registry-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    margin-top: 8px;
}
.dna-registry-badge.warning {
    color: var(--accent-danger);
    font-weight: 600;
}
/* DNA identity card */
.dna-identity { margin-bottom: 16px; }
.dna-company-name {
    font-family: var(--font-display, 'Outfit');
    font-size: 1.2rem;
    margin: 0 0 10px;
}
.dna-company-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dna-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary, #64748b);
}
.dna-detail-row svg { flex-shrink: 0; color: var(--text-secondary, #64748b); }
.dna-badges-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.dna-no-registry {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid var(--accent-danger);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.82rem;
    color: var(--accent-danger);
}
.dna-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #64748b);
    margin: 16px 0 8px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-page, #111827);
}
.dna-section-dim { color: var(--text-secondary, #94a3b8); font-weight: 400; }
.dna-wrong-match {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-page, #111827);
    font-size: 0.82rem;
    color: var(--text-secondary, #64748b);
}

.dna-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary, #64748b);
    font-size: 0.88rem;
}
.dna-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 32px;
    color: var(--indigo-600);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Candidates list */
.candidates-list { margin-top: 16px; }
.candidates-header {
    font-size: 0.88rem;
    margin-bottom: 12px;
    color: var(--text-secondary, #64748b);
}
.candidate-card {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--border, #374151);
    border-radius: var(--radius-md, 8px);
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.candidate-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}
.candidate-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.candidate-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary, #64748b);
}
.candidate-neq { font-family: var(--font-mono, 'JetBrains Mono'); }
.candidate-address, .candidate-phone {
    font-size: 0.78rem;
    color: var(--text-secondary, #64748b);
    margin-top: 2px;
}
.candidate-info {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
}

/* Source badges */
.badge-seao {
    background: rgba(31, 41, 55, 0.1);
    color: var(--accent-info);
}
.badge-rbq {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}
.badge-req, .badge-grey {
    background: var(--bg-page, #111827);
    color: var(--text-secondary, #64748b);
}
.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}
.badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Profile cards (radio) */
.onboarding-profiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.profile-card {
    display: block;
    background: var(--bg-surface);
    border: 2px solid var(--border, #374151);
    border-radius: var(--radius-md, 8px);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.profile-card:hover { border-color: var(--accent-primary); }
.profile-card.selected {
    border-color: var(--accent-primary);
    background: var(--indigo-soft);
}
.profile-card-inner strong { display: block; font-size: 0.88rem; margin-bottom: 4px; }
.profile-cats {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Category & region checkbox grids */
.onboarding-categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.onboarding-regions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border, #374151);
    border-radius: var(--radius-sm, 4px);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: border-color 0.15s;
}
.checkbox-card:hover { border-color: var(--accent-primary); }
.checkbox-card.checked {
    border-color: var(--accent-primary);
    background: var(--indigo-soft);
}

/* Amount range */
.onboarding-amount-range {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.amount-field { flex: 1; }
.amount-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary, #64748b);
}

/* Summary */
.onboarding-summary {
    background: var(--bg-surface);
    border: 1px solid var(--border, #374151);
    border-radius: var(--radius-md, 8px);
    padding: 20px;
    margin-bottom: 24px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-page, #111827);
    font-size: 0.88rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
    font-weight: 600;
    color: var(--text-secondary, #64748b);
}
.summary-value { text-align: right; max-width: 60%; }

/* Navigation */
.onboarding-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border, #374151);
}
.btn-lg {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 700;
}

/* Skip link */
.onboarding-skip {
    text-align: center;
    margin-top: 24px;
}
.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
}
.btn-link:hover { color: var(--text-primary, #1F2937); }

/* ═══════════════════════════════════════════
   DNA WOW — Etape 2 effet impressionnant
   ═══════════════════════════════════════════ */

/* Section wrapper */
.dna-wow-section {
    margin-bottom: 32px;
}

/* Hero banner */
.dna-wow-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241,0.10) 0%, rgba(99, 102, 241,0.04) 100%);
    border: 1px solid var(--border-accent-soft);
    border-radius: var(--radius-lg, 10px);
    padding: 24px;
    margin-bottom: 24px;
}
.dna-wow-banner-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--indigo-soft-strong);
    border-radius: 50%;
    color: var(--indigo-600);
}
.dna-wow-title {
    font-family: var(--font-display, 'Outfit');
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary, #1F2937);
}
.dna-wow-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary, #4B5563);
    margin: 0;
    line-height: 1.5;
}
.dna-wow-subtitle strong {
    color: var(--indigo-600);
    font-size: 1.05rem;
}

/* Stats grid (4 colonnes) */
.dna-wow-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.dna-wow-stat {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 8px);
}
.dna-wow-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-display, 'Outfit');
    color: var(--text-primary, #1F2937);
    line-height: 1.2;
}
.dna-wow-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary, #9CA3AF);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Block titles */
.dna-wow-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 8px);
    padding: 16px 20px;
    margin-bottom: 12px;
}
.dna-wow-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display, 'Outfit');
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary, #1F2937);
    margin: 0 0 12px;
}
.dna-wow-block-title svg {
    color: var(--indigo-600);
    flex-shrink: 0;
}

/* Category bars */
.dna-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dna-category-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dna-category-info {
    min-width: 200px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
}
.dna-category-id {
    font-family: var(--font-mono, 'JetBrains Mono');
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--indigo-600);
    background: var(--indigo-soft);
    padding: 1px 6px;
    border-radius: 3px;
}
.dna-category-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
}
.dna-category-count {
    font-size: 0.72rem;
    color: var(--text-tertiary, #9CA3AF);
}
.dna-category-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-page, #111827);
    border-radius: 4px;
    overflow: hidden;
}
.dna-category-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--indigo-300));
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.6s ease;
}
/* Category force badges */
.dna-category-badge { font-size: 0.68rem; font-weight: 700; margin-left: 4px; }
.dna-category-badge.strong { color: var(--accent-success); }
.dna-category-badge.weak { color: var(--text-tertiary, #9CA3AF); font-style: italic; }
.dna-category-pct {
    font-family: var(--font-mono, 'JetBrains Mono');
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #4B5563);
    min-width: 36px;
    text-align: right;
}

/* Buyer rows */
.dna-buyer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dna-buyer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-page, #111827);
    border-radius: var(--radius-sm, 4px);
}
.dna-buyer-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dna-buyer-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.dna-buyer-count {
    font-size: 0.75rem;
    color: var(--text-secondary, #4B5563);
    font-family: var(--font-mono, 'JetBrains Mono');
}
.dna-buyer-wins {
    font-size: 0.75rem;
    color: var(--accent-success);
    font-weight: 600;
    font-family: var(--font-mono, 'JetBrains Mono');
}
/* Buyer win rate */
.dna-buyer-wr {
    font-family: var(--font-mono, 'JetBrains Mono');
    font-size: 0.72rem; font-weight: 700;
    color: var(--accent-success);
    min-width: 32px; text-align: right;
}
/* Concentration warning */
.dna-concentration-warn {
    font-size: 0.78rem; color: var(--accent-warning);
    padding: 6px 10px; border-radius: var(--radius-sm, 4px);
    background: var(--amber-soft); margin-top: 8px;
}

/* Territory — city tags */
.dna-territory-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dna-city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dna-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-page, #111827);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary, #1F2937);
}
.dna-city-count {
    font-family: var(--font-mono, 'JetBrains Mono');
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--indigo-600);
    background: var(--indigo-soft-strong);
    padding: 1px 6px;
    border-radius: 10px;
}

/* Buyer type bar (gouv/municipal) */
.dna-buyer-type-bar {
    position: relative;
}
.dna-buyer-type-bar::before {
    content: '';
    display: block;
    height: 6px;
    background: var(--cyan-soft);
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
}
.dna-bt-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-info), rgba(31, 41, 55,0.6));
    border-radius: 3px 0 0 3px;
}
.dna-bt-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--text-tertiary, #9CA3AF);
}
.dna-bt-labels span:first-child { color: var(--accent-info); font-weight: 600; }

/* Price gauge */
.dna-price-gauge {
    padding: 8px 0;
}
.dna-price-track {
    position: relative;
    height: 10px;
    background: var(--bg-page, #111827);
    border-radius: 5px;
    margin: 12px 0;
    border: 1px solid var(--border-subtle);
}
.dna-price-range-fill {
    position: absolute;
    top: 0; bottom: 0;
    background: linear-gradient(90deg, var(--indigo-soft-strong), var(--accent-primary), var(--indigo-soft-strong));
    border-radius: 5px;
}
.dna-price-marker {
    position: absolute;
    top: -4px;
    transform: translateX(-50%);
}
.dna-price-marker-line {
    width: 3px;
    height: 18px;
    background: var(--indigo-600);
    border-radius: 2px;
}
.dna-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary, #9CA3AF);
    margin-top: 4px;
}
.dna-price-labels strong {
    color: var(--text-primary, #1F2937);
    font-family: var(--font-mono, 'JetBrains Mono');
}
/* Extended P10-P90 labels */
.dna-price-labels-full {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-tertiary, #9CA3AF);
    margin-top: 4px;
}
.dna-price-labels-full strong {
    color: var(--text-primary, #1F2937);
    font-family: var(--font-mono, 'JetBrains Mono');
}

/* Keyword cloud */
.dna-keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dna-keyword-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-page, #111827);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    font-size: 0.78rem;
    color: var(--text-secondary, #4B5563);
}
.dna-kw-primary {
    background: var(--indigo-soft);
    border-color: var(--border-accent-soft);
    color: var(--indigo-600);
    font-weight: 600;
}
.dna-kw-selected {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
}

/* Config section (Partie B) */
.dna-wow-config-section {
    margin-top: 8px;
}
.dna-wow-config-intro {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.06);
    border-left: 3px solid var(--accent-success);
    border-radius: var(--radius-sm, 4px);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary, #4B5563);
    line-height: 1.5;
}
.dna-wow-config-intro svg { flex-shrink: 0; }
.dna-wow-config-intro p { margin: 0; }
.dna-wow-config-title {
    font-family: var(--font-display, 'Outfit');
    font-size: 0.95rem;
    margin: 20px 0 10px;
}

/* ═══ Cascade reveal animations ═══ */
.dna-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dna-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stats stagger (nth-child delays) */
.dna-wow-stats .dna-wow-stat {
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dna-wow-stats.visible .dna-wow-stat { opacity: 1; transform: translateY(0); }
.dna-wow-stats.visible .dna-wow-stat:nth-child(1) { transition-delay: 0.05s; }
.dna-wow-stats.visible .dna-wow-stat:nth-child(2) { transition-delay: 0.15s; }
.dna-wow-stats.visible .dna-wow-stat:nth-child(3) { transition-delay: 0.25s; }
.dna-wow-stats.visible .dna-wow-stat:nth-child(4) { transition-delay: 0.35s; }

/* Benchmark label */
.dna-wow-stat-benchmark {
    display: block; font-size: 0.68rem; margin-top: 2px;
    font-weight: 600; letter-spacing: 0.02em;
}
.dna-wow-stat-benchmark.positive { color: var(--accent-success); }
.dna-wow-stat-benchmark.negative { color: var(--accent-danger); }

/* Champion badge */
.dna-champion-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241,0.15), rgba(99, 102, 241,0.05));
    border: 1px solid var(--border-accent-soft);
    border-radius: 20px; padding: 6px 16px;
    font-size: 0.82rem; color: var(--indigo-600); font-weight: 600;
    margin-top: 12px; margin-bottom: 12px;
}
.dna-champion-icon { font-size: 1.1rem; }

/* Bar fill animation on reveal */
.dna-reveal .dna-category-bar-fill { width: 0 !important; }
.dna-reveal.visible .dna-category-bar-fill {
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* Tag pop animation */
.dna-city-tag, .dna-keyword-tag {
    opacity: 0; transform: scale(0.85);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dna-reveal.visible .dna-city-tag,
.dna-reveal.visible .dna-keyword-tag {
    opacity: 1; transform: scale(1);
}
.dna-reveal.visible .dna-city-tag:nth-child(1),
.dna-reveal.visible .dna-keyword-tag:nth-child(1) { transition-delay: 0.05s; }
.dna-reveal.visible .dna-city-tag:nth-child(2),
.dna-reveal.visible .dna-keyword-tag:nth-child(2) { transition-delay: 0.12s; }
.dna-reveal.visible .dna-city-tag:nth-child(3),
.dna-reveal.visible .dna-keyword-tag:nth-child(3) { transition-delay: 0.19s; }
.dna-reveal.visible .dna-city-tag:nth-child(4),
.dna-reveal.visible .dna-keyword-tag:nth-child(4) { transition-delay: 0.26s; }
.dna-reveal.visible .dna-city-tag:nth-child(5),
.dna-reveal.visible .dna-keyword-tag:nth-child(5) { transition-delay: 0.33s; }

/* Hover micro-interactions */
.dna-category-row { transition: background 0.2s, transform 0.2s; }
.dna-category-row:hover { background: var(--indigo-soft); transform: translateX(3px); }
.dna-buyer-row { transition: transform 0.2s, border-left 0.2s; border-left: 2px solid transparent; }
.dna-buyer-row:hover { transform: translateX(3px); border-left: 2px solid var(--accent-primary); }
.dna-city-tag { transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dna-city-tag:hover { box-shadow: 0 0 10px rgba(99, 102, 241,0.25); border-color: var(--accent-primary); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dna-reveal, .dna-wow-stats .dna-wow-stat, .dna-city-tag, .dna-keyword-tag {
        opacity: 1 !important; transform: none !important;
        transition: none !important; animation: none !important;
    }
}

/* ── Step 3 — Smart region cards ── */
.step3-regions-active { margin-top: 16px; }
.step3-regions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.step3-region-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1.5px solid var(--border, #374151);
    border-radius: var(--radius-sm, 6px);
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.step3-region-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241,0.12);
}
.step3-region-card.checked {
    border-color: var(--accent-primary);
    background: var(--indigo-soft);
}
.step3-region-main {
    display: flex;
    align-items: center;
    gap: 8px;
}
.step3-region-check {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1.5px solid var(--border, #ccc);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.step3-region-card.checked .step3-region-check {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
.step3-region-check svg { stroke: #fff; }
.step3-region-name {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary, #1F2937);
}
.step3-region-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}
.step3-region-bids {
    font-family: var(--font-mono, 'JetBrains Mono');
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--indigo-600);
    background: var(--indigo-soft-strong);
    padding: 2px 8px;
    border-radius: 10px;
}
.step3-region-pct {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

/* Expand toggle */
.step3-expand { margin-top: 12px; }
.step3-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px dashed var(--border, #4B5563);
    border-radius: var(--radius-sm, 6px);
    padding: 8px 16px;
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}
.step3-expand-btn:hover {
    border-color: var(--accent-primary);
    color: var(--indigo-600);
    background: var(--indigo-soft);
}
.step3-expand-btn svg { transition: transform 0.3s; }
.step3-extra-regions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

/* Price section */
.step3-price-section { margin-top: 8px; }
.step3-filter-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
    font-weight: 400;
}
.step3-price-context {
    font-size: 0.78rem;
    color: var(--text-secondary, #64748b);
    margin: 8px 0 0;
    flex-basis: 100%;
}

/* ── Step 4 — Premium confirmation ── */

/* Reveal animation (reuses .dna-reveal pattern) */
.s4-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.s4-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero — warm gold briefing card */
.s4-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241,0.10) 0%, rgba(99, 102, 241,0.04) 100%);
    border: 1px solid var(--border-accent-soft);
    border-radius: var(--radius-lg, 10px);
    padding: 28px 28px 24px;
    margin-bottom: 20px;
    overflow: hidden;
}
.s4-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 80%, rgba(99, 102, 241,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.s4-hero-content { position: relative; }
.s4-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-success);
    background: var(--emerald-soft);
    border: 1px solid var(--border-success-soft);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 16px;
}
.s4-hero-badge svg { width: 13px; height: 13px; stroke: var(--accent-success); }
.s4-hero-title {
    font-family: var(--font-display, 'Outfit');
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #0B0F1A);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.s4-hero-sub {
    font-size: 0.88rem;
    color: var(--text-secondary, #4B5563);
    margin: 0;
    line-height: 1.5;
}
.s4-hero-sub strong {
    color: var(--indigo-600);
}
.s4-hero-stats {
    position: relative;
    display: flex;
    gap: 0;
    margin-top: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}
.s4-hero-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
}
.s4-hero-stat:not(:last-child) {
    border-right: 1px solid var(--border-subtle);
}
.s4-hero-stat-val {
    display: block;
    font-family: var(--font-display, 'Outfit');
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary, #0B0F1A);
    line-height: 1.1;
}
.s4-hero-stat-lbl {
    display: block;
    font-size: 0.68rem;
    color: var(--text-tertiary, #9CA3AF);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

/* Config blocks — 2x2 grid */
.s4-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.s4-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 8px);
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.s4-block:hover {
    border-color: var(--border-accent-soft);
    box-shadow: 0 2px 12px rgba(99, 102, 241,0.06);
}
.s4-block-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--indigo-soft);
    border-radius: 8px;
    color: var(--indigo-600);
}
.s4-block-body { flex: 1; min-width: 0; }
.s4-block-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary, #9CA3AF);
    margin-bottom: 4px;
}
.s4-block-value {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
}

/* Tags (regions, keywords) */
.s4-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.s4-tag {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-primary, #1F2937);
    background: var(--bg-page, #111827);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2px 8px;
}
.s4-tag-kw {
    background: var(--indigo-soft);
    border-color: var(--border-accent-soft);
    color: var(--indigo-600);
    font-weight: 600;
}
.s4-tag-more {
    background: var(--bg-page, #111827);
    color: var(--text-tertiary, #9CA3AF);
    font-weight: 600;
}
.s4-tag-empty {
    color: var(--text-tertiary, #9CA3AF);
    border-style: dashed;
}

/* Filter pills */
.s4-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.s4-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}
.s4-pill-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.s4-pill-on {
    background: var(--emerald-soft);
    color: var(--accent-success);
    border: 1px solid var(--border-success-soft);
}
.s4-pill-on .s4-pill-dot { background: var(--accent-success); }
.s4-pill-off {
    background: var(--bg-page, #111827);
    color: var(--text-tertiary, #9CA3AF);
    border: 1px solid var(--border-subtle);
}
.s4-pill-off .s4-pill-dot { background: var(--text-muted, #9CA3AF); }

/* Keywords block — full width */
.s4-keywords-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 8px);
    padding: 16px;
    margin-bottom: 10px;
}

/* CTA row */
.s4-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}
.s4-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--indigo-600) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 8px);
    padding: 14px 32px;
    font-family: var(--font-display, 'Outfit');
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241,0.3), 0 0 0 0 rgba(99, 102, 241,0);
}
.s4-launch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241,0.35), 0 0 0 3px rgba(99, 102, 241,0.1);
}
.s4-launch-btn:active {
    transform: translateY(0);
}
.s4-launch-btn svg {
    transition: transform 0.3s;
}
.s4-launch-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Spinner animation */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* Responsive */
@media (max-width: 600px) {
    .onboarding-profiles { grid-template-columns: 1fr; }
    .onboarding-categories-grid { grid-template-columns: 1fr; }
    .onboarding-regions-grid { grid-template-columns: 1fr 1fr; }
    .step3-regions-grid { grid-template-columns: 1fr; }
    .step3-extra-regions { grid-template-columns: 1fr; }
    .onboarding-amount-range { flex-direction: column; gap: 8px; }
    .dna-stats-grid { grid-template-columns: 1fr; }
    .onboarding-progress { gap: 16px; }
    .dna-wow-stats { grid-template-columns: repeat(2, 1fr); }
    .dna-wow-banner { flex-direction: column; gap: 12px; }
    .dna-category-row { flex-wrap: wrap; }
    .dna-category-info { min-width: 100%; }
    .dna-buyer-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .dna-price-labels-full { flex-wrap: wrap; gap: 4px; justify-content: center; }
    .dna-champion-badge { font-size: 0.75rem; }
    .s4-grid { grid-template-columns: 1fr; }
    .s4-hero { padding: 24px 20px 20px; }
    .s4-hero-title { font-size: 1.25rem; }
    .s4-hero-stats { flex-direction: column; gap: 0; }
    .s4-hero-stat:not(:last-child) { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .s4-cta { flex-direction: column-reverse; gap: 10px; }
    .s4-cta .btn, .s4-launch-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════
   MON ENTREPRISE — Profile page (mp-*)
   ═══════════════════════════════════════════════ */

/* ── Header ── */
.mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

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

.mp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--indigo-600) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
}

.mp-company-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.mp-meta {
    display: flex;
    gap: 14px;
    margin-top: 2px;
}

.mp-meta-item {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.mp-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── 5-column stats grid ── */
.stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ── Sections ── */
.mp-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.mp-section-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-subtle);
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Bar charts ── */
.mp-bar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mp-bar-row {
    display: grid;
    grid-template-columns: auto 1fr 120px;
    align-items: center;
    gap: 12px;
}

.mp-bar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mp-bar-id {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--indigo-600);
    background: var(--indigo-soft);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.mp-bar-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.mp-bar-track {
    height: 8px;
    background: var(--bg-page);
    border-radius: 4px;
    overflow: hidden;
}

.mp-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.mp-bar-gold { background: linear-gradient(90deg, var(--accent-primary) 0%, var(--indigo-300) 100%); }
.mp-bar-blue { background: linear-gradient(90deg, var(--accent-info) 0%, #22D3EE 100%); }
.mp-bar-green { background: linear-gradient(90deg, var(--accent-success) 0%, #34D399 100%); }

.mp-bar-value {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-align: right;
    white-space: nowrap;
}

/* ── Tables ── */
.mp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.mp-table thead th {
    text-align: left;
    font-weight: 700;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 16px;
    background: var(--bg-surface-inset);
    border-bottom: 2px solid var(--border-default);
    white-space: nowrap;
}

.mp-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.mp-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }

.mp-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.5;
}

.mp-table tbody tr:nth-child(even) {
    background: rgba(245, 243, 238, 0.4);
}

.mp-table tbody tr:hover {
    background: var(--indigo-soft);
}

.mp-table tbody tr:last-child td {
    border-bottom: none;
}

.mp-col-num {
    text-align: right !important;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    white-space: nowrap;
}

.mp-col-date {
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.mp-td-title {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.mp-table-scroll {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

/* ── Price range (box plot) ── */
.mp-price-range {
    padding: 8px 0;
}

.mp-price-bar {
    position: relative;
    height: 32px;
    margin: 0 40px;
}

.mp-price-whisker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    background: var(--border-default);
}

.mp-price-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    background: var(--indigo-soft-strong);
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
}

.mp-price-median {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 3px;
    background: var(--indigo-600);
    border-radius: 2px;
    transform: translateX(-50%);
}

.mp-price-labels {
    display: flex;
    justify-content: space-between;
    margin: 8px 20px 0;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.mp-price-median-label {
    font-weight: 700;
    color: var(--indigo-600);
}

.mp-price-legend {
    display: flex;
    justify-content: space-between;
    margin: 2px 20px 0;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-price-note {
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ── Activity grid ── */
.mp-activity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.mp-activity-item {
    text-align: center;
    padding: 20px 12px 16px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.mp-activity-item:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.mp-activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    opacity: 0.4;
}

.mp-activity-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.mp-activity-label {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.mp-trend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
}

.mp-trend-croissant { color: var(--accent-success); background: var(--emerald-soft); border: 1px solid var(--border-success-soft); }
.mp-trend-decroissant { color: var(--accent-danger); background: var(--red-soft); border: 1px solid var(--border-danger-soft); }
.mp-trend-stable { color: var(--text-tertiary); background: var(--bg-surface-inset); border: 1px solid var(--border-subtle); }

/* ── Registres ── */
.mp-registres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.mp-registre-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg-surface-inset);
}

.mp-registre-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mp-registre-status {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-success);
}

.mp-registre-detail {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-rbq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.mp-rbq-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.01em;
}

.mp-warnings {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--red-soft);
    border: 1px solid var(--border-danger-soft);
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    color: var(--accent-danger);
    font-weight: 500;
}

/* ── Empty state ── */
.mp-empty {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.mp-empty h3 {
    margin: 16px 0 8px;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.mp-empty p {
    color: var(--text-tertiary);
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* ═══ TRIAL TEASER ═══ */
.mp-teaser-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.mp-teaser-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.mp-teaser-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--indigo-600) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
}

.mp-teaser-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.mp-teaser-neq {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* Blurred stats teaser */
.mp-teaser-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.mp-teaser-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-surface-inset);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.mp-teaser-stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.mp-teaser-stat-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    display: block;
}

.mp-blur {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

/* Ghost sections */
.mp-teaser-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.mp-ghost-section {
    padding: 16px 20px;
    background: var(--bg-surface-inset);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.mp-ghost-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.mp-ghost-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-ghost-bar {
    height: 10px;
    background: linear-gradient(90deg, var(--border-subtle) 0%, var(--bg-page) 100%);
    border-radius: 5px;
    opacity: 0.6;
}

/* Paywall CTA */
.mp-paywall {
    text-align: center;
    padding: 40px 20px 20px;
    border-top: 2px solid var(--border-subtle);
}

.mp-paywall-icon {
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.mp-paywall-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.mp-paywall-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--indigo-600) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .mp-header { flex-direction: column; align-items: flex-start; }
    .mp-badges { margin-top: 8px; }
    .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }
    .mp-bar-row { grid-template-columns: 120px 1fr 80px; }
    .mp-teaser-stats { grid-template-columns: repeat(2, 1fr); }
    .mp-activity-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════
   MARKET INTEL PAGE
   ═══════════════════════════════════════════ */
.mi-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mi-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.32);
    background:
        radial-gradient(circle at 88% 8%, rgba(99, 102, 241, 0.24), transparent 32%),
        linear-gradient(135deg, #111827 0%, #1F2937 48%, #111827 100%);
    box-shadow: 0 10px 28px rgba(30, 30, 45, 0.18);
    overflow: hidden;
}

.mi-hero::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -32px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.26) 0%, rgba(99, 102, 241, 0) 72%);
    pointer-events: none;
}

.mi-hero-main {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.mi-hero-main h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: #111827;
    margin-bottom: 8px;
}

.mi-hero-main p {
    color: rgba(241, 240, 236, 0.88);
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 780px;
}

.mi-hero-main strong {
    color: var(--indigo-300);
}

.mi-hero-badge {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #A5B4FC;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(224, 204, 122, 0.52);
    background: rgba(99, 102, 241, 0.12);
}

.mi-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.mi-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid rgba(99, 102, 241, 0.48);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px 14px 12px;
}

.mi-kpi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 5px;
}

.mi-kpi-value {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
    font-size: 1.46rem;
    letter-spacing: -0.4px;
    margin-bottom: 2px;
}

.mi-kpi-meta {
    color: var(--text-tertiary);
    font-size: 0.76rem;
    font-weight: 500;
}

.mi-guardrail {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(31, 41, 55, 0.06) 100%);
    border: 1px solid var(--border-accent-soft);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
}

.mi-guardrail-title {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mi-guardrail-text {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.mi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 12px;
    align-items: start;
}

.mi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.mi-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-default);
    box-shadow: var(--shadow-card-hover);
}

.mi-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mi-card-head h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.mi-card-sub {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.mi-tier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.4px;
    border: 1px solid transparent;
}

.mi-tier-core {
    background: var(--emerald-soft);
    color: var(--accent-success);
    border-color: var(--border-success-soft);
}

.mi-tier-annex {
    background: var(--indigo-soft);
    color: var(--indigo-600);
    border-color: var(--border-accent-soft);
}

.mi-tier-conditional {
    background: var(--cyan-soft);
    color: var(--accent-info);
    border-color: var(--border-info-soft);
}

.mi-tier-macro {
    background: rgba(154, 154, 170, 0.08);
    color: var(--text-tertiary);
    border-color: rgba(154, 154, 170, 0.2);
}

.mi-score {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface-inset);
    padding: 10px 12px;
}

.mi-score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.mi-score-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(30, 30, 45, 0.08);
}

.mi-score-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--indigo-600) 0%, var(--accent-primary) 100%);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.22);
    animation: mi-fill-in 0.55s ease-out;
}

@keyframes mi-fill-in {
    from { width: 0; opacity: 0.5; }
    to { opacity: 1; }
}

.mi-score-value {
    margin-top: 7px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--indigo-600);
}

.mi-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mi-metric {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-height: 44px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 9px;
    background: #fff;
}

.mi-metric-k {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    font-weight: 700;
}

.mi-metric-v {
    font-family: var(--font-display);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

@media (max-width: 1260px) {
    .mi-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .mi-page {
        gap: 14px;
    }

    .mi-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .mi-hero-badge {
        align-self: flex-start;
    }

    .mi-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .mi-kpi-grid {
        grid-template-columns: 1fr;
    }

    .mi-metrics {
        grid-template-columns: 1fr;
    }

    .mi-card-head {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════
   PHASE 1 — AO EXTERNES + PIPELINE
   ═══════════════════════════════════════════ */
.p1-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.p1-alert {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    font-size: 0.86rem;
}

.p1-alert-warn {
    background: var(--indigo-soft);
    border-color: var(--border-accent-soft);
    color: var(--indigo-600);
}

.p1-filters {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
}

.p1-filters-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.p1-filters-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.p1-filters-form select,
.p1-filters-form input {
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-surface-inset);
    color: var(--text-primary);
    font-size: 0.84rem;
    padding: 0 10px;
    outline: none;
}

.p1-filters-form select:focus,
.p1-filters-form input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.p1-check {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    padding-bottom: 8px;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.84rem !important;
    color: var(--text-secondary) !important;
}

.p1-check input {
    width: 16px;
    height: 16px;
}

.p1-filter-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.p1-reasons {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.p1-reasons h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: -0.2px;
}

.p1-reason-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p1-reason-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(154, 154, 170, 0.08);
    border: 1px solid rgba(154, 154, 170, 0.2);
    color: var(--text-tertiary);
    font-size: 0.74rem;
    font-weight: 600;
}

.p1-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 12px;
}

.p1-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.p1-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.p1-card-head h3 {
    margin: 0;
    font-size: 0.99rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.p1-card-head p {
    margin: 3px 0 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.p1-score {
    flex-shrink: 0;
    text-align: right;
}

.p1-score-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--indigo-600);
    line-height: 1;
}

.p1-score-label {
    display: block;
    margin-top: 2px;
    font-size: 0.66rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.p1-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p1-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-info-soft);
    background: var(--cyan-soft);
    color: var(--accent-info);
    font-size: 0.7rem;
    font-weight: 700;
}

.p1-badge-soft {
    border-color: var(--border-accent-soft);
    background: var(--indigo-soft);
    color: var(--indigo-600);
}

.p1-badge-region {
    border-color: rgba(154, 154, 170, 0.24);
    background: rgba(154, 154, 170, 0.08);
    color: var(--text-tertiary);
}

.p1-badge-direct {
    border-color: var(--border-success-soft);
    background: var(--emerald-soft);
    color: var(--accent-success);
}

.p1-badge-portal {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
    color: var(--accent-danger);
}

.p1-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.p1-meta-grid strong {
    color: var(--text-muted);
    font-weight: 700;
    margin-right: 3px;
}

.p1-reasons-inline {
    margin: 0;
    padding-left: 16px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.p1-ai-explanation {
    margin: 4px 0 0;
    padding: 8px 10px;
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.p1-ai-explanation p {
    margin: 0;
}

.p1-rejection-details {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.p1-rejection-details summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.p1-rejection-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.p1-rejection-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.p1-rejection-count {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.78rem;
}

.p1-meta-pending {
    color: var(--accent-primary);
    font-weight: 600;
}

.p1-meta-warn {
    color: var(--accent-danger);
    font-weight: 600;
}

.p1-card-pending {
    opacity: 0.7;
    border-left: 3px solid var(--accent-primary);
}

.p1-score-pending {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed var(--accent-primary);
}

.p1-score-pending .p1-score-label {
    color: var(--accent-primary);
    font-size: 0.7rem;
}

.p1-card-actions {
    display: flex;
    justify-content: flex-end;
}

.p1-empty {
    background: var(--bg-surface);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: 22px;
    text-align: center;
}

.p1-empty h3 {
    margin: 0 0 6px;
    font-family: var(--font-display);
}

.p1-empty p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.p1-bucket-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.p1-bucket-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.p1-bucket-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.08rem;
    color: var(--text-primary);
}

.p1-bucket-head span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

@media (max-width: 1100px) {
    .p1-filters-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .p1-grid {
        grid-template-columns: 1fr;
    }

    .p1-filters-form {
        grid-template-columns: 1fr;
    }

    .p1-meta-grid {
        grid-template-columns: 1fr;
    }

    .p1-filter-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ─── EXTERNAL TENDERS: nofit + toggle ─── */
.p1-card-nofit {
    opacity: 0.45;
    border-left: 3px solid var(--border-default);
}

.p1-score-nofit {
    background: rgba(120, 120, 120, 0.08);
    border: 1px solid var(--border-default);
}

.p1-score-nofit .p1-score-label {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.p1-badge-fit {
    background: rgba(34, 197, 94, 0.12);
    color: #10B981;
    font-weight: 600;
}

.p1-badge-pending {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}

.p1-badge-nofit {
    background: rgba(120, 120, 120, 0.1);
    color: var(--text-tertiary);
}

.p1-toggle-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.p1-toggle-bar label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.p1-section-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 18px 0 8px;
}

/* ─── DISMISS BUTTON ─── */
.btn-dismiss {
    color: var(--text-tertiary);
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-dismiss:hover {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
}

/* ─── UNSEEN BADGE ─── */
.unseen-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(6, 182, 212, 0.15);
    color: #06B6D4;
    border: 1px solid rgba(6, 182, 212, 0.3);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ─── DEADLINE BADGE (Phase 7) ─── */
.deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-transform: uppercase;
}
.deadline-badge-urgent {
    background: rgba(239, 68, 68, 0.18);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.45);
    animation: deadline-pulse 2.2s ease-in-out infinite;
}
.deadline-badge-soon {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
@keyframes deadline-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
    50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* ─── FILTER TOGGLE (Non vus) ─── */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}
.filter-toggle:hover {
    border-color: var(--border-default);
}
.filter-toggle.filter-active {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.06);
    color: #06B6D4;
}
.filter-toggle-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid var(--border-default);
    transition: all 0.2s;
    flex-shrink: 0;
}
.filter-toggle-dot.active {
    background: #06B6D4;
    border-color: #06B6D4;
}

/* ─── DISMISSED LINK (dashboard) ─── */
.dismissed-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}
.dismissed-link:hover {
    color: var(--text-secondary);
    border-color: var(--border-default);
    background: var(--bg-surface-inset);
}

/* ─── DISMISSED LIST PAGE ─── */
.dismissed-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.dismissed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-surface);
    gap: 16px;
}
.dismissed-row:hover {
    background: var(--bg-surface-hover);
}
.dismissed-info {
    flex: 1;
    min-width: 0;
}
.dismissed-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dismissed-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.dismissed-date {
    font-size: 12px;
    color: var(--text-tertiary);
}
.dismissed-expired {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    letter-spacing: 0.5px;
}
.dismissed-sub {
    font-size: 11px;
    color: var(--text-muted);
}
.dismissed-actions {
    flex-shrink: 0;
}
.btn-restore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #10B981;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-restore:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
}
.dismissed-expired-label {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── DASHBOARD LOADER (async first load) ─── */
.dash-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 60px 24px;
    text-align: center;
}
.dash-loader-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 28px;
    animation: dash-loader-sway 3s ease-in-out infinite;
}
.dash-loader-icon svg {
    width: 100%;
    height: 100%;
}
.dash-loader-cable {
    animation: dash-cable-move 1.8s ease-in-out infinite;
    transform-origin: 24px 26px;
}
.dash-loader-block1 { animation: dash-block-rise 2.4s ease-out infinite; }
.dash-loader-block2 { animation: dash-block-rise 2.4s ease-out 0.4s infinite; }
.dash-loader-block3 { animation: dash-block-rise 2.4s ease-out 0.8s infinite; }
.dash-loader-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}
.dash-loader-sub {
    font-size: 14px;
    color: var(--text-tertiary);
    max-width: 380px;
    line-height: 1.5;
    margin: 0 0 28px 0;
}
.dash-loader-bar {
    width: 240px;
    height: 4px;
    background: var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
}
.dash-loader-bar-fill {
    width: 40%;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
    animation: dash-bar-sweep 2.2s ease-in-out infinite;
}

@keyframes dash-loader-sway {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(2deg); }
}
@keyframes dash-cable-move {
    0%, 100% { stroke-dashoffset: 0; }
    50%      { stroke-dashoffset: 5; }
}
@keyframes dash-block-rise {
    0%   { opacity: 0.04; transform: translateY(4px); }
    50%  { opacity: 0.15; transform: translateY(0); }
    100% { opacity: 0.04; transform: translateY(4px); }
}
@keyframes dash-bar-sweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(500%); }
}

/* ─── SETTINGS PAGE ─── */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 0;
}
.settings-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-inset);
    border-radius: 8px;
    color: var(--text-secondary);
}
.settings-card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.settings-card-body {
    padding: 16px 20px 20px;
}
.settings-card-footer {
    padding: 0 20px 18px;
}
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }
.settings-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.settings-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}
.settings-plan-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
}
.settings-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}
.settings-link:hover {
    background: var(--bg-surface-inset);
    color: var(--text-primary);
}

/* ─── GO/NO-GO BUTTONS ─── */
.btn-go {
    background: #10B981;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}
.btn-go:hover { background: #059669; }

.btn-veille {
    background: var(--accent-primary);
    color: var(--bg-surface);
    border: none;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.15s;
}
.btn-veille:hover { opacity: 0.85; }

.btn-passer {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}
.btn-passer:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-default);
}

/* ─── STATUS BADGES ─── */
.status-badge-go {
    background: rgba(22, 163, 74, 0.15);
    color: #10B981;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-badge-watching {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ─── NOTES PANEL ─── */
.notes-panel {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.notes-panel-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.notes-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.notes-input:focus { border-color: var(--accent-primary); }
.notes-input::placeholder { color: var(--text-muted); }
.btn-notes-save {
    background: var(--indigo-soft);
    color: var(--accent-primary);
    border: 1px solid var(--border-accent-soft);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.btn-notes-save:hover {
    background: var(--accent-primary);
    color: var(--bg-surface);
}
.btn-retirer {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}
.btn-retirer:hover {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
}
.btn-notes-toggle {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}
.btn-notes-toggle:hover {
    background: var(--bg-surface-inset);
    color: var(--text-primary);
}
.notes-confirm {
    font-size: 11px;
    color: #10B981;
    font-weight: 600;
    padding: 2px 0;
}
.gonogo-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.gonogo-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ─── WORKFLOW SOUMISSION 5 ETATS ─── */
.btn-interest {
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.25);
}
.btn-interest:hover {
    background: var(--indigo-500, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}
.btn-submit-start {
    background: #F59E0B;
    color: #1f2937;
    border: none;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}
.btn-submit-start:hover { background: #D97706; color: #fff; }

.btn-submit-confirm {
    background: #10B981;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    margin-top: 4px;
}
.btn-submit-confirm:hover { background: #059669; }

.btn-result-won {
    background: #10B981;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}
.btn-result-won:hover { background: #059669; }

.btn-result-lost {
    background: transparent;
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}
.btn-result-lost:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
}

.status-badge-interested {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-badge-submitted {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.status-badge-won {
    background: rgba(16, 185, 129, 0.18);
    color: #10B981;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.status-badge-lost {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bid-form {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    min-width: 240px;
}
.bid-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.bid-form input[type="number"],
.bid-form input[type="date"] {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.bid-form input:focus { border-color: var(--accent-primary); }

/* ═══════════════════════════════════════════
   PIPELINE KANBAN
   ═══════════════════════════════════════════ */

.pipeline-page { max-width: 1400px; }

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.pipeline-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.pipeline-stats {
    display: flex;
    gap: 24px;
}
.pipeline-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.pipeline-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.pipeline-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.pipeline-column {
    min-width: 200px;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
}
.pipeline-col-header {
    padding: 12px 14px;
    background: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pipeline-col-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pipeline-col-count {
    background: var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.pipeline-col-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

.pipeline-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    transition: box-shadow 0.15s;
}
.pipeline-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pipeline-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 4px;
}
.pipeline-card-buyer {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.pipeline-card-deadline {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.deadline-urgent { color: #dc2626; }
.deadline-soon   { color: #d97706; }
.pipeline-card-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--indigo-600);
    margin-bottom: 4px;
}
.pipeline-card-notes {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
    border-top: 1px dashed var(--border-subtle);
    margin-top: 4px;
}
.pipeline-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.pipeline-action-btn {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border: 1px solid;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pipeline-action-btn:hover {
    background: rgba(0,0,0,0.04);
}
.pipeline-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 8px;
    font-style: italic;
}
.pipeline-onboarding {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-default);
    border-radius: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.pipeline-onboarding a {
    color: var(--indigo-600);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .pipeline-board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .pipeline-board { grid-template-columns: repeat(2, 1fr); }
    .pipeline-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .pipeline-board { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablette (max-width: 768px) */
@media (max-width: 768px) {

    /* ── Sidebar overlay ── */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--navbar-height);
        background: rgba(0, 0, 0, 0.45);
        z-index: 89;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active { display: block; }

    /* ── Tender card header: titre + badge stack mieux ── */
    .tender-card-header {
        padding: 14px 16px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .tender-title { font-size: 14px; }

    /* ── Card body: 2 colonnes sur tablette ── */
    .tender-card-body {
        grid-template-columns: repeat(2, 1fr);
    }
    .tender-detail {
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
    .tender-detail:nth-child(odd) {
        border-right: 1px solid var(--border-subtle);
    }
    .tender-detail:nth-last-child(-n+2) { border-bottom: none; }

    /* ── Card footer: wrap les boutons ── */
    .tender-card-footer {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 16px;
    }

    /* ── Filter bar: scroll horizontal ── */
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 12px;
        gap: 8px;
        scrollbar-width: none;
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-group { flex-shrink: 0; }
    .filter-search { min-width: 180px; flex-shrink: 0; }

    /* ── Profile KPI: 2 colonnes ── */
    .profile-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-header { flex-direction: column; gap: 12px; }
    .profile-header-actions { align-self: flex-start; }

    /* ── Profile tables: scroll horizontal ── */
    .profile-section .profile-table-scroll,
    .profile-section > .profile-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    .profile-table { min-width: 500px; }

    /* ── My history stats: 2x2 grid ── */
    .my-history-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* ── Method bar: colonnes adaptees ── */
    .method-bar-row { grid-template-columns: 110px 1fr 48px; }

    /* ── AI explanation section ── */
    .ai-explanation { padding: 10px 16px; }
    .freshness-bar { padding: 6px 16px; }

}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {

    /* ── Tender card: pleine largeur, 1 colonne ── */
    .tender-card { border-radius: 8px; }
    .tender-card-header { padding: 12px 14px 8px; }
    .tender-title { font-size: 13px; }

    .tender-card-body {
        grid-template-columns: 1fr;
    }
    .tender-detail {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 8px 14px;
    }
    .tender-detail:last-child { border-bottom: none; }

    /* ── Footer: full-width avec boutons larges ── */
    .tender-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px;
    }

    /* ── Boutons Go/Veille/Passer: touch-friendly ── */
    .btn-go,
    .btn-veille,
    .btn-passer {
        min-height: 44px;
        justify-content: center;
        font-size: 13px;
        padding: 0 16px;
        border-radius: 8px;
    }

    /* ── Notes + boutons secondaires ── */
    .btn-notes-toggle,
    .btn-retirer,
    .btn-notes-save {
        min-height: 40px;
        padding: 0 14px;
    }

    /* ── GoNogo footer ── */
    .gonogo-footer-right {
        align-items: flex-start;
        width: 100%;
    }
    .gonogo-status-row { width: 100%; }

    /* ── Filter bar: toujours scroll horizontal ── */
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 6px 10px;
    }

    /* ── Profile KPI: 2 colonnes conservees ── */
    .profile-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .profile-section { padding: 14px 14px; }
    .profile-section-title { font-size: 14px; }
    .profile-table th, .profile-table td { padding: 8px 10px; font-size: 12px; }

    /* ── My history stats: 2x2 conserve, taille reduite ── */
    .my-history-stats { gap: 12px; }
    .my-history-stat-value { font-size: 18px; }

    /* ── Navbar compact ── */
    .navbar-plan { display: none; }
    .live-indicator span { display: none; }
    .live-indicator { gap: 4px; }

    /* ── Typographie: boost lisibilite ── */
    .detail-label { font-size: 10px; }
    .detail-value { font-size: 13px; }
    .detail-sub  { font-size: 11px; }
    .meta-badge  { font-size: 11px; padding: 3px 8px; }

    /* ── Pipeline board: 1 colonne ── */
    .pipeline-board {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
    .pipeline-col { min-width: unset; width: 100%; }

    /* ── Page header ── */
    .page-title { font-size: 18px; }

    /* ── Stats grid (dashboard) ── */
    .stats-grid { grid-template-columns: 1fr; }

}

/* ═══════════════════════════════════════════
   ROI WIDGET
   ═══════════════════════════════════════════ */

.roi-widget {
    background: linear-gradient(135deg, rgba(99, 102, 241,0.06) 0%, rgba(99, 102, 241,0.02) 100%);
    border: 1px solid var(--border-accent-soft);
    border-left: 4px solid var(--accent-primary);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
}
.roi-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.roi-widget-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--indigo-600);
}
.roi-widget-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.roi-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.roi-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.roi-stat-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .roi-widget-stats { gap: 16px; }
    .roi-stat-value { font-size: 16px; }
}

/* ═══════════════════════════════════════════
   AUDIT FIXES — Accessibilite & Contraste
   ═══════════════════════════════════════════ */

/* Focus visible — WCAG 2.4.7 */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Contraste fixes — remonter les couleurs pour WCAG AA 4.5:1 */
/* --text-muted etait #9CA3AF (2.7:1) → #6B7280 (4.6:1) */
/* --gold etait #6366F1 (2.8:1 sur blanc) — on garde pour les fonds, on darkifie pour le texte */
.stat-label, .meta-badge, .filter-banner-label, .pipeline-card-buyer,
.pipeline-card-deadline, .pipeline-empty, .trend-bar-stat, .method-bar-pct,
.profile-subtitle, .my-history-stat-label, .roi-stat-label, .pipeline-stat-label,
.opp-signal-detail, .search-hint, .wpb-label {
    color: #6B7280;
}

/* Boutons Go/Veille/Passer — touch targets 44px minimum */
.btn-go, .btn-veille, .btn-passer {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* hx-indicator pour boutons Go/Veille (feedback chargement) */
.gonogo-footer-right .htmx-request {
    opacity: 0.6;
    pointer-events: none;
}
.gonogo-footer-right .htmx-request::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skip to content link (accessibilite clavier) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--bg-navbar);
    color: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* ═══════════════════════════════════════════
   LANDING PAGE — Dark Fintech
   ═══════════════════════════════════════════ */

.landing-page {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-page);
    margin: 0;
    padding: 0;
}

/* Navbar landing */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 48px;
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-nav-brand {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.landing-nav-brand span {
    color: var(--accent-primary);
    font-style: italic;
}
.landing-nav-links { display: flex; gap: 20px; align-items: center; }
.landing-nav-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.landing-nav-link:hover { color: var(--text-primary); }
.landing-nav-cta {
    background: var(--accent-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.15s, transform 0.15s;
}
.landing-nav-cta:hover {
    background: var(--indigo-400);
    transform: translateY(-1px);
}

/* Hero */
.landing-hero {
    text-align: center;
    padding: 96px 24px 72px;
    max-width: 860px;
    margin: 0 auto;
}
.landing-hero-badge {
    display: inline-block;
    background: var(--indigo-soft);
    color: var(--indigo-300);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
    text-transform: uppercase;
}
.landing-hero h1 {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}
.landing-hero h1 span {
    color: var(--accent-primary);
    background: linear-gradient(135deg, var(--indigo-400), var(--indigo-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.landing-hero p {
    font-size: 19px;
    color: var(--text-tertiary);
    line-height: 1.65;
    margin: 0 auto 36px;
    max-width: 640px;
}
.landing-hero-buttons { display: flex; gap: 14px; justify-content: center; }
.landing-btn-primary {
    background: var(--accent-primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}
.landing-btn-primary:hover {
    background: var(--indigo-400);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}
.landing-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid var(--border-default);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.landing-btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

/* Stats row */
.landing-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 56px 24px;
    background: var(--bg-navbar);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}
.landing-stat { text-align: center; }
.landing-stat-number {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.landing-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Features section */
.landing-features-section {
    padding: 84px 24px 64px;
    background: var(--bg-page);
}
.landing-section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}
.landing-section-header h2 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}
.landing-section-header p {
    font-size: 17px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.5;
}
.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.landing-feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 32px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.landing-feature-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
}
.landing-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--indigo-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent-primary);
}
.landing-feature-icon svg {
    color: var(--indigo-300);
}
.landing-feature-card h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.landing-feature-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.65;
    margin: 0;
}

/* Steps */
.landing-steps {
    background: var(--bg-surface-inset);
    padding: 84px 24px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}
.landing-steps h2 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 56px;
    letter-spacing: -0.02em;
}
.landing-steps-grid {
    display: flex;
    justify-content: center;
    gap: 56px;
    max-width: 960px;
    margin: 0 auto;
}
.landing-step { text-align: center; max-width: 260px; }
.landing-step-number {
    width: 48px;
    height: 48px;
    background: var(--indigo-soft);
    color: var(--indigo-300);
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
    font-variant-numeric: tabular-nums;
}
.landing-step h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}
.landing-step p {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin: 0;
}

/* Pricing */
.landing-pricing {
    padding: 84px 24px;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg-page);
}
.landing-pricing h2 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.landing-pricing-subtitle {
    font-size: 16px;
    color: var(--text-tertiary);
    margin: 0 0 48px;
}
.landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}
.landing-pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: left;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}
.landing-pricing-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}
.landing-pricing-card-featured {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-surface) 60%);
    border: 1.5px solid var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 16px 48px rgba(99, 102, 241, 0.2);
}
.landing-pricing-badge {
    display: inline-block;
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}
.landing-pricing-plan {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.landing-pricing-card-featured .landing-pricing-plan {
    color: var(--indigo-300);
}
.landing-pricing-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 28px;
}
.landing-price-amount {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.landing-pricing-card-featured .landing-price-amount {
    color: var(--accent-primary);
}
.landing-price-period {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.landing-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.landing-pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}
.landing-pricing-features li svg {
    color: var(--accent-success);
    flex-shrink: 0;
}
.landing-pricing-feature-off {
    opacity: 0.45;
}
.landing-pricing-feature-off svg {
    color: var(--text-muted) !important;
}
.landing-pricing-cta {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.landing-pricing-cta:hover {
    transform: translateY(-1px);
}
.landing-pricing-cta-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}
.landing-pricing-cta-primary:hover {
    background: var(--indigo-400);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}
.landing-pricing-cta-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}
.landing-pricing-cta-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* Footer */
.landing-footer {
    background: var(--bg-navbar);
    padding: 40px 48px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}
.landing-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.landing-footer-brand {
    font-size: 14px;
    color: var(--text-tertiary);
}
.landing-footer-brand strong {
    color: var(--accent-primary);
    font-weight: 700;
}
.landing-footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
}
.landing-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}
.landing-footer-links a:hover { color: var(--text-secondary); }
.landing-footer-legal {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Responsive landing */
@media (max-width: 1024px) {
    .landing-features { grid-template-columns: repeat(2, 1fr); }
    .landing-pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-pricing-card:last-child { grid-column: span 2; max-width: 400px; margin: 0 auto; width: 100%; }
}
@media (max-width: 768px) {
    .landing-nav { padding: 12px 20px; gap: 8px; }
    .landing-nav-links { gap: 8px; }
    .landing-nav-link { display: none; }
    .landing-hero { padding: 52px 20px 40px; }
    .landing-hero h1 { font-size: 34px; }
    .landing-hero p { font-size: 16px; }
    .landing-hero-buttons { flex-direction: column; align-items: center; }
    .landing-stats { flex-direction: column; gap: 28px; padding: 36px 24px; }
    .landing-stat-number { font-size: 32px; }
    .landing-features { grid-template-columns: 1fr; }
    .landing-features-section { padding: 48px 20px 32px; }
    .landing-steps-grid { flex-direction: column; align-items: center; gap: 32px; }
    .landing-steps { padding: 52px 20px; }
    .landing-pricing-grid { grid-template-columns: 1fr; }
    .landing-pricing-card:last-child { grid-column: span 1; max-width: none; }
    .landing-pricing { padding: 52px 20px; }
    .landing-footer { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════
   WATCH PROFILES — Page de gestion (Compte > Profils de veille)
   ═══════════════════════════════════════════ */

.watch-profiles-page {
    max-width: 1100px;
    margin: 0 auto;
}

.watch-profiles-page .profiles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

/* Cartes (formulaires) — overrides le .profile-card du wizard */
.watch-profiles-page .profile-card {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px 22px;
    cursor: default;
    transition: border-color 0.15s;
}
.watch-profiles-page .profile-card:hover { border-color: var(--border-default); }
.watch-profiles-page .profile-card-inactive {
    opacity: 0.7;
    border-style: dashed;
}

.watch-profiles-page .profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.watch-profiles-page .profile-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.watch-profiles-page .profile-name-input {
    flex: 1;
    min-width: 200px;
    background: transparent;
    border: 1px dashed transparent;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.watch-profiles-page .profile-name-input:hover {
    border-color: var(--border-subtle);
}
.watch-profiles-page .profile-name-input:focus {
    border-color: var(--indigo-500);
    border-style: solid;
    background: var(--bg-surface-inset);
}
.watch-profiles-page .profile-inactive-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.watch-profiles-page .profile-card-actions {
    display: flex;
    gap: 8px;
}

.watch-profiles-page .profile-section {
    margin-bottom: 18px;
}
.watch-profiles-page .profile-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.watch-profiles-page .profile-help {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0 0 10px;
    line-height: 1.5;
}
.watch-profiles-page .profile-select,
.watch-profiles-page .profile-input {
    width: 100%;
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.watch-profiles-page .profile-select:focus,
.watch-profiles-page .profile-input:focus {
    border-color: var(--indigo-500);
}

.watch-profiles-page .profile-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
    padding: 12px;
    background: var(--bg-surface-inset);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}
.watch-profiles-page .profile-checkboxes-3col {
    grid-template-columns: repeat(3, 1fr);
}
.watch-profiles-page .profile-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.watch-profiles-page .profile-check:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}
.watch-profiles-page .profile-check input[type="checkbox"] {
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--indigo-500);
}
.watch-profiles-page .profile-check input[type="checkbox"]:checked + span {
    color: var(--text-primary);
    font-weight: 600;
}
.watch-profiles-page .profile-check-strong {
    background: var(--bg-surface-inset);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}
.watch-profiles-page .profile-check-strong span { color: var(--text-secondary); }
.watch-profiles-page .profile-check-strong strong { color: var(--text-primary); }

.watch-profiles-page .profile-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    margin-top: 18px;
    border-top: 1px solid var(--border-subtle);
}
.watch-profiles-page .profile-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Alerts flash */
.watch-profiles-page .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid;
}
.watch-profiles-page .alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34D399;
}
.watch-profiles-page .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #EF4444;
}

/* Responsive */
@media (max-width: 768px) {
    .watch-profiles-page .profile-checkboxes,
    .watch-profiles-page .profile-checkboxes-3col {
        grid-template-columns: 1fr;
    }
    .watch-profiles-page .profile-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
