/* ============================================================
   Portail public · Brest Finance — Direction "Audacieux"
   Marine (primaire) + Cuivre (accent) + Sable (neutre chaud)
   Type éditoriale : Manrope display, Fraunces serif accents,
   Inter body, JetBrains Mono pour les chiffres.
   ============================================================ */

:root {
    /* ----- Type ----- */
    --p-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --p-font-display: 'Manrope', 'Inter', -apple-system, sans-serif;
    --p-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --p-font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* ----- Marine ----- */
    --p-marine-50: #eef3fb;
    --p-marine-100: #d8e3f4;
    --p-marine-200: #b3c7e8;
    --p-marine-300: #7ea1d4;
    --p-marine-400: #4d78ba;
    --p-marine-500: #2d5a9c;
    --p-marine-600: #1e4480;
    --p-marine-700: #173565;
    --p-marine-800: #122850;
    --p-marine-900: #0a1a38;

    /* ----- Cuivre / sable ----- */
    --p-copper-50: #fbf5ec;
    --p-copper-100: #f5e7d0;
    --p-copper-200: #ebcfa1;
    --p-copper-300: #ddae6c;
    --p-copper-400: #cd9248;
    --p-copper-500: #b87833;
    --p-copper-600: #9c6028;
    --p-copper-700: #7e4a22;

    --p-sand-50: #faf8f4;
    --p-sand-100: #f3efe7;
    --p-sand-150: #ebe6db;
    --p-sand-200: #ddd5c4;
    --p-sand-300: #c4b89f;
    --p-sand-400: #9c8d70;
    --p-sand-500: #6f6347;
    --p-sand-600: #4f4633;
    --p-sand-700: #3a3327;
    --p-sand-800: #26221a;
    --p-sand-900: #15130f;

    /* ----- Sémantique ----- */
    --p-success-50: #ecfaf3;
    --p-success-500: #1c9d65;
    --p-success-700: #0f6b44;
    --p-warning-50: #fdf6e3;
    --p-warning-500: #d49b1e;
    --p-warning-700: #8a6210;
    --p-danger-50: #fdedec;
    --p-danger-500: #d44848;
    --p-danger-700: #9b2a2a;

    /* ----- Surfaces ----- */
    --p-bg: #faf8f4;
    --p-bg-alt: #f3efe7;
    --p-surface: #ffffff;
    --p-border: #e6dfd1;
    --p-border-soft: #efe9dc;
    --p-border-strong: #d4caaf;

    --p-text: #15130f;
    --p-text-muted: #4f4633;
    --p-text-soft: #6f6347;
    --p-text-faint: #9c8d70;

    /* ----- Rayons ----- */
    --p-r-xs: 6px;
    --p-r-sm: 10px;
    --p-r-md: 14px;
    --p-r-lg: 20px;
    --p-r-xl: 28px;
    --p-r-pill: 999px;

    /* ----- Ombres ----- */
    --p-shadow-xs: 0 1px 2px rgba(38, 34, 26, 0.04);
    --p-shadow-sm: 0 2px 4px rgba(38, 34, 26, 0.05), 0 1px 2px rgba(38, 34, 26, 0.04);
    --p-shadow-md: 0 8px 24px -8px rgba(38, 34, 26, 0.10), 0 3px 6px -3px rgba(38, 34, 26, 0.05);
    --p-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.18), 0 8px 16px -8px rgba(15, 23, 42, 0.08);

    /* ----- Primaires (alias pour rétrocompat avec app.js inline styles) ----- */
    --p-primary: var(--p-marine-700);
    --p-primary-hover: var(--p-marine-800);
    --p-accent: var(--p-copper-500);

    /* Anciennes variables conservées pour compat */
    --bg-primary: var(--p-bg);
    --bg-secondary: var(--p-bg-alt);
    --bg-card: var(--p-surface);
    --text-primary: var(--p-text);
    --text-secondary: var(--p-text-soft);
    --accent: var(--p-marine-700);
    --accent-light: var(--p-copper-500);
    --accent-glow: rgba(45, 90, 156, 0.10);
    --success: var(--p-success-500);
    --error: var(--p-danger-500);
    --warning: var(--p-warning-500);
    --border: var(--p-border);
    --radius: var(--p-r-md);
    --radius-sm: var(--p-r-sm);
    --font: var(--p-font-sans);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background: var(--p-bg);
}

