/* 
* Style principal pour le site "Jus d'cul d'abeille"
* Un site moderne et responsive pour une micro-entreprise de miel
*/

/* Variables */
:root {
    --primary: #FFA000;       /* Jaune miel */
    --primary-dark: #F57F17;  /* Miel foncé */
    --primary-light: #FFD54F; /* Miel clair */
    --secondary: #8D6E63;     /* Brun miel */
    --dark: #212121;          /* Noir */
    --light: #FFFFFF;         /* Blanc */
    --gray: #F5F5F5;          /* Gris clair */
    --gray-dark: #757575;     /* Gris foncé */
    --success: #4CAF50;       /* Vert */
    --danger: #F44336;        /* Rouge */
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Réinitialisation et styles de base */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.section-padding {
    padding: var(--section-padding);
}

.section-header {
    margin-bottom: 50px;
}

.section-header h1, .section-header h2, .section-header h3 {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 700;
}

.section-header h1:after, .section-header h2:after, .section-header h3:after {
    content: '';
    position: absolute;
    background-color: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-header h1:after {
    width: 60px;
    height: 3px;
    bottom: -12px;
}

.section-header h2:after {
    width: 50px;
    height: 3px;
    bottom: -10px;
}

.section-header h3:after {
    width: 40px;
    height: 2px;
    bottom: -8px;
}

.section-header p {
    color: var(--gray-dark);
    max-width: 700px;
    margin: 0 auto;
}

/* Header */
.pre-header {
    font-size: 0.9rem;
}

.pre-header a {
    color: var(--gray-dark);
}

.pre-header a:hover {
    color: var(--primary);
}

.navbar {
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 60px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-light .navbar-nav .nav-link:hover, 
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-light .navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover:after, 
.navbar-light .navbar-nav .nav-link.active:after {
    width: 70%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-image {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    padding: 100px 0;
    color: var(--light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--light);
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--light);
    opacity: 0.5;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
}

/* Intro Section */
.intro .image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.intro .image-wrapper img {
    transition: var(--transition);
}

.intro .image-wrapper:hover img {
    transform: scale(1.05);
}

.intro h1, .intro h2, .intro h3 {
    position: relative;
    margin-bottom: 30px;
    font-weight: 700;
}

.intro h1:after, .intro h2:after, .intro h3:after {
    content: '';
    position: absolute;
    background-color: var(--primary);
    left: 0;
}

.intro h1:after {
    width: 60px;
    height: 3px;
    bottom: -18px;
}

.intro h2:after {
    width: 50px;
    height: 3px;
    bottom: -15px;
}

.intro h3:after {
    width: 40px;
    height: 2px;
    bottom: -12px;
}

/* Styles généraux pour les titres dans les sections principales */
.section-padding h1,
.section-padding h2,
.section-padding h3 {
    position: relative;
    margin-bottom: 30px;
    font-weight: 700;
}

.section-padding h1:after,
.section-padding h2:after,
.section-padding h3:after {
    content: '';
    position: absolute;
    background-color: var(--primary);
    left: 0;
}

.section-padding h1:after {
    width: 60px;
    height: 3px;
    bottom: -18px;
}

.section-padding h2:after {
    width: 50px;
    height: 3px;
    bottom: -15px;
}

.section-padding h3:after {
    width: 40px;
    height: 2px;
    bottom: -12px;
}

/* Centrer les traits pour les titres déjà centrés */
.section-padding .text-center h1:after,
.section-padding .text-center h2:after,
.section-padding .text-center h3:after,
.section-padding h1.text-center:after,
.section-padding h2.text-center:after,
.section-padding h3.text-center:after {
    left: 50%;
    transform: translateX(-50%);
}

/* Exceptions - Pas de liserets pour les titres dans les FAQ et accordéons */
.faq-section h1:after,
.faq-section h2:after,
.faq-section h3:after,
.accordion h1:after,
.accordion h2:after,
.accordion h3:after,
.accordion-item h1:after,
.accordion-item h2:after,
.accordion-item h3:after,
.accordion-header h1:after,
.accordion-header h2:after,
.accordion-header h3:after {
    display: none;
}

/* Products Section */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card img {
    height: 250px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-weight: 700;
    margin-bottom: 15px;
}

/* News Section */
.news-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-card img {
    height: 220px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .card-title {
    font-weight: 700;
    margin-bottom: 15px;
}

.news-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* News Carousel modifications pour les images portrait */
.news-carousel {
    margin-bottom: 30px;
    width: 100%; /* S'assurer que le carousel prend toute la largeur */
}

/* Le conteneur de slide doit être positionné correctement */
.news-carousel .swiper-slide {
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Les images doivent être au-dessus du flou */
.news-carousel .swiper-slide img {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 5; /* Z-index élevé pour être au-dessus du flou */
}

/* Styles spécifiques pour les images portrait */
.news-carousel .swiper-slide.portrait-image {
    background-size: cover !important;
    background-position: center !important;
}

/* Effet de flou en arrière-plan pour les images portrait */
.news-carousel .swiper-slide.portrait-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.7);
    transform: scale(1.1);
    z-index: 1; /* Assurez-vous que c'est inférieur au z-index des images */
    pointer-events: none; /* IMPORTANT: Laisse passer les clics à travers le flou */
}

/* Style pour les images zoomables et leurs conteneurs */
.news-image-container {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
    z-index: 5; /* Z-index élevé pour être au-dessus du flou */
}

.news-image-zoomable {
    transition: transform 0.3s ease;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 5; /* Z-index élevé pour être au-dessus du flou */
}

.news-image-container:hover .news-image-zoomable {
    transform: scale(1.03);
}

/* Quick Contact Section */
.quick-contact {
    background-color: var(--primary);
}

.quick-contact h2 {
    font-weight: 700;
    margin-bottom: 10px;
}

/* About Page */
.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.team-member {
    text-align: center;
    margin-bottom: 30px;
}

.team-member img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.team-member h5 {
    margin-bottom: 5px;
    font-weight: 700;
}

.team-member .position {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.team-member .social-icons {
    margin-top: 15px;
}

.team-member .social-icons a {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    background-color: var(--gray);
    color: var(--dark);
    border-radius: 50%;
    margin: 0 5px;
    transition: var(--transition);
}

.team-member .social-icons a:hover {
    background-color: var(--primary);
    color: var(--light);
}

/* Products Page */
.product-detail {
    margin-bottom: 50px;
}

.product-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.product-info h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 30px;
}

/* News Detail Page */
.news-detail-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.news-detail-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.news-detail-header {
    margin-bottom: 30px;
}

.news-detail-header .news-date {
    margin-bottom: 10px;
}

.news-detail-header h2 {
    font-weight: 700;
    margin-bottom: 0;
}

/* Contact Page */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-info-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
}

.contact-info-content h5 {
    font-weight: 700;
    margin-bottom: 5px;
}

.contact-form .form-control {
    border-radius: var(--border-radius);
    padding: 0.8rem 1.2rem;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.contact-form .form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.contact-form textarea.form-control {
    min-height: 150px;
}

/* Footer */
.site-footer {
    background-color: var(--dark);
    color: #bdbdbd;
    position: relative; /* S'assurer que le footer est correctement positionné */
    width: 100%;        /* Garantir que le footer prend toute la largeur */
}

.footer-main {
    padding: 70px 0 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-heading {
    color: var(--light);
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

.footer-heading:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--primary);
    bottom: -10px;
    left: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdbdbd;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-info li i {
    margin-right: 10px;
    color: var(--primary);
}

.social-icons li {
    margin-right: 10px;
}

.social-icons a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary);
    color: var(--light);
}

.newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
}

.bg-darker {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--primary);
    color: var(--light);
    border-radius: 50%;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    color: var(--light);
    transform: translateY(-5px);
}

