/* assets/css/style.css */
/* Système de design premium pour DIQUARKS IMMO */

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

:root {
    --primary-color: #2b6cb0;
    --primary-hover: #1a5696;
    --secondary-color: #4a5568;
    --success-color: #2f855a;
    --danger-color: #c53030;
    --warning-color: #dd6b20;
    --info-color: #3182ce;
    --dark-bg: #1a202c;
    --light-bg: #f7fafc;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

html,
#wrapper,
#content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Structure Sidebar Responsive */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--dark-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    z-index: 1000;
}

#sidebar.active {
    margin-left: -260px;
}

.sidebar-backdrop {
    display: none;
}

#sidebar .sidebar-header {
    padding: 16px 18px;
    background: #111827;
    border-bottom: 1px solid #2d3748;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex: 0 0 auto;
}

.sidebar-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-text span {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0;
    color: #fff;
}

.sidebar-brand-text small {
    color: #a0aec0;
    font-size: 0.78rem;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #a0aec0;
    padding: 10px;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover {
    color: #fff;
    background: #2d3748;
    border-left-color: var(--primary-color);
}

#sidebar ul li.active > a {
    color: #fff;
    background: #2d3748;
    border-left-color: var(--primary-color);
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
}

#sidebar .sidebar-group-toggle {
    font-weight: 700;
}

#sidebar .sidebar-somana-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.2);
    color: #fdba74;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

#sidebar .sidebar-group-caret {
    margin-left: auto;
    margin-right: 0;
    width: auto;
    flex: 0 0 auto;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

#sidebar .sidebar-group-toggle[aria-expanded="true"] .sidebar-group-caret {
    transform: rotate(180deg);
}

#sidebar .sidebar-submenu {
    margin: 0 12px 8px 18px;
    padding: 6px 0;
    background: rgba(15, 23, 42, 0.58);
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0 8px 8px 0;
}

#sidebar .sidebar-submenu li a {
    position: relative;
    padding: 9px 14px 9px 24px;
    font-size: 0.88rem;
    color: #aeb9c8;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
}

#sidebar .sidebar-submenu li a::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #64748b;
    transform: translateY(-50%);
}

#sidebar .sidebar-submenu li a:hover {
    color: #fff;
    background: rgba(45, 55, 72, 0.86);
    border-left-color: transparent;
}

#sidebar .sidebar-submenu li.active > a {
    color: #fff;
    background: rgba(43, 108, 176, 0.24);
    border-left-color: transparent;
}

#sidebar .sidebar-submenu li.active > a::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.22);
}

/* Contenu Principal */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.navbar-custom {
    position: relative;
    z-index: 1250;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
}

.navbar-custom .dropdown-menu {
    z-index: 1400;
    background: #fff;
    opacity: 1;
}

.navbar-shell,
.navbar-left,
.navbar-toolbar {
    display: flex;
    align-items: center;
}

.navbar-shell {
    justify-content: space-between;
    gap: 16px;
}

.navbar-left {
    min-width: 0;
    gap: 14px;
}

.navbar-toolbar {
    gap: 10px;
    margin-left: auto;
}

.navbar-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--primary-color);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.35rem;
}

.navbar-icon-btn:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.navbar-brand-logo {
    display: block;
    width: 220px;
    max-width: 34vw;
    height: 44px;
    object-fit: contain;
}

.navbar-mobile-logo {
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    justify-self: center;
    text-decoration: none;
}

.navbar-mobile-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.navbar-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), #1e7bbf);
    border: 1px solid rgba(43, 108, 176, 0.35);
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(43, 108, 176, 0.18);
}

.navbar-quick-btn:hover,
.navbar-quick-btn:focus {
    color: #fff;
    background: linear-gradient(135deg, #1a5696, var(--primary-color));
}

.navbar-quick-menu {
    min-width: 250px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    border-radius: 8px;
    padding: 8px;
}

.navbar-quick-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 7px;
    font-weight: 600;
}

.quick-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
}

.quick-action-primary {
    background: #e8f1fb;
    color: var(--primary-color);
}

.quick-action-success {
    background: #eaf6ef;
    color: var(--success-color);
}