body {
    font-family: var(--p-font-sans);
    color: var(--p-text);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.005em;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

.text-left {
    text-align: left !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* ============================================================
   Hero band — marine plein cadre, présent sur tous les états
   ============================================================ */
.hero-band {
    background: var(--p-marine-700);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 20% 110%, #fff 0, transparent 38%),
        radial-gradient(circle at 92% -10%, #fff 0, transparent 30%);
}

.hero-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 22px 32px 28px;
    position: relative;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-title-block {
    margin-top: 36px;
    max-width: 720px;
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.78;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-eyebrow::before {
    content: '';
    width: 18px;
    height: 1px;
    background: currentColor;
}

.hero-title {
    font-family: var(--p-font-serif);
    font-weight: 500;
    font-variation-settings: "opsz" 144;
    font-size: 44px;
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}

.hero-title em {
    color: var(--p-copper-200);
    font-style: italic;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 15px;
    margin-top: 16px;
    max-width: 540px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.55;
}

@media (max-width: 640px) {
    .hero-inner {
        padding: 16px 18px 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-title-block {
        margin-top: 22px;
    }
}

/* ============================================================
   Logo
   ============================================================ */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--p-font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

#logo-container svg {
    flex-shrink: 0;
}

#logo-container svg circle,
#logo-container svg path {
    stroke: #fff;
}

.company-logo {
    max-height: 44px;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

#company-name {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
}

#company-name::after {
    content: 'Espace sécurisé';
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 2px;
}

.hero-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--p-r-pill);
    background: rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
}

.hero-secure::before {
    content: '🔒';
    font-size: 11px;
}

/* ============================================================
   Page container & states
   ============================================================ */
.container {
    width: 100%;
    max-width: none;
    margin: 0;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.state {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 32px 56px;
    text-align: left;
}

#state-loading,
#state-error,
#state-success {
    text-align: center;
    padding-top: 72px;
}

@media (max-width: 640px) {
    .state {
        padding: 18px 16px 36px;
    }
}

/* Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--p-border);
    border-top-color: var(--p-marine-700);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

#state-loading p {
    color: var(--p-text-soft);
    font-size: 14px;
}

/* Error / success */
.error-icon,
.success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

#state-error h2,
#state-success h2 {
    font-family: var(--p-font-serif);
    font-weight: 500;
    font-size: 28px;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--p-text);
}

#state-error h2 {
    color: var(--p-danger-700);
}

#state-success h2 {
    color: var(--p-success-700);
}

#state-error p,
#state-success p {
    color: var(--p-text-soft);
    font-size: 15px;
    max-width: 520px;
    margin: 0 auto;
}

/* ============================================================
   Upload info — titre éditorial dans le hero
   ============================================================ */
.upload-info {
    margin: -18px auto 0;
    max-width: 880px;
    padding: 0 4px 4px;
}

.upload-info h1 {
    font-family: var(--p-font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--p-text);
    margin-bottom: 4px;
}

.subtitle {
    color: var(--p-text-soft);
    font-size: 14px;
    margin-bottom: 14px;
}

.badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.badge {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    padding: 5px 12px;
    border-radius: var(--p-r-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--p-text-muted);
    font-family: var(--p-font-mono);
    letter-spacing: 0.01em;
}

/* ============================================================
   Progress card — flotte sous le hero (option B signature)
   ============================================================ */
.progress-card {
    max-width: 880px;
    margin: -32px auto 28px;
    position: relative;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 22px 26px;
    box-shadow: var(--p-shadow-lg);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
}

