/* Styles personnalisés pour AFRI-VOLAILLES */

:root {
    --primary-color: #2E7D32;
    --secondary-color: #4CAF50;
    --accent-color: #FFC107;
    --text-dark: #2C3E50;
    --bg-light: #F8F9FA;
    --border-radius: 10px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Boutons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.stats-card .card-body {
    text-align: center;
}

.stats-card i {
    opacity: 0.8;
}

/* Alertes */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Formulaires */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.input-group-text {
    background-color: var(--bg-light);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
}

/* Progress bars */
.progress {
    border-radius: var(--border-radius);
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: var(--border-radius);
    transition: width 0.6s ease;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Badges */
.badge {
    font-size: 0.8em;
    padding: 0.5em 0.8em;
    border-radius: 20px;
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 50px;
    bottom: -30px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: relative;
    z-index: 2;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 125, 50, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    margin-top: 50px;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

/* Styles pour les icônes du footer */
.footer h5 i {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .timeline-item {
        margin-left: 0;
    }
    
    .timeline-item::before {
        left: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --text-dark: #ffffff;
    }
    
    body {
        background-color: var(--bg-light);
        color: var(--text-dark);
    }
    
    .card {
        background-color: #2d2d2d;
        color: var(--text-dark);
    }
    
    .navbar {
        background-color: #2d2d2d !important;
    }
}

/* Animation pour les icônes */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.hero-icon {
    animation: iconFloat 3s ease-in-out infinite;
}

/* Responsive auth logo */
@media (max-width: 768px) {
    .auth-logo-container {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }

    .auth-logo-image {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .auth-logo-container {
        width: 55px;
        height: 55px;
        border-width: 2px;
    }

    .auth-logo-image {
        width: 51px;
        height: 51px;
    }
}

/* Logo pages d'authentification */
.auth-logo-container {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    flex-shrink: 0;
}

.auth-logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.auth-logo-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* Responsive auth logo */
@media (max-width: 768px) {
    .auth-logo-container {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
}

/* Carrousel d'actualités */
.carousel-item {
    transition: transform 0.8s ease-in-out;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: var(--primary-color);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

/* Effets sur les cartes d'actualités */
.carousel .card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.carousel .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Bouton play pour les vidéos */
.carousel .btn-lg.rounded-circle {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.carousel .btn-lg.rounded-circle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Badges pour les types de média */
.carousel .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Animation des titres */
.carousel .card-title a {
    transition: color 0.3s ease;
}

.carousel .card-title a:hover {
    color: var(--primary-color) !important;
}

/* Responsive pour le carrousel */
@media (max-width: 768px) {
    .carousel .card .row {
        flex-direction: column;
    }

    .carousel .card-body {
        padding: 1.5rem;
    }

    .carousel .btn-lg.rounded-circle {
        width: 60px;
        height: 60px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
}

/* Utilitaires */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--box-shadow);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

.transition-custom {
    transition: var(--transition);
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
        color: black;
    }
}
