/* ========================================
   CoproManager - Styles principaux
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Pathway+Extreme:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* Variables CSS */
:root {
    /* Colors */
    --primary: #0060dd;
    --primary-light: #e8def8;
    --primary-dark: #000caf;
    --secondary: #00c3ff;
    --surface: #fffbfe;
    --surface-variant: #e7e0ec;
    --background: #f5f5f5;
    --error: #b3261e;
    --success: #2e7d32;
    --warning: #ed6c02;
    --info: #0288d1;
    --text: #1c1b1f;
    --text-secondary: #1f1f1f;
    --border: #e0e0e0;

    /* Shadows */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius: 12px;
    --radius-sm: 8px;

    /* Transitions */
    --transition: all 0.3s ease;

    /* Fonts */
    --font-text: 'Rubik', sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

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

/* Base */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    font-optical-sizing: auto;
    font-weight: 400;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography - Headings use Poppins */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

.page-title,
.card-title,
.modal-title,
.widget-title {
    font-family: var(--font-heading);
    font-weight: 600;
}


.badge-warning .material-icons {
    font-size: 5rem !important;
    position: absolute;
    top: -10px;
    right: -20px;
    opacity: 0.1;
}

/* Typography - Text uses Pathway Extreme */
p,
span,
a,
li,
td,
th,
label,
input,
textarea,
select,
button {
    font-family: var(--font-text);
}

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

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    width: 280px;
    background: var(--primary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    font-family: var(--font-text);
}

.sidebar-header {
    display: flex;
    justify-content: space-evenly;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 450;
}

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

.nav-item .material-icons {
    font-size: 1.25rem;
}

.nav-section {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 1.5rem;
    min-height: 100vh;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem !important;
    max-height: 65vh;
    overflow-y: auto;
}

.card-footer {
    padding: 1rem 1.25rem;
    background: var(--surface-variant);
    border-top: 1px solid var(--border);
}

/* ========================================
   Widgets
   ======================================== */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.widget {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

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

.widget-title {
    font-weight: 600;
    font-size: 1rem;
}

.widget-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

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

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface-variant);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--surface-variant);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.large-icon {
    font-size: 2.5rem;
    color: white;
}


.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-text);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

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

select.form-control {
    cursor: pointer;
}

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

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

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

.table th {
    font-weight: 600;
    background: var(--surface-variant);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--surface);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-new {
    background: #e3f2fd;
    color: #1565c0;
}

.status-progress {
    background: #fff3e0;
    color: #ef6c00;
}