.progress-card .pc-num {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.progress-card .pc-ok {
    font-family: var(--p-font-serif);
    font-weight: 500;
    font-variation-settings: "opsz" 144;
    font-size: 56px;
    line-height: 1;
    color: var(--p-marine-700);
    letter-spacing: -0.02em;
}

.progress-card .pc-total {
    font-family: var(--p-font-display);
    font-size: 22px;
    color: var(--p-text-faint);
    font-weight: 600;
}

.progress-card .pc-body .pc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--p-text);
    letter-spacing: -0.005em;
}

.progress-card .pc-body .pc-hint {
    font-size: 12px;
    color: var(--p-text-soft);
    margin-top: 4px;
}

.progress-card .pc-bar {
    height: 6px;
    background: var(--p-bg-alt);
    border-radius: var(--p-r-pill);
    margin-top: 10px;
    overflow: hidden;
}

.progress-card .pc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-marine-700), var(--p-copper-500));
    border-radius: var(--p-r-pill);
    transition: width 0.4s ease;
}

.progress-card .pc-pct {
    text-align: right;
}

.progress-card .pc-pct-num {
    font-family: var(--p-font-mono);
    font-size: 28px;
    font-weight: 600;
    color: var(--p-text);
    line-height: 1;
}

.progress-card .pc-pct-num small {
    font-size: 16px;
    color: var(--p-text-faint);
}

.progress-card .pc-pct-label {
    font-size: 10px;
    color: var(--p-text-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .progress-card {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 12px;
        margin: -22px 14px 18px;
    }

    .progress-card .pc-pct {
        text-align: left;
    }
}

/* ============================================================
   Drop zone (libre) — bordure pointillée copper, fond crème
   ============================================================ */
.drop-zone {
    background: var(--p-surface);
    border: 2px dashed var(--p-border-strong);
    border-radius: var(--p-r-lg);
    padding: 34px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--p-marine-700);
    background: var(--p-marine-50);
    transform: translateY(-1px);
}

.drop-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.85;
}

.drop-zone p {
    color: var(--p-text-muted);
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.drop-or {
    display: block;
    color: var(--p-text-faint);
    font-size: 12px;
    margin-bottom: 12px;
}

.btn-select {
    display: inline-block;
    background: var(--p-marine-700);
    color: #fff;
    padding: 9px 22px;
    border-radius: var(--p-r-pill);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.005em;
    transition: all 0.18s;
}

.btn-select:hover {
    background: var(--p-marine-800);
    transform: translateY(-1px);
    box-shadow: var(--p-shadow-md);
}

/* ============================================================
   Actions bar / bouton secondaire (rafraîchir)
   ============================================================ */
.actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--p-surface);
    color: var(--p-text);
    border: 1px solid var(--p-border-strong);
    padding: 7px 14px;
    border-radius: var(--p-r-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--p-text-muted);
    background: var(--p-bg-alt);
}

/* ============================================================
   File list (deposit queue)
   ============================================================ */
.file-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-md);
    padding: 12px 16px;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.file-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

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

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name + .small {
    font-size: 11px !important;
    color: var(--p-copper-700) !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.file-size {
    font-size: 11px;
    color: var(--p-text-faint);
    font-family: var(--p-font-mono);
    margin-top: 2px;
}

.file-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--p-r-pill);
    flex-shrink: 0;
}

.file-status.pending {
    color: var(--p-text-muted);
    background: var(--p-bg-alt);
    border: 1px solid var(--p-border);
}

.file-status.uploading {
    color: var(--p-warning-700);
    background: var(--p-warning-50);
    border: 1px solid rgba(212, 155, 30, 0.22);
}

.file-status.done {
    color: var(--p-success-700);
    background: var(--p-success-50);
    border: 1px solid rgba(28, 157, 101, 0.18);
}

.file-status.error {
    color: var(--p-danger-700);
    background: var(--p-danger-50);
    border: 1px solid rgba(212, 72, 72, 0.18);
}

.file-remove {
    background: none;
    border: none;
    color: var(--p-text-faint);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.15s;
}

.file-remove:hover {
    color: var(--p-danger-500);
    background: var(--p-danger-50);
}

