/* ===========================
   LE LIQUIDATEUR - STYLE MODERNE
   =========================== */

/* Variables CSS */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5855eb;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --primary-gradient: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#logo_login {
    float:left;
    width:50px;
    margin-right:20px;
}

#logo_head {
    float:left;
    width:50px;
    margin-right:20px;
}

.footer-line i, .col-md-6 i {
    color:var(--primary-color);
}

a {
    color:var(--primary-color);
}



.nav-link, .nav-link:focus, .nav-link:hover {
    color:var(--primary-color);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

/* Header */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: normal;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand span {
    font-size: 12px;
    color: #6c757d;
}

.navbar .nav-link {
    color: var(--dark-color) !important;
}

.navbar-toggler {
    border: none;
}

.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(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Contenu principal */
.main-content {
    flex: 1;
    padding: 2rem 0;
    width: 100%;
    max-width: 1600px; /* Largeur maximale pour le contenu */
    margin: 0 auto; /* Centrer le contenu */
    transition: all 0.3s ease;
}

.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Sidebar */
.sidebar-container {
    transition: width 0.3s ease;
    width: 280px; /* Largeur par défaut */
    position: relative;
}

.sidebar {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    overflow: hidden;
}

.sidebar-brand i {
    margin-right: 0.5rem;
}

.sidebar-brand-text {
    white-space: nowrap;
    transition: opacity 0.3s ease;
    opacity: 0; /* Caché par défaut */
    width: 0;
}

#sidebar-toggle {
    position: relative;
    /*! top: 50%; */
    /*! right: 10px; */
    transform: translateY(-50%);
    /*! background: var(--light-color); */
    /*! border: 1px solid #e5e7eb; */
    color: var(--dark-color);
    width: 100%;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: right;
    /*! box-shadow: var(--shadow); */
    transition: all 0ms;
    z-index: 10;
    margin-top: 20px;
}

#sidebar-toggle:hover {
    /*! background: var(--primary-color); */
    /*! color: white; */
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    color: var(--dark-color);
    transition: all 0.3s ease;
    justify-content: center;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 25px; /* Taille de base de l'icône */
    text-align: center;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: var(--primary-color) !important;
    color: white;
    box-shadow: var(--shadow);
}

.sidebar .nav-link-text {
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

/* Styles pour la sidebar réduite (état par défaut) */
.sidebar-container {
    width: 100px;
}

.sidebar-brand-text,
.nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

#sidebar-toggle {
    transform: translateY(-50%) rotate(180deg);
}


.nav-link i {
    margin-right: 0;
    font-size: 1.5rem; /* Icônes plus grosses en mode réduit */
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.nav-link:hover i {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.nav-link.active i {
    /*! background: white; */
    /*! color: var(--primary-color); */
}

.dropdown-menu {
    left: 100%;
    top: 0;
    margin-left: 0.5rem;
}

/* Styles pour la sidebar agrandie */
body:not(.sidebar-collapsed) .sidebar-container {
    width: 280px;
}

body:not(.sidebar-collapsed) .sidebar-brand-text,
body:not(.sidebar-collapsed) .nav-link-text {
    opacity: 1;
    width: auto;
}

body:not(.sidebar-collapsed) #sidebar-toggle {
    transform: translateY(-50%) rotate(0deg);
}

body:not(.sidebar-collapsed) .nav-link {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
}

body:not(.sidebar-collapsed) .nav-link i {
    font-size: 1.1rem;
    width: 25px;
    height: auto;
    background: transparent;
    margin-right: 0.75rem;
}

body:not(.sidebar-collapsed) .nav-link.active i {
    color: white;
    background: transparent;
}

.main-content-area {
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0; /* Empêche le contenu de déborder quand la fenêtre est rétrécie */
}

.sidebar-collapsed .dropdown-menu {
    /*! left: 100%; */
    top: 50px;
    margin-left: 0.5rem;
}

.sidebar.offcanvas {
    box-shadow: var(--shadow-lg);
    border-right: 1px solid rgba(0,0,0,0.1);
    height: 100vh; /* Pleine hauteur en mode offcanvas */
    top: 0;
    border-radius: 0;
}

.sidebar .list-group-item {
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.sidebar .list-group-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: var(--primary-color) !important;
    color: white;
    box-shadow: var(--shadow);
}


.sidebar-collapsed .nav-pills .nav-link {
    margin-left:-8px !important;
    width:30px;
    background:#FFFFFF;
    padding-left:30px;
    padding-right:30px;
    text-align: center;
    height:55px;
}

.sidebar-collapsed .nav-pills .nav-link i {
    margin-left:10px !important;
    background:none !important;
}

.sidebar-collapsed .nav-pills .nav-link.active {
    margin-left:-8px !important;
}

/* Cartes */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

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

.card-header {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Formulaires */
.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Boutons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
    color:#000000;
}

.btn-secondary {
    color:#FFFFFF !important;
}

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

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-hover);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}
.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}
.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
    color: white;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #7f1d1d;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #78350f;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.1));
    color: #0c4a6e;
    border-left: 4px solid var(--info-color);
}