.quick-action-info {
    background: #e8f5fb;
    color: var(--info-color);
}

.quick-action-secondary {
    background: #f1f5f9;
    color: #475569;
}

.navbar-notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
}

.navbar-notification-btn:hover,
.navbar-notification-btn:focus {
    color: var(--primary-color);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.navbar-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--danger-color);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.navbar-notification-menu {
    width: 390px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 92px);
    padding: 0;
    overflow-y: auto;
    border-radius: 8px;
    z-index: 1400;
}

.notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.notification-menu-header strong,
.notification-menu-header span {
    display: block;
}

.notification-menu-header strong {
    color: #111827;
    font-size: 0.95rem;
}

.notification-menu-header span {
    color: #64748b;
    font-size: 0.78rem;
}

.notification-summary {
    display: flex;
    gap: 8px;
    padding: 10px 16px 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.notification-summary span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    white-space: normal;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.notification-late {
    background: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(197, 48, 48, 0.12);
}

.notification-today,
.notification-soon {
    background: var(--warning-color);
    box-shadow: 0 0 0 4px rgba(221, 107, 32, 0.12);
}

.notification-future {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.12);
}

.notification-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #111827;
    font-size: 0.86rem;
    font-weight: 800;
}

.notification-title em {
    color: #64748b;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.notification-meta,
.notification-money {
    color: #64748b;
    font-size: 0.76rem;
}

.notification-money {
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 700;
}

.notification-footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    color: var(--primary-color);
    font-weight: 800;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 18px;
    color: #64748b;
    text-align: center;
}

.notification-empty i {
    color: var(--success-color);
    font-size: 2rem;
}

.notification-empty strong {
    color: #111827;
}

.notification-empty span {
    font-size: 0.8rem;
}

.navbar-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.navbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 5px 10px 5px 5px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.navbar-user:hover {
    color: var(--primary-color);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.navbar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
}

.navbar-user-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar-custom {
        padding: 10px 14px;
    }

    .navbar-shell {
        gap: 10px;
    }

    .navbar-toolbar {
        gap: 8px;
    }

    .navbar-quick-btn span,
    .navbar-role-badge {
        display: none;
    }

    .navbar-quick-btn,
    .navbar-icon-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .navbar-user {
        padding: 5px;
    }
}

@media (max-width: 575.98px) {
    .navbar-custom {
        padding: 8px 10px;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
    }

    .navbar-shell {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 42px;
        width: 100%;
        max-width: 100%;
        gap: 0;
    }

    .navbar-left {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        gap: 0;
    }

    .navbar-toolbar {
        position: absolute;
        right: 0;
        top: 8px;
        right: 10px;
        transform: none;
        gap: 7px;
        margin-left: 0;
        justify-content: flex-end;
        z-index: 1600;
    }

    .navbar-mobile-logo {
        position: static;
        margin: 0 auto;
    }

    .navbar-icon-btn,
    .navbar-notification-btn,
    .navbar-user {
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 9px;
    }

    .navbar-user {
        border-radius: 999px;
    }

    .navbar-user-avatar {
        width: 30px;
        height: 30px;
    }

    .navbar-user.dropdown-toggle::after {
        display: none;
    }

    .navbar-quick-dropdown {
        position: relative;
    }

    .navbar-quick-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 9px;
        box-shadow: none;
        font-size: 1.05rem;
    }

    .navbar-quick-btn span,
    .navbar-quick-btn.dropdown-toggle::after {
        display: none;
    }

    .navbar-quick-menu {
        position: absolute !important;
        inset: auto 0 auto auto !important;
        transform: none !important;
        min-width: min(280px, calc(100vw - 28px));
        max-width: calc(100vw - 28px);
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
    }

    .navbar-notification-menu {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - 74px);
    }

    .navbar-notification-badge {
        top: -6px;
        right: -6px;
    }

    .dashboard-hero,
    .dashboard-hero > div,
    .card {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard-hero p {
        overflow-wrap: anywhere;
    }
}

.main-content {
    padding: 30px;
    flex: 1;
}

/* Cartes Personnalisées */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.card-header-custom {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
}