.status-resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-closed {
    background: #f5f5f5;
    color: #616161;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-warning {
    color: var(--warning);
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-error {
    background: #ffebee;
    color: var(--error);
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: var(--error);
    border: 1px solid #ef9a9a;
}

.alert-warning {
    background: #fff3e0;
    color: var(--warning);
    border: 1px solid #ffcc80;
}

.alert-info {
    background: #e3f2fd;
    color: var(--info);
    border: 1px solid #90caf9;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    background: white;
    border-radius: var(--radius);
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface-variant);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ========================================
   Upload Zone
   ======================================== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone input {
    display: none;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.upload-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.upload-preview-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ========================================
   Sidebar User
   ======================================== */
.sidebar-user {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ========================================
   Login Page
   ======================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.75rem;
}

/* ========================================
   Image Gallery & Lightbox
   ======================================== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: .5rem;
    }

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

    .page-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding-top: 3rem;
    }

    .page-subtitle,
    .page-title {
        text-align: center;
    }

    .alert-success {
        position: fixed;
        bottom: 1rem;
        z-index: 1000;
    }

}

/* ========================================
   Utilities
   ======================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-secondary {
    color: var(--text-secondary);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.hidden {
    display: none !important;
}

/* ========================================
   Issue Specific Styles
   ======================================== */
.issue-card {
    border-left: 4px solid var(--border);
    transition: var(--transition);
}

.issue-card:hover {
    border-left-color: var(--primary);
}

.issue-card.status-new {
    border-left-color: var(--info);
}

.issue-card.status-progress {
    border-left-color: var(--warning);
}

.issue-card.status-resolved {
    border-left-color: var(--success);
}

.issue-card.status-closed {
    border-left-color: var(--text-secondary);
}

/* Response thread */
.response-item {
    position: relative;
    padding-left: 1.5rem;
}

.response-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
    border-radius: 2px;
}

.response-item.council::before {
    background: var(--primary);
}

/* Label colors */
.label-plomberie {
    background: #e3f2fd;
    color: #1565c0;
}

.label-electricite {
    background: #fff8e1;
    color: #f57f17;
}

.label-parties-communes {
    background: #e8f5e9;
    color: #2e7d32;
}

.label-ascenseur {
    background: #fce4ec;
    color: #c2185b;
}

.label-parking {
    background: #f3e5f5;
    color: #7b1fa2;
}

.label-jardin {
    background: #e8f5e9;
    color: #388e3c;
}

.label-securite {
    background: #ffebee;
    color: #c62828;
}

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

    .table th:nth-child(4),
    .table td:nth-child(4),
    .table th:nth-child(5),
    .table td:nth-child(5) {
        display: none;
    }

    .card-footer .flex {
        flex-direction: column;
    }

    .card-footer form {
        width: 100%;
    }

    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Sidebar Overlay
   ======================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none;
}

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

    .sidebar.open+.sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================================================
   DESIGN SYSTEM OVERRIDE — The Fluid Architect
   Ajouté sur la base de style.css original.
   Ces règles écrasent / complètent les règles ci-dessus.
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables overrides ────────────────────────────────────── */
:root {
    --primary: #0049ad;
    --primary-cont: #0060dd;
    --primary-light: #e8f0ff;
    --primary-dark: #003580;
    --secondary: #006687;
    --secondary-cont: #00bef9;
    --surface: #faf8ff;
    --surface-variant: #e7e0ec;
    --background: #f2f3fe;
    --surf-low: #f2f3fe;
    --surf-lowest: #ffffff;
    --error: #b3261e;
    --success: #2e7d32;
    --warning: #ed6c02;
    --info: #0288d1;
    --text: #191b23;
    --text-secondary: #44474e;
    --border: #e0e0e0;
    --shadow: 0 8px 32px rgba(25, 27, 35, .06);
    --shadow-lg: 0 4px 24px rgba(25, 27, 35, .10);
    --shadow-float: 0 4px 20px rgba(25, 27, 35, .08);
    --radius: 1.25rem;
    --radius-sm: 0.75rem;
    --radius-lg: 2rem;
    --radius-xl: 3rem;
    --transition: all 0.2s ease;
    --font-text: 'Inter', sans-serif;
    --font-heading: 'Manrope', sans-serif;
    --sidebar-width: 240px;
    --topbar-height: 4rem;
}

/* ── Base overrides ─────────────────────────────────────────── */
html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-text);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.page-title,
.card-title,
.modal-title,
.widget-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: inherit;
}

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