.file-progress {
    width: 100%;
    height: 3px;
    background: var(--p-bg-alt);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.file-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--p-marine-700), var(--p-copper-500));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================================
   Upload button — pleine largeur, marine
   ============================================================ */
.btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--p-marine-700);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: var(--p-r-pill);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    margin-top: 18px;
    transition: all 0.18s ease;
    font-family: inherit;
}

.btn-upload:hover:not(:disabled) {
    background: var(--p-marine-800);
    transform: translateY(-1px);
    box-shadow: var(--p-shadow-md);
}

.btn-upload:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================================
   Footer + trust strip
   ============================================================ */
.trust-strip {
    max-width: 880px;
    margin: 28px auto 0;
    padding: 16px 22px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-md);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--p-text-soft);
}

.trust-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer {
    text-align: center;
    margin: 24px auto 32px;
    padding: 0 32px;
    max-width: 880px;
}

.footer p {
    font-size: 12px;
    color: var(--p-text-faint);
}

.footer-links {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-link {
    color: var(--p-marine-700);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--p-copper-600);
    text-decoration: underline;
}

.footer-sep {
    color: var(--p-text-faint);
    font-size: 12px;
}

/* ============================================================
   History section + history items
   ============================================================ */
.history-section,
.shared-section {
    margin-top: 36px;
    padding: 22px 24px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-md);
}

.history-title,
.shared-title,
.expected-title {
    font-family: var(--p-font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--p-text);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-title::before {
    content: '';
}

.shared-subtitle {
    font-size: 13px;
    color: var(--p-text-soft);
    margin-bottom: 14px;
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--p-border-soft);
    font-size: 14px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-name {
    font-weight: 600;
    color: var(--p-text) !important;
}

.history-date {
    color: var(--p-text-faint) !important;
    font-size: 12px !important;
    font-family: var(--p-font-mono);
}

.history-status {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--p-r-pill);
    white-space: nowrap;
}

.history-status.quarantine {
    color: var(--p-warning-700);
    background: var(--p-warning-50);
    border: 1px solid rgba(212, 155, 30, 0.22);
}

.history-status.healthy {
    color: var(--p-success-700);
    background: var(--p-success-50);
    border: 1px solid rgba(28, 157, 101, 0.18);
}

.history-status.infected,
.history-status.error {
    color: var(--p-danger-700);
    background: var(--p-danger-50);
    border: 1px solid rgba(212, 72, 72, 0.18);
}

.status-refused {
    color: var(--p-danger-700) !important;
    background: var(--p-danger-50) !important;
    border: 1px solid rgba(212, 72, 72, 0.18) !important;
    padding: 4px 10px !important;
    border-radius: var(--p-r-pill) !important;
}

.status-pulsing {
    animation: pulse-opacity 1.5s infinite ease-in-out;
}

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

/* ============================================================
   Consent — checkbox label
   ============================================================ */
.consent-container {
    margin: 22px 0 0;
    padding: 14px 18px;
    background: var(--p-surface);
    border-radius: var(--p-r-md);
    border: 1px solid var(--p-border);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--p-text-muted);
    line-height: 1.55;
}

.checkbox-label input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--p-marine-700);
}

.checkbox-text a {
    color: var(--p-marine-700);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ============================================================
   Modal (sécurité, cookies)
   ============================================================ */
.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(15, 19, 36, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--p-surface);
    color: var(--p-text);
    padding: 2.25rem 2rem;
    border-radius: var(--p-r-lg);
    max-width: 650px;
    width: 92%;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--p-border);
    box-shadow: var(--p-shadow-lg);
}

.modal-content h2 {
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    color: var(--p-text);
}

.modal-content > p {
    color: var(--p-text-soft);
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 14px;
    font-size: 28px;
    font-weight: 400;
    color: var(--p-text-faint);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--p-text);
}

.security-info h3 {
    margin-top: 1.25rem;
    color: var(--p-marine-700);
    font-family: var(--p-font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.security-info ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.security-info li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--p-text-soft);
    font-size: 13px;
    line-height: 1.55;
}