/* Tableau de bord */
.dashboard-page {
    --dashboard-surface: rgba(255, 255, 255, 0.94);
    --dashboard-soft: #f8fafc;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    padding: 22px 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)),
        linear-gradient(90deg, rgba(43,108,176,0.08), rgba(47,133,90,0.08));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary-color), var(--success-color));
}

.dashboard-hero h1 {
    color: #111827;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-section-title {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 22px 0 14px;
    color: #334155;
    font-size: 1rem;
    font-weight: 800;
}

.dashboard-page .card {
    border-color: rgba(226, 232, 240, 0.92);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.09);
}

.dashboard-page .card-header {
    border-bottom-color: rgba(226, 232, 240, 0.9);
    border-radius: 8px 8px 0 0 !important;
}

.dashboard-metric-card,
.dashboard-finance-card,
.dashboard-month-card,
.dashboard-panel,
.dashboard-table-card {
    position: relative;
    overflow: hidden;
}

.dashboard-metric-card::before,
.dashboard-finance-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--metric-color, var(--primary-color));
}

.dashboard-metric-card::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -34px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--metric-color, var(--primary-color)) 14%, transparent);
}

.dashboard-metric-primary { --metric-color: var(--primary-color); }
.dashboard-metric-slate { --metric-color: #64748b; }
.dashboard-metric-success { --metric-color: var(--success-color); }
.dashboard-metric-warning { --metric-color: var(--warning-color); }

.dashboard-metric-card .fs-1 {
    position: relative;
    z-index: 1;
}

.dashboard-page .progress {
    overflow: hidden;
    background: #e5edf6;
    border-radius: 999px;
}

.dashboard-panel .card-body {
    padding: 22px;
}

.dashboard-panel .row.text-center > div {
    padding-top: 6px;
    padding-bottom: 6px;
}

.dashboard-panel .row.text-center span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 42px;
    border-radius: 8px;
    background: #f8fafc;
}

.dashboard-finance-card {
    border: 1px solid rgba(226, 232, 240, 0.92) !important;
}

.finance-primary { --metric-color: var(--primary-color); }
.finance-warning { --metric-color: var(--warning-color); }
.finance-success { --metric-color: var(--success-color); }
.finance-danger { --metric-color: var(--danger-color); }

.dashboard-month-card {
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.dashboard-month-card .fs-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #f1f5f9;
}

.dashboard-table-card .table {
    --bs-table-hover-bg: #f8fafc;
}