/* ============================================================
   SIDEBAR — Nouveau design blanc plat
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surf-lowest);
    color: var(--text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 20px rgba(25, 27, 35, .06);
}

.sidebar-header {
    display: none;
}

.sidebar-logo {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-cont) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 73, 173, .25);
}

.sidebar-brand-icon .material-icons {
    color: #fff;
    font-size: 1.35rem;
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #aab0be;
    padding: 1rem 0.75rem 0.35rem;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item .material-icons {
    font-size: 1.15rem;
    flex-shrink: 0;
    opacity: 0.75;
}

.nav-item:hover {
    background: var(--surf-low);
    color: var(--text);
}

.nav-item:hover .material-icons {
    opacity: 1;
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.nav-item.active .material-icons {
    color: #fff;
    opacity: 1;
}

.sidebar-footer {
    padding: 0.75rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-cont) 100%);
    color: #fff;
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 73, 173, .3);
    transition: box-shadow .2s, transform .15s;
}

.sidebar-new-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 73, 173, .4);
    transform: translateY(-1px);
    color: #fff;
}

.sidebar-new-btn .material-icons {
    font-size: 1rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--surf-low);
}

.sb-user-avatar {
    width: 2rem;
    height: 2rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.sb-user-details {
    flex: 1;
    min-width: 0;
}

.sb-user-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-user-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.sb-logout-btn {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 0.4rem;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}

.sb-logout-btn:hover {
    color: var(--error);
    background: #fff0ee;
}

.sb-logout-btn .material-icons {
    font-size: 1.1rem;
}

/* Sidebar overlay mobile */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: var(--topbar-height);
    padding: 0 1.75rem;
    background: var(--surf-lowest);
    box-shadow: 0 2px 16px rgba(25, 27, 35, .05);
    flex-shrink: 0;
}

.topbar-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 0.5rem;
    transition: background .15s;
}

.topbar-menu-btn:hover {
    background: var(--surf-low);
}

.topbar-menu-btn .material-icons {
    font-size: 1.4rem;
}

.topbar-brand {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.topbar-search {
    flex: 1;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surf-low);
    border-radius: 9999px;
    padding: 0.45rem 1rem;
    margin: 0 auto 0 1.5rem;
}

.topbar-search .material-icons {
    color: var(--text-secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.topbar-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font-text);
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
}

.topbar-search-input::placeholder {
    color: #aab0be;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.topbar-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: var(--surf-low);
    color: var(--text);
}

.topbar-icon-btn .material-icons {
    font-size: 1.2rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    border-radius: 9999px;
    background: var(--surf-low);
    cursor: pointer;
    transition: background .15s;
    margin-left: 0.25rem;
}

.topbar-user:hover {
    background: #e7eaf8;
}

.topbar-avatar {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-cont) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.topbar-user-info {
    line-height: 1.2;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
}

.topbar-user-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    min-width: 0;
    overflow-x: hidden;
}

.page-body {
    flex: 1;
    padding: 1.75rem;
    min-width: 0;
    overflow-x: hidden;
}

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

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.2rem;
}

/* ============================================================
   DASHBOARD — index.php
   ============================================================ */
.dash-wrap {
    color: var(--text);
}

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

.dash-greeting {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.dash-greeting-sub {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.dash-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-cont) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 73, 173, .25);
    transition: box-shadow .2s, transform .15s;
}

.dash-new-btn:hover {
    box-shadow: 0 6px 26px rgba(0, 73, 173, .35);
    transform: translateY(-1px);
    color: #fff;
}

.dash-new-btn .material-icons {
    font-size: 1rem;
}

.dash-alert-urgent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff1f0;
    border-radius: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.dash-alert-urgent .material-icons {
    color: #c53030;
    font-size: 1.25rem;
    margin-top: 2px;
}

.dash-alert-urgent strong {
    color: #c53030;
    display: block;
    margin-bottom: .2rem;
}

.dash-alert-urgent p {
    font-size: .875rem;
    color: var(--text-secondary);
}

/* Stats */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--surf-lowest);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: box-shadow .2s, transform .15s;
}

.stat-card:hover {
    box-shadow: var(--shadow-float);
    transform: translateY(-2px);
}

.stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon .material-icons {
    font-size: 1.35rem;
}

.stat-icon--red {
    background: #fff0ee;
    color: #d93025;
}

.stat-icon--cyan {
    background: #e0f7fd;
    color: #0097b3;
}

.stat-icon--slate {
    background: #f0f2f5;
    color: #5f6b7a;
}

.stat-icon--purple {
    background: #ede7f6;
    color: #6a4fc0;
}

.stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.04em;
}

