/* ===================================
   EXTRANET - Design Hybrid 
   Bootstrap 5 + Material touches
   =================================== */

:root {
    /* Couleurs MAUI - Défaults (peuvent être modifiées dynamiquement) */
    --primary-color: #212842;
    --primary-hover: #2D3A57;
    --primary-active: #141B2D;
    --primary-accent: #E8EAF0;
    
    --secondary-color: #3A4A6B;
    --tertiary-color: #141B2D;
    
    /* Aliases pour compatibilité avec l'ancien code */
    --primary: var(--primary-color);
    --primary-dark: var(--tertiary-color);
    --primary-light: var(--primary-hover);
    --accent: var(--secondary-color);
    
    /* Couleurs système */
    --gray-900: #1C1C1E;
    --gray-800: #2C2C2E;
    --gray-700: #3A3A3C;
    --gray-600: #8E8E93;
    --gray-500: #AEAEB2;
    --gray-400: #C7C7CC;
    --gray-300: #D1D1D6;
    --gray-200: #E5E5EA;
    --gray-100: #F2F2F7;
    
    /* Ombres Material */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 16px rgba(81, 43, 212, 0.15);
}

/* ===================================
   BASE STYLES
   =================================== */

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-900);
    background-color: #FAFAFA;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===================================
   NAVBAR & HEADER
   =================================== */

/* Bandeau coloré supérieur */
.top-banner {
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--primary-hover) 50%, 
        var(--secondary-color) 100%);
}