.security-info li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--p-copper-500);
    font-weight: 700;
}

.security-info li strong {
    color: var(--p-text);
    font-weight: 600;
}

.diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--p-bg-alt);
    border-radius: var(--p-r-md);
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .diagram-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.diagram-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 140px;
}

.node-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.node-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--p-text);
}

.node-sub {
    font-size: 11px;
    color: var(--p-text-soft);
}

.diagram-node.special {
    background: var(--p-marine-50);
    padding: 0.75rem;
    border-radius: var(--p-r-sm);
    border: 1px solid var(--p-marine-200);
}

.diagram-arrow {
    color: var(--p-text-faint);
    font-size: 12px;
    align-self: center;
}

.encryption-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 1rem 0;
}

.enc-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--p-text-muted);
    background: var(--p-bg-alt);
    padding: 10px 14px;
    border-radius: var(--p-r-sm);
    line-height: 1.5;
}

.enc-step strong {
    color: var(--p-text);
}

.enc-step-num {
    background: var(--p-marine-700);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    font-family: var(--p-font-mono);
}

/* ============================================================
   Expected documents (groupes numérotés + cards)
   ============================================================ */
.expected-section {
    margin-top: 28px !important;
}

.expected-title {
    margin-bottom: 18px;
}

#expected-documents-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.borrower-section {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 28px;
    margin-bottom: 32px !important;
    box-shadow: var(--p-shadow-sm);
}

.borrower-section h3 {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 0 20px 0;
    margin: 0 0 24px 0;
    border-bottom: 1px solid var(--p-border-soft);
    font-family: var(--p-font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--p-marine-700);
    line-height: 1.2;
}

.borrower-section h3::before {
    content: attr(data-initials);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--p-copper-100);
    color: var(--p-copper-700);
    border: 1px solid var(--p-copper-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    font-family: var(--p-font-display);
}

.borrower-section.is-common h3::before {
    content: '📁';
    background: var(--p-bg-alt);
    border-color: var(--p-border);
    font-size: 20px;
}

.context-group {
    margin: 24px 0 0 0 !important;
    padding: 0 !important;
    border-left: none !important;
}

.context-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--p-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--p-text-soft);
    margin: 0 0 16px 0;
    padding: 0;
}

.expected-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 12px !important;
    margin-top: 0 !important;
}

@media (min-width: 1024px) {
    #expected-documents-list {
        gap: 28px;
    }
}

/* Card (single-file dropzone) */
.expected-card {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-left: 3px solid var(--p-border-strong);
    border-radius: var(--p-r-md);
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    position: relative;
}

.expected-card:hover,
.expected-card.dragover {
    border-color: var(--p-marine-700);
    border-left-color: var(--p-marine-700);
    box-shadow: var(--p-shadow-sm);
    transform: translateY(-2px);
}

.expected-card.dragover {
    background: var(--p-marine-50);
}

.expected-card.has-file {
    border-color: var(--p-copper-200);
    border-left-color: var(--p-copper-500);
    background: linear-gradient(180deg, var(--p-copper-50) 0%, var(--p-surface) 80%);
}

.expected-card.bg-success-light {
    background: linear-gradient(180deg, var(--p-success-50) 0%, var(--p-surface) 80%);
    border-color: rgba(28, 157, 101, 0.25);
    border-left-color: var(--p-success-500);
}

/* Déposé mais en attente de validation par le courtier (ambre). */
.expected-card.is-pending {
    background: linear-gradient(180deg, #fff8e6 0%, var(--p-surface) 80%);
    border-color: rgba(154, 103, 0, 0.25);
    border-left-color: #c8920a;
}

.expected-card .card-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    opacity: 0.85;
}

.expected-card .card-label {
    font-family: var(--p-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--p-text);
    line-height: 1.35;
}

.expected-card .card-sub {
    font-size: 12px;
    color: var(--p-text-soft);
    margin-top: 8px;
}

.expected-card.bg-success-light .card-label {
    color: var(--p-success-700);
}

.expected-card.bg-success-light .card-sub {
    color: var(--p-success-700) !important;
    font-weight: 500;
}