/* Badges */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

.bg-success {
    background: linear-gradient(135deg, var(--success-color), #059669) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706) !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626) !important;
}

/* Tables */
.table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th {
    background: rgba(99, 102, 241, 0.1);
    border: none;
    font-weight: 600;
    color: var(--primary-color);
}

.table td {
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.1);
}

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

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .auth-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Pages d'authentification */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    max-width: 500px;
    margin: auto;
}

.auth-header {
    background: transparent;
    text-align: center;
    padding: 2rem;
}

.auth-header h2 {
    margin-top:-10px;
    position: relative;
    float:left;
}

.auth-header p {
    position: absolute;
    margin-left:70px;
    margin-top:30px;
}

.auth-header h2 {
    color: var(--primary-color);
    float: left;
}

.auth-body-content {
    padding: 2rem;
}

/* Styles spécifiques aux pages */
.profile-header {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Styles pour l'arbre généalogique (family_tree.php) */
#family-tree-container {
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--border-radius);
}

.tree-level {
    position: relative;
    margin-left: 30px;
    padding-left: 40px;
}

/* Ligne verticale pour connecter les enfants */
.tree-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: #cbd5e1;
}

/* Ligne horizontale pour connecter à la carte de membre */
.member-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -40px; /* Ajuster pour aligner avec la ligne verticale */
    width: 30px;
    height: 2px;
    background-color: #cbd5e1;
}

#legendes .member-card::before {
    display: none;
}


/* Cacher la ligne pour le premier niveau */
#family-tree-container > .tree-level {
    margin-left: 0;
    padding-left: 0;
}
#family-tree-container > .tree-level::before,
#family-tree-container > .tree-level > .member-card::before {
    display: none;
}


.member-card {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow);
    cursor: move;
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
    max-width: 350px; /* Largeur réduite */
    position: relative;
}

.member-card.non-draggable {
    cursor: not-allowed;
    background-color: #f8fafc;
}

.member-card.non-draggable .fa-grip-vertical {
    display: none;
}

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

.member-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.sortable-ghost {
    opacity: 0.3;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius);
}

.member-info {
    flex: 1;
}

.member-relation {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    margin-top: 0.25rem;
    display: inline-block;
}

