/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variables de couleur */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --accent-green: #10b981;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

/* Styles globaux */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Sidebar */
.sidebar-custom {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3730a3 100%);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.4s;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

table td, table th {
    padding: 0.75rem 1.5rem;
}

table tbody tr:hover {
    background-color: #f9fafb;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 42rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-custom {
        transform: translateX(-100%);
    }
    
    .sidebar-custom.translate-x-0 {
        transform: translateX(0);
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--secondary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.text-primary { color: var(--primary-blue); }
.text-secondary { color: var(--text-secondary); }
.bg-primary { background-color: var(--primary-blue); }
.bg-secondary { background-color: var(--secondary-blue); }
