/* ===========================
   TIC HARMONY - CUSTOM STYLES
   =========================== */

/* Variables CSS */
:root {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-yellow: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Classes utilitaires */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease-out;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-pulse-custom {
    animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Glassmorphism amélioré */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

.glass-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(44, 62, 80, 0.04);
}

/* Boutons améliorés */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-blue-hover) 0%, #1e3a8a 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Input améliorés */
.input-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background: white;
    font-size: 1rem;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.input-modern.error {
    border-color: var(--error-red);
    animation: shake 0.5s;
}

.input-modern.success {
    border-color: var(--success-green);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 5rem;
    right: 1rem;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    color: white;
}

.toast.error {
    background: linear-gradient(135deg, var(--error-red) 0%, #dc2626 100%);
    color: white;
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning-yellow) 0%, #d97706 100%);
    color: white;
}

.toast.info {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1d4ed8 100%);
    color: white;
}

/* Spinner de chargement */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

/* Cards avec hover effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Badge de statut */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Amélioration des transitions globales */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-overlay .spinner-large {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1s linear infinite;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .toast {
        right: 0.5rem;
        left: 0.5rem;
        min-width: auto;
    }
}