/* ============================================================
   Available document sets (boutons "+")
   ============================================================ */
.btn-add-set {
    background: var(--p-surface) !important;
    border: 1px dashed var(--p-border-strong) !important;
    padding: 10px 18px !important;
    border-radius: var(--p-r-pill) !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    transition: all 0.18s !important;
    font-family: inherit !important;
    color: var(--p-text-muted);
}

.btn-add-set:hover {
    background: var(--p-marine-50) !important;
    border-color: var(--p-marine-700) !important;
    border-style: solid !important;
    color: var(--p-marine-700);
}

.btn-add-set:hover div {
    color: var(--p-marine-700) !important;
}

.btn-add-set div {
    font-family: var(--p-font-display) !important;
    font-weight: 600 !important;
    color: var(--p-text-muted) !important;
    font-size: 13px;
}

/* ============================================================
   Shared files list
   ============================================================ */
.shared-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shared-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-left: 3px solid var(--p-marine-700);
    border-radius: var(--p-r-md);
    padding: 14px 16px;
    animation: slideIn 0.2s ease;
    transition: all 0.18s;
}

.shared-file-item:hover {
    border-color: var(--p-border-strong);
    border-left-color: var(--p-copper-500);
    box-shadow: var(--p-shadow-sm);
}

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

.shared-file-name {
    font-family: var(--p-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-file-size {
    font-size: 11px;
    color: var(--p-text-faint);
    margin-top: 3px;
    font-family: var(--p-font-mono);
}

.btn-download {
    background: var(--p-marine-700);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--p-r-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: -0.005em;
}

.btn-download:hover {
    background: var(--p-marine-800);
    transform: translateY(-1px);
    box-shadow: var(--p-shadow-md);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Cookie banner — adopte la palette marine/sable
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 16px 16px;
    animation: cookieSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}

.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-lg);
    padding: 22px 26px;
    box-shadow: var(--p-shadow-lg);
}

.cookie-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.cookie-banner-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.cookie-banner-text h3 {
    font-family: var(--p-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--p-text);
    margin-bottom: 6px;
}

.cookie-banner-text p {
    font-size: 13px;
    color: var(--p-text-soft);
    line-height: 1.55;
}

.cookie-banner-text a {
    color: var(--p-marine-700);
    text-decoration: none;
    font-weight: 600;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: var(--p-r-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: -0.005em;
}

.cookie-btn-accept {
    background: var(--p-marine-700);
    color: #fff;
}

.cookie-btn-accept:hover {
    background: var(--p-marine-800);
    transform: translateY(-1px);
    box-shadow: var(--p-shadow-md);
}

.cookie-btn-reject {
    background: var(--p-surface);
    color: var(--p-text-muted);
    border-color: var(--p-border-strong);
}

.cookie-btn-reject:hover {
    border-color: var(--p-text-muted);
    background: var(--p-bg-alt);
}

.cookie-btn-settings {
    background: var(--p-marine-50);
    color: var(--p-marine-700);
    border-color: var(--p-marine-200);
}

.cookie-btn-settings:hover {
    background: var(--p-marine-100);
    border-color: var(--p-marine-400);
}

/* Cookie modal */
.cookie-modal-content {
    max-width: 680px;
}

.cookie-modal-intro {
    font-size: 13px;
    color: var(--p-text-soft);
    line-height: 1.6;
    margin-bottom: 22px;
}

.cookie-modal-intro strong {
    color: var(--p-marine-700);
}

.cookie-category {
    background: var(--p-bg-alt);
    border: 1px solid var(--p-border);
    border-radius: var(--p-r-md);
    padding: 16px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: var(--p-border-strong);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-category-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.cookie-category-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-category-info h4 {
    font-family: var(--p-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--p-text);
    margin-bottom: 4px;
}

.cookie-category-info p {
    font-size: 12px;
    color: var(--p-text-soft);
    line-height: 1.5;
}

.cookie-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--p-border-strong);
    border-radius: 26px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--p-marine-700);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle.always-on .cookie-toggle-slider {
    background: var(--p-success-500);
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle.always-on .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle.always-on {
    cursor: not-allowed;
}

.cookie-toggle-label {
    font-size: 9px;
    color: var(--p-success-700);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cookie-detail-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--p-border);
}

