/* Styles personnalisés pour l'application médicale Dr Camara */

/* Font Import */
body {
    font-family: 'Inter', sans-serif;
}

/* Animations personnalisées */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.8);
    }
}

@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-in {
    animation: slideIn 1s ease-out 0.5s both;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-wiggle {
    animation: wiggle 2s ease-in-out;
}

/* Animation delays for staggered effects */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Styles des boutons */
.btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply bg-white text-blue-600 border-2 border-blue-600 hover:bg-blue-600 hover:text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg;
}

/* Styles des cartes de service */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.25);
}

.service-card:hover::before {
    opacity: 1;
    animation: shine 1.5s ease-in-out;
}

/* Logo animation */
.logo-container {
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: rotate(360deg);
}

/* Avatar du docteur */
.doctor-avatar {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.doctor-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.doctor-avatar:hover::before {
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Styles des modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border: none;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

/* Effets de survol pour les éléments interactifs */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.2);
}

/* Styles pour les formulaires */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Navigation responsive */
@media (max-width: 768px) {
    .nav-mobile {
        display: block;
    }
    
    .nav-desktop {
        display: none;
    }
}

/* Styles pour le dashboard */
.dashboard-card {
    @apply bg-white rounded-xl shadow-lg p-6 hover:shadow-2xl transition-all duration-500 transform hover:-translate-y-2;
    position: relative;
    overflow: hidden;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s;
}

.dashboard-card:hover::after {
    left: 100%;
}

/* Animation d'apparition en cascade pour les cartes */
.dashboard-card.animate-cascade {
    animation: slideInUp 0.6s ease-out both;
}

.dashboard-card.animate-cascade:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card.animate-cascade:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card.animate-cascade:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card.animate-cascade:nth-child(4) { animation-delay: 0.4s; }

.dashboard-stat {
    @apply text-center p-6 bg-gradient-to-br from-blue-50 to-blue-100 rounded-xl;
}

.dashboard-stat-number {
    @apply text-3xl font-bold text-blue-600 mb-2;
}

.dashboard-stat-label {
    @apply text-gray-600 text-sm;
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1100;
    animation: notificationSlide 0.3s ease;
    max-width: 400px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Effets de hover avancés pour les boutons */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Animations de chargement personnalisées */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Effets de parallaxe léger */
.parallax-element {
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Gradient animé pour les backgrounds */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.gradient-animated {
    background: linear-gradient(-45deg, #dbeafe, #bfdbfe, #93c5fd, #60a5fa);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes notificationSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.notification-info {
    background-color: #3b82f6;
}

/* Styles pour les tableaux */
.table-container {
    @apply overflow-x-auto bg-white rounded-lg shadow-lg;
}

.data-table {
    @apply min-w-full divide-y divide-gray-200;
}

.data-table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.data-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.data-table tr:nth-child(even) {
    @apply bg-gray-50;
}

.data-table tr:hover {
    @apply bg-blue-50;
}

/* Styles pour les badges de statut */
.status-badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.status-en-attente {
    @apply bg-yellow-100 text-yellow-800;
}

.status-confirme {
    @apply bg-green-100 text-green-800;
}

.status-reporte {
    @apply bg-blue-100 text-blue-800;
}

.status-annule {
    @apply bg-red-100 text-red-800;
}

/* Styles pour les messages d'erreur */
.error-message {
    @apply text-red-600 text-sm mt-1;
}

/* Styles pour le loading spinner */
.spinner {
    @apply inline-block w-4 h-4 border-2 border-white border-t-transparent rounded-full;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive design amélioré */
@media (max-width: 1024px) {
    .dashboard-card {
        padding: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Navigation mobile */
    nav .flex {
        flex-wrap: wrap;
    }
    
    nav .hidden.md\\:flex {
        display: none !important;
    }
    
    /* Hero section mobile */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    /* Grilles responsive */
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    .grid.grid-cols-1.lg\\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    /* Statistiques dashboard mobile */
    .dashboard-stat {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-stat-number {
        font-size: 2rem;
    }
    
    /* Formulaires mobile */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1rem;
    }
    
    /* Boutons mobile */
    .flex.flex-col.sm\\:flex-row {
        flex-direction: column !important;
        gap: 0.75rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    /* Modales mobile */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Titres mobile */
    .text-5xl.lg\\:text-6xl {
        font-size: 2rem !important;
    }
    
    .text-4xl {
        font-size: 1.875rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    /* Cartes mobile */
    .service-card, .dashboard-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* Navigation sticky mobile */
    nav {
        padding: 0 1rem;
    }
    
    nav .max-w-7xl {
        padding: 0;
    }
    
    /* Formulaires mobile optimisés */
    input, select, textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    /* Spacing mobile */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-8 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Tables responsive */
    .table-container {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    /* Stats cards mobile stack */
    .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Très petits écrans */
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    .p-8 {
        padding: 1rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Logo mobile plus petit */
    .logo-container i {
        font-size: 1.5rem !important;
    }
    
    /* Avatar docteur mobile */
    .doctor-avatar {
        width: 200px !important;
        height: 200px !important;
    }
    
    .doctor-avatar i {
        font-size: 4rem !important;
    }
    
    /* Stats en colonne unique sur très petits écrans */
    .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

/* Améliorations tactiles */
@media (hover: none) and (pointer: coarse) {
    /* Styles pour appareils tactiles */
    .hover\\:shadow-2xl:hover {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
    
    .service-card:hover {
        transform: translateY(-4px);
    }
    
    .dashboard-card:hover {
        transform: translateY(-1px);
    }
    
    /* Augmenter la taille des boutons tactiles */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Améliorer l'accessibilité des liens */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Animation d'apparition optimisée pour mobile */
@media (max-width: 768px) {
    .animate-fade-in,
    .animate-slide-in,
    .animate-slide-in-up {
        animation-duration: 0.4s;
    }
}

/* Éviter les animations sur les appareils qui préfèrent un mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-pulse,
    .animate-bounce,
    .animate-heartbeat {
        animation: none !important;
    }
}

/* Animations au scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour les alertes personnalisées */
.alert {
    @apply p-4 rounded-lg mb-4;
}

.alert-success {
    @apply bg-green-100 border-green-500 text-green-700 border;
}

.alert-error {
    @apply bg-red-100 border-red-500 text-red-700 border;
}

.alert-info {
    @apply bg-blue-100 border-blue-500 text-blue-700 border;
}

.alert-warning {
    @apply bg-yellow-100 border-yellow-500 text-yellow-700 border;
}