/* ============================================
   ÉTAT DES LIEUX PRO - STYLES CSS
   Version: 1.0.0
   ============================================ */

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

/* ============================================
   MATERIAL SYMBOLS (GOOGLE ICONS)
   ============================================ */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 21px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tailles d'icônes */
.icon-sm {
    font-size: 18px;
}

.icon-md {
    font-size: 24px;
}

.icon-lg {
    font-size: 32px;
}

/* Icône dans les boutons */
.btn .material-symbols-rounded,
.btn-nav .material-symbols-rounded {
    vertical-align: middle;
    margin-right: 0.25rem;
}

.btn-nav .material-symbols-rounded {
    font-size: 20px;
}

button.btn.btn-add-small span.material-symbols-rounded {
    font-size: 20px;
}

button.btn-delete-corner span.material-symbols-rounded {
    font-size: 20px;
    /* color: revert-layer; */
}
/* Collapse icons */
.collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.collapse-icon .material-symbols-rounded {
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Rotation pour l'état fermé */
.collapsed .collapse-icon .material-symbols-rounded,
.piece-header.collapsed .collapse-icon .material-symbols-rounded,
.compteur-header.collapsed .collapse-icon .material-symbols-rounded,
.cle-header.collapsed .collapse-icon .material-symbols-rounded {
    transform: rotate(-90deg);
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Couleurs principales */
    --primary: #2D3748;
    --primary-light: #3a4861;
    --primary-dark: #1e232c;
    --secondary: #10b981;
    --secondary-light: #15d0a5;
    --secondary-dark: #068063;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;

    /* Couleurs sémantiques */
    --success: #10b981;
    --success-light: #34d399;
    --success-dark: #129066;
    --success-bg: #bff3d8;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #b0152c;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-light: #60a5fa;
    --info-bg: #dbeafe;
    --conseil: #0e563e27;

    /* Couleurs neutres */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray: #f1f5f9;
    --text-dark: #2D3748;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --backgnd-bck: #000000; 

    /* Dimensions */
    --header-height: 60px;
    --nav-height: 50px;
    --footer-height: 70px;
    --container-max: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;
    --border-radius-xl: 30px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 16px 0px rgba(0, 0, 0, 0.05), 0 2px 4px 1px rgba(0, 0, 0, 0.01);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mode EDL actif - fond sombre */
body.edl-active {
    background: var(--bg-gray);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ============================================
   PAGE D'ACCUEIL
   ============================================ */
.home-page {
    display: none;
    padding: 0rem 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.home-page.active {
    display: block;
}

/* Indicateur connexion base */
.db-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    padding: 0.4rem 1rem 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.db-status-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}

.db-status-led.online {
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e;
}

.db-status-led.offline {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444;
}

.db-status-text {
    font-size: 0.725rem;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

/* Header accueil avec logo */
.home-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0 1.25rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.home-header-logo {
    height: 40px;
    width: auto;
}

.home-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.home-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.home-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 25px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bg-light);
    box-shadow: var(--shadow);
}

.home-search .search-icon {
    font-size: 1rem;
    margin-right: 0.75rem;
    color: var(--text-light);
}

.home-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--text-dark);
    outline: none;
}

.home-search input::placeholder {
    color: var(--text-light);
}

/* Grille des boutons d'actions rapides */
.home-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.home-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    min-height: 100px;
}

.home-action-btn .material-symbols-rounded {
    font-size: 2rem;
    color: var(--success);
}

.home-action-btn .home-action-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.3;
}

.home-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--success);
}

.home-action-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

a.home-action-btn {
    text-decoration: none;
}

/* Bouton créer EDL flottant */
.btn-create-edl-floating {
    position: fixed;
    bottom: 2rem !important;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem !important;
    padding: 1rem 4rem !important;
    background: var(--success);
    color: white;
    border: none!important;
    border-radius: 30px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
    z-index: var(--z-sticky);
    white-space: nowrap;
}

.btn-create-edl-floating .material-symbols-rounded {
    font-size: 22px;
}

.btn-create-edl-floating:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 174, 112, 0.1);
}

.btn-create-edl-floating:active {
    transform: translateX(-50%) translateY(-1px);
}

/* Masquer quand EDL actif */
.edl-active .btn-create-edl-floating {
    display: none;
}

/* Liste EDL sur accueil */
.edl-list-item {
    display: flex;
    align-items: center;
    padding: 0.875rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.edl-list-item:hover {
    border-color: var(--primary-light);
    background: var(--bg-white);
}

.edl-list-item .edl-color {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    margin-right: 0.875rem;
    flex-shrink: 0;
}

.edl-list-item .edl-color.entree {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.edl-list-item .edl-color.sortie {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.edl-list-item .edl-info {
    flex: 1;
    min-width: 0;
}

.edl-list-item .edl-address {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edl-list-item .edl-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

.edl-list-item .edl-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.edl-list-item .edl-status.brouillon {
    background: #fef3c7;
    color: #92400e;
}

.edl-list-item .edl-status.termine {
    background: #d1fae5;
    color: #065f46;
}

.edl-list-item .edl-delete {
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.125rem;
    transition: color var(--transition-fast);
    margin-left: 0.5rem;
}

.edl-list-item .edl-delete:hover {
    color: var(--danger);
}

/* ============================================
   LOGO FLOTTANT (gauche)
   ============================================ */
.floating-logo {
    position: fixed;
    top: 1rem;
    left: 1rem;
    /*background: var(--bg-white);*/
    background: rgb(147 147 147 / 43%);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
    border: 1px solid var(--border);
}

.floating-logo.hidden {
    display: none;
}

.floating-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ============================================
   BOUTON ENREGISTRER FLOTTANT (droite)
   ============================================ */
.floating-save {
    position: fixed;
    top: 1rem;
    right: 1rem;
    /*background: var(--bg-white);*/
    background: rgb(147 147 147 / 43%);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-gray);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, color 0.15s ease-out;
}

.floating-save.hidden {
    display: none;
}

.floating-save:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

.floating-save:active {
    transform: scale(0.95);
}

.floating-save .material-symbols-rounded {
    font-size: 22px;
}

.floating-save.saving {
    pointer-events: none;
    color: var(--primary);
}

.floating-save .material-symbols-rounded.rotating {
    animation: spin 1s linear infinite;
}

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

/* ============================================
   NAVIGATION TABS FLOTTANTE
   ============================================ */
.nav-tabs-floating {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    /*background: var(--bg-white);*/
    background: rgb(147 147 147 / 43%);
    backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.nav-tabs-floating.hidden {
    display: none;
}

/* Slider qui glisse - transition CSS simple */
.nav-slider {
    position: absolute;
    top: 0.25rem;
    left: 4px;
    height: calc(100% - 0.5rem);
    width: 40px;
    background: var(--primary-dark);
    border-radius: 25px;
    z-index: 0;
    pointer-events: none;
    transition: left 0.25s ease-out, width 0.25s ease-out;
}

.nav-tabs-floating button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.6rem;
    border: none;
    background: transparent;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-gray);
    white-space: nowrap;
    /* Transitions légères */
    transition: color 0.15s ease-out;
    /* Force GPU rendering */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.nav-tabs-floating button .tab-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    line-height: 1;
    transition: width 0.2s ease-out, opacity 0.15s ease-out, margin 0.2s ease-out;
}

.nav-tabs-floating button .tab-text {
    display: none;
    white-space: nowrap;
}

.nav-tabs-floating button:hover:not(.active) {
    color: var(--text-dark);
}

/* Bouton actif - le texte apparaît, l'icône disparaît */
.nav-tabs-floating button.active {
    color: white;
    padding: 0.5rem 1rem;
}

.nav-tabs-floating button.active .tab-text {
    display: inline;
}

.nav-tabs-floating button.active .tab-icon {
    display: none;
}

/* ============================================
   BOTTOM NAVIGATION FLOTTANTE
   ============================================ */
.bottom-nav-floating {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: var(--z-sticky);
}

.bottom-nav-floating.hidden {
    display: none;
}

/* ============================================
   BOUTON FLOTTANT (FAB - Floating Action Button)
   ============================================ */
.btn-fab {
    position: fixed;
    bottom: 6.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-sticky);
    transition: all var(--transition-fast);
}

.btn-fab:hover {
    background: var(--success-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(41, 238, 120, 0.4);
}

.btn-fab:active {
    transform: scale(0.95);
}

.btn-fab .material-symbols-rounded {
    font-size: 28px;
    font-weight: 500;
    margin: 0;
}

.btn-fab.hidden {
    display: none;
}

.btn-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-nav-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-nav-secondary:hover {
    background: var(--bg-gray);
}

.btn-nav-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-nav-primary:hover {
    background: var(--primary-light);
    /*transform: translateY(-2px);*/
    box-shadow: var(--shadow-lg);
}

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

.btn-nav-icon {
    display: inline-flex;
    align-items: center;
}

.btn-nav-icon .material-symbols-rounded {
    font-size: 1rem;
}

.btn-nav-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-nav-text .material-symbols-rounded {
    font-size: 20px;
}
button .material-symbols-rounded {
    margin-right : 0px !important;
}
/* ============================================
   ANCIEN HEADER (masqué)
   ============================================ */
.app-header {
    display: none;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-header {
    display: none;
}

/* Ancien nav-tabs (backup) */
.nav-tabs {
    display: none;
}

/* ============================================
   BOUTON RETOUR (Onglet Infos)
   ============================================ */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-back:hover {
    color: var(--text-dark);
}

.btn-back .material-symbols-rounded {
    font-size: 20px;
}

/* ============================================
   SECTIONS COLLAPSIBLES (Onglet Infos)
   ============================================ */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title.collapsible {
    cursor: pointer;
    user-select: none;
}

.section-title .collapse-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: transform var(--transition-fast);
}

.section-title .collapse-arrow .material-symbols-rounded {
    font-size: 20px;
    transition: transform var(--transition-fast);
}

.section-collapsible.collapsed .section-title .collapse-arrow .material-symbols-rounded {
    transform: rotate(-90deg);
}

.section-collapsible.collapsed .section-content {
    display: none;
}

/* Sélecteur type d'EDL et Meublé */
.edl-type-selector {
    display: flex;
    gap: 1rem;
}

.edl-type-option {
    flex: 1;
    cursor: pointer;
}

.edl-type-option input {
    display: none;
}

.edl-type-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 85px;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-fast);
    border: 3px solid transparent;
}

