// ============================================
// FILE: assets/css/style.css
// ============================================
/* Styles personnalisés pour le site de recettes */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.banner-container {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cards hover effect */
.hover-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Tables */
.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

/* Animation pour les alertes */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        
    }
    to {
        opacity: 1;
        transform: translateY(-0px);
    }
}

/* Styles pour l'impression */
@media print {
    /* Masquer les éléments non nécessaires à l'impression */
    .banner-container,
    footer,
    .no-print,
    .print-button,
    .btn:not(.keep-print),
    .alert-dismissible,
    form,
    .modal {
        display: none !important;
    }
    
    /* Optimiser la mise en page pour l'impression */
    body {
        font-size: 11pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    /* Éviter les sauts de page au milieu des éléments */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
        color: #000;
    }
    
    .card {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin-bottom: 1rem;
    }
    
    .card-header {
        background-color: #f0f0f0 !important;
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: avoid;
        border-collapse: collapse;
    }
    
    table td, table th {
        border: 1px solid #ddd;
        padding: 8px;
    }
    
    /* Masquer les liens href pour l'impression */
    a[href]:after {
        content: none !important;
    }
    
    /* Marges de page */
    @page {
        margin: 1.5cm;
        size: A4;
    }
    
    /* Conteneur principal en pleine largeur */
    .container, .container-fluid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Badges en noir et blanc */
    .badge {
        border: 1px solid #000;
        color: #000 !important;
        background-color: #fff !important;
    }
    
    /* Améliorer la lisibilité des listes */
    .list-group-item {
        border: 1px solid #ddd;
        padding: 0.5rem;
    }
}

/* Style du bouton d'impression */
.print-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.print-button:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.print-button svg {
    width: 20px;
    height: 20px;
}
