/* foncier2.css - Styles modernes alignés sur scte-val.css */

:root {
    --primary-color: #9b59b6;
    --primary-hover: #8e44ad;
    --primary-light: #e8daef;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3298dc;
    --background: #f8fafc;
    --background-light: #f1f5f9;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.2s ease-out;
    --transition-slow: 0.3s ease-out;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background décoratif */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/family_design.png');
    background-size: cover;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
    z-index: -1;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

/* Header moderne */
.header-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px 32px;
    background: var(--card-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* User info placement */
.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* Navigation par onglets */
.tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--card-background);
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    min-height: 48px;
}

.tab-btn:hover {
    background: var(--background-light);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
}

/* Contenu des onglets */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 4px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    border-radius: 2px;
}

/* Groupe de boutons */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Boutons modernes */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-search {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Barre de recherche */
.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.search-input {
    flex: 1;
    max-width: 600px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    transition: all var(--transition-base);
    background: var(--card-background);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Container de table moderne */
.table-container-modern {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.table-container-modern .table {
    background: transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-container-modern .table thead {
    background: var(--background-light);
}

.table-container-modern .table thead th {
    padding: 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-container-modern .table tbody tr {
    transition: all var(--transition-fast);
}

.table-container-modern .table tbody tr:hover {
    background: var(--background-light);
    transform: scale(1.01);
}

.table-container-modern .table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

/* Colonnes de table spécifiques */
.table-col-checkbox {
    width: 50px;
    text-align: center;
}

.table-col-actions {
    width: 180px;
    text-align: center;
}

/* Boutons d'actions dans les tables */
/* Boutons d'actions dans les tables */
.table-container-modern .button.is-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.button.is-info {
    background: linear-gradient(135deg, var(--info-color), var(--primary-hover));
    color: white;
    border: none;
}

.button.is-warning {
    background: linear-gradient(135deg, var(--warning-color), #dc8b0e);
    color: white;
    border: none;
}

.button.is-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    border: none;
}

.button.is-small:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Tri de colonnes */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: rgba(155, 89, 182, 0.1);
}

.sort-icon {
    opacity: 0.3;
    margin-left: 8px;
    transition: opacity 0.2s;
}

.sortable:hover .sort-icon {
    opacity: 1;
}

.sortable.asc .sort-icon::before {
    content: '\f0de';
    opacity: 1;
}

.sortable.desc .sort-icon::before {
    content: '\f0dd';
    opacity: 1;
}

/* Cards modernes pour les assurances */
.card-modern {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-modern .card-header {
    background: var(--background-light);
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
}

.card-modern .card-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.card-modern .card-content {
    padding: 24px;
}

/* Section assurances */
.assurance-section {
    margin-top: 24px;
}

.assurances-container {
    animation: fadeIn 0.3s ease-out;
}

.assurances-container.is-hidden {
    display: none;
}

/* Modales */
.modal-large {
    max-width: 900px;
    width: 95%;
}

.modal-extra-large {
    max-width: 1200px;
    width: 95%;
}

.modal-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.modal-card-head {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 20px 24px;
    border-bottom: none;
}

.modal-card-title {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-card-head .delete {
    background: rgba(255, 255, 255, 0.2);
}

.modal-card-head .delete:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-card-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-card-foot {
    background: var(--background-light);
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Formulaires */
.field {
    margin-bottom: 20px;
}

.label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.control {
    position: relative;
}

.input,
.textarea,
.select select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 1rem;
    line-height: 1.5;
    height: auto;
    min-height: 48px;
    transition: all var(--transition-base);
    background: var(--card-background);
    width: 100%;
    font-family: inherit;
    display: flex;
    align-items: center;
}

.select {
    position: relative;
    display: block;
    width: 100%;
}

.select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    cursor: pointer;
    height: 48px;
    min-height: 48px;
    line-height: normal;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

.select select option {
    padding: 12px;
    line-height: 1.6;
    min-height: 40px;
}

.input:focus,
.textarea:focus,
.select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    display: block;
    height: auto;
}

/* Fix pour les select trop petits */
.select.is-fullwidth {
    width: 100%;
}

.select.is-fullwidth select {
    width: 100%;
}

/* Messages fixes */
.message-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    max-width: 450px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Historique tables */
.historique-table-container {
    margin-bottom: 32px;
    padding: 20px;
    background: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.historique-table-container h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* Tooltip Bulma */
.has-tooltip-arrow::before {
    border-color: var(--text-primary) transparent transparent transparent;
}

.has-tooltip-arrow::after {
    background-color: var(--text-primary);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Tags et badges */
.tag {
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag.is-info {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.tag.is-danger {
    background: #fee2e2;
    color: #991b1b;
}

.tag.is-light {
    opacity: 0.8;
}

.tag.is-rounded {
    border-radius: 999px;
}

/* Ligne de séparation dans le tableau */
.separator-row {
    background: var(--background-light) !important;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    border-top: 3px solid var(--border-color) !important;
    border-bottom: 3px solid var(--border-color) !important;
}

.separator-row td {
    padding: 16px !important;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.separator-row:hover {
    background: var(--background-light) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Icônes */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Choices.js customisation */
.choices__inner {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-background);
    padding: 6px;
    min-height: 44px;
}

.choices__inner:focus {
    border-color: var(--primary-color);
}

.choices__list--multiple .choices__item {
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    margin: 2px;
}

.choices__list--dropdown {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.choices__item--selectable {
    padding: 10px 14px;
}

.choices__item--selectable.is-highlighted {
    background: var(--primary-light);
    color: var(--primary-hover);
}

/* User rows dans les formulaires */
#usersContainer {
    margin-bottom: 16px;
}

.user-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--background-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.user-row .field {
    margin-bottom: 0;
}

.user-row .select,
.user-row .select select,
.user-row .input {
    height: 48px;
    min-height: 48px;
}

.user-row .button.is-danger {
    padding: 10px 14px;
    min-height: 48px;
    align-self: start;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .logo {
        width: 60px;
    }

    .title {
        font-size: 1.5rem;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn-primary,
    .button-group .btn-secondary {
        width: 100%;
    }

    .search-container {
        flex-direction: column;
    }

    .search-input {
        max-width: 100%;
    }

    .table-container-modern {
        padding: 16px;
        overflow-x: auto;
    }

    .modal-card {
        width: 95%;
        margin: 20px auto;
    }

    .modal-large,
    .modal-extra-large {
        width: 95%;
        max-width: 100%;
    }

    .message-fixed {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .user-row {
        grid-template-columns: 1fr;
    }
}

/* Classes utilitaires */
.is-hidden {
    display: none !important;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.has-text-centered {
    text-align: center;
}

.is-fullwidth {
    width: 100%;
}

/* Animation loader héritée de general.css */
.famivest-loader {
    display: none;
}

.famivest-loader:not(.is-hidden) {
    display: flex;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Amélioration accessibilité */
.button:focus,
.input:focus,
.textarea:focus,
.select select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* États des boutons */
.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Transitions globales */
* {
    transition: background-color var(--transition-base), 
                border-color var(--transition-base),
                color var(--transition-base);
}
/* Table container pour assurances */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    background: var(--card-background);
}

.table-col-inclure {
    width: 80px;
    text-align: center;
}

.table-col-action {
    width: 60px;
    text-align: center;
}

/* Assurer que le tableau des assurances est visible */
#assurancesTableBody {
    display: table-row-group;
}

.card-modern .table {
    width: 100%;
    background: transparent;
}

.card-modern .table td,
.card-modern .table th {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.card-modern .table thead {
    background: var(--background-light);
}

.card-modern .table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-primary);
}
/* À AJOUTER dans foncier2.css */

/* Largeur des colonnes du tableau des assurances */
.card-modern .table th:nth-child(3),
.card-modern .table td:nth-child(3) {
    /* Nom de l'assurance */
    min-width: 200px;
}

.card-modern .table th:nth-child(4),
.card-modern .table td:nth-child(4) {
    /* Date début - rétrécir */
    min-width: 120px;
}

/* Retirer la colonne date fin - elle sera remplacée par une icone */

.card-modern .table th:nth-child(5),
.card-modern .table td:nth-child(5) {
    /* Type de contrat - plus large */
    min-width: 180px;
}

.card-modern .table th:nth-child(6),
.card-modern .table td:nth-child(6) {
    /* Réf. Contrat - plus large */
    min-width: 160px;
}

.card-modern .table th:nth-child(7),
.card-modern .table td:nth-child(7) {
    /* Identifiant site */
    min-width: 140px;
}

.card-modern .table th:nth-child(8),
.card-modern .table td:nth-child(8) {
    /* URL site - TRÈS LARGE */
    min-width: 300px;
}

.card-modern .table td:nth-child(8) {
    word-break: break-word;
}

.card-modern .table th:nth-child(9),
.card-modern .table td:nth-child(9) {
    /* Observations */
    min-width: 150px;
}

.card-modern .table th:nth-child(10),
.card-modern .table td:nth-child(10) {
    /* Actions - icone date fin + poubelle */
    min-width: 100px;
    text-align: center;
}

/* Style pour le bouton icone date fin */
.btn-date-fin {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-date-fin:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, #0891b2, #0e7490);
}

.btn-date-fin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal pour date de fin */
.modal-date-fin {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-background);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    min-width: 350px;
    border: 1px solid var(--border-color);
}

.modal-date-fin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.modal-date-fin-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-date-fin-body {
    margin-bottom: 20px;
}

.modal-date-fin-body .field {
    margin-bottom: 16px;
}

.modal-date-fin-body .label {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.modal-date-fin-body input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.modal-date-fin-body input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-date-fin-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-date-fin-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
}

.modal-date-fin-footer .btn-confirm {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.modal-date-fin-footer .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-date-fin-footer .btn-cancel {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-date-fin-footer .btn-cancel:hover {
    background: var(--border-light);
}
/* ============================================
   SECTION DESCRIPTIONS DÉTAILLÉES
   ============================================ */

.desc-section {
    background: var(--background-light);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.desc-section:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

.desc-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.desc-section-title i {
    color: var(--primary-color);
    font-size: 1.2em;
}

/* Checkboxes modernes */
.checkbox-modern {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    min-height: 52px;
}

.checkbox-modern:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.checkbox-modern input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-modern input[type="checkbox"]:checked + .checkbox-label {
    color: var(--primary-color);
    font-weight: 600;
}

.checkbox-modern .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    flex: 1;
    transition: all var(--transition-base);
}

.checkbox-modern .checkbox-label i {
    font-size: 1.1em;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.checkbox-modern input[type="checkbox"]:checked ~ .checkbox-label i {
    color: var(--primary-color);
}

/* Animation pour l'apparition du formulaire */
#descFormContainer {
    animation: fadeInUp 0.4s ease-out;
}

#descFormContainer.is-hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration des champs de saisie dans les descriptions */
.desc-section .input,
.desc-section .textarea,
.desc-section .select select {
    background: var(--card-background);
}

.desc-section .field {
    margin-bottom: 16px;
}

/* Badge pour les classes énergétiques */
.dpe-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    min-width: 60px;
}

.dpe-badge.A { background: #009e60; color: white; }
.dpe-badge.B { background: #50b848; color: white; }
.dpe-badge.C { background: #c3d200; color: #333; }
.dpe-badge.D { background: #f7e300; color: #333; }
.dpe-badge.E { background: #f0b300; color: white; }
.dpe-badge.F { background: #eb6b00; color: white; }
.dpe-badge.G { background: #e20714; color: white; }

/* Responsive pour les descriptions */
@media screen and (max-width: 768px) {
    .desc-section {
        padding: 16px;
    }

    .desc-section-title {
        font-size: 1rem;
    }

    .checkbox-modern {
        padding: 10px 12px;
        min-height: 48px;
    }

    .checkbox-modern .checkbox-label {
        font-size: 0.9rem;
    }

    .checkbox-modern input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}

/* Amélioration visuelle des textarea */
.desc-section .textarea {
    font-family: inherit;
    line-height: 1.6;
}

.desc-section .textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Style pour les selects dans les descriptions */
.desc-section .select::after {
    border-color: var(--primary-color);
}

.desc-section .select select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* État désactivé */
.desc-section .input:disabled,
.desc-section .textarea:disabled,
.desc-section .select select:disabled {
    background-color: var(--background-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Groupe de boutons dans descriptions */
.desc-section .field.is-grouped {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Animation hover sur les sections */
.desc-section {
    position: relative;
    overflow: hidden;
}

.desc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--success-color), 
        var(--info-color)
    );
    transition: left 0.5s ease;
}

.desc-section:hover::before {
    left: 100%;
}

/* Grille responsive pour équipements */
.desc-section .columns.is-multiline {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.desc-section .columns.is-multiline > .column {
    padding: 0.5rem;
}

/* ============================================
   SECTION COPROPRIÉTÉS
   ============================================ */

#tab-coproprietes .card-modern {
    animation: fadeInUp 0.4s ease-out;
}

/* Table copropriétés */
#coproTable tbody tr {
    transition: all var(--transition-base);
}

#coproTable tbody tr:hover {
    background: var(--background-light);
    transform: scale(1.01);
}

#coproTable .tag {
    font-weight: 600;
}

/* Table lots */
#lotsTable tbody tr {
    transition: all var(--transition-base);
}

#lotsTable tbody tr:hover {
    background: var(--background-light);
}

/* Formulaire de liaison */
#formLinkBienCopro {
    background: var(--background-light);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    margin-bottom: 24px;
}

#formLinkBienCopro:hover {
    border-color: var(--primary-color);
    background: var(--card-background);
}

/* Modal copropriété */
#coproModal .modal-card {
    max-width: 800px;
}

#coproModal .columns {
    margin-bottom: 0;
}

#coproModal .field {
    margin-bottom: 16px;
}

/* Style pour les badges de compteurs */
.copro-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary-hover);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
}

.copro-counter i {
    font-size: 1.1em;
}

/* Animation pour les boutons d'action */
#coproTable .buttons .button,
#lotsTable .buttons .button {
    transition: all var(--transition-base);
}

#coproTable .buttons .button:hover,
#lotsTable .buttons .button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media screen and (max-width: 768px) {
    #formLinkBienCopro {
        padding: 16px;
    }

    #formLinkBienCopro .columns {
        margin-left: 0;
        margin-right: 0;
    }

    #coproModal .modal-card {
        width: 95%;
        max-width: 100%;
    }

    #coproTable,
    #lotsTable {
        font-size: 0.9rem;
    }

    #coproTable td,
    #lotsTable td {
        padding: 8px;
    }
}

/* États vides */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--border-color);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* Badge indicateur */
.indicator-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* foncier2.html modals */
#foncierModal.is-active .modal-card-foot {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

#historiqueModal.is-active .modal-card-foot {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

#coproModal.is-active .modal-card-foot {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}