.edl-type-icon {
    font-size: 1.75rem;
}

.edl-type-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Type EDL - Entrée */
.edl-type-option.entree .edl-type-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.edl-type-option.entree .edl-type-label {
    color: #166534;
}

/* Type EDL - Sortie */
.edl-type-option.sortie .edl-type-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.edl-type-option.sortie .edl-type-label {
    color: #991b1b;
}

/* Meublé - Non meublé */
.edl-type-option.non-meuble .edl-type-box {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.edl-type-option.non-meuble .edl-type-label {
    color: #475569;
}

/* Meublé - Meublé */
.edl-type-option.meuble .edl-type-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.edl-type-option.meuble .edl-type-label {
    color: #92400e;
}

/* État sélectionné */
.edl-type-option input:checked + .edl-type-box {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

/* Hover */
.edl-type-option:hover .edl-type-box {
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

.edl-type-option input:checked + .edl-type-box:hover {
    transform: scale(1.03);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem;
}

/* Quand les onglets sont visibles - conteneur blanc avec coins arrondis */
body.edl-active .container {
    background: var(--bg-white);
    border-radius: 24px 24px 0 0;
    min-height: calc(100vh - 4.5rem);
    margin-top: 5rem;
    padding: 1.5rem 1rem 6rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TAB CONTENT - TRANSITIONS FLUIDES
   ============================================ */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tabSlideIn 0.35s ease-out;
}

/* Animation d'entrée - glissement depuis la droite */
@keyframes tabSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de sortie - pour usage futur avec JS */
.tab-content.exiting {
    animation: tabSlideOut 0.25s ease-in forwards;
}

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

/* Animation spéciale pour navigation arrière */
.tab-content.active.from-right {
    animation: tabSlideInFromLeft 0.35s ease-out;
}

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

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow var(--transition);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--primary-dark);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    /*transform: translateY(-2px);*/
    box-shadow: var(--shadow-md);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-green {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success) 100%);
    color: white;
    border-radius: 30px;
}
.btn-green:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-green:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 30px;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border);
    border-color: var(--border-dark);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-light);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-add {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem auto;
    width: fit-content;
}

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

.btn-add-small {
    background: var(--bg-gray);
    color: var(--primary);
    border: 1px dashed var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 0.75rem;
}

.btn-add-small:hover {
    background: var(--primary);
    color: white;
    border-style: solid;
}

.btn-clear {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-clear:hover {
    background: var(--danger);
    color: white;
}

.btn-photo {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-photo:hover {
    background: var(--info);
    color: white;
}

.btn-delete {
    background: transparent;
    color: var(--danger);
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.btn-delete:hover {
    background: var(--danger-bg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

.form-group label.required::after {
    content: ' *';
    color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: var(--bg-gray);
    cursor: not-allowed;
}

input[readonly],
select[readonly],
textarea[readonly] {
    background: var(--bg-gray);
}

/* Champs éditables en mode création */
input.editable,
select.editable,
textarea.editable {
    background: var(--bg-white);
    border-color: var(--border-dark);
    /*box-shadow: inset 0 0 0 1px var(--primary-light);*/
}

input.editable:focus,
select.editable:focus,
textarea.editable:focus {
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15), inset 0 0 0 1px var(--primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   SEARCH CONTAINER
   ============================================ */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container input {
    padding-left: 2.75rem;
    font-size: 1.0625rem;
}

input#searchLogement, input#searchLocataire {
    padding: 0px;
    background: none;
    border: none;
    padding-left: 20px;
}

input#searchLogement:focus {
    box-shadow: none;
}
.search-container::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-gray);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.result-address {
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.result-meta {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* Pastilles de statut logement */
.status-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-badge.status-libre {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-badge.status-occupe {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-gray);
}

/* ============================================
   INFO BOXES
   ============================================ */
.info-box {
    background: var(--info-bg);
    border: 1px solid var(--info);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: var(--primary-dark);
}

.info-box-warning {
    background: var(--warning-bg);
    border-color: var(--warning);
}

.info-box-success {
    background: var(--success-bg);
    border-color: var(--success);
}

.info-box-important {
    background: var(--conseil);
    border: 2px solid var(--conseil);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-box-important h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.0625rem;
    display: flex;
    gap: 0.375rem;
}

.info-box-important ul {
    list-style: none;
    padding-left: 0;
}

.info-box-important li {
    padding: 0.01rem 0;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

/* Info box avec image à droite */
.info-box-with-image {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-box-with-image .info-box-content {
    flex: 1;
}

.info-box-with-image .info-box-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-box-with-image .info-box-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 600px) {
    .info-box-with-image {
        flex-direction: column;
    }

    .info-box-with-image .info-box-image {
        width: 80px;
        height: 80px;
        order: -1;
    }
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */
.collapsible {
    margin-bottom: 1rem;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.collapsible-header:hover {
    background: var(--bg-gray);
    border-color: var(--border-dark);
}

.collapsible-header.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.collapsible-header h3,
.collapsible-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-header.active .collapse-icon .material-symbols-rounded {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.collapsible-content.active {
    max-height: 5000px;
}

.collapsible-content-inner {
    padding: 1.25rem;
}

/* ============================================
   PIECE CARDS
   ============================================ */
.piece-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.piece-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-light) 100%);
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.piece-header h3 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.piece-header .btn-delete {
    color: rgba(255, 255, 255, 0.8);
}

.piece-header .btn-delete:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.piece-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
}

.piece-content.active {
    max-height: 10000px;
}

.piece-content-inner {
    padding: 1.25rem;
}

/* Murs section */
.murs-section,
.elements-section,
.inventaire-section,
.media-360-section {
    margin-bottom: 1.5rem;
}

.murs-section h4,
.elements-section h4,
.inventaire-section h4,
.media-360-section h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--info-bg);
}

.murs-container,
.elements-container,
.equipements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.elements-container .text-gray,
.equipements-container .text-gray {
    grid-column: 1 / -1;
}

.mur-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    position: relative;
}

.mur-item h5 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 500;
}

.mur-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

/* Bouton de suppression en haut à droite */
.btn-delete-corner {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    color: var(--danger);
    z-index: 1;
}

.btn-delete-corner:hover {
    background: var(--danger);
    color: white;
}

/* Sélecteur d'état avec emojis */
.etat-selector {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    flex-wrap: nowrap;
}

.etat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 0;
    flex: 1 1 0;
}

.etat-btn:hover {
    background: var(--bg-light);
    border-color: var(--border-dark);
}

.etat-btn.active {
    background: var(--primary-dark);
    border-color: var(--primary);
    color: white;
}

.etat-btn.active .etat-label {
    color: white;
}

.etat-emoji {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: 0.15rem;
    filter: grayscale(100%);
    transition: filter var(--transition-fast);
}

.etat-btn:hover .etat-emoji,
.etat-btn.active .etat-emoji {
    filter: grayscale(0%);
}

.etat-label {
    font-size: 0.65rem;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Responsive pour petits écrans */
@media (max-width: 400px) {
    .etat-selector {
        gap: 0.15rem;
    }

    .etat-btn {
        padding: 0.3rem 0.25rem;
    }

    .etat-emoji {
        font-size: 1.1rem;
    }

    .etat-label {
        font-size: 0.55rem;
    }
}

/* Section Bâti (sol, plafond, murs) */
.bati-section {
    margin-bottom: 1.5rem;
}

.bati-section h4 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

.bati-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 992px) {
    .bati-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bati-container {
        grid-template-columns: 1fr;
    }
}

.bati-item {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    position: relative;
}

.bati-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.bati-header h5 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bati-nature-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    background: white;
    margin-bottom: 0.75rem;
}

