/* Custom styles for Padel Academy Corfu */

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

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

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

/* Enhanced form styles */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: var(--padel-primary);
    box-shadow: 0 0 0 3px rgba(0, 138, 149, 0.1);
}

/* Custom button effects */
.btn-primary {
    background: linear-gradient(135deg, var(--padel-primary), var(--padel-secondary));
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--padel-secondary), #005a61);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 138, 149, 0.3);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Enhanced navigation */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--padel-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Loading animations */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top: 2px solid var(--padel-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Updated color palette */
:root {
    --padel-primary: #008a95;
    --padel-secondary: #006b74;
    --padel-accent: #00a8b5;
}

/* Enhanced form sections */
.form-section {
    animation: fadeInUp 0.6s ease forwards;
}

.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }
.form-section:nth-child(4) { animation-delay: 0.3s; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--padel-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--padel-secondary);
}

/* Responsive table */
.table-responsive {
    overflow-x: auto;
}

.table-responsive table {
    min-width: 600px;
}

/* Enhanced notifications */
.notification-enter {
    animation: slideInLeft 0.5s ease forwards;
}

.notification-exit {
    animation: slideInLeft 0.5s ease reverse forwards;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f9fafb;
    border-radius: 8px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
    
    .mobile-p-2 {
        padding: 0.5rem;
    }
}

/* Logo styles */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-natural {
    /* Logo naturel sans filtre de couleur */
}

/* Hero logo centered with Padel Academy text */
.hero-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    margin-right: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-padel-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #008a95;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.025em;
}

@media (max-width: 768px) {
    .hero-logo {
        width: 60px;
        height: 60px;
        margin-right: 0.75rem;
    }
    
    .hero-padel-text {
        font-size: 1.75rem;
    }
}

/* Système de créneaux avancé */
.time-slot {
    padding: 8px 4px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-slot.off-hours {
    background-color: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.time-slot.peak {
    background-color: #fbbf24;
    color: #92400e;
    border-color: #f59e0b;
}

.time-slot.off-peak {
    background-color: #34d399;
    color: #065f46;
    border-color: #10b981;
}

.time-slot:hover:not(.off-hours) {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.time-slot.peak:hover {
    background-color: #f59e0b;
}

.time-slot.off-peak:hover {
    background-color: #10b981;
}

#slotsGrid {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 768px) {
    #slotsGrid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .time-slot {
        font-size: 10px;
        padding: 6px 2px;
        min-height: 36px;
    }
}

/* Styles pour la popup résumé */
#summaryPopup {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#summaryPopup .bg-white {
    animation: slideInUp 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Styles pour les métriques gradient */
.gradient-metric {
    background: linear-gradient(135deg, var(--color-start), var(--color-end));
}

/* Styles pour les graphiques */
.chart-container {
    position: relative;
    height: 250px;
}

/* Animation pour les points forts */
#projectStrengths .flex {
    transition: all 0.3s ease;
}

#projectStrengths .flex:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Styles pour le tableau des projections */
#projectionTable {
    font-size: 0.875rem;
}

#projectionTable thead th {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    position: sticky;
    top: 0;
}

#projectionTable tbody tr:hover {
    background-color: #f8fafc;
}

/* Animation des boutons de partage */
.sharing-button {
    transition: all 0.3s ease;
}

.sharing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Système de financement restructuré */
#financingSummary {
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

#financingSummary.balanced {
    background-color: #f0fdf4;
    border-color: #22c55e;
}

#financingSummary.unbalanced {
    background-color: #fef2f2;
    border-color: #ef4444;
}

.financing-source {
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.financing-source:hover {
    border-color: #008a95;
    box-shadow: 0 2px 8px rgba(0, 138, 149, 0.1);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Hero banner styles */
.hero-banner {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content-bg {
    background: linear-gradient(135deg, var(--padel-primary), var(--padel-secondary));
}

/* Enhanced hero section */
.hero-bg {
    background: linear-gradient(135deg, var(--padel-primary), var(--padel-secondary));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Compact form layout */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.form-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Responsive form grids */
@media (max-width: 1024px) {
    .form-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid-3,
    .form-grid-4,
    .form-grid-5 {
        grid-template-columns: 1fr;
    }
}

/* Compact input styling */
.form-input-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    height: 2.5rem;
}

/* Layout 80-20 */
.main-content-80 {
    width: 78%;
}

.sidebar-20 {
    width: 20%;
}

@media (max-width: 1024px) {
    .main-content-80,
    .sidebar-20 {
        width: 100%;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Form validation styles */
.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.input-success {
    border-color: var(--padel-primary) !important;
    background-color: #f0fdff;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Enhanced checkboxes */
.custom-checkbox {
    position: relative;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"]:checked {
    background: var(--padel-primary);
    border-color: var(--padel-primary);
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Statistics cards */
.stat-card {
    background: linear-gradient(135deg, rgba(0, 138, 149, 0.1), rgba(0, 107, 116, 0.05));
    border-left: 4px solid var(--padel-primary);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(0, 138, 149, 0.15), rgba(0, 107, 116, 0.1));
    transform: translateX(5px);
}

/* Progress bars */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--padel-primary), var(--padel-accent));
    border-radius: 4px;
    transition: width 1s ease;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animated icons */
.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-15px);
    }
    70% {
        transform: translateY(-7px);
    }
    90% {
        transform: translateY(-3px);
    }
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    margin: 3rem 0;
}

/* Enhanced forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--padel-primary);
    box-shadow: 0 0 0 3px rgba(0, 138, 149, 0.1);
}

/* Success states */
.success-pulse {
    animation: pulse 2s infinite;
}

.success-border {
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f4f6;
    border-top: 6px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for keyboard navigation */
.focus-ring:focus {
    outline: 2px solid var(--padel-primary);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Enhanced table styles */
.data-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(16, 185, 129, 0.02);
}

/* Custom sliders for equipment */
.slider {
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    outline: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--padel-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: var(--padel-secondary);
    transform: scale(1.1);
}

.slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider:disabled::-webkit-slider-thumb {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Compact form styles */
.compact-grid {
    display: grid;
    gap: 0.5rem;
}

.compact-input {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.compact-input:focus {
    outline: none;
    border-color: var(--padel-primary);
    box-shadow: 0 0 0 2px rgba(0, 138, 149, 0.1);
}

.compact-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Equipment card styling */
.equipment-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.equipment-card:hover {
    background: #f3f4f6;
    border-color: var(--padel-primary);
}

.equipment-card.active {
    background: rgba(0, 138, 149, 0.05);
    border-color: var(--padel-primary);
}