/* ============================================
   AMÉLIORATIONS DU TEMPLATE - Design Moderne
   ============================================ */

/* Amélioration de l'en-tête principal */
.app-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.5), transparent);
    animation: shimmer 3s ease infinite;
}

.app-header:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.header-title-main {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.header-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-top: 4px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-user:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Amélioration de la section de sélection OF */
.of-selection-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.of-selection-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4);
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.of-selection-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.of-label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.of-label::before {
    content: '📋';
    font-size: 18px;
}

.of-input {
    flex: 1;
    min-width: 300px;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.of-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.load-of-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-of-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.load-of-btn:active {
    transform: translateY(0);
}

.of-info {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1e40af;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* Amélioration des onglets */
.tab-container {
    background: white;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    margin: 0 32px;
    margin-top: 24px;
}

.tab-control {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    gap: 4px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-control::-webkit-scrollbar {
    height: 6px;
}

.tab-control::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tab-control::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tab-button {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px 3px 0 0;
    transition: width 0.3s ease;
}

.tab-button:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    transform: translateY(-2px);
}

.tab-button.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    font-weight: 700;
}

.tab-button.active::before {
    width: 80%;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    border-radius: 10px;
    pointer-events: none;
}

/* Amélioration du contenu principal */
.tab-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 32px;
    min-height: 500px;
    border-radius: 0 0 16px 16px;
    position: relative;
}

.tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.tab-content.active {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration des boutons flottants */
.floating-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.float-btn {
    padding: 14px 20px;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    min-width: 160px;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.float-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.float-btn:hover::before {
    left: 100%;
}

.float-btn:hover {
    transform: translateX(-4px) scale(1.02);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

.float-btn i {
    font-size: 18px;
    color: #2563eb;
    transition: transform 0.3s ease;
}

.float-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

.float-btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.float-btn-logout i {
    color: white;
}

.float-btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Amélioration des cartes et sections */
.section-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.section-card:hover::before {
    transform: scaleX(1);
}

.section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #e2e8f0;
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-card-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

/* Amélioration des formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Amélioration des boutons */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
}

/* Amélioration des notifications */
.notification {
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Amélioration générale du scroll */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Responsive améliorations */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }
    
    .of-selection-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .of-input {
        min-width: 100%;
    }
    
    .tab-control {
        padding: 6px;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .floating-buttons {
        top: 10px;
        right: 10px;
    }
    
    .float-btn {
        min-width: 140px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Animations d'entrée pour les éléments */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-down {
    animation: slideDown 0.5s ease;
}

