/* 
 * Styles personnalisés pour l'application LEX
 * Learning Expeditions - KEYCE Academy
 */

/* Variables CSS pour la cohérence des couleurs */
:root {
    --lex-primary: #4f46e5;
    --lex-secondary: #f59e0b;
    --lex-success: #10b981;
    --lex-info: #06b6d4;
    --lex-warning: #f59e0b;
    --lex-danger: #ef4444;
    --lex-dark: #1f2937;
    --lex-light: #f8fafc;
    --lex-gradient: linear-gradient(135deg, var(--lex-primary), var(--lex-secondary));
}

/* Styles généraux */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.bg-gradient-primary {
    background: var(--lex-gradient) !important;
}

.text-primary {
    color: var(--lex-primary) !important;
}

.btn-primary {
    background-color: var(--lex-primary);
    border-color: var(--lex-primary);
}

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
}

/* Hero Section */
.hero-section {
    background: var(--lex-gradient);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/fondEdutaskmaster.jpg') center/cover;
    opacity: 0.1;
    z-index: 0;
}

/* Styles pour la page de login */
.auth-main {
    min-height: 100vh;
    background: url('/images/fondEdutaskmaster.jpg') center/cover no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-main .auth-wrapper {
    position: relative;
    z-index: 1;
}

.auth-main .auth-wrapper .container {
    position: relative;
    z-index: 2;
}

/* Rendre les colonnes transparentes */
.auth-main .col-md-6 {
    background: transparent;
}

/* Supprimer le background de auth-form */
.auth-main .auth-wrapper.v1 .auth-form {
    background: none !important;
    background-image: none !important;
}

/* Seules les cartes ont un fond blanc semi-transparent */
.auth-main .card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(5px);
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards et composants */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Badges et statuts */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
}

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

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

.badge.bg-warning {
    background-color: var(--lex-warning) !important;
    color: var(--lex-dark) !important;
}

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

/* Boutons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.15s ease-in-out;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--lex-dark);
    background-color: var(--lex-light);
}

.table-hover tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.05);
}

/* Navigation et header */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.pc-header {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.pc-sidebar .pc-menu-overlay {
    backdrop-filter: blur(10px);
}

/* Formulaires */
.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--lex-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--lex-dark);
    margin-bottom: 0.5rem;
}

/* Alertes et notifications */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

/* Avatars et profils */
.user-avtar {
    border-radius: 50%;
    border: 2px solid var(--lex-primary);
    transition: transform 0.2s ease-in-out;
}

.user-avtar:hover {
    transform: scale(1.05);
}

.avtar {
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

/* Animations et effets */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* États de chargement */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--lex-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages flash */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash-message {
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Styles spécifiques LEX */
.destination-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.destination-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.session-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
}

.tips-category {
    border-left: 4px solid var(--lex-primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.journal-entry {
    border-radius: 12px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.incident-card {
    border-left: 4px solid;
    border-radius: 8px;
}

.incident-card.incident-mineur {
    border-left-color: var(--lex-info);
}

.incident-card.incident-majeur {
    border-left-color: var(--lex-warning);
}

.incident-card.incident-critique {
    border-left-color: var(--lex-danger);
}

/* Utilitaires */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.border-radius-lg {
    border-radius: 12px;
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bg-soft-primary {
    background-color: rgba(79, 70, 229, 0.1);
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-soft-danger {
    background-color: rgba(239, 68, 68, 0.1);
}