/* ============================================
   CRM Closers — Styles
   ============================================ */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-bg: #eef2ff;
    --success: #22c55e;
    --success-bg: #f0fdf4;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --sidebar-width: 250px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-subtitle {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.nav-icon { display:inline-flex; align-items:center; opacity:.9; }
.icone { vertical-align:-3px; }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 12px 0;
}

.nav-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px 8px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 13px;
    color: white;
}

.user-role {
    font-size: 11px;
    color: var(--gray-400);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    max-width: 100%;
    overflow-x: hidden;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body { padding: 20px; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

tr:hover td {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: #15803d; }
.badge-warning { background: var(--warning-bg); color: #a16207; }
.badge-danger { background: var(--danger-bg); color: #dc2626; }
.badge-info { background: var(--info-bg); color: #2563eb; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline { background: white; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px 10px; }

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    color: var(--gray-800);
    background: white;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    appearance: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: var(--success-bg); color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-bg); color: #dc2626; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: #a16207; border: 1px solid #fde68a; }
.alert-info { background: var(--info-bg); color: #2563eb; border: 1px solid #bfdbfe; }

/* Prospect detail */
.prospect-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.prospect-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s;
}

.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Timeline / History */
.timeline { padding: 0; list-style: none; }

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content .timeline-action {
    font-weight: 500;
    color: var(--gray-800);
}

.timeline-content .timeline-details {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.timeline-content .timeline-date {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

/* Pipeline columns view */
.pipeline-nav {
    position: relative;
}
.pipeline-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-600);
    transition: all 0.15s;
}
.pipeline-nav-btn:hover {
    background: var(--gray-100);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.pipeline-nav-btn.hidden { display: none; }
.pipeline-nav-btn.left { left: -18px; }
.pipeline-nav-btn.right { right: -18px; }

.pipeline-board {
    display: flex;
    gap: 16px;
    overflow: hidden;
    padding-bottom: 16px;
    scroll-behavior: smooth;
}

.pipeline-column {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 12px;
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--gray-300);
}

.pipeline-column-title {
    font-weight: 600;
    font-size: 14px;
}

.pipeline-column-count {
    background: var(--gray-300);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pipeline-cards {
    min-height: 60px;
}

.pipeline-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: box-shadow 0.15s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.pipeline-card:hover {
    box-shadow: var(--shadow-md);
}

.pipeline-card[draggable="true"] {
    cursor: pointer;
}

.pipeline-card[draggable="true"]:active {
    cursor: grabbing;
}

.pipeline-card.dragging {
    opacity: 0.4;
}

.drag-handle {
    cursor: grab;
    color: var(--gray-300);
    font-size: 16px;
    line-height: 1;
    padding: 2px;
    user-select: none;
    flex-shrink: 0;
}

.drag-handle:hover {
    color: var(--gray-500);
}

.drag-handle:active {
    cursor: grabbing;
}

.pipeline-column.drag-over {
    background: var(--primary-bg);
    outline: 2px dashed var(--primary);
    outline-offset: -2px;
}

.pipeline-column.drag-over .pipeline-column-header {
    background: rgba(79, 70, 229, 0.05);
}

.pipeline-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--primary);
}

.pipeline-card-info {
    font-size: 12px;
    color: var(--gray-500);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 18px; }

.modal-body { padding: 20px; }

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
}

/* Filters bar */
.filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters-bar .form-control {
    width: auto;
    min-width: 160px;
}

.filters-bar input[type="search"] {
    min-width: 250px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.pagination a:hover { background: var(--gray-100); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* Login page */
.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
}

/* Responsive */
/* ═══ MOBILE HEADER ═══ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: #312e81;
    color: white;
    z-index: 1001;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mobile-header .hamburger {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1;
}
.mobile-header .hamburger:active {
    background: rgba(255,255,255,0.2);
}
.mobile-header .mobile-title {
    font-weight: 700;
    font-size: 16px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 14px;
    z-index: 10;
    padding: 4px 8px;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.open { display: block; }

/* ═══ MOBILE RESPONSIVE ═══ */
@media (max-width: 768px) {
    /* Mobile header visible */
    .mobile-header { display: flex; }
    .sidebar-close { display: block; }
    
    /* Sidebar as drawer */
    .sidebar { 
        transform: translateX(-100%); 
        transition: transform 0.3s ease;
        z-index: 1000;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }
    
    /* Main content */
    .main-content { 
        margin-left: 0; 
        padding: 12px; 
        padding-top: 68px;
        min-height: 100vh;
    }
    
    /* Page headers */
    .page-header { 
        flex-direction: column; 
        gap: 10px; 
        align-items: flex-start;
        margin-bottom: 12px;
    }
    .page-header h1 { font-size: 20px; }
    .page-header > div { 
        display: flex; 
        flex-wrap: wrap; 
        gap: 6px;
        width: 100%;
    }
    
    /* Stats grids — compact 2 columns */
    .stats-grid { 
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        gap: 6px !important;
        margin-bottom: 14px !important;
    }
    .stat-card { 
        padding: 10px 12px !important;
        min-width: 0 !important;
    }
    .stat-card .stat-value, .stat-card .stat-num { font-size: 20px !important; }
    .stat-card .stat-label { font-size: 10px !important; }
    
    /* Forms */
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .form-control { font-size: 16px; }
    select.form-control { font-size: 16px; }
    
    /* Tables — horizontal scroll */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 500px; }
    table th, table td { padding: 8px 10px; font-size: 12px; }
    
    /* Cards */
    .card { border-radius: 8px; }
    .card-body { padding: 12px; }
    .card-header { padding: 12px 16px; }
    .card-header h3 { font-size: 15px; }
    
    /* Alerts / RDV alert */
    [style*="padding:20px 24px"] { padding: 14px 16px !important; }
    
    /* Prospect detail */
    .prospect-detail { grid-template-columns: 1fr; gap: 12px; }
    .prospect-sidebar { order: -1; }
    
    /* Tabs — scrollable horizontally */
    .tabs { 
        overflow-x: auto; 
        white-space: nowrap; 
        -webkit-overflow-scrolling: touch; 
        padding-bottom: 4px;
        gap: 0;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { 
        flex-shrink: 0; 
        font-size: 12px; 
        padding: 8px 12px;
    }
    
    /* Tab content */
    .tab-content { padding: 0 !important; }
    .tab-content .card-body { padding: 10px; }
    .pipeline-board { flex-direction: column; overflow-x: visible; }
    .pipeline-column { min-width: 100%; max-width: 100%; }
    .pipeline-nav { display: none; }
    
    /* Filters */
    .filters-bar { flex-direction: column; gap: 8px; }
    .filters-bar form { flex-direction: column; gap: 8px; }
    .filters-bar .form-control { width: 100% !important; min-width: 0 !important; }
    
    /* Buttons */
    .btn { font-size: 13px; padding: 8px 12px; }
    .btn-sm { font-size: 12px; padding: 6px 10px; }
    
    /* Orders */
    .order-head { flex-direction: column; }
    .order-progress { flex-direction: column; gap: 8px; }
    .expand-grid { grid-template-columns: 1fr !important; }
    .expand-actions { flex-wrap: wrap; gap: 6px; }
    .expand-inner { padding: 12px; }
    
    /* Tabs — handled above with prospect detail */
    
    /* Wizard */
    .wizard-steps { flex-direction: column; gap: 4px; }
    .wizard-step { font-size: 13px; }
    .opt-card { min-width: 100% !important; }
    #moyen-cards { flex-direction: column; }
    #moyen-cards .opt-card { min-width: 100% !important; flex: unset !important; }
    .custom-pay-row { grid-template-columns: auto 1fr !important; }
    
    /* Client list */
    .order-card .order-head { gap: 8px; }
    
    /* Dashboard grid 2 columns → 1 column */
    [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    
    /* RDV accordion on prospect view */
    .rdv-accordion { padding: 10px !important; }
    .rdv-accordion [style*="display:flex"] { flex-direction: column; gap: 6px; }
    
    /* Form groups in tabs */
    .tab-panel .form-row { grid-template-columns: 1fr; }
    
    /* Sidebar footer */
    .sidebar-footer { padding: 12px 16px; }
    
    /* Hide scrollbars on mobile */
    ::-webkit-scrollbar { width: 0; height: 0; }
}

/* ═══ SMALL PHONES ═══ */
@media (max-width: 400px) {
    .main-content { padding: 8px; padding-top: 62px; }
    .stats-grid { gap: 6px; }
    .stat-card { padding: 10px 12px; }
    .stat-card .stat-value, .stat-card .stat-num { font-size: 18px; }
    .stat-card .stat-label { font-size: 9px; }
    .page-header h1 { font-size: 17px; }
    .btn { font-size: 11px; padding: 5px 8px; }
    .btn-sm { font-size: 10px; padding: 4px 7px; }
}

/* ═══ PWA standalone mode ═══ */
@media (display-mode: standalone) {
    .mobile-header { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
    .main-content { padding-top: calc(72px + env(safe-area-inset-top)); }
    body { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Graphiques (includes/graphiques.php) ─────────────────────────────────── */
:root { --g-surface: #fff; --g-encre: #52514e; --g-muet: #898781; --g-grille: #e9e8e4; }
.g-svg { width: 100%; height: auto; display: block; }
.g-grille { stroke: var(--g-grille); stroke-width: 1; }
.g-zero { stroke: var(--g-muet); stroke-width: 1; }
.g-axe { font: 11px system-ui, sans-serif; fill: var(--g-muet); }
.g-svg [data-tip]:hover { opacity: .8; cursor: default; }
.g-legende { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0 0 .6rem; font-size: .8rem; color: var(--g-encre); }
.g-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.g-bulle { position: fixed; z-index: 50; pointer-events: none; background: #1a1a19; color: #fff; font-size: .78rem;
  padding: .35rem .55rem; border-radius: 6px; max-width: 22rem; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.lecture { border-left: 3px solid var(--primary); background: var(--gray-50, #f8fafc); padding: .75rem 1rem; margin: 0 0 1rem;
  border-radius: 0 6px 6px 0; font-size: .92rem; line-height: 1.55; }
.lecture ul { margin: .25rem 0 0; padding-left: 1.1rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
details.tableau > summary { cursor: pointer; color: var(--gray-500); font-size: .85rem; margin: .5rem 0; }

/* ── Diagnostic (includes/conseils.php) ──────────────────────────────────── */
.conseil { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-left: 4px solid; border-radius: 8px; padding: .9rem 1.1rem; margin: 0 0 .8rem; }
.conseil h3 { margin: .15rem 0 .4rem; font-size: 1rem; line-height: 1.35; }
.conseil p { margin: 0 0 .45rem; font-size: .9rem; line-height: 1.55; color: var(--gray-700, #374151); }
.conseil-niveau { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.conseil-action { background: var(--gray-50, #f8fafc); border-radius: 6px; padding: .5rem .7rem; margin-bottom: 0 !important; }

/* ── Explications repliées derrière un « ⓘ » (demande de Marine : la méthode prenait trop de place) ─────── */
details.methode { margin: .6rem 0 0; font-size: .85rem; color: var(--gray-500, #6b7280); }
details.methode > summary { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none;
  font-size: .78rem; padding: .15rem .55rem; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 999px; user-select: none; }
details.methode > summary::-webkit-details-marker { display: none; }
details.methode > summary::before { content: "ⓘ"; font-size: .9rem; }
details.methode > summary:hover { color: var(--gray-700, #374151); border-color: var(--gray-400, #9ca3af); }
details.methode[open] > summary { color: var(--primary); border-color: var(--primary); }
details.methode > p { margin: .5rem 0 0; line-height: 1.55; max-width: 62rem; }

/* Historique des événements : cases de saisie compactes dans le tableau */
table.histo .histo-champ { width: 5.2rem; text-align: right; padding: .25rem .4rem; font-size: .85rem; }
table.histo .histo-champ::placeholder { color: var(--gray-500); font-style: italic; }
table.histo .histo-texte { width: 100%; text-align: left; }
table.histo tr.histo-notes td { padding-bottom: .7rem; }
