/* ===================================================================
   FICHIER CSS GLOBAL POUR LES COMPOSANTS DE LA BIBLIOTHÈQUE
   Kone.PKDGestionChantiers.Library
   
   Ce fichier consolide tous les styles des composants de la bibliothèque
   =================================================================== */

/* === STYLES GÉNÉRAUX === */
.main-container {
    padding: 2rem 1rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.modal-visible {
    display: block !important;
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.cursor-pointer {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cursor-pointer:hover {
    transform: scale(1.02);
}

.clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clickable:hover {
    transform: scale(1.05);
}

.text-black {
    color: black !important;
}

.btn-spacing {
    margin-right: 15px;
    margin-bottom: 10px;
}

/* === EN-TÊTE === */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.header-section h2 {
    color: white !important;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heading-underline {
    height: 4px;
    width: 80px;
    background: rgba(255, 255, 255, 0.9);
    margin-top: 0.75rem;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === TOOLBAR SECTION === */
.toolbar-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* === BOUTONS D'ACTION PRINCIPAUX === */
.btn-fancy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.025rem;
}

.btn-fancy i {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.btn-fancy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.btn-fancy:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-fancy.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-fancy.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-fancy.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-fancy.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-fancy.btn-outline-info {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    box-shadow: none;
}

.btn-fancy.btn-outline-info:hover {
    background: #3b82f6;
    color: white;
}

.btn-animate {
    transition: all 0.2s ease;
}

.btn-animate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-animate:active {
    transform: translateY(0);
}

.btn-danger.btn-animate {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
    color: white;
}

.btn-danger.btn-animate:hover {
    background: linear-gradient(45deg, #c82333, #a02330);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-toggle {
    padding: 6px 10px;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-toggle.active {
    background-color: #0d6efd;
    color: white;
}

.btn-toggle:not(.active) {
    background-color: #e9ecef;
    color: #495057;
}

/* === BARRE DE RECHERCHE === */
.search-container {
    width: 100%;
}

.search-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-group:focus-within {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

.search-group .input-group-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 0.75rem 1rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.search-group .input-group-text i {
    font-size: 1.1rem;
    line-height: 1;
    display: block;
}

.search-input {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background-color: #fff;
}

.search-input:focus {
    background-color: #fff;
    outline: none;
    box-shadow: none;
}

.search-input::placeholder {
    color: #94a3b8;
}

/* === SECTION ARCHIVES === */
.section-header {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header h4 {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: #475569;
    margin: 0;
}

.section-header h4 i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.section-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #3b82f6 0%, transparent 100%);
    border-radius: 2px;
}

.section-title {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #495057;
    font-weight: 500;
}

/* === BOUTONS D'ARCHIVE === */
.archive-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.archive-year-btn {
    font-weight: 600;
    min-width: 90px;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-size: 1rem;
}

.archive-year-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.archive-year-btn.btn-light {
    background-color: white;
    color: #475569;
    border-color: #e2e8f0;
}

.archive-year-btn.btn-light:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.archive-year-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* === CARTES DE CHANTIERS === */
.chantier-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    height: 100%;
    display: flex;
    margin-top: 1rem;
    flex-direction: column;
}

.chantier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15) !important;
    border-color: #cbd5e1;
}

.card-header {
    padding: 1rem 1.25rem;
    border: none;
    background: white;
    border-bottom: 2px solid #f1f5f9;
}

.card-header.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-bottom-color: #6ee7b7;
}

.card-header.archived {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-bottom-color: #cbd5e1;
}

.card-header span:first-child {
    font-size: 0.875rem;
    font-weight: 600;
}

.card-header .badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025rem;
}

.card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === INFO CARD === */
.card-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 6px;
    flex-shrink: 0;
}

.info-row strong {
    color: #475569;
    margin-right: 0.35rem;
}

.info-row span {
    color: #64748b;
}

/* === ACTIONS DES CARTES === */
.card-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.action-row:last-child {
    margin-bottom: 0;
}

.action-row.single-action {
    grid-template-columns: 1fr;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    white-space: nowrap;
}

.action-btn i {
    display: inline-flex;
    align-items: center;
    margin-right: 0.4rem;
    font-size: 0.95rem;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.action-btn.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.action-btn.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.action-btn.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.action-btn.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.action-btn.btn-black {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* === OVERLAY DE CHARGEMENT === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.loading-content {
    text-align: center;
    max-width: 350px;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.loading-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin-bottom: 1rem;
}

.loading-icon i {
    font-size: 3rem;
}

.loading-content h5 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.loading-content p {
    color: #64748b;
    margin-bottom: 0;
}

.spinner-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e2e8f0;
}

.progress-bar {
    border-radius: 4px;
}

/* === ONGLETS === */

/* Container des onglets */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 0.5rem;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Boutons d'onglets (button ou a) */
.nav-tabs .nav-link,
.nav-tabs button.nav-link {
    position: relative;
    padding: 1rem 1.75rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px 10px 0 0;
    margin-bottom: -2px;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Effet au survol */
.nav-tabs .nav-link:hover,
.nav-tabs button.nav-link:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* État actif */
.nav-tabs .nav-link.active,
.nav-tabs button.nav-link.active {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e40af;
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    box-shadow: 0 -2px 12px rgba(59, 130, 246, 0.15);
}

/* Effet au focus pour l'accessibilité */
.nav-tabs .nav-link:focus,
.nav-tabs button.nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Animation de sélection */
.nav-tabs .nav-link.active::before,
.nav-tabs button.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Icônes dans les onglets */
.nav-tabs .nav-link i,
.nav-tabs button.nav-link i {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link.active i,
.nav-tabs button.nav-link.active i {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Contenu des onglets */
.tab-content {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

/* Panes des onglets */
.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

.tab-pane.active.show {
    opacity: 1;
    animation: fadeInContent 0.4s ease-out;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ICÔNES D'AVERTISSEMENT === */
.warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.warning-icon:hover {
    transform: scale(1.15);
}

.warning-icon img {
    width: 100%;
    height: 100%;
}

.warning-icon-img {
    width: 24px;
    height: 24px;
}

/* Icônes d'avertissement dans les onglets */
.nav-tabs .nav-link .warning-icon,
.nav-tabs button.nav-link .warning-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    animation: pulse-warning-tab 2s ease-in-out infinite;
}

.nav-tabs .nav-link .warning-icon i,
.nav-tabs button.nav-link .warning-icon i {
    font-size: 1.25rem;
    color: #f59e0b;
}

@keyframes pulse-warning-tab {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.75;
        transform: scale(1.15);
    }
}

.nav-tabs .nav-link.active .warning-icon i,
.nav-tabs button.nav-link.active .warning-icon i {
    color: #f59e0b;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.5));
}

.nav-tabs .nav-link:hover .warning-icon i,
.nav-tabs button.nav-link:hover .warning-icon i {
    color: #d97706;
}

/* === ICÔNES DE STATUT === */
.status-icon-success {
    color: green;
    font-size: 1.75rem;
}

.status-icon-danger {
    color: red;
    font-size: 1.75rem;
}

/* === SECTIONS DE FORMULAIRE === */
.form-section {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-section-info {
    background-color: #cfe2ff;
}

/* === CONTRÔLES DE FORMULAIRE === */
.form-control,
.form-select,
.form-check-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-check-input {
    cursor: pointer;
    margin-top: 0.25rem;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* === RANGÉES DE MATÉRIEL/ITEMS === */
.item-row,
.materiel-row {
    transition: all 0.3s ease;
    padding: 8px 5px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.item-row:hover,
.materiel-row:hover {
    background-color: #f0f7ff;
}

.extracteur-row,
.tache-row,
.tache-controle-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.extracteur-row:last-child,
.tache-row:last-child,
.tache-controle-row:last-child {
    border-bottom: none;
}

.process-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.process-row:last-child {
    border-bottom: none;
}

/* === BOUTONS DE SUPPRESSION === */
.delete-btn {
    transition: all 0.2s ease;
    opacity: 0.8;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.delete-selection-btn {
    margin-right: 8px;
    animation: fadeIn 0.3s;
}

/* === MODALES === */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* === ANIMATIONS === */
.fade-in {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loaded {
    opacity: 1;
}

.pulse {
    transition: transform 0.3s ease-in-out;
}

.pulse:hover {
    transform: scale(1.05);
}

/* === LISTES D'ITEMS === */
.list-item {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.list-item:hover {
    transform: translateX(5px);
    border-left: 4px solid #007bff;
    background-color: #f0f7ff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.list-group-item-action {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.list-group-item-action:hover {
    background-color: #f0f7ff;
    transform: translateX(3px);
}

/* === BADGES === */
.date-badge {
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.phase-badge {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.phase-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.phase-badge:hover::before {
    content: "Cliquer pour supprimer";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
}

.phase-badge.bg-primary {
    background-color: #007bff !important;
    color: white;
}

.phase-badge.bg-success {
    background-color: #28a745 !important;
    color: white;
}

.phase-badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.phase-badge.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

.phase-badge.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

.selected-phases {
    min-height: 40px;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
}

.phase-selection .form-check {
    margin-bottom: 8px;
}

/* === CASES À COCHER === */
.selection-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #007bff;
    transform: scale(1.2);
    margin-right: 10px;
}

.select-all-checkbox {
    accent-color: #007bff;
    transform: scale(1.1);
    margin-right: 8px;
}

/* === BOUTONS DE SUPPRESSION EN MASSE === */
.bulk-delete-btn {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
}

.bulk-delete-btn:hover {
    background: linear-gradient(45deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* === REGISTRE ENTREE SORTIE - STYLES SPÉCIFIQUES === */

/* En-tête de carte amélioré */
.registre-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.registre-card-header h4 {
    margin: 0;
    font-weight: 700;
    color: white;
    font-size: 1.5rem;
}

/* Carte principale avec ombre */
.registre-main-card {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: none;
    overflow: hidden;
    background: white;
    margin-bottom: 2rem;
}

.registre-card-body {
    padding: 2rem;
    background-color: #ffffff;
}

/* Section de formulaire améliorée */
.registre-form-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.registre-form-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Titre de section avec icône */
.registre-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
}

/* En-tête de section Personnel */
.registre-personnel-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Badges améliorés */
.registre-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.registre-badge-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.registre-badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Input de formulaire stylisé */
.registre-form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.65rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.registre-form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Label de formulaire */
.registre-form-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Item de liste de personnel */
.registre-worker-item {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.registre-worker-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
}

/* Info worker */
.registre-worker-info {
    flex: 1;
}

.registre-worker-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.registre-worker-detail {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.registre-worker-detail i {
    margin-right: 0.5rem;
    color: #3b82f6;
}

/* Groupe d'actions */
.registre-actions-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Modal amélioré */
.registre-modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.registre-modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    border: none;
}

.registre-modal-header .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.registre-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.registre-modal-header .btn-close:hover {
    opacity: 1;
}

.registre-modal-body {
    padding: 2rem;
}

.registre-modal-footer {
    padding: 1.5rem 2rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

/* Carte de modal (sections internes) */
.registre-modal-card {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.registre-modal-card-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #cbd5e1;
}

.registre-modal-card-header h6 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.registre-modal-card-body {
    padding: 1.5rem;
}

/* Alert stylisé */
.registre-alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #93c5fd;
    border-radius: 10px;
    padding: 1.25rem;
    color: #1e40af;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.registre-alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.registre-alert-warning i {
    font-size: 1.5rem;
    color: #d97706;
}

/* Checkbox personnalisée */
.registre-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
    margin-right: 1rem;
    transition: transform 0.2s ease;
}

.registre-checkbox:hover {
    transform: scale(1.1);
}

/* Select stylisé */
.registre-select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.65rem 1rem;
    transition: all 0.3s ease;
    background-color: white;
    cursor: pointer;
}

.registre-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Zone vide élégante */
.registre-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.registre-empty-state i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.registre-empty-state p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Animations douces */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registre-animate-in {
    animation: slideIn 0.3s ease-out;
}

/* Divider élégant */
.registre-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 2rem 0;
}

/* Amélioration des boutons */
.btn-black {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
    border: none;
}

.btn-black:hover {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
}

/* Amélioration des boutons success */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Amélioration des boutons primary */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Espacement des boutons d'action */
.d-flex.flex-wrap.mt-4 .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Amélioration du placeholder */
.registre-form-control::placeholder,
.registre-select::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Style pour le form-check (switch) */
.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

/* Amélioration des textarea */
textarea.registre-form-control {
    resize: vertical;
    min-height: 80px;
}

/* Animations pour les modales */
.modal.show {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-dialog {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Style pour les inputs time */
input[type="time"].registre-form-control {
    cursor: pointer;
}

/* Amélioration du focus visible */
.registre-checkbox:focus,
.registre-form-control:focus,
.registre-select:focus {
    outline: none;
}

/* Badge hover effect */
.registre-badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.registre-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === CLASSES UTILITAIRES === */

/* Titres sans bordure */
.registre-section-title-no-border {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Icônes d'avertissement */
.warning-icon-md {
    font-size: 1.5rem;
}

.warning-icon-lg {
    font-size: 2rem;
}

/* Curseur pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Textarea hauteur fixe */
.textarea-height-80 {
    height: 80px;
}

/* Input caché */
.input-hidden {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Lien sans décoration */
.link-no-decoration {
    text-decoration: none;
}

/* Image icône fichier */
.file-icon-img {
    max-width: 80px;
    max-height: 80px;
}

/* Alert info custom */
.alert-info-custom {
    background-color: #e0f2fe;
    color: #075985;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Modal header gradient */
.modal-header-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
}

/* Modal footer custom */
.modal-footer-custom {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border: none;
}

/* Button custom style */
.btn-custom-rounded {
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
}

/* Button gradient primary */
.btn-gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

/* Input custom border */
.input-custom-border {
    border-color: #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* Header gradient danger */
.header-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1rem;
}

/* Progress bar width */
.progress-width-full {
    width: 100%;
}

/* Text color muted custom */
.text-muted-custom {
    color: #475569;
    font-size: 1rem;
}

/* RESPONSIVE === */
@media (max-width: 991px) {
    .main-container {
        padding: 1.5rem 0.75rem 2rem;
    }

    .header-section {
        padding: 2rem 1.5rem;
    }

    .toolbar-section {
        padding: 1.25rem;
    }

    .action-group {
        justify-content: center;
    }

    .registre-card-body {
        padding: 1.5rem;
    }

    .registre-form-section {
        padding: 1.25rem;
    }
    
    /* Onglets responsive */
    .nav-tabs {
        padding: 0 0.25rem;
        gap: 0.25rem;
    }
    
    .nav-tabs .nav-link,
    .nav-tabs button.nav-link {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .tab-content {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 767px) {
    .header-section h2 {
        font-size: 1.5rem;
    }

    .btn-fancy {
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .action-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.5rem;
    }

    .action-btn i {
        margin-right: 0.25rem;
    }

    /* Responsive pour registre */
    .registre-card-header h4 {
        font-size: 1.2rem;
    }

    .registre-section-title {
        font-size: 1.1rem;
    }

    .registre-worker-item {
        padding: 1rem;
    }

    .registre-worker-name {
        font-size: 1rem;
    }

    .registre-actions-group {
        width: 100%;
        margin-top: 0.75rem;
    }

    .registre-actions-group .btn {
        flex: 1;
        font-size: 0.85rem;
    }

    .registre-modal-card-header h6 {
        font-size: 0.9rem;
    }

    .registre-form-label {
        font-size: 0.875rem;
    }

    .registre-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Onglets mobile */
    .nav-tabs {
        padding: 0;
        gap: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .nav-tabs::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-tabs::-webkit-scrollbar-track {
        background: #f1f5f9;
    }
    
    .nav-tabs::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
    
    .nav-tabs .nav-link,
    .nav-tabs button.nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        flex-shrink: 0;
    }
    
    .nav-tabs .nav-link i,
    .nav-tabs button.nav-link i {
        font-size: 1rem;
        margin-right: 0.35rem;
    }
    
    .tab-content {
        padding: 1.25rem 0.75rem;
        min-height: 300px;
    }
    
    .nav-tabs .nav-link:hover,
    .nav-tabs button.nav-link:hover {
        transform: translateY(0);
    }
}

/* === VISUALISE FILE COMPONENT === */

/* Conteneur principal du viewer */
.file-viewer-container {
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* En-tête avec le bouton retour */
.file-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: white;
    border-top: 1px solid #dee2e6;
}

/* Styles pour les images */
.file-viewer-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex: 1;
}

/* Styles pour l'iframe PDF */
.file-viewer-iframe {
    width: 100%;
    height: calc(100vh - 150px);
    border: none;
    flex: 1;
}

/* Styles pour les cartes de fichiers texte */
.file-viewer-card {
    height: 100%;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-viewer-card .card-body {
    overflow: auto;
    max-height: calc(100vh - 200px);
}

/* Styles pour les fichiers embed */
.file-viewer-embed {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex: 1;
}

/* Boutons d'action du viewer */
.file-viewer-btn {
    transition: all 0.2s ease;
}

.file-viewer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* === VERIFICATION ELECTRIQUE COMPONENT === */

/* Container des items de vérification */
.verification-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Item de vérification individuel */
.verification-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.verification-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
}

/* Alternance de couleur de fond */
.verification-item.bg-light-custom {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Image de l'item */
.verification-item-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.verification-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.verification-item:hover .verification-item-image img {
    transform: scale(1.1);
}

/* Contenu de l'item */
.verification-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Nom de l'item avec warning */
.verification-item-name {
    position: relative;
}

.verification-item-name label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.verification-item-name .warning-icon {
    display: inline-flex;
    align-items: center;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* Container des checkboxes */
.verification-checks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verification-checks .row {
    margin: 0;
}

/* Groupe de checkbox */
.check-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.check-group:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.check-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
    min-width: 80px;
}

/* Custom checkbox élégante */
.custom-checkbox {
    position: relative;
    display: inline-block;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
}

.custom-checkbox input[type="checkbox"]:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.custom-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    animation: checkmark-appear 0.3s ease;
}

@keyframes checkmark-appear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.custom-checkbox label {
    display: none;
}

/* Signature textarea stylisée */
.signature-textarea {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.signature-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
    background: white;
}

.signature-textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Alert danger personnalisée */
.alert-danger.shadow-sm {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #f87171;
    border-radius: 10px;
    color: #991b1b;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.alert-danger h5 {
    color: #991b1b;
}

/* Responsive pour vérification électrique */
@media (max-width: 991px) {
    .verification-item {
        flex-direction: column;
        gap: 1rem;
    }

    .verification-item-image {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .check-group {
        padding: 0.6rem 0.75rem;
    }

    .check-label {
        min-width: 70px;
        font-size: 0.875rem;
    }
}

@media (max-width: 767px) {
    .verification-checks .row {
        display: flex;
        flex-direction: column;
    }

    .verification-checks .col-md-6 {
        width: 100%;
        max-width: 100%;
    }

    .verification-item-image {
        width: 70px;
        height: 70px;
    }

    .verification-item-name label {
        font-size: 1rem;
    }

    .custom-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }

    .custom-checkbox input[type="checkbox"]:checked::after {
        font-size: 16px;
    }
}

/* === PAGE DE LOGIN === */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: none;
    backdrop-filter: blur(10px);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.login-header {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    padding: 2rem;
    text-align: center;
    border: none;
}

.login-header h3 {
    color: white;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    font-weight: 300;
}

.login-body {
    padding: 2.5rem;
}

.login-page .alert-danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border: 1px solid #FECACA;
    color: #DC2626;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.loading-container {
    text-align: center;
    padding: 3rem 2rem;
}

.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.loading-text {
    color: #6B7280;
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 500;
}

.sso-section {
    margin-bottom: 2rem;
}

.sso-title {
    color: #374151;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
}

.divider-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #6B7280;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.login-page .form-label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-page .form-control {
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FAFAFA;
}

.login-page .form-control:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.login-page .form-check {
    margin: 1.5rem 0;
}

.login-page .form-check-input:checked {
    background-color: #4F46E5;
    border-color: #4F46E5;
}

.login-page .form-check-label {
    color: #4B5563;
    font-weight: 500;
}

.login-page .btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, #3730A3 0%, #6B21A8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.login-page .btn-primary:active {
    transform: translateY(0);
}

.login-page .btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.login-page .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.registration-section {
    text-align: center;
    padding-top: 1rem;
}

.registration-text {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.login-footer {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #E5E7EB;
}

.footer-text {
    color: #6B7280;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.validation-message {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.icon {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.external-login-section {
    width: 100%;
}

/* === PAGE D'INSCRIPTION === */
.register-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.register-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: none;
    backdrop-filter: blur(10px);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    transition: all 0.3s ease;
}

.register-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.register-header {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    padding: 2rem;
    text-align: center;
    border: none;
}

.register-header h3 {
    color: white;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.register-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    font-weight: 300;
}

.register-body {
    padding: 2.5rem;
}

.register-page .alert-danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border: 1px solid #FECACA;
    color: #DC2626;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.register-page .alert-success {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid #BBF7D0;
    color: #15803D;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.register-page .loading-container {
    text-align: center;
    padding: 3rem 2rem;
}

.register-page .loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.register-page .loading-text {
    color: #6B7280;
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 500;
}

.register-page .form-label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.register-page .form-control {
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FAFAFA;
}

.register-page .form-control:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background-color: white;
}

.register-page .validation-message {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.register-page .help-text {
    color: #6B7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

.register-page .btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.register-page .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.register-page .btn-success:active {
    transform: translateY(0);
}

.register-page .btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.register-page .btn-primary:hover {
    background: linear-gradient(135deg, #3730A3 0%, #6B21A8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.register-page .divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.register-page .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
}

.register-page .divider-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #6B7280;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.register-page .login-section {
    text-align: center;
    padding-top: 1rem;
}

.register-page .login-text {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.register-footer {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #E5E7EB;
}

.register-page .footer-text {
    color: #6B7280;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.register-page .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.register-page .row .col-md-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* === DROPDOWN BLAZOR === */
.dropdown-blazor {
    position: relative;
}

.dropdown-blazor .dropdown-menu.show {
    display: block;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 1000;
}

.dropdown-blazor .dropdown-menu {
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    margin-top: 0.25rem;
}

.dropdown-blazor .dropdown-menu li {
    list-style: none;
}

.dropdown-blazor .dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-blazor .dropdown-menu li a:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Dropdown dans la navbar */
.navbar .dropdown-blazor .dropdown-menu.show {
    right: 0;
    left: auto;
    background-color: #fff;
}

.navbar .dropdown-blazor .dropdown-menu li a {
    color: #333;
}

.navbar .dropdown-blazor .dropdown-menu li a:hover {
    background-color: #f5f5f5;
}

/* Button toggle dans la navbar */
.navbar .dropdown-blazor button.dropdown-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.navbar .dropdown-blazor button.dropdown-toggle:hover {
    opacity: 0.9;
}

.navbar .dropdown-blazor button.dropdown-toggle:focus {
    outline: none;
}

/* === BOUTONS DE CONNEXION EXTERNE === */
.btn-azure {
    background: linear-gradient(135deg, #0078D4 0%, #106EBE 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
    margin-bottom: 0.5rem;
}

.btn-azure:hover {
    background: linear-gradient(135deg, #106EBE 0%, #005A9E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
    color: white;
}

.btn-azure:active {
    transform: translateY(0);
}

.btn-external {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    margin-bottom: 0.5rem;
}

.btn-external:hover {
    background: linear-gradient(135deg, #3730A3 0%, #6B21A8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-external:active {
    transform: translateY(0);
}

.external-login-icon {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.no-external-auth {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border: 1px solid #FECACA;
    color: #DC2626;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.external-login-form {
    width: 100%;
}