.cookie-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
}

.cookie-detail-name {
    font-family: var(--p-font-mono);
    font-weight: 600;
    color: var(--p-marine-700);
    background: var(--p-marine-50);
    padding: 2px 8px;
    border-radius: var(--p-r-xs);
    font-size: 11px;
    flex-shrink: 0;
}

.cookie-detail-desc {
    flex: 1;
    color: var(--p-text-soft);
}

.cookie-detail-duration {
    color: var(--p-text-faint);
    font-size: 11px;
    flex-shrink: 0;
    font-family: var(--p-font-mono);
}

.cookie-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--p-border);
}

.cookie-legal-notice {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--p-marine-50);
    border-radius: var(--p-r-sm);
    border-left: 3px solid var(--p-marine-700);
}

.cookie-legal-notice p {
    font-size: 11px;
    color: var(--p-text-soft);
    line-height: 1.7;
}

.cookie-legal-notice strong {
    color: var(--p-text);
}

/* ============================================================
   Mobile responsive tweaks
   ============================================================ */
@media (max-width: 640px) {
    .cookie-banner-inner {
        padding: 18px 16px;
        border-radius: var(--p-r-md) var(--p-r-md) 0 0;
    }

    .cookie-banner {
        padding: 0;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cookie-toggle-container {
        align-self: flex-end;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .file-item {
        flex-wrap: wrap;
    }

    .file-status {
        margin-left: auto;
    }
}

.expected-card.is-refused {
    background: linear-gradient(180deg, var(--p-danger-50) 0%, var(--p-surface) 80%);
    border-color: rgba(212, 72, 72, 0.25);
    border-left-color: var(--p-danger-500);
}

/* ============================================================
   Cards groupées (Documents partagés v2) + Mode banquier
   ============================================================ */
.doc-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 10px;
    padding: 6px 10px;
    border-left: 4px solid var(--p-copper-500);
    background: #faf6ec;
    border-radius: 6px;
}
.doc-group-icon { font-size: 20px; line-height: 1; }
.doc-group-title {
    flex: 1;
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--p-text);
    letter-spacing: -0.01em;
}
.doc-group-count {
    background: var(--p-marine-700);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: var(--p-font-mono);
}

.doc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.doc-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    transition: all .18s ease;
    animation: slideIn .2s ease;
}
.doc-card:hover {
    border-color: var(--p-border-strong);
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
    transform: translateY(-1px);
}
.doc-card.downloaded { opacity: 0.85; }