/* Relations familiales colorées */
.relation-liquidateur { border-left-color: #7c3aed !important; }
.relation-defunt { border-left-color: #374151 !important; }
.relation-conjoint { border-left-color: #ec4899 !important; }
.relation-parent { border-left-color: #10b981 !important; }
.relation-enfant { border-left-color: #f59e0b !important; }
.relation-petit-enfant { border-left-color: #06b6d4 !important; }
.relation-petit-petit-enfant { border-left-color: #8b5cf6 !important; }
.relation-frere-soeur { border-left-color: #ef4444 !important; }
.relation-autre { border-left-color: #6b7280 !important; }

.drop-zone {
    padding: 2rem;
    margin: 1rem 0;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transition: all 0.3s ease;
}

.drop-zone:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-hover);
}

/* Styles pour le slider de vue (items.php) */
.item-photo-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%; /* Force un format carré (ratio 1:1) */
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.item-photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

/* Niveaux de zoom */
.items-container.zoom-1 .col-item { width: 12.5%; } /* 8 par ligne */
.items-container.zoom-2 .col-item { width: 100%; } /* Mode liste */
.items-container.zoom-3 .col-item { width: 100%; } /* Mode liste */
.items-container.zoom-4 .col-item { width: 25%; } /* 4 par ligne */
.items-container.zoom-5 .col-item { width: 33.33%; } /* 3 par ligne */

/* Style de liste pour zoom 2 et 3 */
.items-container.zoom-2 .item-card,
.items-container.zoom-3 .item-card {
    display: flex;
    flex-direction: row;
    align-items: center; /* Re-centrer verticalement */
}

/* Zoom 2 - Liste compacte */
.items-container.zoom-2 .item-card { height: 100px; }
.items-container.zoom-2 .item-photo-container { width: 100px; height: 100px; flex-shrink: 0; }
.items-container.zoom-2 .card-body { padding: 0.5rem 1rem; }
.items-container.zoom-2 .card-title { font-size: 1rem; }
.items-container.zoom-2 .card-footer { flex: 0 0 180px; }

/* Zoom 3 - Liste détaillée */
.items-container.zoom-3 .item-card { height: 200px; }
.items-container.zoom-3 .item-photo-container { width: 200px; height: 200px; flex-shrink: 0; }
.items-container.zoom-3 .card-body { padding: 1rem 1.5rem; }
.items-container.zoom-3 .card-footer { flex: 0 0 220px; }

.items-container.zoom-2 .item-photo-container,
.items-container.zoom-3 .item-photo-container {
    padding-top: 0; /* Annuler le hack du padding */
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.items-container.zoom-2 .card-body,
.items-container.zoom-3 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.items-container.zoom-2 .card-footer,
.items-container.zoom-3 .card-footer {
    border-left: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Cacher les éléments en fonction du zoom */
.items-container.zoom-1 .card-body, .items-container.zoom-1 .card-footer { display: none; }
.items-container.zoom-2 .item-category, .items-container.zoom-2 .item-description, .items-container.zoom-2 .item-details { display: none; }
.items-container.zoom-3 .item-description, .items-container.zoom-3 .item-details { display: none; }
.items-container.zoom-4 .item-details, .items-container.zoom-4 .card-footer { display: none; }

/* Styles pour les rapports (reports.php) */
.print-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.summary-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.summary-box h3 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
}

.member-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.member-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.item-row {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.item-row:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

/* Styles d'impression formels pour les rapports */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-family: 'Times New Roman', Times, serif;
        font-size: 11pt;
        line-height: 1.5;
    }

    .sidebar, .no-print, .navbar, footer, .main-content > .row > .col-md-9 > .card.no-print {
        display: none !important;
    }

    .print-section {
        display: block !important;
        box-shadow: none !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        border: none !important;
    }
    
    .container-fluid.main-content {
        padding: 0 !important;
    }

    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        font-weight: bold;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }

    hr {
        border-top: 2px solid black;
    }

    .table {
        width: 100%;
        border-collapse: collapse;
    }
    .table th, .table td {
        border: 1px solid #000;
        padding: 0.5rem;
        text-align: left;
    }
    .table th {
        background-color: #eee !important;
    }

    .card, .summary-box, .member-section, .item-row {
        box-shadow: none !important;
        border: none !important;
        background: none !important;
        page-break-inside: avoid;
    }

    /* Styles d'impression pour l'arbre généalogique */
    #printable-tree {
        display: block !important;
        background: white !important;
        border: none !important;
        padding: 0 !important;
    }
    #printable-tree .alert {
        display: none;
    }
    .member-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    .member-card .fa-grip-vertical {
        display: none !important;
    }
    .tree-level::before, .member-card::before {
        background-color: #000 !important;
    }
    .drop-zone {
        display: none !important;
    }

    .badge {
        display: none; /* Cacher les badges colorés */
    }

    a {
        text-decoration: none !important;
        color: #000 !important;
    }

    .page-break {
        page-break-before: always !important;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-nav.ms-auto {
        display: none; /* Cacher le menu utilisateur desktop */
    }

    .navbar-toggler {
        display: block; /* Afficher le bouton hamburger */
    }
    
    .col-md-9, .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-line {
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 992px) {
    .sidebar.offcanvas {
        /* S'assurer que l'offcanvas n'est jamais visible sur desktop */
        visibility: hidden !important;
        display: none !important;
    }
}

/* Styles pour la page de distribution */
.distribution-row {
    display: flex;
    flex-wrap: wrap;
}

.distribution-row > .col-md-4 {
    display: flex;
    flex-direction: column;
}

.member-column {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    flex: 1; /* Fait en sorte que la colonne prenne toute la hauteur disponible */
    display: flex;
    flex-direction: column;
}

.items-container {
    flex-grow: 1; /* Fait en sorte que le conteneur d'items grandisse */
}

.member-header {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    padding: 1rem;
    border-radius: 15px 15px 0 0;
    font-weight: 600;
    text-align: center;
}

.unassigned-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 1rem;
    border-radius: 15px 15px 0 0;
    font-weight: 600;
    text-align: center;
    min-height:80px;
}

.items-container {
    min-height: 200px;
    padding: 1rem;
    border-radius: 0 0 15px 15px;
}

.item-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.item-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.item-card-ghost {
    opacity: 0.4;
    background: #f8f9fa;
}

.item-card-chosen {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.item-card-drag {
    opacity: 0.8;
}

.item-photo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

/* Uniform size for action buttons in tables */
td.action-buttons .btn {
    min-width: 42px;
    text-align: center;
}

/* Couleurs des headers de colonnes de membres sur la page de distribution */
.member-header.relation-liquidateur { background: linear-gradient(135deg, #7c3aed, #5a28a3) !important; }
.member-header.relation-defunt { background: linear-gradient(135deg, #374151, #1f2937) !important; }
.member-header.relation-conjoint { background: linear-gradient(135deg, #ec4899, #be185d) !important; }
.member-header.relation-parent { background: linear-gradient(135deg, #10b981, #059669) !important; }
.member-header.relation-enfant { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.member-header.relation-petit-enfant { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
.member-header.relation-petit-petit-enfant { background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important; }
.member-header.relation-frere-soeur { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.member-header.relation-autre { background: linear-gradient(135deg, #6b7280, #4b5563) !important; }