/* Ligne de sélecteurs (propreté + fonctionnement) */
.selectors-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

/* Sélecteur générique (propreté, fonctionnement) */
.proprete-selector,
.fonctionnement-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selector-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
    white-space: nowrap;
}

.selector-buttons {
    display: flex;
    gap: 0.25rem;
}

/* Boutons de sélection (propreté et fonctionnement) - style similaire à état */
.selector-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 50px;
}

.selector-btn:hover {
    background: var(--bg-light);
    border-color: var(--border-dark);
}

.selector-icon {
    font-size: 1rem;
    line-height: 1;
    margin-bottom: 0.15rem;
    font-weight: bold;
}

.selector-text {
    font-size: 0.65rem;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.1;
}

/* Boutons de propreté (V/X) - style unifié avec etat-btn */
.etat-btn.proprete-ok .etat-emoji {
    color: var(--success);
}

.etat-btn.proprete-ok:hover {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.etat-btn.proprete-ok.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #a7f3d0;
}

.etat-btn.proprete-ok.active .etat-emoji,
.etat-btn.proprete-ok.active .etat-label {
    color: var(--success-dark);
}

.etat-btn.proprete-ko .etat-emoji {
    color: var(--danger);
}

.etat-btn.proprete-ko:hover {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

.etat-btn.proprete-ko.active {
    background: var(--danger-bg);
    border-color: var(--danger-bg);
}

.etat-btn.proprete-ko.active .etat-emoji,
.etat-btn.proprete-ko.active .etat-label {
    color: var(--danger-dark);
}

/* Boutons de fonctionnement (F/NF) - style unifié avec etat-btn */
.etat-btn.fonctionnement-ok .etat-emoji {
    color: var(--primary);
}

.etat-btn.fonctionnement-ok:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.etat-btn.fonctionnement-ok.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.etat-btn.fonctionnement-ok.active .etat-emoji,
.etat-btn.fonctionnement-ok.active .etat-label {
    color: white;
}

.etat-btn.fonctionnement-ko .etat-emoji {
    color: var(--warning);
}

.etat-btn.fonctionnement-ko:hover {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.1);
}

.etat-btn.fonctionnement-ko.active {
    background: var(--warning);
    border-color: var(--warning);
}

.etat-btn.fonctionnement-ko.active .etat-emoji,
.etat-btn.fonctionnement-ko.active .etat-label {
    color: var(--primary-dark);
}

/* Pied d'élément (photo + observations) */
.element-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-photo-full {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-gray);
    border: 1px dashed var(--border-dark);
    border-radius: var(--border-radius);
    color: var(--text-gray);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-photo-full:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.observations-inline {
    margin: 0;
}

.observations-inline label {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

/* Elements et Equipements */
.element-item,
.equipement-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    position: relative;
}

.element-item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-right: 2.5rem;
}

.element-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    /*background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);*/
    color: var(--primary-dark);
    padding: 0rem 0.75rem 0rem 0rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.element-name-input {
    flex: 1;
    min-width: 150px;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: all var(--transition-fast);
}

input.element-name-input {
    width: 100%;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.element-name-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.element-name-input::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.element-type-select {
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--text-dark);
    cursor: pointer;
}

.element-type-select:focus {
    outline: none;
    color: var(--primary);
}

.element-item-content,
.equipement-item-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

/* ============================================
   COMPTEUR CARDS
   ============================================ */
.compteur-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.compteur-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    cursor: pointer;
}

.compteur-header h3 {
    color: white;
    margin: 0;
    font-size: 1rem;
}

.compteur-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
    padding: 0 1.25rem;
}

.compteur-content.active {
    max-height: 5000px;
    padding: 1rem;
}

.compteur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================
   COMPTEURS - NOUVEAU DESIGN COMPACT
   ============================================ */

/* Ligne de champs */
.compteur-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.compteur-row-info {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 0.5rem;
}

.compteur-row-identifiants {
    margin-bottom: 0.5rem;
}

.compteur-field {
    flex: 1;
    min-width: 100px;
}

.compteur-field input,
.compteur-field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.compteur-select-categorie {
    min-width: 140px;
    font-weight: 500;
}

.compteur-field-numero input {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.input-identifier {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    background: var(--bg-gray);
}

/* Cartes de relevés visuelles */
.compteur-releves {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.releve-card {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-fast);
}

.releve-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.releve-card:focus-within {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.releve-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.releve-input-wrapper {
    position: relative;
    width: 100%;
}

.releve-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    background: white;
    transition: all var(--transition-fast);
}

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

.releve-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.releve-unit {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    pointer-events: none;
}

.releve-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Couleurs spécifiques */
.releve-hp {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border-color: #facc15;
}

.releve-hp:focus-within {
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
}

.releve-hp .releve-unit {
    color: #a16207;
    background: rgba(250, 204, 21, 0.3);
}

.releve-hc {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
}

.releve-hc:focus-within {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.releve-hc .releve-unit {
    color: #1d4ed8;
    background: rgba(96, 165, 250, 0.3);
}

/* Footer compact */
.compteur-row-footer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

/* Footer compteur - unifié avec pièces */
.compteur-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
}

.compteur-footer .element-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compteur-footer .observations-inline {
    margin: 0;
}

.compteur-footer .observations-inline input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--bg-light);
}

.compteur-footer .observations-inline input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
}

/* Responsive */
@media (max-width: 480px) {
    .compteur-row-info {
        grid-template-columns: 1fr;
    }

    .compteur-releves {
        flex-direction: column;
    }

    .releve-card {
        min-width: 100%;
    }
}

/* ============================================
   CLES (KEYS) CARDS
   ============================================ */
.cle-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    cursor: pointer;
}

.cle-header h3 {
    color: white;
    margin: 0;
    font-size: 1rem;
}

.cle-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
    padding: 0 1.25rem;
}

.cle-content.active {
    max-height: 5000px;
    padding: 1.25rem;
}

.cle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Fonctionnement des clés - nouveau système avec un état par clé */
.fonctionnement-container {
    width: 100%;
}

.fonctionnement-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fonctionnement-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.fonctionnement-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
    min-width: 45px;
}

.fonctionnement-buttons {
    display: flex;
    gap: 0.25rem;
}

.fonct-btn {
    width: 36px;
    height: 32px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fonct-btn:hover {
    transform: scale(1.05);
}

.fonct-btn.fonct-ok {
    color: var(--primary);
}

.fonct-btn.fonct-ok:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.fonct-btn.fonct-ok.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.fonct-btn.fonct-nf {
    color: var(--warning);
}

.fonct-btn.fonct-nf:hover {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.1);
}