.doc-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-card-icon { font-size: 22px; }
.doc-card-ext {
    font-family: var(--p-font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    background: #faf6ec;
    border-radius: 4px;
    color: var(--p-text-soft);
    letter-spacing: 0.05em;
}
.doc-card-flag {
    margin-left: auto;
    font-size: 10px;
    color: var(--p-marine-700);
    font-weight: 700;
}

.doc-card-name {
    font-family: var(--p-font-display);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--p-text);
    line-height: 1.3;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.doc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--p-text-faint);
}
.doc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.doc-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.doc-card-btn {
    flex: 1;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
    font-family: inherit;
}
.doc-card-btn.preview {
    background: #faf6ec;
    border-color: var(--p-border);
    color: var(--p-text-soft);
}
.doc-card-btn.preview:hover {
    background: #fff;
    border-color: var(--p-marine-700);
    color: var(--p-marine-700);
}
.doc-card-btn.download {
    background: var(--p-marine-700);
    color: #fff;
}
.doc-card-btn.download:hover { background: var(--p-marine-800); transform: translateY(-1px); }
.doc-card-btn.done { background: #1f7a4d; color: #fff; }
.doc-card-btn.err { background: #c0392b; color: #fff; }
.doc-card-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ====== Mode banquier ====== */
body.banker-mode .hero-band {
    background: linear-gradient(135deg, #1a2540 0%, #2c3e63 100%);
}
body.banker-mode .hero-eyebrow {
    color: #a9c0e6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
body.banker-mode .doc-card-grid.banker .doc-card {
    border-left: 3px solid #2c5282;
}
body.banker-mode .doc-card-grid.banker .doc-card-btn.download {
    background: #2c5282;
}
body.banker-mode .doc-card-grid.banker .doc-card-btn.download:hover { background: #1a365d; }

/* ====== Modal Preview (PDF / Image) ====== */
.preview-modal-content {
    max-width: 95vw;
    width: 1100px;
    max-height: 92vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--p-border);
    background: #faf6ec;
}
.preview-title {
    flex: 1;
    margin: 0;
    font-family: var(--p-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preview-actions { display: flex; gap: 8px; }
.preview-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--p-border);
    background: var(--p-surface);
    color: var(--p-text);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all .15s ease;
}
.preview-action-btn:hover {
    background: var(--p-marine-700);
    color: #fff;
    border-color: var(--p-marine-700);
}
.preview-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #1e1e1e;
    min-height: 70vh;
}

@media (max-width: 600px) {
    .doc-card-grid { grid-template-columns: 1fr; }
    .preview-modal-content { width: 100vw; max-height: 100vh; border-radius: 0; }
}

/* ===== Note de renégociation du courtier (mode banquier) ===== */
.broker-message-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--p-marine-50);
    border: 1px solid var(--p-marine-200);
    border-left: 4px solid var(--p-marine-500);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 8px 0 20px;
}
.broker-message-banner .bmb-icon { font-size: 22px; line-height: 1.2; }
.broker-message-banner .bmb-body { flex: 1; min-width: 0; }
.broker-message-banner .bmb-title {
    font-weight: 700;
    color: var(--p-marine-800);
    margin-bottom: 4px;
    font-size: 14px;
}
.broker-message-banner .bmb-round {
    font-weight: 600;
    color: var(--p-marine-500);
    font-size: 13px;
}
.broker-message-banner .bmb-text {
    color: var(--p-text);
    white-space: pre-wrap;
    margin: 0;
    line-height: 1.55;
}

/* ===== Zone de réponse du banquier ===== */
.banker-comment-section {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}
.banker-comment-section .bc-title {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--p-text);
}
.banker-comment-section .bc-subtitle {
    color: var(--p-text-soft);
    font-size: 13px;
    margin: 0 0 14px;
}
.banker-comment-section .bc-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--p-border-strong);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--p-text);
    resize: vertical;
    margin-bottom: 14px;
}
.banker-comment-section .bc-textarea:focus {
    outline: none;
    border-color: var(--p-marine-500);
    box-shadow: 0 0 0 3px var(--p-marine-100);
}
.bc-feedback { margin: 12px 0 0; font-size: 13px; font-weight: 600; }
.bc-feedback-success { color: #1d7a46; }
.bc-feedback-error { color: #b3261e; }

/* ===== Overlay de maintenance (déconnexion imminente) ===== */
.maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 26, 56, 0.72);
    backdrop-filter: blur(3px);
    padding: 20px;
}
.maintenance-overlay.hidden { display: none; }
.maintenance-box {
    background: var(--p-sand-50, #faf8f4);
    border: 1px solid var(--p-copper-300, #ddae6c);
    border-radius: 14px;
    max-width: 460px;
    width: 100%;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    font-family: var(--p-font-sans, sans-serif);
}
.maintenance-box .maintenance-icon { font-size: 40px; line-height: 1; }
.maintenance-box h2 {
    font-family: var(--p-font-display, sans-serif);
    color: var(--p-marine-700, #173565);
    margin: 12px 0 8px;
}
.maintenance-box p { color: var(--p-marine-800, #122850); margin: 8px 0; }
.maintenance-countdown {
    font-family: var(--p-font-mono, monospace);
    font-weight: 700;
    font-size: 18px;
    color: var(--p-copper-600, #9c6028);
}