/* Témoignages */
.testimonial-card {
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.testimonial-rating i {
    color: var(--primary);
    margin-right: 2px;
}

/* Styles pour les étoiles de notation */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    padding: 0 0.1rem;
}

.rating-stars label:hover,
.rating-stars label:hover ~ label,
.rating-stars input:checked ~ label {
    color: var(--primary);
}

/* Styles pour les cartes d'actualités cliquables */
.card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

.card-link-wrapper:hover .news-card {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-link-wrapper:hover .card-title {
    color: var(--primary);
}

.card-link-wrapper .btn-link {
    color: var(--primary);
    padding-left: 0;
}

/* Style pour la modal des images */
#imageModal .modal-dialog {
    max-width: 90vw;
}

#imageModal .modal-content {
    background-color: rgba(255, 255, 255, 0.95);
}

#modalImage {
    max-height: 80vh;
    object-fit: contain;
}

/* Styles améliorés pour l'accordion/FAQ */
.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: var(--light);
    width: 100%;
}

.accordion-header {
    margin: 0;
    width: 100%;
}

.accordion-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    text-align: left;
    background-color: var(--light);
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: rgba(255, 160, 0, 0.05);
    box-shadow: none;
}

/* Correction pour la flèche de l'accordéon */
.accordion-button::after {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFA000'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    background-position: center;
    transition: transform .2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}

.accordion-body {
    padding: 1rem 1.25rem;
    background-color: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Animation plus fluide */
.accordion-collapse {
    transition: height 0.35s ease;
}

/* Notification de copie */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.copy-notification.fade-out {
    opacity: 0;
}

/* Style pour les cartes de recettes (comme news-card) */
.recipe-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Image occupe toute la largeur comme pour news-card */
.recipe-card .card-img-top {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.recipe-card .card-body {
    padding: 1.5rem;
}

.recipe-card .card-title {
    font-weight: 700;
    margin-bottom: 15px;
}

/* Ces styles peuvent être conservés si nécessaire */
.recipe-image-container {
    text-align: center;
    max-width: 100%;
}

.recipe-image-zoomable {
    max-height: 500px;
    width: auto;
    margin: 0 auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.recipe-image-zoomable:hover {
    transform: scale(1.03);
}

/* Style pour les images par défaut des recettes */
.default-recipe-image {
    max-width: 222px;
    max-height: 222px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Modifier le comportement des swiper pour éviter les débordements */
.swiper-container {
    width: 100%;
    overflow: hidden;
}

.swiper-wrapper {
    width: 100%;
}

/* S'assurer que toutes les sections et conteneurs respectent la largeur */
main, section, .container, .container-fluid, .row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeInUp 1s ease;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .navbar-collapse {
        background-color: var(--light);
        padding: 15px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        border-radius: var(--border-radius);
    }
    
    /* Assurer que les images et tableaux ne débordent pas */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767.98px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .footer-heading {
        margin-top: 30px;
    }
    
    .news-carousel img {
        max-height: 300px;
    }
    
    /* S'assurer que les images sont correctement dimensionnées sur mobile */
    img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 575.98px) {
    .hero {
        height: 60vh;
    }
    
    .hero-image {
        height: 60vh;
    }
    
    .hero-content {
        padding: 50px 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .news-carousel img {
        max-height: 250px;
    }
    
    /* Ajustement pour les colonnes sur les très petits écrans */
    .col-6 {
        max-width: 100%;
    }
}