.dashboard-table-card thead th {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-table-card tbody td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.dashboard-table-card .btn {
    border-radius: 999px;
}

@media (max-width: 768px) {
    .dashboard-hero {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }

    .dashboard-date {
        white-space: normal;
    }
}

/* Page de connexion Glassmorphism */
.login-bg {
    background: linear-gradient(135deg, #1a202c 0%, #2b6cb0 100%);
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.login-brand-logo {
    width: 300px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Couleurs des statuts pour appartements */
.status-libre {
    background-color: #ffffff !important;
    color: #2d3748 !important;
    border: 2px solid #cbd5e0 !important;
}

.status-reserve {
    background-color: #e53e3e !important;
    color: #ffffff !important;
    border: 2px solid #e53e3e !important;
}

.status-vendu {
    background-color: #38a169 !important;
    color: #ffffff !important;
    border: 2px solid #38a169 !important;
}

.status-annule {
    background-color: #a0aec0 !important;
    color: #ffffff !important;
    border: 2px solid #a0aec0 !important;
}

.status-conciergerie {
    background: repeating-linear-gradient(45deg, #f6e05e, #f6e05e 10px, #d69e2e 10px, #d69e2e 20px) !important;
    color: #1a202c !important;
    border: 2px solid #d69e2e !important;
}

.status-bloque {
    background-color: #1a202c !important;
    color: #ffffff !important;
    border: 2px solid #1a202c !important;
}

/* Badges standards */
.badge-status {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 4px;
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Grilles Visuelles des schémas d'immeubles */
.schema-grid {
    display: grid;
    grid-gap: 15px;
    margin-top: 20px;
}

.floor-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.floor-label {
    min-width: 100px;
    font-weight: 600;
}

.floor-units {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.apartment-box {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.apartment-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.apartment-box .box-sub {
    font-size: 0.65rem;
    font-weight: normal;
    margin-top: 2px;
}

/* Grille des lots */
.lots-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.lot-box {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.lot-box:hover {
    transform: scale(1.05);
}

.lot-box .lot-surface {
    font-size: 0.75rem;
    font-weight: normal;
    margin-top: 4px;
}

/* Plan de lotissement coordonnées absolues */
.plan-relative-container {
    position: relative;
    width: 100%;
    border: 1px solid var(--border-color);
    background-color: #edf2f7;
    overflow: auto;
    border-radius: 8px;
}

.plan-background-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.absolute-lot-box {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 0.8rem;
    transition: transform 0.2s;
    opacity: 0.85;
}

.absolute-lot-box:hover {
    transform: scale(1.05);
    opacity: 1;
    z-index: 10;
}

/* Styles d'impression A4 */
@media print {
    #sidebar, .navbar-custom, .btn, .no-print, header, footer, .breadcrumb, .alert {
        display: none !important;
    }
    
    #content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    body {
        background-color: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .print-container {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        padding: 10mm;
        box-sizing: border-box;
    }
    
    table {
        page-break-inside: avoid;
    }
    
    /* Forcer le rendu des couleurs pour l'impression */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Formulaires structurés par sections */
.form-section-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 20px;
    margin-top: 10px;
    font-weight: 600;
}

/* Modèle d'affichage de quittance éditable */
.quittance-editor-container {
    border: 2px dashed var(--primary-color);
    background: #fff;
    min-height: 500px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.quittance-editor-container[contenteditable="true"]:focus {
    outline: 2px solid var(--primary-hover);
}

/* Responsive application mobile */
@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    #wrapper {
        display: block;
        min-width: 0;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 290px);
        min-width: 0;
        max-width: min(86vw, 290px);
        min-height: 100dvh;
        margin-left: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 1500;
        box-shadow: 18px 0 44px rgba(15, 23, 42, 0.34);
    }

    #sidebar.active {
        margin-left: 0;
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        opacity: 0;
        background: rgba(15, 23, 42, 0.48);
        transition: opacity 0.2s ease;
        z-index: 1450;
    }

    .sidebar-backdrop.show {
        pointer-events: auto;
        opacity: 1;
    }

    #content {
        width: 100%;
        min-width: 0;
    }

    .navbar-custom {
        position: sticky;
        top: 0;
        z-index: 1300;
    }

    .main-content {
        padding: 18px 14px;
    }

    .sticky-top {
        position: static !important;
    }

    .main-content > .d-flex.justify-content-between.align-items-center.mb-4:not(.dashboard-hero) {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .main-content > .d-flex.justify-content-between.align-items-center.mb-4:not(.dashboard-hero) > .d-flex {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .table-responsive {
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > .table {
        min-width: 660px;
    }

    .card,
    .dashboard-hero {
        border-radius: 8px;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    footer .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 6px;
    }

    .floor-row {
        flex-direction: column;
    }

    .floor-label {
        width: 100% !important;
        min-height: auto !important;
        padding: 10px 12px !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--border-color);
    }

    .floor-units {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .navbar-custom {
        padding: 9px 10px;
    }

    .navbar-toolbar {
        gap: 6px;
    }

    .navbar-notification-menu,
    .navbar-quick-menu {
        max-width: calc(100vw - 16px);
    }

    .navbar-notification-menu {
        width: calc(100vw - 16px);
    }

    .main-content {
        padding: 14px 10px;
    }

    .dashboard-hero {
        padding: 18px 16px;
    }

    .dashboard-hero h1 {
        font-size: 1.45rem;
    }

    .dashboard-hero p,
    .dashboard-date {
        font-size: 0.86rem;
    }

    .dashboard-section-title {
        font-size: 0.94rem;
        margin-top: 18px;
    }

    .dashboard-metric-card .h3,
    .dashboard-finance-card .h4 {
        font-size: 1.45rem;
    }

    .card-body,
    .dashboard-panel .card-body {
        padding: 16px;
    }

    .btn {
        white-space: normal;
    }

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

    .login-card {
        margin: 14px;
        padding: 28px 22px;
    }
}
