/* ==========================================================
   Login page – Final clean version
   ========================================================== */

/* Background */
#bg-home {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.export-toast {
    min-width: 420px;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.3);
}

.export-toast-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.export-toast-text {
    opacity: 0.9;
}

.scan-status-icon {
    width: 30px;
    height: 30px;
    margin-right: 3px;
}

.scan-feedback .scan-status-icon {
    width: 64px;
    height: 64px;
}

/* Overlay GLOBAL (pas lié au layout) */
.login-layout::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 0;
}

/* Scrollbar dark – WebKit */
.modal-body::-webkit-scrollbar {
    width: 10px;
}

.scan-history-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-group-flush {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.scan-page .modal-body::-webkit-scrollbar {
    width: 8px;
}

.scan-page .modal-body::-webkit-scrollbar-track {
    background: #1e2327;
}

.scan-page .modal-body::-webkit-scrollbar-thumb {
    background-color: #3a3f45;
    border-radius: 6px;
    border: 2px solid #1e2327;
}

.scan-page .modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #4a5057;
}

.of-list-page .modal-body::-webkit-scrollbar {
    width: 8px;
}

.of-list-page .modal-body::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.of-list-page .modal-body::-webkit-scrollbar-thumb {
    background-color: #c1c7cd;
    border-radius: 6px;
    border: 2px solid #f1f3f5;
}

.of-list-page .modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #a8afb6;
}

/* Scrollbar dark – Firefox (scan uniquement) */
.scan-page .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #3a3f45 #1e2327;
}
/* Scrollbar light – Firefox (liste OF) */
.of-list-page .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #c1c7cd #f1f3f5;
}

.modal-content {
    border: 1px solid #2c3238;
}

.modal-header {
    border-bottom: 1px solid #2c3238;
}

/* Layout login */
.login-layout {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Card login */
.login-card-xl {
    width: 520px;
    max-width: 92%;
    background-color: rgba(255, 255, 255, 0.97);
}

/* Logo dans la card */
.login-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
}

/* ==========================================================
   App toolbar (pages après login)
   ========================================================== */

.app-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 100px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.app-toolbar__logo {
    height: 80px;
    display: block;
}

/* ==========================================================
   Thème orange GLOBAL (Bootstrap override propre)
   ========================================================== */

:root {
    --mure-orange: #f57c00;
    --mure-orange-hover: #ef6c00;
    --mure-orange-active: #e65100;
}

/* Boutons primary = orange */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mure-orange);
    --bs-btn-border-color: var(--mure-orange);
    --bs-btn-hover-bg: var(--mure-orange-hover);
    --bs-btn-hover-border-color: var(--mure-orange-hover);
    --bs-btn-active-bg: var(--mure-orange-active);
    --bs-btn-active-border-color: var(--mure-orange-active);
    --bs-btn-focus-shadow-rgb: 245, 124, 0;
}

/* Barre de progression orange */
.progress-bar {
    background-color: var(--mure-orange);
}

.of-card-full {
    border-radius: 30px;
    background-color: #ffffff;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12),
        0 6px 12px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.of-card-full:hover {
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.18),
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 3px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ==========================================================
   Scan page – toolbar dark (branding discret)
   ========================================================== */

.scan-toolbar {
    height: 88px; /* même hauteur que la toolbar claire */
    background-color: #0f1113;
    border-bottom: 1px solid #2a2d31;
    display: flex;
    align-items: center;
}

/* Logo blanc, plus visible */
.scan-toolbar-logo {
    height: 48px;
    width: auto;
}

.badge-status-en-cours {
    background-color: #e9ecef; /* gris clair */
    color: #495057;
    font-weight: 500;
}

.btn-scan {
    padding: 10px 16px;
    font-weight: 500;
}

.of-card-full .card-body {
    padding: 24px;
}

/* ==========================================================
   Scan page – card OF active
   ========================================================== */

.scan-of-card {
    background: linear-gradient(
        180deg,
        #20252a 0%,
        #1a1f24 100%
    );
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scan-of-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.scan-of-subtitle {
    font-size: 0.85rem;
    color: #9aa0a6;
    margin-top: 2px;
}

.scan-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.scan-waiting {
    opacity: 0.8;
}

.scan-waiting .fs-1 {
    letter-spacing: 0.02em;
}

.scan-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9aa0a6;
}

.scan-ok {
    color: #198754;
}

.scan-warning {
    color: #ffc107;
}

.scan-error {
    color: #dc3545;
}

/* ==========================================================
   Scan page – historique des scans
   ========================================================== */

.scan-history-card {
    background: linear-gradient(
        180deg,
        #1f2429 0%,
        #191e23 100%
    );
    border-radius: 16px;
    border: 1px solid #2a2f35;
    padding: 12px 0;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scan-history-title {
    padding: 0 16px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #2a2f35;
}

/* Liste */
.scan-history-list .list-group-item {
    background-color: transparent;
    border-color: #2a2f35;
    font-size: 0.8rem;
    color: #e5e7eb;
    padding: 8px 16px;
}

/* Dernier scan mis en avant */
.scan-history-list .list-group-item:first-child {
    background-color: #23282e;
    font-weight: 600;
}

.scan-page {
    background-color: #14181c;
}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 768px) {
    .app-toolbar {
        height: 64px;
    }

    .app-toolbar__logo {
        height: 48px;
    }

    .scan-toolbar {
        height: 64px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .scan-toolbar-logo {
        height: 36px;
    }
}
