/**
 * Modern UI Enhancements
 * 
 * Fichier CSS séparé pour moderniser l'interface
 * Pour désactiver : commenter ou supprimer l'import dans layout.jsp
 * 
 * @version 1.0
 * @date 2026-01-26
 */

/* ==========================================================================
   1. VARIABLES & CONFIGURATION MODERNE
   ========================================================================== */
 

/* ==========================================================================
   2. ANIMATIONS GLOBALES
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ==========================================================================
   3. TRANSITIONS GLOBALES (optimisées pour la performance)
   ========================================================================== */
/* Note: 'transition: all' évité car coûteux en performance.
   Transitions limitées aux propriétés visuelles spécifiques */
a {
    transition: color var(--transition-fast);
}

button, .btn {
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

/* Transitions désactivées par défaut sur les champs de formulaire pour éviter les lenteurs */
input, select, textarea {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.message_service {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

#formula {
    /* Pas de transition sur le formulaire entier */
    transition: none;
}

/* ==========================================================================
   4. TYPOGRAPHIE MODERNE
   ========================================================================== */
body { 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   5. CONTENEUR PRINCIPAL - Animation d'entrée (désactivée pour performance)
   ========================================================================== */
/* Animations désactivées pour éviter le flash de contenu non stylé (FOUC)
   Décommenter si vous souhaitez les réactiver :
.main-content {
    animation: fadeInUp 0.3s ease-out;
}
.main_page {
    animation: fadeIn 0.2s ease-out;
}
*/

/* ==========================================================================
   6. BOUTONS MODERNISÉS
   ========================================================================== */
.btn_custom_1,
.btn-create-account,
.commands .button-next,
.commands .finish {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: none;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn_custom_1::before,
.btn-create-account::before,
.commands .button-next::before,
.commands .finish::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn_custom_1:hover,
.btn-create-account:hover,
.commands .button-next:hover,
.commands .finish:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn_custom_1:hover::before,
.btn-create-account:hover::before,
.commands .button-next:hover::before,
.commands .finish:hover::before {
    left: 100%;
}

.btn_custom_1:active,
.btn-create-account:active,
.commands .button-next:active,
.commands .finish:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.commands .button-back {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.commands .button-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   7. FORMULAIRES MODERNISÉS
   ========================================================================== */
#formula {
    background: rgba(255, 255, 255, 0.98);
    /* backdrop-filter désactivé car coûteux en performance */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(230, 230, 230, 0.8);
}

#formula .blocinput input[type="text"],
#formula .blocinput input[type="email"],
#formula .blocinput input[type="password"],
#formula .blocinput input[type="tel"],
#formula .blocinput input[type="number"],
#formula .blocinput select,
#formula .blocinput textarea,
#formula_info .blocinput input[type="text"],
#formula_info .blocinput select,
#formula_info .blocinput textarea {
    border: 2px solid #e8e8e8;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.95rem;
    background-color: #fafafa;
    transition: all var(--transition-fast);
}

#formula .blocinput input:focus,
#formula .blocinput select:focus,
#formula .blocinput textarea:focus,
#formula_info .blocinput input:focus,
#formula_info .blocinput select:focus,
#formula_info .blocinput textarea:focus {
    border-color: var(--main-title-color);
    box-shadow: 0 0 0 4px rgba(128, 172, 221, 0.15);
    background-color: #fff;
    outline: none;
}

#formula .blocinput input:hover,
#formula .blocinput select:hover,
#formula .blocinput textarea:hover {
    border-color: #d0d0d0;
    background-color: #fff;
}

#formula .blocinput label {
    font-weight: 500;
    color: #444;
    margin-bottom: 1px;
}

/* ==========================================================================
   8. CARTES ET MESSAGES
   ========================================================================== */
.message_service {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    transition: all var(--transition-normal);
}

.message_service:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(128, 172, 221, 0.3);
}

/* ==========================================================================
   9. NAVIGATION ET HEADER
   ========================================================================== */
/* Note: backdrop-filter désactivé sur .page-header car il crée un nouveau 
   stacking context qui interfère avec le z-index du menu offcanvas mobile */
.page-header {
    background: rgba(255, 255, 255, 0.95) !important;
}

#header {
    box-shadow: var(--shadow-md);
}

.navbar-nav .nav-link {
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(128, 172, 221, 0.1);
}

/* ==========================================================================
   9b. MENU MOBILE OFFCANVAS - Protection des styles Bootstrap
   ========================================================================== */
/* S'assurer que le menu mobile offcanvas reste bien positionné en bas */
.offcanvas-bottom {
    position: fixed !important;
    bottom: 0 !important;
    z-index: 1045 !important;
}

.offcanvas-backdrop {
    z-index: 1040 !important;
}

/* Ne pas appliquer de transitions qui pourraient interférer avec l'offcanvas */
.offcanvas,
.offcanvas-bottom,
.offcanvas-backdrop {
    transition: none;
    transform: none;
    border-radius: 0;
}