/* Grid */
.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.dash-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

/* DS Card */
.ds-card {
    background: var(--surf-lowest);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.ds-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 1.6rem 0.9rem;
}

.ds-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .55rem;
}

.ds-badge-live {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: #e8f5e9;
    color: #1b7b34;
    padding: .2rem .55rem;
    border-radius: 9999px;
}

.ds-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    transition: opacity .15s;
}

.ds-link:hover {
    opacity: .7;
}

.ds-card-body {
    padding: 0 1.6rem 1.4rem;
}

/* Report rows */
.report-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.report-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1.1rem;
    background: var(--surf-low);
    border-radius: 1.25rem;
    transition: background .15s;
}

.report-row:hover {
    background: #eaebfd;
}

.report-accent {
    width: 4px;
    align-self: stretch;
    border-radius: 9999px;
    flex-shrink: 0;
}

.report-accent--open {
    background: #f59e0b;
}

.report-accent--progress {
    background: var(--primary);
}

.report-accent--closed {
    background: #16a34a;
}

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

.report-title {
    font-weight: 600;
    font-size: .875rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
}

.report-title:hover {
    color: var(--primary);
}

.report-meta {
    font-size: .73rem;
    color: var(--text-secondary);
    margin-top: .2rem;
}

.report-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: .2rem .4rem;
    border-radius: .5rem;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: background .15s;
    flex-shrink: 0;
}

.report-more-btn:hover {
    background: rgba(0, 0, 0, .06);
}

/* Status chips */
.chip {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .28rem .75rem;
    border-radius: 1.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.chip--pending {
    background: #fff7ed;
    color: #b45309;
}

.chip--progress {
    background: #eff6ff;
    color: #1d4ed8;
}

.chip--closed {
    background: #f0fdf4;
    color: #15803d;
}

.chip--info {
    background: #f0f9ff;
    color: var(--secondary);
}

/* Annonces */
.ann-filter-btn {
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .95rem;
    border: 1.5px solid #d0d3e8;
    border-radius: 9999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.ann-filter-btn:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.ann-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.ann-hero {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0049ad 0%, #0060dd 55%, #0075ff 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.ann-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, .07);
    border-radius: 50%;
    pointer-events: none;
}

.ann-type-tag {
    display: inline-block;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    padding: .28rem .75rem;
    border-radius: .75rem;
    margin-bottom: .85rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ann-type-tag--urgent {
    background: rgba(255, 80, 80, .35);
}

.ann-type-tag--warning {
    background: rgba(255, 180, 0, .35);
}

.ann-hero-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: .7rem;
    letter-spacing: -.02em;
}

.ann-hero-body {
    font-size: .875rem;
    color: rgba(255, 255, 255, .85);
    line-height: 1.6;
    margin-bottom: 1.1rem;
}

.ann-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .6rem 1.3rem;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, .3);
    border-radius: 9999px;
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    transition: background .2s;
}

.ann-hero-cta:hover {
    background: rgba(255, 255, 255, .25);
}

.ann-row {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .85rem 1rem;
    border-radius: 1.25rem;
    background: var(--surf-low);
    transition: background .15s;
    text-decoration: none;
    color: var(--text);
}

.ann-row:hover {
    background: #eaebfd;
}

