/* Styles personnalisés pour Resinet */

/* Variables CSS personnalisées */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --success-500: #10b981;
    --success-600: #059669;
    
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Polices personnalisées */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Animations personnalisées */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Classes d'animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Boutons personnalisés */
.btn {
    @apply inline-flex items-center justify-center px-4 py-2 rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
}

.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-900 hover:bg-gray-300 focus:ring-gray-500;
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
}

.btn-warning {
    @apply bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-500;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
}

/* Cartes personnalisées */
.card {
    @apply bg-white rounded-lg shadow-md overflow-hidden;
}

.card-hover {
    @apply transition-all duration-300 hover:shadow-xl hover:-translate-y-1;
}

/* Formulaires */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors;
}

.form-input:focus {
    @apply outline-none;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors bg-white;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors resize-vertical;
}

.form-checkbox {
    @apply h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded;
}

.form-radio {
    @apply h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300;
}

/* Messages d'erreur et de succès */
.error-message {
    @apply text-red-600 text-sm mt-1;
}

.success-message {
    @apply text-green-600 text-sm mt-1;
}

/* Navigation */
.nav-link {
    @apply text-gray-700 hover:text-blue-600 transition-colors duration-200;
}

.nav-link.active {
    @apply text-blue-600 border-b-2 border-blue-600;
}

/* Dropdown menus */
.dropdown {
    @apply relative;
}

.dropdown-menu {
    @apply absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 z-50;
}

.dropdown-item {
    @apply block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors;
}

/* Modals */
.modal-overlay {
    @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50;
}

.modal {
    @apply bg-white rounded-lg p-6 max-w-md mx-4 max-h-screen overflow-y-auto;
}

/* Notifications/Toast */
.toast {
    @apply fixed top-4 right-4 z-50 max-w-sm p-4 rounded-lg shadow-lg transition-all duration-300;
}

.toast-success {
    @apply bg-green-100 border border-green-400 text-green-700;
}

.toast-error {
    @apply bg-red-100 border border-red-400 text-red-700;
}

.toast-warning {
    @apply bg-yellow-100 border border-yellow-400 text-yellow-700;
}

.toast-info {
    @apply bg-blue-100 border border-blue-400 text-blue-700;
}

/* Badges */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

.badge-gray {
    @apply bg-gray-100 text-gray-800;
}

/* Tables */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table-striped tbody tr:nth-child(even) {
    @apply bg-gray-50;
}

.table-hover tbody tr:hover {
    @apply bg-gray-100;
}

/* Loading spinner */
.spinner {
    @apply animate-spin rounded-full border-4 border-gray-200 border-t-blue-600;
}

/* Pagination */
.pagination {
    @apply flex items-center justify-center space-x-1;
}

.pagination-item {
    @apply px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 hover:bg-gray-50 hover:text-gray-700 transition-colors;
}

.pagination-item.active {
    @apply text-blue-600 bg-blue-50 border-blue-500;
}

.pagination-item:first-child {
    @apply rounded-l-md;
}

.pagination-item:last-child {
    @apply rounded-r-md;
}

/* Breadcrumb */
.breadcrumb {
    @apply flex items-center space-x-2 text-sm text-gray-600;
}

.breadcrumb-item {
    @apply flex items-center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    @apply ml-2 text-gray-400;
}

/* Progress bar */
.progress {
    @apply w-full bg-gray-200 rounded-full;
}

.progress-bar {
    @apply bg-blue-600 text-xs font-medium text-blue-100 text-center p-0.5 leading-none rounded-full transition-all duration-300;
}

/* Cards spécialisées pour les propriétés */
.property-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden transition-all duration-300 hover:shadow-xl hover:-translate-y-1;
}

.property-card-image {
    @apply h-48 bg-gray-200 relative overflow-hidden;
}

.property-card-badge {
    @apply absolute top-2 left-2 px-2 py-1 rounded-full text-xs font-semibold;
}

.property-card-content {
    @apply p-6;
}

.property-card-title {
    @apply text-xl font-semibold text-gray-900 mb-2;
}

.property-card-location {
    @apply flex items-center text-gray-600 mb-3;
}

.property-card-price {
    @apply text-2xl font-bold text-blue-600;
}

/* Dashboards */
.dashboard-widget {
    @apply bg-white rounded-lg shadow-md p-6;
}

.dashboard-stat {
    @apply text-center;
}

.dashboard-stat-number {
    @apply text-3xl font-bold mb-2;
}

.dashboard-stat-label {
    @apply text-gray-600;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
}

@media (min-width: 641px) {
    .mobile-only {
        display: none;
    }
}

/* Utility classes supplémentaires */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus visible pour l'accessibilité */
.focus-visible:focus {
    @apply outline-none ring-2 ring-blue-500 ring-offset-2;
}

/* Animations de chargement */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Effets hover pour les cartes */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift: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);
}

/* Styles pour les maps */
.map-container {
    @apply relative w-full h-96 bg-gray-200 rounded-lg overflow-hidden;
}

.map-marker {
    @apply absolute bg-blue-600 text-white p-2 rounded-full shadow-lg transform -translate-x-1/2 -translate-y-1/2;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
}

/* Styles pour les formulaires de recherche */
.search-form {
    @apply bg-white rounded-lg shadow-lg p-6;
}

.search-filters {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4;
}

/* Styles pour la pagination */
.pagination-wrapper {
    @apply flex items-center justify-between mt-8;
}

.pagination-info {
    @apply text-sm text-gray-700;
}

/* Styles pour les notifications en temps réel */
.notification-badge {
    @apply absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full w-5 h-5 flex items-center justify-center;
}

/* Styles pour les tooltips */
.tooltip {
    @apply absolute z-50 px-2 py-1 text-sm text-white bg-gray-900 rounded-md shadow-lg opacity-0 pointer-events-none transition-opacity duration-200;
}

.tooltip.show {
    @apply opacity-100;
}

/* Styles pour les drag and drop */
.dropzone {
    @apply border-2 border-dashed border-gray-300 rounded-lg p-8 text-center transition-colors;
}

.dropzone.dragover {
    @apply border-blue-500 bg-blue-50;
}

/* Styles pour les étapes */
.steps {
    @apply flex items-center space-x-4;
}

.step {
    @apply flex items-center space-x-2;
}

.step-number {
    @apply w-8 h-8 rounded-full bg-gray-200 text-gray-600 flex items-center justify-center text-sm font-medium;
}

.step.active .step-number {
    @apply bg-blue-600 text-white;
}

.step.completed .step-number {
    @apply bg-green-600 text-white;
}

/* Responsive text */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.text-responsive-large {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

/* Animations CSS personnalisées */
.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}