.offcanvas.show,
.offcanvas-bottom.show {
    transform: none !important;
}
 

/* ==========================================================================
   11. TABLES MODERNISÉES
   ========================================================================== */
table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #666;
    padding: 14px 16px;
}

table tbody tr {
    transition: background-color var(--transition-fast);
}

table tbody tr:hover {
    background-color: rgba(128, 172, 221, 0.06);
}

table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* ==========================================================================
   12. LIENS MODERNISÉS
   ========================================================================== */
a {
    color: var(--main-title-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #5a94c9;
}

/* Effet de soulignement animé pour les liens de navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-title-color);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ==========================================================================
   13. BLOCS D'ACCUEIL
   ========================================================================== */
.bloc-accueil,
.homebloc,
[class*="homebloc"] {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.bloc-accueil:hover,
.homebloc:hover,
[class*="homebloc"]:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   14. ALERTES ET NOTIFICATIONS
   ========================================================================== */
.message_tt {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.message_tt.error {
    background: linear-gradient(135deg, #DF1659 0%, #c41350 100%);
}

.message_tt.notify {
    background: linear-gradient(135deg, #FD5318 0%, #e04a15 100%);
}

/* ==========================================================================
   15. INDICATEURS DE QUALITÉ (mot de passe, etc.)
   ========================================================================== */
.pwdquality,
.pwdidem {
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    display: block;
    margin-top: 5px;
}

/* Fix pour les groupes de champs avec indicateurs de qualité */
#formula .blocinput .groupfld {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
    clear: both;
}

#formula .blocinput .groupfld::after {
    content: "";
    display: table;
    clear: both;
}

#formula .blocinput .groupfld .field {
    float: none !important;
}

#formula .blocinput .groupfld .field.w100 {
    flex: 0 0 100%;
    max-width: 100%;
}

#formula .blocinput .groupfld .field.w60 {
    flex: 0 0 60%;
    max-width: 60%;
}

#formula .blocinput .groupfld .field.w40 {
    flex: 0 0 40%;
    max-width: 40%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Supprimer la marge excessive sur les indicateurs */
#formula .blocinput .groupfld .field.w40.mt-2 {
    margin-top: 0 !important;
}

#formula .blocinput .groupfld .field.w40 label {
    font-size: 0.85em;
    margin-bottom: 6px;
}

@media (max-width: 767px) {
    #formula .blocinput .groupfld {
        flex-direction: column;
    }
    
    #formula .blocinput .groupfld .field.w60,
    #formula .blocinput .groupfld .field.w40,
    #formula .blocinput .groupfld .field.w100 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        padding-left: 0;
    }
    
    #formula .blocinput .groupfld .field.w40 {
        margin-top: 8px;
    }
}

.calcconsoerr0 {
    background: linear-gradient(135deg, #356B03 0%, #2d5a02 100%);
    border-radius: var(--radius-sm);
}

.calcconsoerr1 {
    background: linear-gradient(135deg, #ff800f 0%, #e0700d 100%);
    border-radius: var(--radius-sm);
}

.calcconsoerr2 {
    background: linear-gradient(135deg, #A1083B 0%, #8a0733 100%);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   16. SCROLLBAR MODERNE (Chrome, Edge, Safari)
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    border-radius: 5px;
    border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a0a0a0, #808080);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f5f5f5;
}

/* ==========================================================================
   17. SPINNER / LOADER MODERNISÉ
   ========================================================================== */
#globalLoadingPanel .spinner {
    border-radius: 50%;
    animation: pulse 1s infinite ease-in-out;
}

/* ==========================================================================
   18. SÉLECTION DE TEXTE
   ========================================================================== */
::selection {
    background: rgba(128, 172, 221, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(128, 172, 221, 0.3);
    color: inherit;
} 
/* ==========================================================================
   20. EFFETS GLASS-MORPHISM OPTIONNELS
   ========================================================================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   21. RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
        --radius-xl: 16px;
    }
    
    #formula {
        border-radius: var(--radius-md);
        padding: 15px;
    }
    
    .message_service {
        border-radius: var(--radius-md);
    }
    
    .btn_custom_1:hover,
    .btn-create-account:hover,
    .message_service:hover {
        transform: none; /* Désactive les effets hover sur mobile */
    }
}

/* ==========================================================================
   22. RÉDUCTION DES ANIMATIONS (accessibilité)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   23. HOME PAGE - BLOCS MODERNISÉS
   ========================================================================== */

/* Bloc factures groupées - compact */
.home_bills_alert {
    background: #ffffff;
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    overflow: hidden;
}

.home_bills_header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom: 1px solid #fde68a;
    font-weight: 600;
    font-size: 0.85rem;
    color: #92400e;
}

.home_bills_header > i {
    font-size: 0.95rem;
    color: #d97706;
}