.ann-row-badge {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .22rem .58rem;
    border-radius: .75rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ann-row-badge--urgent {
    background: #fff0ee;
    color: #c53030;
}

.ann-row-badge--warning {
    background: #fffbeb;
    color: #b45309;
}

.ann-row-badge--info {
    background: #f0f9ff;
    color: #0369a1;
}

.ann-row-title {
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: .15rem;
}

.ann-row-excerpt {
    font-size: .78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ann-row-date {
    font-size: .72rem;
    color: #8b93a5;
    margin-top: .15rem;
}

/* Propositions */
.prop-row {
    padding: .85rem 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.prop-row+.prop-row {
    border-top: 1px solid rgba(0, 0, 0, .05);
}

.prop-title {
    font-weight: 600;
    font-size: .9rem;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.prop-title:hover {
    color: var(--primary);
}

.prop-excerpt {
    font-size: .8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.prop-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .75rem;
    color: #8b93a5;
    margin-top: .1rem;
}

.prop-vote {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-weight: 600;
}

.prop-vote--pour {
    color: #16a34a;
}

.prop-vote--contre {
    color: #dc2626;
}

.prop-vote--reply {
    color: var(--text-secondary);
}

.prop-vote .material-icons {
    font-size: .9rem;
}

/* Documents récents */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem .95rem;
    border-radius: 1.25rem;
    background: var(--surf-low);
    transition: background .15s;
    text-decoration: none;
    color: var(--text);
}

.doc-row:hover {
    background: #eaebfd;
}

.doc-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-icon--pdf {
    background: #fff0ee;
    color: #c53030;
}

.doc-icon--xlsx {
    background: #e8f5e9;
    color: #2e7d32;
}

.doc-icon--docx {
    background: #e3f2fd;
    color: #1565c0;
}

.doc-icon--img {
    background: #fce4ec;
    color: #ad1457;
}

.doc-icon--other {
    background: #f3e5f5;
    color: #6a1b9a;
}

.doc-icon .material-icons {
    font-size: 1.2rem;
}

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

.doc-name {
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    font-size: .73rem;
    color: var(--text-secondary);
    margin-top: .12rem;
}

.doc-all-btn {
    display: block;
    text-align: center;
    padding: .7rem;
    margin-top: .65rem;
    border: 1.5px solid #d0d3e8;
    border-radius: 1.25rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.doc-all-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f4ff;
}

/* DS Empty */
.ds-empty {
    text-align: center;
    padding: 2.25rem 1rem;
    color: var(--text-secondary);
}

.ds-empty .material-icons {
    font-size: 2.25rem;
    color: #c8ccd8;
    display: block;
    margin-bottom: .65rem;
}

.ds-empty p {
    font-size: .875rem;
}

/* Équipements */
.equip-bg--elevator {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6572 100%);
}

.equip-bg--door {
    background: linear-gradient(135deg, #3d3d3d 0%, #6b6b6b 100%);
}

.equip-bg--boiler {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
}

.equip-bg--vmc {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.equip-bg--intercom {
    background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
}

.equip-bg--default {
    background: linear-gradient(135deg, #374151 0%, #6b7280 100%);
}

/* ── Équipement unifié ──────────────────────────────────────── */
.equip-unified-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.equip-unified-card {
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(25, 27, 35, .07);
    transition: transform .2s, box-shadow .2s;
}

.equip-unified-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(25, 27, 35, .11);
}

.equip-unified-visual {
    position: relative;
    height: 90px;
    display: flex;
    align-items: flex-end;
    padding: .75rem 1rem;
    overflow: hidden;
}

.equip-unified-bg-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 3.5rem;
    opacity: .12;
    color: #fff;
    pointer-events: none;
}

.equip-unified-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
}

.equip-unified-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .2rem;
}

.equip-unified-type {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
}

.equip-unified-sep {
    color: rgba(255, 255, 255, .4);
    font-size: .65rem;
}

.equip-unified-ref {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .85);
    font-family: monospace;
}

.equip-unified-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equip-unified-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    padding: .5rem .75rem;
    background: var(--surf-lowest);
}

.equip-unified-info {
    display: none;
}

.equip-contact-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: #1b5e20;
    text-decoration: none;
    background: #e8f5e9;
    padding: .3rem .65rem;
    border-radius: 9999px;
    transition: background .15s;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.equip-contact-badge:hover {
    background: #c8e6c9;
}

.equip-contact-badge .material-icons {
    font-size: .9rem;
    color: #2e7d32;
    flex-shrink: 0;
}

