/**
 * Styles modernes pour l'administration TEPI
 * - Ombres douces et diffuses (elevation)
 * - Icônes Lucide (line style)
 * - Boutons arrondis
 * - Pas de bordures grises visibles
 */

/* ========== OMBRES DOUCES (ELEVATION) ========== */
.shadow-soft {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}
.shadow-soft-md {
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.08);
}
.shadow-soft-lg {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.1);
}

/* ========== ANIMATIONS HOVER ========== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 20px 48px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* ========== ICÔNES LUCIDE ========== */
.lucide {
    stroke-width: 1.5;
}
.lucide-sm {
    width: 16px;
    height: 16px;
}
.lucide-md {
    width: 20px;
    height: 20px;
}
.lucide-lg {
    width: 24px;
    height: 24px;
}
.lucide-xl {
    width: 28px;
    height: 28px;
}

/* ========== BOUTONS MODERNES ========== */
.btn-modern {
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}
.btn-modern:hover {
    transform: translateY(-1px);
}
.btn-pill {
    border-radius: 9999px;
}

/* ========== CARTES MODERNES ========== */
.card-modern {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}

/* ========== INPUTS MODERNES ========== */
.input-modern {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.input-modern:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 6px rgba(0,0,0,0.06);
}

/* ========== TABLES MODERNES ========== */
.table-modern {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}
.table-modern th {
    background: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #64748b;
}
.table-modern td {
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
}
.table-modern tr:hover td {
    background: rgba(248, 250, 252, 0.5);
}

/* ========== ALERTES MODERNES ========== */
.alert-modern {
    border-radius: 1rem;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}
.alert-modern.alert-danger {
    background: #fef2f2;
    border-left-color: #ef4444;
}
.alert-modern.alert-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}
.alert-modern.alert-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}
.alert-modern.alert-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

/* ========== BADGES MODERNES ========== */
.badge-modern {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ========== BACKGROUND GRADIENT ========== */
.bg-gradient-subtle {
    background: #f8fafc;
}

/* ========== HEADER MODERNE ========== */
.header-modern {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ========== STAT CARDS ========== */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 20px 48px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}
.stat-card .stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* ========== QUICK ACCESS CARDS ========== */
.quick-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
}
.quick-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 20px 48px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.quick-card .card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

/* ========== FORMULAIRES ========== */
.form-group-modern label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}
.form-group-modern input,
.form-group-modern select,
.form-group-modern textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.form-group-modern input:focus,
.form-group-modern select:focus,
.form-group-modern textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 6px rgba(0,0,0,0.06);
}

/* ========== OVERRIDE BORDURES PAR DÉFAUT ========== */
.border-gray-200 {
    border-color: transparent !important;
}
.border {
    border-width: 0 !important;
}

/* ========== SÉPARATEURS DOUX ========== */
.divide-y > * + * {
    border-top: 1px solid #f1f5f9 !important;
}
.divide-y.divide-gray-100 > * + * {
    border-top-color: #f1f5f9 !important;
}
.divide-y.divide-gray-200 > * + * {
    border-top-color: #e5e7eb !important;
}

/* ========== MODAL MODERNE ========== */
.modal-modern {
    border-radius: 1.5rem;
    box-shadow: 0 24px 48px rgba(0,0,0,0.15), 0 48px 96px rgba(0,0,0,0.2);
}
.modal-modern .modal-header {
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    padding: 1.5rem;
}
.modal-modern .modal-body {
    padding: 1.5rem;
}
.modal-modern .modal-footer {
    border-top: 1px solid rgba(241, 245, 249, 0.8);
    padding: 1rem 1.5rem;
}