/* Navbar avec couleurs du thème */
.navbar-themed {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-themed .navbar-brand {
    color: white !important;
}

.navbar-themed .brand-name {
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Logo dynamique */
.brand-logo {
    height: 80px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    padding: 10px 16px;
    background-color: transparent;
    border-radius: 10px;
}

.brand-icon-fallback {
    font-size: 2.5rem;
    padding: 14px 20px;
    background-color: transparent;
    border-radius: 10px;
}

.brand-icon {
    font-size: 1.5rem;
}

/* Menu items */
.navbar-themed .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-themed .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* Hamburger menu blanc sur fond foncé */
.navbar-themed .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-themed .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-themed .dropdown-menu {
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-themed .dropdown-item:hover {
    background-color: var(--primary-accent);
    color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.dropdown-item i {
    margin-right: 0.5rem;
}

/* ===================================
   LOGIN PAGE
   =================================== */

.login-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease;
}

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

/* Logo de login */
.login-logo-wrapper {
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-img {
    height: 120px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    padding: 20px 28px;
    background-color: var(--primary-color);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(33, 40, 66, 0.2);
}

/* Bannière événementielle (pages de connexion) — voir Views/Shared/_BanniereConnexion.cshtml */
.banniere-connexion {
    position: relative;
    margin-bottom: 1.5rem;
    animation: slideUp 0.4s ease;
}

.banniere-connexion-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(33, 40, 66, 0.2);
}

/* Croix posée sur le coin, hors de l'image, pour ne masquer aucun texte */
.banniere-connexion-fermer {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.banniere-connexion-fermer:hover,
.banniere-connexion-fermer:focus-visible {
    background-color: var(--primary-hover);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.login-logo-fallback {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    box-shadow: 0 4px 16px rgba(33, 40, 66, 0.2);
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    font-weight: 600;
}

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

/* ===================================
   STAT CARDS
   =================================== */

.stat-card {
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gray-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

/* ===================================
   ESPACE CARDS
   =================================== */

.section-header {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.espace-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.espace-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.espace-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.espace-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.espace-address {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.badge-generic {
    background: var(--accent);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Badges personnalisés avec texte blanc sur fond coloré - PRIORITÉ MAXIMALE */
span.badge.badge-locataire {
    background: linear-gradient(135deg, #007AFF, #0056D2) !important;
    color: white !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.2) !important;
    border: none !important;
}

span.badge.badge-proprietaire {
    background: linear-gradient(135deg, #34C759, #28A745) !important;
    color: white !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(52, 199, 89, 0.2) !important;
    border: none !important;
}

span.badge.badge-coproprietaire {
    background: linear-gradient(135deg, #AF52DE, #8E44AD) !important;
    color: white !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(175, 82, 222, 0.2) !important;
    border: none !important;
}

span.badge.badge-conseil {
    background: linear-gradient(135deg, #FFC107, #FF9800) !important;
    color: #000 !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2) !important;
    border: none !important;
}

.espace-arrow {
    font-size: 1.5rem;
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.espace-card:hover .espace-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.espace-card.espace-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.espace-card.espace-disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.espace-card.espace-disabled .espace-arrow {
    display: none;
}

/* ===================================
   EMPTY STATE
   =================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.empty-text {
    color: var(--gray-600);
    font-size: 1rem;
}

/* ===================================
   FOOTER
   =================================== */

/* ===================================
   FOOTER
   =================================== */

.footer-themed {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    margin-top: auto;
}

.footer-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.1);
}

.footer-logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
    padding: 8px;
    background-color: var(--primary-color);
    border-radius: 50%; /* Cercle */
}

.footer-brand-name {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.footer-description {
    margin: 0;
    line-height: 1.5;
}

.footer-title {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-links {
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-block;
}

.footer-link:hover {
    color: white;
    padding-left: 5px;
}

.footer-info li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-info i {
    opacity: 0.7;
}

/* Legacy footer style (si utilisé ailleurs) */
.footer {
    border-top: 1px solid var(--gray-200);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

/* ===================================
   LOADER OVERLAY
   =================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

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

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

.loader-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--gray-700);
    font-size: 0.875rem;
    margin: 0;
}

/* ===================================
   COMPTE PAGE
   =================================== */

.compte-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.compte-card.solde-positif {
    border-left: 4px solid #28a745;
}

.compte-card.solde-negatif {
    border-left: 4px solid #dc3545;
}

.compte-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.compte-montant {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.compte-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--gray-400);
}

.table-responsive {
    border-radius: 0 0 12px 12px;
}

/* ===================================
   SIDEBAR NAVIGATION
   =================================== */

.sidebar {
    width: 250px;
    min-height: calc(100vh - 57px);
    position: sticky;
    top: 0;
    overflow-y: auto;
    border-right: 1px solid var(--gray-200);
    background: #FAFBFC;
}

.sidebar-content {
    position: sticky;
    top: 1rem;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar .nav-link {
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-primary);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    font-style: normal;
}

/* Sous-menus dépliables */
.sidebar .nav-link[data-bs-toggle="collapse"] {
    font-weight: 600;
    color: var(--gray-800);
}

.sidebar .nav-link[data-bs-toggle="collapse"]:hover {
    background-color: var(--primary-accent);
    color: var(--primary-color);
}

.sidebar .collapse .nav-link,
.sidebar .collapsing .nav-link {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    border-left: 2px solid var(--gray-200);
    margin-left: 1rem;
    border-radius: 0 8px 8px 0;
}

.sidebar .collapse .nav-link:hover,
.sidebar .collapsing .nav-link:hover {
    border-left-color: var(--primary-color);
}

.sidebar .collapse .nav-link.active {
    border-left-color: white;
}

/* Menu mobile sous-menus */
.navbar .nav-link[data-bs-toggle="collapse"] {
    font-weight: 600;
}

.navbar .collapse .nav-link {
    padding-left: 2.5rem !important;
    font-size: 0.9rem;
    border-left: 2px solid var(--gray-300);
    margin-left: 1rem;
}

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

/* ===================================
   THEMED PAGE HEADERS
   =================================== */

.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.page-header h1,
.page-header h2,
.page-header h3 {
    color: white;
    margin: 0;
}

.page-header p {
    color: rgba(255,255,255,.8);
    margin: 0.5rem 0 0 0;
}

/* Titres de pages avec barre latérale colorée */
h1.h3.fw-bold, h2.h4.fw-bold {
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
    color: var(--gray-900);
}

/* ===================================
   THEMED CARDS (global)
   =================================== */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

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

.card-header {
    background: white;
    border-bottom: 2px solid var(--primary-accent);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.card-header h5 {
    color: var(--primary-color);
}

/* ===================================
   THEMED TABLES
   =================================== */

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: none !important;
}

.table thead.table-light th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
}

.table thead th.text-muted {
    color: rgba(255,255,255,.85) !important;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #F0F2F8 !important;
}

/* ===================================
   THEMED BADGES
   =================================== */

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #198754, #20c997) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ffca2c) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #e35d6a) !important;
}

/* ===================================
   THEMED FORM ELEMENTS
   =================================== */

.form-control,
.form-select {
    border-radius: 8px !important;
    border: 1px solid var(--gray-300);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 40, 66, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.input-group .form-control {
    border-radius: 8px 0 0 8px !important;
}

.input-group .btn,
.input-group .input-group-text {
    border-radius: 0 8px 8px 0 !important;
}

/* ===================================
   COOKIE CONSENT BANNER
   =================================== */

#cookieConsent {
    background: var(--primary-color, #212842) !important;
}

#cookieConsent h6 {
    color: #fff !important;
}

#cookieConsent p {
    color: rgba(255, 255, 255, 0.9) !important;
}

#cookieConsent a {
    color: #7dd3fc !important;
    text-decoration: underline !important;
}

/* ===================================
   THEMED ALERTS
   =================================== */

.alert {
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: #E8F4FD;
    color: #0A4A7A;
    border-left: 4px solid #0D6EFD;
}

.alert-success {
    background: #E8F7ED;
    color: #0A5C2F;
    border-left: 4px solid #198754;
}

.alert-warning {
    background: #FFF8E1;
    color: #7A5C00;
    border-left: 4px solid #FFC107;
}

.alert-danger {
    background: #FDE8EA;
    color: #7A0A14;
    border-left: 4px solid #DC3545;
}

/* ===================================
   THEMED SECTION DIVIDERS
   =================================== */

.section-divider {
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border: none;
    margin: 1.5rem 0;
    border-radius: 2px;
}

/* ===================================
   THEMED SCROLLBAR
   =================================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* ===================================
   PAGE CONTENT WRAPPER
   =================================== */

.container.py-4 {
    animation: fadeInUp 0.3s ease;
}

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

/* ===================================
   CURSOR UTILITY
   =================================== */

.cursor-pointer { cursor: pointer; }

/* ===================================
   USER DROPDOWN MENU
   =================================== */

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    padding: 0.5rem 1rem;
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
}

.dropdown-item.active small {
    color: rgba(255, 255, 255, 0.95) !important;
}

button.dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
}

button.dropdown-item.active small {
    color: rgba(255, 255, 255, 0.95) !important;
}

.dropdown-item small {
    font-size: 0.75rem;
}

/* ===================================
   BIEN CARDS WITH PHOTOS
   =================================== */

.bien-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bien-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.bien-photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.bien-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bien-card:hover .bien-photo img {
    transform: scale(1.05);
}

.bien-photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.bien-content {
    padding: 1.25rem;
}

.bien-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.bien-address {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.bien-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===================================
   DASHBOARD CARDS
   =================================== */

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

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

.dashboard-card-placeholder {
    opacity: 0.7;
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.card-body-custom {
    padding: 1.5rem;
    flex: 1;
}

/* Dashboard - Mon Bien */
.bien-photo-dashboard {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.bien-photo-dashboard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bien-photo-placeholder-dashboard {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon-dashboard {
    font-size: 3rem;
    opacity: 0.5;
}

.bien-info {
    text-align: center;
}

.bien-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.bien-location {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.bien-location i {
    font-style: normal;
}

.bien-meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Dashboard - Mon Compte */
.compte-solde {
    text-align: center;
    padding: 1.5rem 0;
    border-radius: 8px;
    background: var(--gray-100);
}

.solde-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.solde-montant {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.compte-info {
    text-align: center;
    margin-top: 1rem;
}

.compte-info i {
    font-style: normal;
}

.compte-action {
    text-align: center;
}

/* Dashboard - Placeholders */
.placeholder-content {
    text-align: center;
    padding: 3rem 1rem;
}

.placeholder-icon-small {
    font-size: 2.5rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

/* ===================================
   BIEN CARDS (HOME PAGE)
   =================================== */

.bien-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bien-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.bien-photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.bien-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bien-photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.bien-content {
    padding: 1.25rem;
}

.bien-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.bien-address {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.bien-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .bien-photo,
    .bien-photo-placeholder {
        height: 180px;
    }
}

/* ===================================
   DROPDOWN FORM BUTTONS
   =================================== */

/* Boutons qui sont dropdown-item doivent avoir le style natif Bootstrap */
button.dropdown-item {
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

button.dropdown-item:hover:not(.active) {
    background-color: var(--bs-dropdown-link-hover-bg, #e9ecef);
}

/* Le petit texte dans les dropdown-item */
button.dropdown-item small {
    display: block;
    color: var(--gray-600);
}

/* Empêcher les numéros de téléphone et fax de se couper */
a[href^="tel:"], .nowrap { white-space: nowrap; }

/* ===================================
   ICÔNES GRATADE
   Sprite : wwwroot/images/icons.svg (généré par icones/IconGen)
   Balise : <icon name="accueil" />  (TagHelpers/IconTagHelper.cs)
   L'icône prend la couleur du texte ; l'or passe par --ic-or.
   =================================== */
.ic {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    flex: none;
    vertical-align: -0.22em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

.ic-sm {
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.08em;
}

.nav-link .ic,
.dropdown-item .ic {
    margin-right: 0.5rem;
}

.nav-link .ic.ic-sm {
    margin-right: 0;
    margin-left: 0.25rem;
}

.user-avatar .ic {
    margin: 0;
}

/* Couleurs d'état des icônes : <icon name="succes" class="ic-ok" /> */
.ic-ok { color: #28A745; }
.ic-ko { color: #DC3545; }
.ic-warn { color: #B07800; }
.ic-info { color: #007AFF; }

/* Indicateurs de tri des tableaux triables en CSS (th[data-sort], pages collaborateur).
   Masques tirés de icones/source/tri*.svg : à reporter ici si ces trois dessins changent. */
:root {
    --ic-tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 20V4M4.5 7.5 8 4l3.5 3.5M16 4v16M12.5 16.5 16 20l3.5-3.5'/%3E%3C/svg%3E");
    --ic-tri-croissant: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 20V4M4.5 7.5 8 4l3.5 3.5'/%3E%3Cpath d='M16 4v16M12.5 16.5 16 20l3.5-3.5' opacity='.35'/%3E%3C/svg%3E");
    --ic-tri-decroissant: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 20V4M4.5 7.5 8 4l3.5 3.5' opacity='.35'/%3E%3Cpath d='M16 4v16M12.5 16.5 16 20l3.5-3.5'/%3E%3C/svg%3E");
}