.fonct-btn.fonct-nf.active {
    background: var(--warning);
    border-color: var(--warning);
    color: #333;
}

/* Quand il n'y a qu'une seule clé, on n'affiche pas le label */
.fonctionnement-item:only-child .fonctionnement-label {
    display: none;
}

.fonctionnement-item:only-child {
    background: transparent;
    border: none;
    padding: 0;
}

/* Responsive pour fonctionnement */
@media (max-width: 480px) {
    .fonctionnement-grid {
        flex-direction: column;
    }

    .fonctionnement-item {
        justify-content: space-between;
    }
}

/* ============================================
   DÉTECTEURS DE SÉCURITÉ
   ============================================ */

.detecteurs-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.detecteurs-section h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grille 2 colonnes pour les détecteurs */
.detecteurs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .detecteurs-grid {
        grid-template-columns: 1fr;
    }
}

.detecteur-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.detecteur-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

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

.detecteur-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-dark);
}

.detecteur-na {
    margin-left: auto;
}

.na-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.na-toggle:hover {
    border-color: var(--text-muted);
}

.na-toggle input {
    margin: 0;
}

.na-toggle input:checked + .na-label {
    color: var(--danger);
    font-weight: 600;
}

.na-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.detecteur-content {
    padding: 1rem;
}

.detecteur-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detecteur-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

/* Items container */
.detecteur-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-detecteur {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.detecteur-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 0.75rem;
}

.detecteur-item-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Détecteur : pas de marge en bas sur etat-selector */
.detecteur-item .etat-selector {
    margin-bottom: 0.5rem;
}

/* Ligne emplacement */
.detecteur-bottom-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.detecteur-bottom-row .detecteur-emplacement {
    flex: 1;
}

.detecteur-emplacement select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--bg-white);
}

/* Ligne photo (pleine largeur, même style que boutons état) */
.detecteur-photo-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Preview photo */
.detecteur-photo-preview {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.detecteur-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: 1px solid #d1d5db;
}

.detecteur-photo-preview .thumbnail-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-photo-small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-photo-small .material-symbols-rounded {
    font-size: 1rem;
}

.thumbnail-mini {
    width: 40px;
    height: 40px;
}

.thumbnail-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.thumbnail-mini .thumbnail-remove {
    width: 16px;
    height: 16px;
    font-size: 10px;
    top: -4px;
    right: -4px;
}

/* Footer détecteur */
.detecteur-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.detecteur-footer .observations-inline {
    margin: 0;
}

.detecteur-footer .observations-inline input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

/* Responsive détecteurs */
@media (max-width: 768px) {
    .detecteur-header {
        flex-wrap: wrap;
    }

    .detecteur-na {
        width: 100%;
        margin-top: 0.5rem;
        margin-left: 0;
    }
}

/* Verifications section */
.verifications {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.verifications h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.verification-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
}

.verification-item:last-child {
    border-bottom: none;
}

.verification-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
}

.verification-item label {
    font-size: 0.9375rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* Photos trousseau */
.photos-trousseau {
    margin-top: 1.5rem;
}

.photos-trousseau h4 {
    margin-bottom: 1rem;
}

.trousseau-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ============================================
   PHOTO UPLOADS & PREVIEWS
   ============================================ */
.photo-upload-zone {
    border: 2px dashed var(--border-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-gray);
}

.photo-upload-zone:hover {
    border-color: var(--primary);
    background: var(--bg-white);
}

.photo-upload-zone.dragover {
    border-color: var(--success);
    background: var(--success-bg);
}

.photo-upload-zone-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.photo-upload-zone-text {
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.photo-preview-item .remove-photo {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.photo-preview-item:hover .remove-photo {
    opacity: 1;
}

/* Photo identité sections */
.photo-identite-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.photo-identite-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* ============================================
   SIGNATURE CANVAS
   ============================================ */
.signature-container {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.signature-container h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.signature-pad {
    display: block;
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border-dark);
    border-radius: var(--border-radius);
    background: var(--bg-gray);
    cursor: crosshair;
    touch-action: none;
}

.signature-pad:hover {
    border-color: var(--primary);
}

.signature-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ============================================
   BOTTOM NAVIGATION (ancien - masqué)
   ============================================ */
.bottom-nav {
    display: none;
}

/* ============================================
   TOASTS
   ============================================ */
.toast-container {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    min-width: 220px;
    max-width: 340px;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-info {
    background: rgba(219, 234, 254, 0.3);
    border-color: rgba(59, 130, 246, 0.09);
}

.toast-success {
    background: rgba(209, 250, 229, 0.3);
    border-color: rgba(16, 185, 129, 0.09);
}

.toast-warning {
    background: rgba(254, 243, 199, 0.3);
    border-color: rgba(245, 158, 11, 0.09);
}

.toast-error {
    background: rgba(254, 226, 226, 0.3);
    border-color: rgba(239, 68, 68, 0.09);
}

.toast-icon {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: var(--z-modal);
}

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

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

/* ============================================
   SPLASH SCREEN (Home loading + Finalisation)
   ============================================ */
.splash-screen {
    position: fixed;
    inset: 0;
    background: #00B389;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.splash-screen.active {
    transform: translateY(0);
}

.splash-screen.slide-down {
    transform: translateY(100%);
}

/* Au premier chargement, pas d'animation d'entrée — déjà visible */
.splash-screen.splash-instant {
    transition: none;
    transform: translateY(0);
}

.splash-screen.splash-instant.slide-down {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.splash-screen .splash-logo {
    width: 80px;
    height: auto;
    animation: breathing 2.4s ease-in-out infinite;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.15));
}

@keyframes breathing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   POPUP ELEMENT TYPE SELECTOR
   ============================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.element-type-popup {
    width: 500px;
}

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

.popup-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-dark);
}

.popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-gray);
    transition: all var(--transition-fast);
}

.popup-close:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.popup-subtitle {
    padding: 1rem 1.25rem 0.5rem;
    margin: 0;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.element-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
}

.element-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.element-type-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

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

.element-type-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.element-type-label {
    font-size: 0.75rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
}

/* ============================================
   POPUP ÉQUIPEMENT TYPE SELECTOR
   ============================================ */
.equipement-type-popup {
    width: 600px;
    max-height: 85vh;
}

.equipement-categories-container {
    padding: 0.5rem 1.25rem 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.equipement-category {
    margin-bottom: 1rem;
}

.equipement-category:last-child {
    margin-bottom: 0;
}

.equipement-category-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.equipement-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.equipement-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.625rem 0.375rem;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.equipement-type-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

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

.equipement-type-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.equipement-type-label {
    font-size: 0.6875rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================
   ÉQUIPEMENT ITEM DETAILS
   ============================================ */
.equipement-details-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.equipement-quantity {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.equipement-quantity label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Composant Quantity Stepper (input avec +/-) */
.quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-white);
}

.quantity-stepper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quantity-stepper .qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast);
    user-select: none;
}

.quantity-stepper .qty-btn:hover {
    background: var(--primary-light);
}

.quantity-stepper .qty-btn:active {
    background: var(--primary);
    color: white;
}

.quantity-stepper .qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-stepper .qty-btn:disabled:hover {
    background: transparent;
}

.quantity-stepper .quantity-input {
    width: 50px;
    height: 40px;
    padding: 0.5rem 0;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    background: transparent;
    -moz-appearance: textfield;
}


.quantity-stepper .quantity-input::-webkit-outer-spin-button,
.quantity-stepper .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-stepper .quantity-input:focus {
    outline: none;
}

/* Champ Marque masqué (non utilisé pour l'instant) */
.equipement-marque {
    display: none;
}

.equipement-marque label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
    white-space: nowrap;
}

.marque-input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .element-type-popup,
    .piece-type-popup {
        width: 95%;
    }

    .equipement-type-popup {
        width: 95%;
    }

    .equipement-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .equipement-details-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .equipement-quantity,
    .equipement-marque {
        width: 100%;
    }

    .element-type-grid,
    .piece-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Popup de sélection de type de pièce */
.piece-type-popup {
    width: 550px;
    max-height: 85vh;
}

