:root {
    --brand-red: #B30B0B;
    --bg-base: #000000;
    --bg-panel: rgba(18, 18, 18, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(179, 11, 11, 0.3);
    --text-primary: #FFFFFF;
    --text-secondary: #DED7D7;
    --accent-primary: #B30B0B;
    --accent-glow: #E63946;
    --accent-gradient: linear-gradient(135deg, #B30B0B 0%, #5a0606 100%);
    --accent-hover: #d40d0d;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --glow: 0 0 25px rgba(179, 11, 11, 0.2);
    --panel-glow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(179, 11, 11, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(179, 11, 11, 0.05) 0%, transparent 40%),
        var(--bg-base);
    background-attachment: fixed;
    overflow: hidden;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--panel-glow);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.app-container {
    display: flex;
    height: 100vh;
    padding: 0.5rem;
    gap: 1rem;
}

/* Sidebar */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.brand {
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.brand .logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
}

.brand .logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--brand-red);
}

.brand .subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.nav-item {
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: rgba(179, 11, 11, 0.08);
    color: var(--brand-red);
    border-color: rgba(179, 11, 11, 0.2);
    box-shadow: 0 4px 15px rgba(179, 11, 11, 0.1);
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge.danger {
    background: rgba(179, 11, 11, 0.15);
    color: var(--brand-red);
    border-color: rgba(179, 11, 11, 0.2);
}

.roi-widget {
    padding: 1.2rem;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.roi-widget h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

.stat-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
    /* prevents full page scroll */
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.topbar h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.status-badge {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-success);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 2fr 1fr;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    /* needed for nested scrolling */
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Document Viewer */
.document-viewer {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.viewer-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.viewer-container iframe {
    width: 100%;
    height: 100%;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Form Panel */
.correction-panel {
    padding: 1rem;
    overflow-y: auto;
}

.metadata-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

input,
select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    cursor: pointer;
}

select option {
    background-color: #0f172a;
    color: var(--text-primary);
    padding: 10px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(179, 11, 11, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.preview-name {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.preview-name code {
    color: #a78bfa;
    font-family: monospace;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 10px 20px -10px rgba(179, 11, 11, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(179, 11, 11, 0.6);
    filter: brightness(1.15);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Queue Panel Refined */
.queue-panel {
    grid-column: 1 / -1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.5rem;
}

.queue-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
}

.queue-item:hover {
    border-color: var(--accent-glow);
    background: rgba(255, 255, 255, 0.05);
}

.queue-item.active {
    border-color: var(--brand-red);
    background: rgba(179, 11, 11, 0.1);
    box-shadow: inset 0 0 10px rgba(179, 11, 11, 0.05);
}

.queue-item .title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.queue-item .suggested {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.queue-item .suggested.pending {
    color: var(--text-secondary);
    opacity: 0.5;
}

.queue-item.analyzing {
    opacity: 0.6;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Users Table */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1.2rem;
    border-bottom: 2px solid var(--border-color);
}

.users-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.users-table tr:hover td {
    background: rgba(179, 11, 11, 0.03);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* Explorer Items */
.explorer-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid transparent;
}

.explorer-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.explorer-item.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-color);
    font-size: 0.9rem;
}

.shortcut-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.shortcut-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
    font-weight: 600;
}

.shortcut-item span:first-child {
    font-size: 1.1rem;
}

/* Breadcrumbs Explorer */
.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    overflow-x: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.breadcrumb-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.breadcrumb-item:hover {
    color: var(--text-primary);
}

.breadcrumb-item:last-child {
    color: var(--accent-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

/* Modals Refined */
.modal-content.explorer-v2 {
    max-width: 950px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.explorer-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.explorer-sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.explorer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.explorer-toolbar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.explorer-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.explorer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 1.5rem 0.5rem 0.75rem;
}

.sidebar-section-title:first-child {
    margin-top: 0;
}

.explorer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    align-content: start;
}

.explorer-folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.explorer-folder-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.explorer-folder-card.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.icon-folder {
    color: #60a5fa;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.folder-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 0.8s linear infinite;
}

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

.animate-in {
    animation: slideInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.queue-item,
.animate-row {
    opacity: 0;
    animation: slideInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.queue-item:nth-child(1), .animate-row:nth-child(1) { animation-delay: 0.05s; }
.queue-item:nth-child(2), .animate-row:nth-child(2) { animation-delay: 0.1s; }
.queue-item:nth-child(3), .animate-row:nth-child(3) { animation-delay: 0.15s; }
.queue-item:nth-child(4), .animate-row:nth-child(4) { animation-delay: 0.2s; }
.queue-item:nth-child(5), .animate-row:nth-child(5) { animation-delay: 0.25s; }
.queue-item:nth-child(n+6), .animate-row:nth-child(n+6) { animation-delay: 0.3s; }

/* --- DASHBOARD RELANCE DEVIS --- */
.relance-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glow);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.stat-card .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-card strong {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to bottom, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gradient);
    transition: width 0.6s ease;
}

.stat-card:hover::after {
    width: 100%;
}

/* Drawer / Side Panel */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    height: 100vh;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.98); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.animate-in {
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.drawer-info-section {
    margin-bottom: 2rem;
    width: 100%;
}

.info-item .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.3rem;
}

.info-item .value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Notes / Follow-up List */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.note-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--brand-red);
    transition: transform 0.2s;
}

.note-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.note-card .note-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.note-card .note-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.btn-follow-up {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-follow-up:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-follow-up.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

/* --- PREMIUM V5 QUOTE DETAILS (Identical Position Match) --- */
.drawer {
    background: #000000 !important;
    padding: 1.5rem; /* Espace global autour */
}

.drawer-header {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-client-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0; /* Plus de marge basse ici, géré par le header */
}

.premium-client-badge.particulier {
    background: #241d13;
    color: #a68b5a;
}

.btn-close-drawer {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.9;
}

.premium-quote-header {
    padding-bottom: 2rem;
}

.premium-client-name {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0 0 0.3rem 0;
    letter-spacing: -0.01em;
}

.premium-quote-meta {
    color: #555555;
    font-size: 1.2rem;
    font-weight: 500;
}

.premium-info-card {
    background: #121212; /* Un peu plus sombre */
    border-radius: 28px;
    padding: 2.2rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    border: none;
}

.premium-section-label {
    text-transform: uppercase;
    color: #555555;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.premium-object-text {
    color: #ffffff;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.premium-contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-label {
    text-transform: uppercase;
    color: #555555;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.contact-value {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

/* --- PREMIUM V7 FOLLOW-UP SECTION --- */
.follow-up-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
}

.follow-up-label {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 1.2rem;
    display: block;
}

.premium-action-grid {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-premium-action {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #222;
    color: #ffffff;
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-premium-action:hover {
    background: #111;
    border-color: #444;
}

.btn-premium-action.active {
    background: #0d1425;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

/* Style spécifique SMS rouge comme sur la capture */
.btn-premium-action[data-type="SMS"].active {
    background: #0d121c;
    border: 2px solid #8b1111; /* Rouge foncé */
    color: #ff3b3b;
}

.premium-textarea {
    width: 100% !important;
    background: #000000 !important;
    border: 1px solid #222 !important;
    border-radius: 16px !important;
    padding: 1.2rem !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    min-height: 120px !important;
    margin-bottom: 1.5rem !important;
    outline: none !important;
}

.btn-premium-save {
    width: 100%;
    background: linear-gradient(180deg, #8b0000 0%, #4d0000 100%);
    color: #ffffff;
    border: none;
    padding: 1.2rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    transition: transform 0.2s;
}

.btn-premium-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}