.home_bills_header > span {
    flex: 1;
}

.home_bills_badge {
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.home_bills_link {
    font-size: 0.75rem;
    font-weight: 500;
    color: #b45309;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: opacity 0.15s ease;
}

.home_bills_link:hover {
    opacity: 0.8;
    color: #92400e;
}

.home_bills_link i {
    font-size: 0.65rem;
}

.home_bills_list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.home_bill_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    width: 100%;
    font-size: 0.82rem;
    transition: background 0.15s ease;
}

.home_bill_item:last-child {
    border-bottom: none;
}

.home_bill_item:hover {
    background: #f9fafb;
}

.home_bill_amount {
    font-weight: 600;
    color: #1f2937;
}

.home_bill_date {
    color: #6b7280;
    font-size: 0.78rem;
}

/* Si plus de 3 factures, on limite la hauteur */
.home_bills_list {
    max-height: 150px;
    overflow-y: auto;
}

/* ==========================================
   BLOC FACTURES À RÉGLER - PETIT (colonne gauche)
   ========================================== */
.home_bills_alert_small {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
} 
.home_bills_small_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0 1rem;
    background: transparent;
}

.home_bills_small_header > span:first-child {
    font-weight: 600;
    font-size: 1.4rem;
    color: var( --color-neutral-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home_bills_small_header > span:first-child i {
    color: #6b7280;
}

.home_bills_small_body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.home_bills_small_list {
    padding: 0.5rem 0;
}

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

.home_bills_small_amount {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.home_bills_small_date {
    font-size: 0.75rem;
    color: #6b7280;
}

.home_bills_small_link {
    display: block;
    width:150px;
    margin:auto;
    text-align: center;
    padding: 0.65rem 1rem;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
    margin-top: auto;
    border-radius: 12px;
}

.home_bills_small_link:hover {
    background: #1f2937;
    color: #ffffff;
}

.home_bills_small_link i {
    margin-left: 0.25rem;
}

/* ==========================================================================
   BLOC DERNIERE CONSOMMATION
   ========================================================================== */
.home_conso_card {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff;
}

.home_conso_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 0.85rem;
}

.home_conso_header i {
    margin-right: 0.5rem;
}

.home_conso_link {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s ease;
}

.home_conso_link:hover {
    color: #ffffff;
}

.home_conso_content {
    padding: 1.25rem 1rem;
}

.home_conso_stats {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
}

.home_conso_stat_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.home_conso_label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.home_conso_value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    font-family: 'Inter', system-ui, sans-serif;
}

.home_conso_unit {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.home_conso_divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    align-self: stretch;
}

.home_conso_period {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    opacity: 0.85;
    text-align: center;
}

.home_conso_period i {
    margin-right: 0.4rem;
}

@media (max-width: 767.98px) {
    .home_conso_card {
        border-radius: 12px;
    }
    
    .home_conso_value {
        font-size: 1.75rem;
    }
    
    .home_conso_stats {
        gap: 1rem;
    }
}

/* ==========================================================================
   BLOC MODE DE PAIEMENT
   ========================================================================== */
.home_payment_card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.85rem 1rem;
}

.home_payment_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.home_payment_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home_payment_label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home_payment_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.home_payment_action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.15s ease;
}

.home_payment_action:hover {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 767.98px) {
    .home_bills_header {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
    }
    
    .home_bill_item {
        padding: 0.5rem 0.85rem;
        font-size: 0.78rem;
    }
    
    .home_bills_list {
        max-height: 120px;
    }
}

/* Container des blocs home */
.home_page {
    padding-top: 10px;
    padding-bottom: 60px;
}

/* Bloc home - style carte avec accent latéral */
.home_item {
    position: relative;
    max-width: 320px;
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem 1rem 1.25rem;
    padding-left: calc(4px + 1rem); /* 4px pour la bande + 1rem d'espace */
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

/* Bande colorée à gauche */
.home_item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--main-title-color, #3b82f6);
    transition: width 0.2s ease;
}

.home_item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.home_item:hover::before {
    width: 6px;
}

/* Icône intégrée - alignée */
.home_item_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-shrink: 0;
}

/* Icône Font Awesome */
.home_item_icon > i {
    font-size: 1.5rem;
}

/* Fallback pour anciennes images PNG si présentes */
.home_item_icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: 0.85;
}

/* Titre du bloc - aligné au centre */
.home_item h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: #1e293b;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

/* Description - cachée */
.home_item_desc {
    display: none;
}

/* Annuler l'ancien style my-img-container */
.home_item .my-img-container {
    margin-top: 0;
    opacity: 1;
}