/* ========== CLASSES DE BASE (pour compatibilité) ========== */
body { font-family: system-ui, -apple-system, sans-serif; color: #1e293b; }
.card { background: white; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06); margin-bottom: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9; }
.card-header h2 { font-size: 1.125rem; font-weight: 600; color: #1e293b; margin: 0; }
.card-body { padding: 1.5rem; }

.btn { padding: 0.625rem 1.25rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; border: none; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-icon { width: 2rem; height: 2rem; padding: 0; border-radius: 0.375rem; display: inline-flex; align-items: center; justify-content: center; }

/* ========== COULEURS TAILWIND MANQUANTES (fallback) ========== */
/* Ces règles garantissent que les boutons sont toujours visibles */
.bg-cyan-600 { background-color: #0891b2 !important; }
.bg-cyan-700 { background-color: #0e7490 !important; }
.bg-cyan-50 { background-color: #ecfeff !important; }
.bg-emerald-600 { background-color: #059669 !important; }
.bg-emerald-700 { background-color: #047857 !important; }
.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-teal-600 { background-color: #0d9488 !important; }
.bg-teal-700 { background-color: #0f766e !important; }
.bg-teal-50 { background-color: #f0fdfa !important; }
.bg-amber-600 { background-color: #d97706 !important; }
.bg-amber-700 { background-color: #b45309 !important; }
.bg-amber-50 { background-color: #fffbeb !important; }
.bg-purple-600 { background-color: #9333ea !important; }
.bg-purple-700 { background-color: #7e22ce !important; }
.bg-blue-600 { background-color: #2563eb !important; }
.bg-blue-700 { background-color: #1d4ed8 !important; }
.bg-red-600 { background-color: #dc2626 !important; }
.bg-red-700 { background-color: #b91c1c !important; }
.bg-gray-500 { background-color: #6b7280 !important; }
.bg-gray-600 { background-color: #4b5563 !important; }
.bg-gray-700 { background-color: #374151 !important; }
.bg-green-600 { background-color: #16a34a !important; }
.bg-green-700 { background-color: #15803d !important; }
.bg-orange-600 { background-color: #ea580c !important; }
.bg-orange-700 { background-color: #c2410c !important; }
.bg-indigo-600 { background-color: #4f46e5 !important; }
.bg-indigo-700 { background-color: #4338ca !important; }
.text-white { color: white !important; }

/* ========== SELECTS PERSONNALISÉS ========== */
.select-custom {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2212%22 height%3D%2212%22 viewBox%3D%220 0 12 12%22%3E%3Cpath fill%3D%22%236b7280%22 d%3D%22M2.5 4.5L6 8l3.5-3.5%22 stroke%3D%22%236b7280%22 stroke-width%3D%221.5%22 fill%3D%22none%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E') !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    padding-right: 2rem !important;
    background-color: #f9fafb !important;
    color: #1f2937 !important;
}

/* ========== INPUT RECHERCHE ========== */
.input-search {
    padding-left: 2.5rem !important;
}
.input-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
}

/* ========== BOUTONS AVEC STYLES INLINE OVERRIDE ========== */
.btn-preview {
    background-color: #6b7280 !important;
    color: white !important;
}
.btn-preview:hover {
    background-color: #4b5563 !important;
}
.btn-emit {
    background-color: #059669 !important;
    color: white !important;
}
.btn-emit:hover {
    background-color: #047857 !important;
}

.table { width: 100%; border-collapse: collapse; }
.table thead { background: #f8fafc; }
.table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.table td { padding: 0.875rem 1rem; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: rgba(248, 250, 252, 0.5); }
.text-right { text-align: right; }
.text-center { text-align: center; }

.alert { padding: 1rem 1.25rem; border-radius: 0.75rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #22c55e; }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-content { background: white; border-radius: 1rem; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 48px rgba(0,0,0,0.15); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 1.25rem; font-weight: 600; margin: 0; }
.modal-header .close { font-size: 1.5rem; cursor: pointer; background: none; border: none; color: #64748b; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #f1f5f9; display: flex; gap: 0.75rem; justify-content: flex-end; }

.form-control { width: 100%; padding: 0.625rem 0.875rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.875rem; }
.form-control:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.content-header h1 { font-size: 1.875rem; font-weight: 700; color: #1e293b; margin: 0; display: flex; align-items: center; gap: 0.75rem; }
.content-header .subtitle { font-size: 0.875rem; color: #64748b; margin: 0.25rem 0 0 0; }
