/* Styles personnalisés pour la Foire Agricole - Compléments Tailwind CSS */

/* Variables personnalisées déjà définies dans Tailwind config */
:root {
    --green-primary: #0D6C3D;
    --green-light: #2E8B57;
    --green-dark: #0A4F2D;
    --black-primary: #1E1E1C;
    --black-light: #2D2D2B;
    --accent: #FFD700;
}

/* Animations personnalisées */
@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

/* Classes utilitaires personnalisées */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.float-animation {
    animation: float 20s infinite linear;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Effets de survol personnalisés */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(13, 108, 61, 0.2);
}

/* Zones colorées pour les produits */
.zone-maraicher {
    background-color: rgba(13, 108, 61, 0.1);
    border-left: 4px solid var(--green-primary);
}

.zone-vivrier {
    background-color: rgba(139, 69, 19, 0.1);
    border-left: 4px solid #8B4513;
}

.zone-proteine {
    background-color: rgba(204, 0, 0, 0.1);
    border-left: 4px solid #CC0000;
}

/* Styles pour les formulaires */
.form-input-custom {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input-custom:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(13, 108, 61, 0.1);
}

/* Boutons personnalisés */
.btn-custom-primary {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-light) 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 108, 61, 0.3);
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(13, 108, 61, 0.4);
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green-primary) 100%);
}

/* Cards personnalisées */
.card-custom {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Tables personnalisées */
.table-custom {
    border-radius: 10px;
    overflow: hidden;
}

.table-custom thead th {
    border-bottom: 2px solid var(--green-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    background-color: var(--green-primary);
    color: white;
}

.table-custom tbody tr:hover {
    background-color: rgba(13, 108, 61, 0.05);
}

/* Alertes personnalisées */
.alert-success-custom {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid var(--green-primary);
    border-radius: 10px;
    padding: 16px;
}

.alert-danger-custom {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 5px solid #CC0000;
    border-radius: 10px;
    padding: 16px;
}

/* Section sponsor */
.sponsor-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
}

.pack-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--green-primary), var(--accent), var(--green-primary));
}

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

.pack-featured {
    border: 3px solid var(--accent);
    transform: scale(1.05);
}

.pack-featured::after {
    content: 'RECOMMANDÉ';
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--green-primary);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-custom {
        margin-bottom: 20px;
    }
    
    .table-custom {
        font-size: 0.9rem;
    }
    
    .btn-custom-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--green-dark);
}

/* Focus accessibility */
.focus-visible:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Transitions globales */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