/* Couleurs bleus, gris, noir par bloc */
.home_page a:nth-child(1) .home_item::before { background: #1e40af; }  /* Bleu foncé */
.home_page a:nth-child(2) .home_item::before { background: #3b82f6; }  /* Bleu */
.home_page a:nth-child(3) .home_item::before { background: #64748b; }  /* Gris ardoise */
.home_page a:nth-child(4) .home_item::before { background: #1f2937; }  /* Noir/anthracite */

.home_page a:nth-child(1) .home_item { background: #f0f5ff; }  /* Bleu très pâle */
.home_page a:nth-child(2) .home_item { background: #f5f9ff; }  /* Bleu clair */
.home_page a:nth-child(3) .home_item { background: #f8fafc; }  /* Gris très clair */
.home_page a:nth-child(4) .home_item { background: #f3f4f6; }  /* Gris clair */

/* Version mobile */
@media (max-width: 767.98px) {
    .home_page {
        padding-top: 15px;
        padding-bottom: 20px;
    }
    
    .home_item {
        max-width: none;
        padding: 1rem 1rem 1rem 1.25rem;
        gap: 0.75rem;
    }
    
    .home_item_icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    
    .home_item_icon img {
        max-width: 32px;
        max-height: 32px;
    }
    
    .home_item h6 {
        font-size: 0.85rem;
    }
    
    .home_item:hover {
        transform: none;
    }
}

/* Alerte facture impayée */
.container > .row:first-child .shadow-sm.border {
    border-radius: var(--radius-md) !important;
    border: 1px solid #fde68a !important;
    border-left: 4px solid #f59e0b !important;
    background: #fffbeb !important;
}

/* ==========================================================================
   24. BLOC RÉSUMÉ ABONNEMENT SUR LA HOME
   ========================================================================== */
 
.home_layout .home_page {
    padding-top: 0;
    padding-bottom: 0;
}

/* Carte collapsible - Design ultra flat */
.home_subscription_card {
    background: #ffffff;
    border-radius: 4px;
    padding: 0;
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 100px;
    overflow: hidden;
}

.home_subscription_card:hover {
    border-color: #d1d5db;
}

/* Header moderne avec dégradé subtil */
.home_abo_header,
.home_abo_header_static {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.home_abo_header_static > span:first-of-type {
    flex: 1;
}

.home_abo_viewall_link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--main-title-color, #3b82f6);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: opacity 0.15s ease;
}

.home_abo_viewall_link:hover {
    opacity: 0.8;
    color: var(--main-title-color, #3b82f6);
}

.home_abo_viewall_link i {
    font-size: 0.65rem;
}

.home_abo_header_static::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--main-title-color, #3b82f6);
    border-radius: 2px;
    margin-right: 0.25rem;
}

/* Petit indicateur coloré */
.home_abo_bullet {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--main-title-color, #3b82f6);
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Contenu */
.home_abo_content {
    padding: 0.35rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
}

.home_abo_item {
    padding: 0.3rem 1rem;
    border-bottom: none;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.home_abo_item:hover {
    background: transparent;
}

.home_abo_item strong {
    color: #374151;
    display: inline;
    margin-top: 0;
    font-weight: 500;
}

/* Adresse sur une nouvelle ligne */
.home_abo_item strong:has(+ br),
.home_abo_item strong[style*="block"] {
    display: block;
    width: 100%;
}

/* Forcer l'adresse à la ligne si elle contient certains mots clés */
.home_abo_item:last-of-type strong {
    display: block;
    width: 100%;
}

.home_abo_item:last-child {
    border-bottom: none;
}

/* Liste déroulante pour changer d'abonnement */
.home_abo_switch {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
}

.home_abo_switch label {
    display: block;
    font-size: 0.72rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.home_abo_switch label i {
    margin-right: 0.3rem;
    font-size: 0.68rem;
}

.home_abo_dropdown {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.home_abo_dropdown:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

.home_abo_dropdown:focus {
    outline: none;
    border-color: var(--main-title-color, #3b82f6);
    background: #ffffff;
}

/* Lien vers tous les abonnements */
.home_abo_all_link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--main-title-color, #3b82f6);
    text-decoration: none;
}

.home_abo_all_link:hover {
    text-decoration: underline;
    color: var(--main-title-color, #3b82f6);
}

.home_abo_all_link i {
    font-size: 0.7rem;
}

/* Mobile : bloc en dessous */
@media (max-width: 991.98px) {
    .home_layout {
        padding-top: 0.5rem;
    }
    
    .home_subscription_card {
        margin-top: 0;
        margin-bottom: 0.75rem;
        position: static;
        border-radius: 4px;
    }
}

@media (max-width: 767.98px) {
    .home_abo_header {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }
    
    .home_abo_content {
        padding: 0.5rem 0;
    }
    
    .home_abo_item {
        padding: 0.55rem 1rem;
        font-size: 0.78rem;
    }
    
    .home_abo_toggle {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    .home_abo_list_item {
        padding: 0.75rem 1rem;
        margin: 0 0.35rem;
    }
    
    .home_abo_switch_icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   25. BLOC MES ABONNEMENTS (SWITCH) - Design flat, sans collapse
   ========================================================================== */

/* Bloc toujours ouvert */
.home_card_open {
    max-height: none !important;
}

.home_abo_list_content {
    padding: 0.25rem 0 !important;
    background: #ffffff;
}

.home_abo_list_item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: none;
    margin: 0;
    border-radius: 0;
}

.home_abo_list_item:hover {
    background: #f9fafb;
}

.home_abo_list_item:last-of-type {
    border-bottom: none;
}

.home_abo_switch_icon {
    color: #9ca3af;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.home_abo_list_item:hover .home_abo_switch_icon {
    color: var(--main-title-color, #3b82f6);
}

.home_abo_list_info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.home_abo_list_type {
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
}

.home_abo_list_address {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home_abo_list_all {
    padding: 0.6rem 1rem;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
}

.home_abo_list_all a {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.home_abo_list_all a:hover {
    color: var(--main-title-color, #3b82f6);
}

.home_abo_list_all a i {
    font-size: 0.7rem;
}

/* ==========================================
   BLOC BIENVENUE
   ========================================== */
.home_welcome_card {
    background: linear-gradient(135deg, var(--main-title-color, #3b82f6) 0%, #2563eb 100%);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    color: #ffffff;
}

.home_welcome_card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home_welcome_card h4 i {
    font-size: 1.1rem;
}

.home_welcome_card p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ==========================================
   BLOC DERNIÈRE FACTURE
   ========================================== */
.home_lastbill_card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.25rem;
}

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

.home_lastbill_header span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home_lastbill_header span i {
    color: var(--main-title-color, #3b82f6);
}

.home_lastbill_link {
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s ease;
}

.home_lastbill_link:hover {
    color: var(--main-title-color, #3b82f6);
}

.home_lastbill_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home_lastbill_amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.home_lastbill_meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.home_lastbill_date {
    font-size: 0.8rem;
    color: #6b7280;
}

.home_lastbill_status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.home_lastbill_status.paid {
    background: #dcfce7;
    color: #166534;
}

.home_lastbill_status.pending {
    background: #fef3c7;
    color: #92400e;
}

.home_lastbill_status.overdue {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================
   TITRE DE SECTION
   ========================================== */
.home_section_title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home_section_title i {
    color: var(--main-title-color, #3b82f6);
    font-size: 0.9rem;
}

/* ==========================================
   BLOC INFORMATIONS SERVICE (remplace bienvenue)
   ========================================== */
.home_info_card {
    background: var(--color-primary, #12447d);
    border: none;
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100px;
    overflow: hidden;
}

.home_info_card_icon {
    width: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.home_info_card_icon .home-icon-info {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3C!-- Cercle de fond --%3E%3Ccircle cx='24' cy='24' r='18' stroke='white' stroke-width='2.5' fill='none'/%3E%3C!-- Icône info: point --%3E%3Ccircle cx='24' cy='14' r='3' fill='white'/%3E%3C!-- Icône info: barre --%3E%3Crect x='21' y='20' width='6' height='16' rx='2' fill='white'/%3E%3C!-- Reflet --%3E%3Cellipse cx='18' cy='14' rx='2' ry='3' fill='white' opacity='0.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
}

.home_info_card_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.5rem;
}

.home_info_card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.home_info_card p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ==========================================
   BLOC MODE DE PAIEMENT / DATE RELEVE - SIMPLE
   ========================================== */
.home_payment_card_simple {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home_payment_card_simple .home_payment_label {
    font-size: 0.8rem;
    color: #6b7280;
}

.home_payment_card_simple .home_payment_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

/* ==========================================
   BLOC MON COMPTEUR
   ========================================== */
.home_meter_card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem 1.25rem;
}

.home_meter_title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

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

.home_meter_label {
    font-size: 0.8rem;
    color: #6b7280;
}

.home_meter_value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1f2937;
}

/* ==========================================
   BOUTON FAIRE MA RELEVE
   ========================================== */
.home_releve_button {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--home-releve-btn-bg) 0%, var(--home-releve-btn-bg-end) 100%);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    color: var(--home-releve-btn-text);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home_releve_button:hover {
    color: var(--home-releve-btn-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.home_releve_button .home-icon-releve {
    width: 48px;
    height: 48px;
    background-color: var(--home-releve-btn-icon);
    flex-shrink: 0;
}

.home_releve_button_text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.home_releve_button_text strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.home_releve_button_text small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.home_releve_button > i {
    font-size: 1.25rem;
    opacity: 0.8;
}

/* ==========================================
   QUICKLINKS COMPACTS
   ========================================== */
.home_quicklink {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home_quicklink:hover {
    border-color: var(--color-primary, #12447d);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.home_quicklink .home-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.home_quicklink span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

/* ==========================================
   BLOC CONSOMMATION COMPACT
   ========================================== */
.home_conso_compact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--home-conso-bg);
    border: 1px solid var(--home-conso-border);
    border-radius: 6px;
    padding: 0.875rem 1.25rem;
}

.home_conso_compact_label {
    font-size: 0.8rem;
    color: var(--home-conso-label);
    margin-right: auto;
}

.home_conso_compact_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--home-conso-value);
}

.home_conso_compact_sep {
    color: var(--home-conso-separator);
}

.home_conso_compact_volume {
    font-size: 0.85rem;
    color: var(--home-conso-volume);
}

.home_conso_compact_link {
    font-size: 0.75rem;
    color: var(--home-conso-link);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.home_conso_compact_link:hover {
    color: var(--home-conso-link-hover);
}

/* ==========================================
   BLOC DERNIÈRE FACTURE - VISUEL MODERNE
   ========================================== */
.home_lastbill_card_visual {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

.home_lastbill_visual_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem; 
    background: transparent;
    font-size: 1.2rem;
}

.home_lastbill_visual_title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
 
.home_lastbill_visual_link:hover {
    color: var(--color-secondary, #255b9a);
    text-decoration: underline;
}

.home_lastbill_visual_body {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.home_lastbill_visual_amount {
    font-size: 2rem;
    font-weight: 700;
    color:  var(--color-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.home_lastbill_visual_info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.home_lastbill_visual_date {
    font-size: 0.8rem;
    color: #6b7280;
}

.home_lastbill_visual_ref {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Responsive pour petits écrans */
@media (max-width: 576px) {
    .home_lastbill_visual_body {
        padding: 1rem;
    }
    
    .home_lastbill_visual_amount {
        font-size: 1.75rem;
    }
}

/* ==========================================
   BLOC INFO GÉNÉRIQUE (paiement, date relève)
   ========================================== */
.home_info_block {
    background: var(--home-infoblock-bg);
    border: 1px solid var(--home-infoblock-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease;
}

.home_info_block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.home_info_block_icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--home-infoblock-icon-bg) 0%, var(--home-infoblock-icon-bg-end) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.home_info_block_icon i {
    color: var(--home-infoblock-icon-color);
    font-size: 1.25rem;
}

.home_info_block_content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home_info_block_label {
    font-size: 0.75rem;
    color: var(--home-infoblock-label);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.home_info_block_value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--home-infoblock-value);
}

/* ==========================================
   BLOC MON COMPTEUR - VISUEL
   ========================================== */
.home_meter_card_visual {
    background: var(--home-meter-bg);
    border: 1px solid var(--home-meter-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home_meter_visual_header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--home-meter-header-bg) 0%, var(--home-meter-header-bg-end) 100%);
    color: var(--home-meter-header-text);
}

.home_meter_visual_header i {
    font-size: 1.1rem;
}

.home_meter_visual_header span {
    font-size: 0.95rem;
    font-weight: 600;
}

.home_meter_visual_body {
    padding: 1.25rem;
}

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

.home_meter_visual_row:not(:last-child) {
    border-bottom: 1px solid var(--home-meter-row-border);
}

.home_meter_visual_label {
    font-size: 0.85rem;
    color: var(--home-meter-label);
}

.home_meter_visual_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--home-meter-value);
}

/* ==========================================
   BLOC CONSOMMATION - VISUEL
   ========================================== */
.home_conso_visual {
    background: var(--home-conso-bg);
    border: 1px solid var(--home-conso-border);
    border-radius: 8px;
    overflow: hidden;
}

.home_conso_visual_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--home-conso-header-bg) 0%, var(--home-conso-header-bg-end) 100%);
    color: var(--home-conso-header-text);
}

.home_conso_visual_header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.home_conso_visual_link {
    font-size: 0.75rem;
    color: var(--home-conso-header-link);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.home_conso_visual_link:hover {
    color: var(--home-conso-header-link-hover);
}

.home_conso_visual_body {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.home_conso_visual_stat {
    flex: 1;
    text-align: center;
}

.home_conso_visual_label {
    display: block;
    font-size: 0.75rem;
    color: var(--home-conso-label);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.home_conso_visual_value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--home-conso-value);
}

.home_conso_visual_value small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--home-conso-unit);
}

.home_conso_visual_divider {
    width: 1px;
    height: 60px;
    background: var(--home-conso-divider);
    margin: 0 1rem;
}
/* ==========================================
   MESSAGE D'ALERTE HOME
   ========================================== */
.home_alert_box {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fef2f2;
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    animation: fadeInUp 0.4s ease;
    position: relative;
}

.home_alert_dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    background-color: #dc2626;
    border-radius: 50%;
}

.home_alert_text {
    flex: 1;
    color: var(--color-neutral-dark);
    font-size: 0.9rem;
    line-height: 1.4;
}

.home_alert_close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--color-neutral-dark);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s ease;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home_alert_close:hover {
    opacity: 1;
}

.home_alert_close::before {
    content: '×';
    font-size: 1.5rem;
    line-height: 1;
}

/* ==========================================================================
   NOUVEAU DASHBOARD HOME - LAYOUT 3 LIGNES
   ========================================================================== */

/* Container de ligne du dashboard */
.home_dashboard_row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.home_dashboard_row > [class*="col-"] {
    padding: 0 0.5rem;
}

/* Section dashboard */
.home_dashboard_section {
    margin-bottom: 1.5rem;
}

/* Carte dashboard générique */
.home_dashboard_card {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home_dashboard_card:hover {
    box-shadow: none;
}

/* ==========================================================================
   CARTE FAIRE MA RELEVE (nouveau style)
   ========================================================================== */
.home_releve_card {
    background: var(--color-primary, #12447d);
    color: #ffffff;
    text-decoration: none;
    padding: 0;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.home_releve_card:hover {
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 68, 125, 0.25);
}

.home_releve_card_icon {
    width: 33.333%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center; 
}

.home_releve_card_icon .home-icon-releve {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3C!-- Compteur d'eau --%3E%3Crect x='4' y='14' width='30' height='22' rx='3' stroke='white' stroke-width='2.5' fill='none'/%3E%3C!-- Écran digital fond blanc --%3E%3Crect x='8' y='18' width='22' height='10' rx='1.5' fill='white' opacity='0.3'/%3E%3Crect x='8' y='18' width='22' height='10' rx='1.5' stroke='white' stroke-width='1.5' fill='none'/%3E%3C!-- Chiffres du compteur --%3E%3Ctext x='12' y='26' font-family='monospace' font-size='7' font-weight='bold' fill='white'%3E0247%3C/text%3E%3C!-- Goutte d'eau avec reflet --%3E%3Cpath d='M38 8c0 0-6 7-6 11a6 6 0 0 0 12 0c0-4-6-11-6-11z' fill='%2393c5fd'/%3E%3Cellipse cx='35' cy='16' rx='2' ry='2.5' fill='white' opacity='0.6'/%3E%3C!-- Indicateur avec centre --%3E%3Ccircle cx='19' cy='32' r='3' stroke='white' stroke-width='1.5' fill='white' opacity='0.3'/%3E%3Ccircle cx='19' cy='32' r='1' fill='white'/%3E%3Cpath d='M19 32l4-6' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
}

.home_releve_card_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.25rem;
}

.home_releve_card_title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.home_releve_card_desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.home_releve_card_arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

.home_releve_card:hover .home_releve_card_arrow {
    transform: translateX(4px);
    color: #ffffff;
}

/* ==========================================================================
   CARTE MA CONSOMMATION (nouveau style)
   ========================================================================== */
.home_conso_card_new {
    background: var(--color-white, #ffffff); 
    border-radius: 8px;
    overflow: hidden;
}

.home_conso_card_header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: transparent; 
    color: var(--color-neutral-dark);
    font-size: 1.4rem;
    font-weight: 600;
}

.home_conso_card_body {
    padding: 1.25rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: top;
    align-items: top;
    text-align: center;
    gap: 0.5rem;
}

.home_conso_card_stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.home_conso_card_label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.home_conso_card_value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary, #12447d);
    line-height: 1.2;
}

.home_conso_card_value small {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
}

.home_conso_card_index {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.home_conso_card_link {
    display: block;
    text-align: center;
    padding: 0.65rem 1rem;
    background: #f9fafb;
    color: var(--color-primary, #12447d);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
    border-top: 1px solid #e5e7eb;
}

.home_conso_card_link:hover {
    background: #e8f4fd;
    color: var(--color-primary, #12447d);
}

/* ==========================================================================
   CARTE MES AUTRES ABONNEMENTS
   ========================================================================== */
.home_subscriptions_card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
}

.home_subscriptions_title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.home_subscriptions_list {
    /* Utilise la grille Bootstrap row g-2 */
}

.home_subscription_item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    height: 100%;
}

.home_subscription_item:hover {
    background: #ffffff;
    border-color: var(--color-primary, #12447d);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.home_subscription_item .home-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.home_subscription_info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.home_subscription_ref {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.home_subscription_address {
    font-size: 0.8rem;
    color: #596573; /* accessibilité : ratio ≥4.5:1 sur #e8f4fd (WCAG 1.4.3 AA) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home_subscription_item.subscriptionItem-ended {
    opacity: 0.6;
}

.home_subscription_item.subscriptionItem-ended .home_subscription_ref::after {
    content: " (terminé)";
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: normal;
}

.home_subscriptions_footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    text-align: right;
}

.home_subscriptions_viewall {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary, #12447d);
    text-decoration: none;
}

.home_subscriptions_viewall:hover {
    text-decoration: underline;
}

/* Abonnement actuellement sélectionné */
.home_subscription_item.home_subscription_active {
    background: var(--color-primary-light, #e8f4fd);
    border-color: var(--color-primary, #12447d);
    pointer-events: none;
}

.home_subscription_item.home_subscription_active::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.75rem;
    color: var(--color-primary, #12447d);
    font-weight: bold;
}

.home_subscription_item {
    position: relative;
}

/* ==========================================================================
   BARRE ACCÈS RAPIDES (horizontale)
   ========================================================================== */
.home_quickaccess_bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.home_quicklink_bar_item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.home_quicklink_bar_item:hover {
    background: #f9fafb;
    border-color: var(--color-primary, #12447d);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.home_quicklink_bar_item .home-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.home_quicklink_bar_item span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

/* ==========================================================================
   CARTE ACCÈS RAPIDES (colonne verticale - conservé pour compatibilité)
   ========================================================================== */
.home_quickaccess_card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.home_quickaccess_title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

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

.home_quicklink_item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.home_quicklink_item:hover {
    background: #ffffff;
    border-color: var(--color-primary, #12447d);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.home_quicklink_item .home-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.home_quicklink_item span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

/* ==========================================================================
   CARTE MON COMPTEUR (style moderne)
   ========================================================================== */
.home_meter_card_modern {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.home_meter_title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.home_meter_content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home_meter_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.home_meter_row:last-child {
    border-bottom: none;
}

.home_meter_label {
    font-size: 0.85rem;
    color: #6b7280;
}

.home_meter_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

/* ==========================================================================
   CARTE MON COMPTEUR (ancien style - conserver pour compatibilité)
   ========================================================================== */
.home_meter_card_new {
    background: var(--color-white, #ffffff);
}

.home_meter_card_header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--color-primary, #12447d) 0%, var(--color-secondary, #255b9a) 100%);
    color: var(--color-white, #ffffff);
    font-size: 0.95rem;
    font-weight: 600;
}

.home_meter_card_header i {
    font-size: 1.1rem;
}

.home_meter_card_body {
    padding: 1.25rem;
}

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

.home_meter_card_row:not(:last-child) {
    border-bottom: 1px solid var(--home-card-border, #e5e7eb);
}

.home_meter_card_label {
    font-size: 0.85rem;
    color: var(--color-neutral-dark, #2c3e50);
}

.home_meter_card_value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary, #12447d);
}

/* ==========================================================================
   CARTE MODE DE PAIEMENT (nouveau style)
   ========================================================================== */
.home_payment_card_new {
    background: var(--color-white, #ffffff);
}

.home_payment_card_header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--color-white, #ffffff);
    font-size: 0.95rem;
    font-weight: 600;
}

.home_payment_card_header i {
    font-size: 1.1rem;
}

.home_payment_card_body {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.home_payment_card_value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-neutral-dark, #2c3e50);
}

/* ==========================================================================
   RESPONSIVE DASHBOARD
   ========================================================================== */
@media (max-width: 991.98px) {
    .home_dashboard_row > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    .home_releve_card {
        min-height: 150px;
    }
}

@media (max-width: 767.98px) {
    /* Ajouter du padding latéral sur mobile */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .home_dashboard_card {
        border-radius: 10px;
    }
    
    .home_releve_card {
        padding: 1rem;
        min-height: 140px;
    }
    
    .home_releve_card_icon {
        width: 48px;
        height: 48px;
    }
    
    .home_releve_card_icon .home-icon-releve {
        width: 26px;
        height: 26px;
    }
     
}

/* ==========================================================================
   ACCESSIBILITÉ - FOCUS STYLES
   ========================================================================== */
.home_dashboard_card:focus-visible,
.home_releve_card:focus-visible,
.home_quicklink:focus-visible {
    outline: 2px solid var(--color-primary, #12447d);
    outline-offset: 2px;
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .home_dashboard_card,
    .home_releve_card,
    .home_releve_card_arrow {
        transition: none;
    }
    
    .home_releve_card:hover {
        transform: none;
    }
}

/* ==========================================================================
   LOADING STATE POUR LES CARTES AJAX
   ========================================================================== */
.home_card_loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--color-neutral-dark, #6b7280);
    min-height: 150px;
}

.home_card_loading i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary, #12447d);
}

.home_card_loading span {
    font-size: 0.85rem;
}

/* État OK pour bloc factures (aucune facture à payer) */
.home_bills_small_header.home_bills_ok {
    background: transparent;
}

.home_bills_small_header.home_bills_ok i {
    color: #10b981;
}

.home_bills_small_body_ok {
    padding: 1.5rem 1rem;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home_bills_ok_icon {
    font-size: 4rem;
    color: #e5e7eb;
}

.home_bills_small_body_ok p {
    margin: 0;
    color: #10b981;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Badge factures */
.home_bills_badge {
    background: #dc2626;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}
input[type="text"].fldtextoblig, input[type="password"].fldtextoblig, input[type="email"].fldtextoblig, textarea.fldtextoblig, select.fldtextoblig, span.fldtextoblig {
  border-left: solid 3px #CF0828 !important;
}