.equip-no-contact {
    font-size: .75rem;
    color: #aab0be;
    font-style: italic;
}

.equip-unified-actions {
    display: flex;
    gap: .3rem;
    flex-shrink: 0;
}

.equip-action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}

.equip-action-btn .material-icons {
    font-size: .95rem;
}

.equip-action-btn:hover {
    transform: scale(1.1);
}

.equip-action-btn--view {
    background: #f0f2f5;
    color: var(--text-secondary);
}

.equip-action-btn--view:hover {
    background: #e8ecf5;
    color: var(--primary);
}

.equip-action-btn--edit {
    background: var(--primary-light);
    color: var(--primary);
}

.equip-action-btn--edit:hover {
    background: #d0ddff;
}

.equip-action-btn--delete {
    background: #fff0ee;
    color: #c53030;
}

.equip-action-btn--delete:hover {
    background: #ffe0dc;
}

/* Modal références */
.reference-detail .detail-row {
    display: flex;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.reference-detail .detail-row:last-child {
    border-bottom: none;
}

.reference-detail .detail-label {
    width: 100px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-size: .82rem;
}

.reference-detail .detail-value {
    flex: 1;
    color: var(--text);
    font-size: .85rem;
}

/* ============================================================
   RESPONSIVE overrides
   ============================================================ */
@media (max-width: 1200px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-menu-btn {
        display: flex;
    }

    .topbar-brand {
        display: none;
    }

    .topbar-search {
        max-width: none;
        margin-left: 0;
    }

    .page-body {
        padding: .75rem;
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-value {
        font-size: 1.85rem;
    }

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

    .page-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding-top: 1rem;
    }

    .page-subtitle,
    .page-title {
        text-align: center;
    }

    .table th:nth-child(4),
    .table td:nth-child(4),
    .table th:nth-child(5),
    .table td:nth-child(5) {
        display: none;
    }

    .card-footer .flex {
        flex-direction: column;
    }

    .card-footer form,
    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   ÉQUIPEMENTS — grille horizontale (colonne principale)
   ============================================================ */

/* Grille 2-3 colonnes selon la place disponible */
.equip-horiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

/* La partie visuelle est un peu plus haute en mode grille */
.equip-horiz-grid .equip-unified-visual {
    height: 110px;
}

/* ============================================================
   ANNONCES COMPACTES — colonne latérale
   ============================================================ */
.sidebar-ann-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.sidebar-ann-row {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .7rem .85rem;
    border-radius: 1rem;
    background: var(--surf-low);
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
}

.sidebar-ann-row:hover {
    background: #eaebfd;
}

.sidebar-ann-content {
    flex: 1;
    min-width: 0;
}

.sidebar-ann-title {
    font-weight: 600;
    font-size: .85rem;
    color: var(--text);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-ann-date {
    font-size: .72rem;
    color: #8b93a5;
    margin-top: .15rem;
}

/* Responsive : grille équipements passe à 1 col sur petits écrans */
@media (max-width: 900px) {
    .equip-horiz-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ── Badge contact repositionné en haut à gauche du visuel ── */
.equip-contact-overlay {
    position: absolute;
    top: .6rem;
    left: .7rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .65rem .25rem .45rem;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 9999px;
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    max-width: calc(100% - 1.4rem);
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s;
}

.equip-contact-overlay:hover {
    background: rgba(255, 255, 255, .28);
}

.equip-contact-overlay .material-icons {
    font-size: .85rem;
    flex-shrink: 0;
}

/* Badge contact en haut à gauche : augmente légèrement la hauteur visuelle */
.equip-horiz-grid .equip-unified-visual {
    height: 115px;
}

/* Footer équipement vide : caché */
.equip-unified-footer:empty,
.equip-horiz-grid .equip-unified-footer {
    display: none;
}

/* Curseur pointer sur toute la carte */
.equip-unified-card {
    cursor: pointer;
}