.piece-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.piece-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.piece-type-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

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

.piece-type-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.piece-type-label {
    font-size: 0.6875rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .piece-type-popup {
        width: 95%;
    }

    .piece-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 400px) {
    .piece-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LOCATAIRE CARDS
   ============================================ */
.locataire-card {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.locataire-card h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.locataire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

/* ============================================
   SECTION TOGGLES
   ============================================ */
.section-toggle {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.section-toggle-header:hover {
    background: var(--bg-gray);
}

.section-toggle-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-toggle-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.section-toggle-content.active {
    max-height: 3000px;
}

.section-toggle-content-inner {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-gray);
}

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

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.empty-state-text {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-neutral {
    background: var(--bg-gray);
    color: var(--text-gray);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.warning-text {
    color: var(--warning);
    font-size: 0.875rem;
}

.error-text {
    color: var(--danger);
    font-size: 0.875rem;
}

.success-text {
    color: var(--success);
    font-size: 0.875rem;
}

/* ============================================
   RÉCAPITULATIF DÉTAILLÉ (Onglet Signatures)
   ============================================ */

/* En-tête du récapitulatif */
.recap-header {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-dark);
}

.recap-header-sortie {
    background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
}

.recap-header-entree {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);;
}

.recap-main-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recap-date {
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* Sections */
.recap-section {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
}

.recap-section:last-child {
    margin-bottom: 0;
}

.recap-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recap-title-icon {
    font-size: 1.125rem;
}

.recap-content {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* Sous-sections */
.recap-subsection {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary);
}

.recap-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Lignes */
.recap-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    gap: 0.75rem;
}

.recap-row-indent {
    padding-left: 1rem;
}

.recap-label {
    color: var(--text-gray);
    flex-shrink: 0;
    min-width: 90px;
}

.recap-value {
    color: var(--text-dark);
    text-align: right;
    word-break: break-word;
}

.recap-empty {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Badges */
.recap-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.recap-badge.entree {
    background: var(--success-bg);
    color: var(--success);
}

.recap-badge.sortie {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ===== PIÈCES DÉTAILLÉES ===== */
.recap-piece-block {
    background: var(--bg-light);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.recap-piece-block:last-child {
    margin-bottom: 0;
}

.recap-piece-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.recap-piece-icon-large {
    font-size: 1.5rem;
}

.recap-piece-name-large {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
}

.recap-etat-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-weight: 600;
}

.recap-etat-neuf {
    background: #dcfce7;
    color: #15803d;
}

.recap-etat-bon {
    background: #dbeafe;
    color: #1d4ed8;
}

.recap-etat-moyen {
    background: #fef3c7;
    color: #b45309;
}

.recap-etat-mauvais {
    background: #fee2e2;
    color: #b91c1c;
}

/* Groupes d'éléments dans une pièce */
.recap-element-group {
    margin-bottom: 0.75rem;
}

.recap-element-group:last-child {
    margin-bottom: 0;
}

.recap-element-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* Grille des items (murs, éléments, équipements) - 2 colonnes sur desktop */
.recap-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .recap-items-grid {
        grid-template-columns: 1fr;
    }
}

/* Item en mode mini-tableau pour comparaison Entrée/Sortie */
.recap-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

/* En-tête de l'item (nom + nature + photo) */
.recap-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background: var(--bg-white);
    gap: 0.375rem;
}

.recap-item-header-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.recap-item-name {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.recap-item-nature {
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recap-item-marque {
    font-size: 0.6875rem;
    color: var(--text-light);
}

.recap-item-photo {
    font-size: 0.75rem;
    color: var(--info);
}

/* Tableau des critères (État, Fonctionnement, Propreté) */
.recap-item-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.recap-item-row {
    display: table-row;
}

.recap-item-label {
    display: table-cell;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-gray);
    background: var(--bg-white);
    width: 60px;
    vertical-align: middle;
}

.recap-item-value {
    display: table-cell;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-dark);
    background: var(--bg-white);
    vertical-align: middle;
}

/* Observations */
.recap-item-obs {
    padding: 0.125rem 0.5rem 0.25rem;
    font-size: 0.6875rem;
    color: var(--warning);
    font-style: italic;
    background: var(--bg-white);
}

/* Couleurs de bordure selon l'état global */
.recap-item-neuf { border-left: 3px solid #22c55e; }
.recap-item-bon { border-left: 3px solid #3b82f6; }
.recap-item-moyen { border-left: 3px solid #f59e0b; }
.recap-item-mauvais { border-left: 3px solid #ef4444; }

/* =============================================
   NOMENCLATURE BADGES - Récapitulatif EDL
   ============================================= */

/* Badge générique */
.recap-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* États - Nomenclature officielle (couleurs de la charte) */
.recap-badge-en {
    background: #449955;
    color: #fff;
}

.recap-badge-be {
    background: #64d489;
    color: #fff;
}

.recap-badge-eu {
    background: #7a7a7a;
    color: #fff;
}

.recap-badge-me {
    background: #ec5e68;
    color: #fff;
}

/* Fonctionnement - badges rectangulaires comme les états */
.recap-badge-f {
    background: #64d489;
    color: #fff;
}

.recap-badge-nf {
    background: #ec5e68;
    color: #fff;
}

.recap-badge-nt {
    background: #7a7a7a;
    color: #fff;
}

/* Propreté */
.recap-badge-propre {
    background: #53b47a;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    width: 20px;
    padding: 0;
}

.recap-badge-sale {
    background: #fbbb03;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    width: 20px;
    padding: 0;
}

/* Propreté et Fonctionnement dans le récap */
.recap-item-proprete,
.recap-item-fonct {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-dark);
    white-space: nowrap;
}

/* État dans le récap */
.recap-item-etat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-gray);
}

/* Clés fonctionnement dans le récap */
.recap-cle-fonct-list {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.recap-cle-fonct-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 4px;
}

.recap-cle-fonct-item.fonct-ok {
    background: #4ade80;
    color: #1a365d;
}

.recap-cle-fonct-item.fonct-ko {
    background: #fca5a5;
    color: #1a365d;
}

.recap-cle-fonct-item.fonct-na {
    background: #d1d5db;
    color: #6b7280;
}

/* Observations de la pièce */
.recap-piece-observations {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--warning-bg);
    border-radius: var(--border-radius);
    font-size: 0.8125rem;
    color: var(--warning-dark, #92400e);
}

/* Médias 360° */
.recap-piece-media {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.recap-media-badge {
    font-size: 0.6875rem;
    background: var(--info-bg);
    color: var(--info);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
}

/* ===== COMPTEURS ===== */
.recap-compteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.recap-compteur-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.recap-compteur-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--primary);
    color: white;
}

.recap-compteur-icon {
    font-size: 1.125rem;
}

.recap-compteur-type {
    font-weight: 600;
    font-size: 0.875rem;
}

.recap-compteur-body {
    padding: 0.625rem 0.75rem;
    flex: 1;
}

.recap-row-sm {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 0.125rem 0;
}

.recap-label-sm {
    color: var(--text-light);
}

.recap-value-sm {
    color: var(--text-dark);
    font-weight: 500;
}

.recap-compteur-index {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recap-index-label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.recap-index-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.recap-compteur-obs {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-gray);
    font-style: italic;
}

.recap-compteur-photo {
    padding: 0.375rem 0.75rem;
    background: var(--info-bg);
    font-size: 0.6875rem;
    color: var(--info);
    text-align: center;
    margin-top: auto;
}

/* ===== DÉTECTEURS ===== */
.recap-detecteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.recap-detecteur-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.recap-detecteur-card.recap-detecteur-na {
    opacity: 0.6;
}

.recap-detecteur-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: #f97316;
    color: white;
}

.recap-detecteur-icon {
    font-size: 1.125rem;
}

.recap-detecteur-type {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
}

.recap-detecteur-count {
    background: rgba(255,255,255,0.2);
    padding: 0.125rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 700;
}

.recap-detecteur-badge-na {
    background: rgba(255,255,255,0.3);
    padding: 0.125rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.6875rem;
    font-weight: 600;
}

.recap-detecteur-body {
    padding: 0.625rem 0.75rem;
}

.recap-detecteur-item {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.recap-detecteur-item:last-child {
    border-bottom: none;
}

.recap-detecteur-num {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.recap-detecteur-obs {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.6875rem;
    color: var(--text-gray);
    font-style: italic;
}

/* ===== CLÉS ===== */
.recap-cles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.625rem;
}

.recap-cle-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.recap-cle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.recap-cle-num {
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-dark);
}

.recap-cle-statut {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.recap-statut-remis {
    background: var(--success-bg);
    color: var(--success);
}

.recap-statut-non_remis {
    background: var(--danger-bg);
    color: var(--danger);
}

.recap-statut-perdu {
    background: var(--warning-bg);
    color: var(--warning);
}

.recap-statut-a_refaire {
    background: var(--info-bg);
    color: var(--info);
}

.recap-cle-body {
    padding: 0.5rem 0.75rem;
}

.recap-cle-obs {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-gray);
    font-style: italic;
}

.recap-cles-verifications {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.recap-verif {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-weight: 500;
}

.recap-verif-ok {
    background: var(--success-bg);
    color: var(--success);
}

.recap-verif-no {
    background: var(--bg-gray);
    color: var(--text-light);
}

.recap-cles-commentaires {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* ===== IDENTITÉ ===== */
.recap-identite-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recap-identite-obs {
    margin-top: 0.625rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* ===== STATISTIQUES GLOBALES ===== */
.recap-stats {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
}

.recap-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.recap-stat-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.recap-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.recap-stat-label {
    font-size: 0.6875rem;
    color: var(--text-gray);
    display: block;
    margin-top: 0.125rem;
}

/* Barres de répartition des états */
.recap-etats-summary {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    border: 1px solid var(--border);
}

.recap-etats-summary h5 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
}

.recap-etats-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recap-etat-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.recap-etat-bar-label {
    width: 70px;
    flex-shrink: 0;
    color: var(--text-gray);
}

.recap-etat-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.recap-etat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.recap-etat-bar-value {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.6875rem;
}

/* Locataire item */
.recap-locataire-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.recap-locataire-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --container-max: 100%;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --nav-height: 48px;
        --footer-height: 80px;
    }

    html {
        font-size: 15px;
    }

    .logo {
        font-size: 1rem;
    }

    .btn-header span {
        display: none;
    }

    .container {
        padding: 0.75rem;
    }

    body.edl-active .container {
        margin-top: 4.8rem;
        min-height: calc(100vh - 4.8rem);
        padding: 1.25rem 0.75rem 5.5rem;
        border-radius: 20px 20px 0 0;
    }

    .card {
        padding: 1rem;
        border-radius: var(--border-radius);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .murs-container,
    .equipements-container {
        grid-template-columns: 1fr;
    }

    .compteur-grid,
    .cle-grid,
    .locataire-grid {
        grid-template-columns: 1fr;
    }

    /* Logo et bouton save responsive */
    .floating-logo,
    .floating-save {
        top: 0.75rem;
        width: 38px;
        height: 38px;
    }

    .floating-logo {
        left: 0.75rem;
    }

    .floating-save {
        right: 0.75rem;
        padding-right: 4px;
    }

    .floating-logo img {
        width: 22px;
        height: 22px;
    }

    .floating-save .material-symbols-rounded {
        font-size: 20px;
    }

    /* Navigation flottante responsive */
    .nav-tabs-floating {
        top: 0.75rem;
        padding: 0.2rem;
    }

    .nav-slider {
        top: 0.2rem;
        height: calc(100% - 0.4rem);
        transform: translateX(0.2rem);
    }

    .nav-tabs-floating button {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .nav-tabs-floating button.active {
        padding: 0.4rem 0.85rem;
    }

    .nav-tabs-floating button .tab-icon {
        font-size: 1.1rem;
        width: 1.1rem;
        height: 1.1rem;
    }

    .nav-tabs-floating button.active .tab-text {
        max-width: 90px;
        padding-left: 5px;
    }

    .bottom-nav-floating {
        bottom: 1rem;
    }

    .btn-fab {
        bottom: 5.5rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }

    .btn-fab .material-symbols-rounded {
        font-size: 24px;
    }

    .btn-nav {
        padding: 1.1rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-add-small {
        width: 100%;
        justify-content: center;
    }

    .signature-pad {
        height: 150px;
    }

    .toast-container {
        left: auto;
        right: 0.5rem;
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 1rem);
    }

    .modal {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    .element-item,
    .equipement-item {
        grid-template-columns: 1fr;
    }

    .photo-upload-zone {
        padding: 1.5rem 1rem;
    }

    .info-box-important {
        padding: 1rem;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */
@media (max-width: 375px) {
    html {
        font-size: 14px;
    }

    .nav-tabs button {
        padding: 0.5rem 0.5rem;
    }

    .btn-add {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
}

/* ============================================
   PAGE DE FINALISATION
   ============================================ */
.finalize-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.finalize-page.hidden {
    display: none;
}

.finalize-container {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    padding: 2.5rem;
    text-align: center;
    animation: scaleIn 0.3s ease-out;
}

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

.finalize-header {
    margin-bottom: 2rem;
}

.finalize-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

.finalize-icon .material-symbols-rounded {
    font-size: 48px;
    color: white;
}

.finalize-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.finalize-subtitle {
    color: var(--text-gray);
    font-size: 0.9375rem;
}

.finalize-info {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}

.finalize-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.finalize-info .info-row:last-child {
    border-bottom: none;
}

.finalize-info .info-label {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.finalize-info .info-value {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.875rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.finalize-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.finalize-actions .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.finalize-actions .btn .material-symbols-rounded {
    font-size: 24px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

.finalize-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.finalize-footer .btn-text {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.9375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.finalize-footer .btn-text:hover {
    color: var(--primary-dark);
}

.finalize-footer .btn-text .material-symbols-rounded {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .finalize-container {
        padding: 1.5rem;
    }

    .finalize-header h1 {
        font-size: 1.5rem;
    }

    .finalize-icon {
        width: 64px;
        height: 64px;
    }

    .finalize-icon .material-symbols-rounded {
        font-size: 36px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .app-header,
    .nav-tabs,
    .bottom-nav,
    .btn-delete,
    .btn-add,
    .btn-add-small,
    .toast-container {
        display: none !important;
    }

    body {
        background: white;
        padding: 0;
    }

    .container {
        padding: 0;
        max-width: none;
    }

    .tab-content {
        display: block !important;
    }

    .collapsible-content,
    .piece-content,
    .section-toggle-content {
        max-height: none !important;
    }

    .card,
    .piece-card,
    .compteur-card,
    .cle-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ============================================
   LIGHTBOX - VISUALISATION IMAGES
   ============================================ */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-title {
    color: white;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
}

/* ============================================
   MINIATURES INLINE
   ============================================ */
.thumbnail-preview {
    display: inline-flex;
    position: relative;
    border-radius: 6px;
    overflow: visible;
    border: 2px solid var(--border-color);
    background: var(--gray-100);
    vertical-align: middle;
    margin-left: 0.5rem;
    margin-top: 8px;
    margin-right: 8px;
}

.thumbnail-preview img {
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.thumbnail-preview img.clickable {
    cursor: zoom-in;
}

.thumbnail-preview img.clickable:hover {
    opacity: 0.9;
}

.thumbnail-small {
    width: 40px;
    height: 40px;
}

.thumbnail-small img {
    width: 40px;
    height: 40px;
}

.thumbnail-medium {
    width: 60px;
    height: 60px;
}

.thumbnail-medium img {
    width: 60px;
    height: 60px;
}

.thumbnail-large {
    width: 100px;
    height: 100px;
}

.thumbnail-large img {
    width: 100px;
    height: 100px;
}

.thumbnail-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: 2px var(--danger);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.thumbnail-remove:hover {
    background: #c53030;
    transform: scale(1.15);
}

/* Container pour bouton + miniature inline */
.photo-button-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.photo-button-container .btn {
    flex-shrink: 0;
}

.thumbnails-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

/* Photo preview amélioré avec agrandissement */
.photo-preview-item {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.photo-preview-item img {
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.photo-preview-item img:hover {
    transform: scale(1.02);
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(229, 62, 62, 0.9);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-preview-item:hover .remove-photo {
    opacity: 1;
}

/* Grille de photos pour affichage multiple */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photos-grid .photo-preview-item img {
    width: 100%;
    height: 80px;
}

/* Grande preview pour pièces et identité */
.photo-preview-large {
    margin-top: 0.75rem;
}

.photo-preview-large .photo-preview-item img {
    width: 150px;
    height: 150px;
}

@media (max-width: 768px) {
    .photo-preview-large .photo-preview-item img {
        width: 120px;
        height: 120px;
    }

    .thumbnail-large {
        width: 80px;
        height: 80px;
    }

    .thumbnail-large img {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --border-dark: #000;
        --text-gray: #333;
    }
}

/* ============================================
   DARK MODE (Optional - préparé pour future)
   ============================================ */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1e293b;
        --bg-white: #0f172a;
        --bg-gray: #1e293b;
        --text-dark: #f8fafc;
        --text-gray: #94a3b8;
        --text-light: #64748b;
        --border: #334155;
        --border-dark: #475569;
    }
}
*/

/* ============================================
   LISTE DES EDL LOCAUX
   ============================================ */
.edl-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.edl-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.edl-item:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.edl-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.edl-item-icon.entree {
    background: var(--success);
}

.edl-item-icon.sortie {
    background: var(--danger);
}

.edl-item-content {
    flex: 1;
    min-width: 0;
}

.edl-item-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edl-item-subtitle {
    font-size: 0.875rem;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edl-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.edl-item-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.edl-item-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-transform: uppercase;
}

.edl-item-status.brouillon {
    background: var(--warning-bg);
    color: var(--warning);
}

.edl-item-status.en_cours {
    background: var(--info-bg);
    color: var(--info);
}

.edl-item-status.termine {
    background: var(--success-bg);
    color: var(--success);
}

.edl-item-status.signe {
    background: #c4f1f9;
    color: #0891b2;
}

.edl-item-actions {
    display: flex;
    gap: 0.5rem;
}

.edl-item-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

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

.edl-item-btn.delete:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* Badge count dans le header */
.card-header .badge {
    background: var(--primary);
    color: white;
    min-width: 24px;
    text-align: center;
}

/* ============================================
   MODE COMPARAISON EDL SORTIE
   ============================================ */

/* Badge comparaison dans le header de pièce */
.badge-comparaison {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 500;
}

/* Badge structure verrouillée */
.badge-verrouille {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 500;
}

/* Pièce en mode comparaison */
.piece-comparaison {
    border-left: 4px solid var(--primary);
}

/* Pièce en mode structure verrouillée */
.piece-verrouillee {
    border-left: 4px solid #6c757d;
}

/* Masquer les boutons de suppression en mode verrouillé */
.piece-verrouillee .btn-delete-element,
.piece-verrouillee .btn-delete-mur,
.piece-verrouillee .element-card .btn-delete,
.piece-verrouillee .mur-card .btn-delete,
.piece-verrouillee .equipement-card[data-verrouille="true"] .btn-delete {
    display: none !important;
}

/* Type de pièce en lecture seule */
.piece-type-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #6c757d;
}

.piece-type-info .type-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* Style pour les éléments verrouillés */
.piece-verrouillee .element-type-badge,
.piece-verrouillee .element-precision {
    opacity: 0.9;
}

/* Input désactivé pour la nature en mode verrouillé */
.piece-verrouillee input[data-field="nature"][readonly],
.piece-verrouillee select[data-field="type"][disabled] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Ligne de comparaison entrée/sortie */
.comparaison-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

.comparaison-entree,
.comparaison-sortie {
    padding: 10px;
    border-radius: 8px;
    min-height: 60px;
}

/* Masquer le bloc entrée en mode comparaison */
.comparaison-entree {
    display: none;
}

.comparaison-sortie {
    background: #fff9e6;
    border: 1px solid #ffeeba;
}

.comparaison-entree label,
.comparaison-sortie label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-medium);
}

/* Valeur entrée (lecture seule) */
.valeur-entree {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Badge état */
.etat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.etat-badge.etat-neuf { background: #d4edda; color: #155724; }
.etat-badge.etat-tres_bon { background: #cce5ff; color: #004085; }
.etat-badge.etat-bon { background: #e2e3e5; color: #383d41; }
.etat-badge.etat-usage { background: #fff3cd; color: #856404; }
.etat-badge.etat-mauvais { background: #f8d7da; color: #721c24; }
.etat-badge.etat-hs { background: #721c24; color: white; }

/* Photos miniatures */
.photo-entree-thumb,
.photo-sortie-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 4px;
    border: 1px solid #ddd;
}

.photo-entree-thumb:hover,
.photo-sortie-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Observations entrée */
.obs-entree {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-style: italic;
    margin-top: 4px;
    padding: 4px;
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
}

/* Input observations sortie */
.obs-sortie-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 6px;
}

.obs-sortie-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.1);
}

/* Bouton photo petit */
.btn-photo-small {
    padding: 4px 8px;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* No data indicator */
.no-data {
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
}

/* Items comparaison */
.mur-comparaison,
.element-comparaison,
.equipement-comparaison {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.mur-comparaison:last-child,
.element-comparaison:last-child,
.equipement-comparaison:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Équipements info */
.equip-info {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.equip-sortie-fields {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.equip-sortie-fields .quantity-stepper {
    transform: scale(0.9);
}

.equip-sortie-fields .etat-selector {
    flex: 1;
}

/* Observations comparaison section */
.observations-comparaison {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.observations-comparaison h4 {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .comparaison-row {
        grid-template-columns: 1fr;
    }

    .comparaison-entree {
        border-bottom: none;
        border-radius: 8px 8px 0 0;
    }

    .comparaison-sortie {
        border-radius: 0 0 8px 8px;
    }
}

/* ============================================
   MODE COMPARAISON - ENTRÉE/SORTIE
   ============================================ */

/* Header de l'item comparaison */
.comparaison-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.nature-info {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-style: italic;
}

/* Précision des éléments (format: "Type - précision") */
.element-precision {
    font-size: 0.8125rem;
    color: var(--primary-dark);
    font-weight: 500;
}

/* Blocs Entrée/Sortie */
.comparaison-bloc {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.comparaison-bloc:last-child {
    margin-bottom: 0;
}

.bloc-label {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.bloc-content {
    padding: 12px;
}

/* Bloc Entrée (lecture seule) - MASQUÉ en mode comparaison */
.bloc-entree {
    display: none !important;
}

.bloc-entree .bloc-label {
    background: #e9ecef;
    color: var(--text-dark);
}

.bloc-entree .bloc-content {
    background: #fafafa;
}

/* Bloc Sortie (éditable) - Prend toute la largeur car bloc-entree masqué */
.bloc-sortie {
    background: #fff9e6;
    border: 1px solid #ffeeba;
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
}

.bloc-sortie .bloc-label {
    background: #ffeeba;
    color: #856404;
}

.bloc-sortie .bloc-content {
    background: #fffef5;
}

/* Info row (badges alignés) */
.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.info-row:empty {
    display: none;
}

/* Badges propreté/fonctionnement lecture seule */
.proprete-badge,
.fonct-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.proprete-badge.proprete-v,
.fonct-badge.fonct-f {
    background: #d4edda;
    color: #155724;
}

.proprete-badge.proprete-x,
.fonct-badge.fonct-nf {
    background: #f8d7da;
    color: #721c24;
}

/* Badge quantité */
.quantite-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--secondary-dark, #e3e8f0);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Photo miniature entrée */
.photo-thumb-entree {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    margin-top: 6px;
    transition: transform 0.15s ease;
}

.photo-thumb-entree:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Observations entrée */
.obs-entree {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-style: italic;
    margin-top: 6px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
    border-left: 3px solid #ddd;
}

/* No data */
.no-data {
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
}

/* Ligne quantité */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quantity-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
}

/* Items comparaison */
.bati-comparaison,
.mur-comparaison,
.element-comparaison,
.equipement-comparaison {
    margin-bottom: 16px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.bati-comparaison:last-child,
.mur-comparaison:last-child,
.element-comparaison:last-child,
.equipement-comparaison:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .comparaison-item-header {
        flex-wrap: wrap;
    }

    .bloc-content {
        padding: 10px;
    }

    .info-row {
        gap: 4px;
    }

    .proprete-badge,
    .fonct-badge,
    .quantite-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* ============================================
   COMPTEURS - MODE COMPARAISON
   ============================================ */

.compteur-comparaison {
    border-left: 4px solid var(--primary);
}

/* Compteur en mode structure verrouillée */
.compteur-verrouille {
    border-left: 4px solid #6c757d;
}

.compteur-verrouille .btn-delete {
    display: none !important;
}

.compteur-info-fixed {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.compteur-info-fixed .info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.compteur-info-fixed .info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: var(--text-medium);
    min-width: 100px;
}

.info-value {
    color: var(--text-dark);
}

.index-value-entree {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.index-value-entree .index-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.index-value-entree .index-unit {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.consommation-calc {
    background: linear-gradient(135deg, #e8f4fd, #d4ecfa);
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consommation-label {
    font-weight: 500;
    color: var(--text-medium);
}

.consommation-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.consommation-value.negative {
    color: var(--danger);
}

.consommation-unit {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Styles améliorés mode comparaison compteurs */
.comparaison-releves {
    margin-top: 12px;
}

.releve-comparaison-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.releve-bloc {
    padding: 12px;
    border-radius: 8px;
}

/* Masquer le bloc entrée des relevés compteurs */
.releve-bloc.bloc-entree {
    display: none;
}

.releve-bloc.bloc-sortie {
    background: #fff9e6;
    border: 1px solid #ffeeba;
    grid-column: 1 / -1; /* Prend toute la largeur */
}

.releve-label-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.releve-card-comparaison {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    min-height: 50px;
}

.releve-card-comparaison.editable {
    border: 1px dashed var(--primary-light);
}

.releve-card-comparaison .releve-icon {
    font-size: 1.5rem;
}

.releve-card-comparaison .releve-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.releve-card-comparaison .index-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
}

.releve-card-comparaison .index-unit {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.releve-card-comparaison .releve-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.releve-card-comparaison .releve-input {
    width: 100%;
    max-width: 120px;
    padding: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.releve-card-comparaison .releve-unit {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Section électricité HP/HC */
.comparaison-releves.electricite {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.releve-comparaison-section {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
}

.releve-section-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.consommation-calc-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #e8f4fd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.consommation-calc-inline .consommation-value {
    font-size: 1rem;
}

.consommation-calc.total {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    margin-top: 12px;
}

.consommation-calc.total .consommation-label {
    font-weight: 600;
}

.consommation-calc.total .consommation-value {
    font-size: 1.3rem;
    color: #155724;
}

/* Footer comparaison compteur */
.compteur-comparaison-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.comparaison-photos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Masquer la colonne photo entrée */
.comparaison-photos .photo-col:first-child {
    display: none;
}

.photo-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-col label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
}

.photo-col .no-photo {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.photo-col .photo-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.comparaison-observations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Masquer la colonne observations entrée */
.comparaison-observations .obs-col:first-child {
    display: none;
}

.obs-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.obs-col label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
}

/* Masquer le texte des observations entrée */
.obs-entree-text {
    display: none;
}

.obs-sortie-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================
   DÉTECTEURS - MODE COMPARAISON
   ============================================ */

/* Détecteur en mode structure verrouillée */
.detecteur-verrouille {
    border-left: 4px solid #6c757d;
}

.detecteur-verrouille .detecteur-na input[type="checkbox"]:disabled,
.detecteur-verrouille .quantity-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.detecteur-verrouille .qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.detecteurs-comparaison-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.detecteur-comparaison-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border-left: 4px solid var(--primary);
}

.detecteur-comparaison-card.na {
    border-left-color: var(--text-light);
    opacity: 0.7;
}

.detecteur-comparaison-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.detecteur-comparaison-header .detecteur-icon {
    font-size: 1.5rem;
}

.detecteur-comparaison-header .detecteur-title {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.detecteur-comparaison-header .badge-na {
    background: #6c757d;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.detecteur-comparaison-content {
    padding: 16px;
}

.detecteur-item-comparaison {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.detecteur-item-comparaison:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detecteur-item-comparaison .detecteur-item-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.detecteur-comparaison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detecteur-col {
    padding: 12px;
    border-radius: 8px;
}

/* Masquer la colonne entrée des détecteurs */
.detecteur-col.bloc-entree {
    display: none;
}

.detecteur-col.bloc-sortie {
    background: #fff9e6;
    border: 1px solid #ffeeba;
}

.detecteur-col .col-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.detecteur-info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.detecteur-info-row .info-label {
    font-weight: 500;
    color: var(--text-medium);
    min-width: 90px;
}

.detecteur-info-row .info-value {
    color: var(--text-dark);
}

.detecteur-info-row .info-value.fonct-ok {
    color: var(--success);
    font-weight: 500;
}

.detecteur-info-row .info-value.fonct-ko {
    color: var(--danger);
    font-weight: 500;
}

.detecteur-photo-entree {
    margin-top: 10px;
}

.detecteur-photo-entree img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* Boutons état compacts pour détecteurs */
.detecteur-col .etat-selector.compact {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.detecteur-col .etat-selector.compact .etat-btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.75rem;
    min-width: 0;
}

.detecteur-col .etat-selector.compact .etat-btn .etat-emoji {
    font-size: 1rem;
}

.detecteur-col .etat-selector.compact .etat-btn .etat-label {
    display: none;
}

.detecteur-photo-sortie {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.detecteur-photo-sortie .btn-photo-small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Observations détecteurs comparaison */
.detecteur-observations-comparaison {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.detecteur-observations-comparaison .obs-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Masquer la colonne observations entrée des détecteurs */
.detecteur-observations-comparaison .obs-col:first-child {
    display: none;
}

.detecteur-observations-comparaison .obs-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detecteur-observations-comparaison .obs-col label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
}

.detecteur-observations-comparaison .obs-entree-text {
    display: none;
}

.detecteur-observations-comparaison input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Responsive compteurs/détecteurs comparaison */
@media (max-width: 600px) {
    .releve-comparaison-row,
    .comparaison-photos,
    .comparaison-observations,
    .detecteur-comparaison-grid,
    .detecteur-observations-comparaison .obs-row {
        grid-template-columns: 1fr;
    }

    .releve-card-comparaison .releve-input {
        max-width: 100%;
    }
}

/* ============================================
   CLÉS - MODE COMPARAISON
   ============================================ */

.cle-comparaison {
    border-left: 4px solid var(--primary);
}

/* Clé en mode structure verrouillée */
.cle-verrouillee {
    border-left: 4px solid #6c757d;
}

.cle-verrouillee .btn-delete {
    display: none !important;
}

.cle-fields-edit {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cle-fields-edit .field-group {
    flex: 1;
    min-width: 150px;
}

.cle-fields-edit .field-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-medium);
}

.cle-footer {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.cle-info-fixed {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.cle-info-fixed .info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.cle-info-entree {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.cle-info-entree .nb-copies {
    font-size: 0.9rem;
}

.statut-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.statut-badge.statut-remis {
    background: #d4edda;
    color: #155724;
}

.statut-badge.statut-manquant,
.statut-badge.statut-perdu {
    background: #f8d7da;
    color: #721c24;
}

.statut-badge.statut-defectueux {
    background: #fff3cd;
    color: #856404;
}

.cle-fields-sortie {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cle-fields-sortie .field-group {
    flex: 1;
    min-width: 120px;
}

.cle-fields-sortie label {
    font-size: 0.75rem;
    color: var(--text-medium);
    margin-bottom: 4px;
    display: block;
}

.cle-fields-sortie select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Trousseau résumé entrée */
.trousseau-entree-resume {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.trousseau-entree-resume .resume-header h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.resume-checks {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.resume-checks .check-ok {
    color: #155724;
}

.resume-checks .check-no {
    color: #721c24;
}

.resume-commentaires {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-medium);
    font-style: italic;
}

/* Indicateur de différence */
.diff-indicator {
    display: none;
    margin-top: 10px;
    padding: 8px;
    background: #fff3cd;
    border-radius: 6px;
}

.diff-warning {
    color: #856404;
    font-size: 0.85rem;
    font-weight: 500;
}
