/* --- Variables & Réglages Généraux --- */
:root {
    /* Couleurs Bartavel - Charte Graphique Officielle */
    --bartavel-olive: #999931;       /* Vert olive/kaki - Nature, outdoor */
    --bartavel-orange: #FF6633;      /* Orange/Rouge-orange - CTAs, accents */
    --bartavel-turquoise: #339999;   /* Turquoise/Vert d'eau - Éléments frais */
    --bartavel-marine: #349B9A;      /* Bleu marine - Textes importants */
    --bartavel-brown: #CC9966;       /* Marron - Chaleur, nature */
    --bartavel-grey: #CCCCCC;        /* Gris clair - Backgrounds */
    --bartavel-black: #000000;       /* Noir - Textes, contrastes */

    /* Couleurs héritées (compatibilité) */
    --primary-color: var(--bartavel-marine);
    --secondary-color: var(--bartavel-orange);
    --bs-primary: var(--primary-color);
    --bs-body-color: var(--bartavel-black);
    --bs-body-bg: #f8f9fa;

    /* Polices Bartavel - Charte Graphique Officielle */
    --font-titles: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;  /* Titres principaux (alternative NEW GOTHIC) */
    --font-subtitles: 'Oswald', sans-serif;                              /* Sous-titres */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;  /* Corps de texte */
    --font-accent: 'Domine', serif;                                      /* Accents de marque */

    --bs-body-font-family: var(--font-body);
}

/* --- Typographie Bartavel --- */

/* Titres principaux - Style NEW GOTHIC */
h1, .page-header h1, .hero h1, .main-title {
    font-family: var(--font-titles);
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--bartavel-marine);
}

/* Sous-titres - Oswald */
h2, h3, .subtitle {
    font-family: var(--font-subtitles);
    font-weight: 500;
    color: var(--bartavel-marine);
    margin-bottom: 1.5rem;
}

/* Titres secondaires */
h4, h5, h6 {
    font-family: var(--font-subtitles);
    font-weight: 400;
    color: var(--bartavel-marine);
}

/* Override Bootstrap .lead */
.lead {
    font-size: 1.15rem;
}

/* Corps de texte */
body, p, .body-text {
    font-family: var(--font-body);
    color: var(--bartavel-black);
}

/* Accents de marque - Domine */
.brand-accent, .bartavel-signature {
    font-family: var(--font-accent);
    color: var(--bartavel-olive);
    font-weight: 600;
}

/* --- Texte sur Fonds Foncés (Surcharge) --- */

/* Sections avec fond foncé : texte en blanc */
.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6, .hero p,
.page-header h1, .page-header h2, .page-header h3, .page-header h4, .page-header h5, .page-header h6, .page-header p,
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6, .bg-dark p,
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6, .bg-primary p,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
    color: #ffffff !important;
}

/* Sections avec classe text-white : forcer le blanc */
.text-white, .text-white * {
    color: #ffffff !important;
}

/* Exception : liens et boutons gardent leur couleur ou blanc */
.hero a, .page-header a, .bg-dark a, .bg-primary a {
    color: #ffffff;
    text-decoration: underline;
}

.hero .btn, .page-header .btn, .bg-dark .btn, .bg-primary .btn {
    color: inherit; /* Garde la couleur du bouton */
}

/* --- Styles spécifiques aux composants --- */
.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color) !important;
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Sections */
.hero, .page-header {
    background-color: var(--primary-color);
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.6);
}

/* Cartes */
.card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08); 
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12); 
}
.card-icon {
    font-size: 2em;
    margin-bottom: 10px;
}
.card-title {
    font-weight: bold;
    font-size: 0.9em;
}

/* Boutons */
.cta-button {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white !important;
    padding: 10px 25px;
    font-weight: bold;
}
.cta-button:hover {
    background-color: #d35400;
    border-color: #d35400;
}

/* Breadcrumb */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 0;
    border-left: 4px solid var(--secondary-color);
    font-weight: 500;
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.2);
    padding-left: 1rem;
}
.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    display: inline;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.breadcrumb a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}
.breadcrumb > span {
    color: #495057;
    font-weight: 600;
}

/* ================================================= */
/* ====== NOUVEAUX STYLES - PAGE ATELIER =========== */
/* ================================================= */
.atelier-step > h3 {
    color: var(--secondary-color); /* Titres des étapes en orange */
    font-size: 1.5em;
    margin-top: 0;
}

.atelier-step .card .card-title {
    color: var(--secondary-color); /* Titres des cartes produits en orange */
}

.upload-box {
    border: 2px dashed var(--secondary-color) !important; /* Bordure pointillée orange */
    background-color: #fdfaf6; /* Fond légèrement crème */
}

.upload-box .form-label {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* ================================================= */
/* ====== NOUVEAUX STYLES - PAGE COLLECTIONS ======= */
/* ================================================= */
.collection-list .collection-item {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Espacement sur mobile */
.collection-list .collection-item .col-md-5,
.collection-list .collection-item .col-md-7 {
    margin-bottom: 1rem;
}

/* Sur écran large, on annule l'espacement du bas */
@media (min-width: 768px) {
    .collection-list .collection-item .col-md-5,
    .collection-list .collection-item .col-md-7 {
        margin-bottom: 0;
    }
}

.collection-item h3 {
    color: var(--primary-color);
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.collection-item p {
    font-size: 1.1em;
    margin-bottom: 1.5rem;
}


/* ================================================= */
/* ============= STYLES MENU PRINCIPAL ============= */
/* ================================================= */

/* Header avec ombre */
.main-header {
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.6);
}

/* Footer avec ombre */
.main-footer {
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.6);
}

/* --- Styles pour le menu Desktop (grands écrans) --- */

@media (min-width: 992px) {
    .main-header .navbar-nav .nav-item {
        /* Ajoute plus d'espace entre chaque élément du menu */
        margin-left: 1rem; 
    }

    .main-header .navbar-nav .nav-link {
        font-size: 1.05rem; /* Police légèrement plus grande */
        font-weight: 500; /* Un peu plus de corps */
        padding: 0.8rem 1rem !important; /* Augmente la zone cliquable */
        position: relative; /* Nécessaire pour le pseudo-élément ci-dessous */
        transition: color 0.3s ease, transform 0.3s ease;
        color: var(--primary-color) !important;
    }

    /* Effet au survol (mousseover) */
    .main-header .navbar-nav .nav-link:hover {
        color: var(--secondary-color) !important; /* Le texte devient orange */
        transform: translateY(-2px); /* Léger mouvement vers le haut */
    }

    /* Ligne décorative sous le lien au survol */
    .main-header .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: width 0.3s ease;
    }

    .main-header .navbar-nav .nav-link:hover::after {
        width: 70%; /* La ligne apparaît au survol */
    }
}


/* --- Styles pour le menu Mobile (Overlay) --- */

/* Bouton fermeture mobile - DÉSACTIVÉ (nouvelle version dans RECHERCHE) */
/* .btn-close-mobile {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 300;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1051;
    opacity: 0;
    animation: slideIn 0.5s ease forwards 0.2s;
}

.btn-close-mobile:hover {
    color: #ffc107;
    transform: scale(1.1);
} */

@media (max-width: 991.98px) {
    /* Bouton "hamburger" */
    .navbar-toggler {
        border: none; /* On enlève la bordure disgracieuse */
    }
    .navbar-toggler:focus {
        box-shadow: none; /* On enlève l'ombre au focus */
    }

    /* Quand le menu est ouvert, il prend tout l'écran */
    .navbar-collapse.show, 
    .navbar-collapse.collapsing {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(44, 62, 80, 0.98); /* Fond bleu foncé semi-transparent */
        z-index: 1050; /* Pour passer au-dessus de tout */
        
        /* Centrage parfait des liens */
        display: flex;
        justify-content: center;
        align-items: center;
        animation: fadeIn 0.3s ease; /* Animation d'apparition */
    }

    /* On s'assure que la liste prend toute la hauteur */
    .navbar-collapse .navbar-nav {
        width: 100%;
        text-align: center;
    }

    /* Style des liens dans l'overlay mobile */
    .navbar-collapse .nav-item {
        margin: 0.75rem 0; /* Espacement vertical réduit (moitié de 1.5rem) */
    }
    .navbar-collapse .nav-link {
        color: #ffffff !important; /* Liens en blanc pour contraster */
        font-size: 1.8rem; /* Police beaucoup plus grande et lisible */
        font-weight: bold;
        opacity: 0; /* Pour l'animation d'apparition */
        animation: slideIn 0.5s ease forwards;
    }

    /* On anime les liens un par un pour un effet escalier */
    .navbar-collapse .nav-item:nth-child(1) .nav-link { animation-delay: 0.1s; }
    .navbar-collapse .nav-item:nth-child(2) .nav-link { animation-delay: 0.2s; }
    .navbar-collapse .nav-item:nth-child(3) .nav-link { animation-delay: 0.3s; }
    .navbar-collapse .nav-item:nth-child(4) .nav-link { animation-delay: 0.4s; }
    .navbar-collapse .nav-item:nth-child(5) .nav-link { animation-delay: 0.5s; }
    .navbar-collapse .nav-item:nth-child(6) .nav-link { animation-delay: 0.6s; }
    .navbar-collapse .nav-item:nth-child(7) .nav-link { animation-delay: 0.7s; }
}

/* Animations pour le menu mobile */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ================================================= */
/* ============== ZONE COPYRIGHT ================== */
/* ================================================= */

.copyright-section {
    background-color: #495057 !important; /* Gris foncé */
    color: #ffffff;
    font-size: 0.9rem;
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.6);
}

.copyright-section.py-3 {
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
}

.copyright-logo {
    height: 70px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    vertical-align: middle;
    filter: brightness(0) invert(1); /* Convertit le logo en blanc */
}

.copyright-text {
    font-weight: 600;
    color: #ffffff;
    vertical-align: middle;
}

.copyright-credit {
    color: #e9ecef;
}

.copyright-credit a {
    color: #ffc107 !important; /* Jaune Bootstrap */
    text-decoration: none;
    font-weight: 600;
}

.copyright-credit a:hover {
    text-decoration: underline;
    color: #ffca2c !important;
}

.version-info {
    color: #adb5bd;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Responsive pour mobile */
@media (max-width: 767.98px) {
    .copyright-logo {
        height: 50px;
        margin-bottom: 0.5rem;
    }

    .copyright-section {
        text-align: center !important;
    }

    .copyright-section .col-md-6 {
        text-align: center !important;
    }
}

/* ================================================= */
/* ======= OVERRIDE BOOTSTRAP SPACING ============= */
/* ================================================= */

/* Réduction du padding vertical de .py-5 */
.py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* ================================================= */
/* ======= COULEURS DOUBLES (BI-COULEUR) ========= */
/* ================================================= */

/* Pastille couleur simple pour backend (tableau admin) */
.color-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    margin-right: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Pastille couleur double pour backend (tableau admin) */
.color-badge-double {
    display: inline-block;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    margin-right: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Badge couleur double pour frontend (fiche produit) */
.badge-color-double {
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Badge couleur simple pour frontend avec contraste texte auto */
.badge-color-simple {
    border: 1px solid rgba(0,0,0,0.1);
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Bulle de couleur pour frontend (fiche produit) */
.color-bubble {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.color-bubble:hover {
    transform: scale(1.1);
}

/* Nom de couleur à côté de la bulle */
.color-name {
    color: #000000;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Référence mise en avant sur layout gammes techniques (motifs/broderie/patch) */
.ref-technique {
    font-size: 1.5em;
    font-weight: 800;
    color: #349B9A;
    vertical-align: middle;
}

/* Badge outline pour nom de couleur (mode sans pastille) */
/* Retirer cette classe du span si les pastilles .color-bubble sont réactivées */
.color-name.color-name-badge {
    color: #349B9A;
    background: transparent;
    border: 1.5px solid #349B9A;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    line-height: 1.2;
}

/* Conteneur d'une couleur (bulle + nom) */
.color-item {
    margin-bottom: 0;
}

/* ================================================= */
/* ======== BADGES COLLECTIONS PRODUITS =========== */
/* ================================================= */

/* Badges de collections sous les produits */
.badge.bg-secondary.collection-badge,
a.badge.bg-secondary {
    background-color: var(--bartavel-olive) !important; /* Vert olive Bartavel */
    color: #ffffff !important;
    border: 1px solid var(--bartavel-olive);
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Effet hover : passage à l'orange Bartavel */
.badge.bg-secondary.collection-badge:hover,
a.badge.bg-secondary:hover {
    background-color: var(--bartavel-orange) !important; /* Orange Bartavel */
    border-color: var(--bartavel-orange);
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(255, 102, 51, 0.3); /* Ombre orange douce */
    transform: translateY(-2px); /* Légère élévation */
}

/* ================================================= */
/* ====== DESCRIPTIONS PRODUITS (FR / EN) ========= */
/* ================================================= */

/* Description produit en français (lead) */
.product-description-fr {
    line-height: 1.3rem;
    margin-bottom: 5px !important;
}

/* Description produit en anglais (traduction) */
.product-description-en {
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1rem;
    margin-bottom: 5px;
    color: #6c757d; /* text-muted Bootstrap */
}

/* ================================================= */
/* ======== RECAPTCHA BADGE POSITIONING =========== */
/* ================================================= */

/* Cacher le badge reCAPTCHA hors de l'écran (obligation légale de l'afficher techniquement) */
.grecaptcha-badge {
    left: -27px !important;
    right: auto !important;
    bottom: -4px !important;
    z-index: 9998 !important; /* Juste en-dessous du chatbot (9999) */
    opacity: 0.1 !important; /* Quasi-transparent */
    transform: scale(0.5) !important; /* 50% de la taille */
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Au survol, redevient visible (pour respecter les CGU Google) */
.grecaptcha-badge:hover {
    opacity: 1 !important;
    left: 4px !important; /* Revient dans l'écran */
    bottom: 4px !important;
    transform: scale(0.8) !important;
}

/* ================================================= */
/* ========== RECHERCHE : IC\u00d4NE LOUPE =============== */
/* ================================================= */

/* Ic\u00f4ne de recherche desktop */
.navbar-nav .search-icon {
    font-size: 1.2rem;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .search-icon:hover {
    color: var(--bartavel-orange) !important;
    transform: scale(1.1);
}

.navbar-nav .search-icon i {
    display: inline-block;
}

/* Header mobile : loupe gauche + croix droite */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--bartavel-grey);
}

.mobile-search-btn {
    font-size: 1.5rem;
    color: var(--bartavel-marine);
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-search-btn:hover {
    color: var(--bartavel-orange);
}

/* Bouton de fermeture mobile (croix) */
.btn-close-mobile {
    background: none;
    border: none;
    color: var(--bartavel-marine);
    font-size: 2rem;
    font-weight: 300;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-close-mobile:hover {
    color: var(--bartavel-orange);
    transform: scale(1.1);
}

/* ========================================
   RIBBON "FEATURED" (Produits mis en avant)
   ======================================== */

/* Container pour le ribbon (position relative) */
.product-image-container {
    position: relative;
    overflow: hidden;
}

/* Ribbon doré en bandeau oblique (coin supérieur gauche) */
.featured-ribbon {
    position: absolute;
    top: 15px;
    left: -40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;
    padding: 5px 45px;
    transform: rotate(-45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    letter-spacing: 2px;
}

/* Icône étoile dans le ribbon */
.featured-ribbon i {
    font-size: 0.75rem;
    color: white;
}

/* Animation subtle au survol */
.featured-ribbon:hover {
    transform: rotate(-45deg) scale(1.05);
    transition: transform 0.2s ease;
}

/* ================================================= */
/* ========== OVERLAY DE RECHERCHE ================ */
/* ================================================= */

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.search-overlay-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.search-overlay.active .search-overlay-content {
    transform: scale(1);
}

.search-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-overlay-close:hover {
    background: #f0f0f0;
    color: var(--bartavel-orange, #FF6633);
}

.search-overlay-inner {
    padding-top: 1rem;
}

.search-overlay-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bartavel-marine, #349B9A);
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-overlay-form {
    margin-bottom: 2rem;
}

.search-overlay-input-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-overlay-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.search-overlay-input:focus {
    outline: none;
    border-color: var(--bartavel-orange, #FF6633);
    box-shadow: 0 0 0 3px rgba(255, 102, 51, 0.1);
}

.search-overlay-button {
    padding: 1rem 2rem;
    background: var(--bartavel-orange, #FF6633);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-overlay-button:hover {
    background: var(--bartavel-marine, #349B9A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-overlay-suggestions {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.search-suggestion-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 2rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-suggestion-link:hover {
    background: var(--bartavel-orange, #FF6633);
    color: white;
    transform: translateY(-2px);
}

/* Empêcher le scroll du body quand overlay actif */
body.search-overlay-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .search-overlay-content {
        width: 95%;
        padding: 1.5rem;
        border-radius: 0.75rem;
    }

    .search-overlay-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .search-overlay-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-overlay-input {
        min-width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .search-overlay-button {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .search-overlay-suggestions {
        margin-top: 1rem;
    }

    .search-suggestion-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ================================================= */
/* ========== BADGE RIBBON NOMBRE DE PRODUITS ===== */
/* ================================================= */

/* Version petite (accueil, gammes-produits) */
.product-count-ribbon-small {
    position: absolute;
    top: 8px;
    right: -6px;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 12px 4px 8px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.product-count-ribbon-small::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 4px 0;
    border-color: transparent #a0410d transparent transparent;
}

/* Version normale (collections) */
.product-count-ribbon {
    position: absolute;
    top: 12px;
    right: -8px;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 16px 6px 12px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.product-count-ribbon::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 6px 0;
    border-color: transparent #a0410d transparent transparent;
}

/* ================================================= */
/* ========== HOVER LIFT (Collections) ============ */
/* ================================================= */

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* ================================================= */
/* ========== DETAIL PRODUIT ====================== */
/* ================================================= */

.main-image-container {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0.375rem;
}

#main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease-out;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-image {
    width: 165px;
    height: 165px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s;
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.4) !important;
    /* Amélioration du rendu pour éviter l'effet escalier */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: smooth;
    -ms-interpolation-mode: bicubic;
}

.thumbnail-image:hover {
    border-color: var(--secondary-color);
}

/* Galerie étendue (produits exceptionnels) : vignettes plus compactes quand nombreuses */
.product-thumbnails--compact {
    gap: 8px;
}

.product-thumbnails--compact .thumbnail-image {
    width: 100px;
    height: 100px;
}

.product-sizes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    min-width: 45px;
    text-align: center;
}

.product-colors {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem; /* espacement horizontal entre badges (inchangé) */
    row-gap: 0.35rem;   /* espacement vertical entre lignes (réduit) */
}

.color-badge {
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ================================================= */
/* ========== PAGINATION ========================== */
/* ================================================= */

/* Styles pour la pagination (gamme-detail, recherche) */
.pagination-controls {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    cursor: not-allowed;
}

.per-page-selector .form-select {
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.per-page-selector .form-select:hover {
    border-color: var(--secondary-color);
}

.per-page-selector .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.25);
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 1rem !important;
    }

    .pagination {
        font-size: 0.875rem;
    }

    .pagination .page-link {
        padding: 0.375rem 0.625rem;
    }
}

/* ================================================= */
/* ========== RECHERCHE : FORMULAIRE ============== */
/* ================================================= */

.search-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-form .input-group-text {
    border-right: none;
}

.search-form .form-control {
    border-left: none;
    padding-left: 10px;
    font-size: 1.1rem;
    max-width: 400px;
}

.search-form .form-control:focus {
    border-color: var(--bartavel-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 51, 0.25);
}

.search-form .btn-primary {
    background-color: var(--bartavel-orange);
    border-color: var(--bartavel-orange);
    font-weight: 600;
}

.search-form .btn-primary:hover {
    background-color: var(--bartavel-marine);
    border-color: var(--bartavel-marine);
}

@media (max-width: 768px) {
    .search-form .input-group {
        flex-direction: column;
    }

    .search-form .input-group-text {
        display: none; /* Masquer l'icône loupe sur mobile */
    }

    .search-form .form-control {
        border: 2px solid #333 !important; /* Bordure épaisse et foncée sur mobile */
        border-radius: 0.5rem !important; /* Border radius complet sur mobile */
        background-color: #fff !important; /* Fond blanc forcé */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important; /* Ombre légère */
        min-height: 50px; /* Hauteur minimale pour meilleure visibilité */
        min-width: 100% !important; /* Largeur 100% sur mobile */
    }

    .search-form .form-control:focus {
        border-color: var(--bartavel-orange) !important;
        box-shadow: 0 0 0 3px rgba(255, 102, 51, 0.2) !important;
    }

    .search-form .btn {
        width: 100%;
        margin-top: 0.75rem;
        border-radius: 0.5rem !important;
        min-height: 50px; /* Même hauteur que l'input */
        font-size: 1.1rem;
        font-weight: 600;
    }
}

/* ================================================= */
/* ========== BADGES RIBBON DE PERTINENCE ======== */
/* ================================================= */

.relevance-ribbon {
    position: absolute;
    top: 15px;
    right: -35px;
    transform: rotate(45deg);
    width: 150px;
    height: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Couleurs des ribbons selon pertinence */
.ribbon-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.ribbon-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.ribbon-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

/* Animation subtle au survol */
.relevance-ribbon:hover {
    transform: rotate(45deg) scale(1.05);
    transition: transform 0.2s ease;
}

/* Responsive : réduire le ribbon sur mobile */
@media (max-width: 576px) {
    .relevance-ribbon {
        top: 10px;
        right: -40px;
        width: 130px;
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}

/* Échantillons de couleur pour la légende */
.relevance-legend-sample {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* ================================================= */
/* ========== RECHERCHE : CARDS PRODUITS ========== */
/* ================================================= */

.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.product-card .card-title a:hover {
    color: var(--bartavel-orange) !important;
}

.product-card .btn-outline-primary {
    border-color: var(--bartavel-marine);
    color: var(--bartavel-marine);
}

.product-card .btn-outline-primary:hover {
    background-color: var(--bartavel-orange);
    border-color: var(--bartavel-orange);
    color: white;
}

/* ================================================= */
/* ========== RECHERCHE : PAGES TROUVÉES ========= */
/* ================================================= */

.list-group-item-action {
    transition: all 0.2s ease;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    border-left: 4px solid var(--bartavel-orange);
    padding-left: calc(1rem - 4px);
}

.list-group-item-action:hover .fa-chevron-right {
    color: var(--bartavel-orange) !important;
}

.list-group-item-action .fa-external-link-alt {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ================================================= */
/* ========== BOUTON BACK TO TOP ================= */
/* ================================================= */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color, #e67e22);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998; /* Sous le chatbot (999) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top:hover {
    background-color: var(--primary-color, #2c3e50);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Offset when chatbot widget is present (uses JS class) */
body.has-chatbot .back-to-top {
    right: 110px; /* 80px chatbot + 30px marge */
}

@media (max-width: 768px) {
    body.has-chatbot .back-to-top {
        right: 20px; /* Aligné à droite comme le chatbot */
        bottom: 100px; /* Au-dessus du chatbot (chatbot à 30px + 70px d'espace) */
    }
}

/* ============================================================
   Logos clients - Section "Ils Nous Font Confiance"
   ============================================================ */
/* Swiper logos - responsive slider (2/3/4 slides per view, mobile/tablet/desktop) */

/* Outer wrapper: holds arrows OUTSIDE the clipped swiper area */
.logos-swiper-wrapper {
    position: relative;
    padding: 0; /* mobile/tablet: no external arrows -> no padding */
}

.logos-swiper {
    overflow: hidden;
}

.logos-swiper .swiper-slide {
    height: auto; /* equal-height slides for consistent logo+name alignment */
    display: flex;
}

.logos-swiper .swiper-slide > .logo-item {
    width: 100%;
}

/* Navigation arrows - absolutely positioned on the wrapper, NOT inside .logos-swiper
   so they can't sit on top of logos. Hidden by default (mobile/tablet). */
.logos-swiper-wrapper .logos-nav-prev,
.logos-swiper-wrapper .logos-nav-next {
    position: absolute;
    top: calc(50% - 14px); /* vertical center of logo (above the name) */
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    color: #349B9A;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    display: none; /* shown only on desktop */
    align-items: center;
    justify-content: center;
}

.logos-swiper-wrapper .logos-nav-prev::after,
.logos-swiper-wrapper .logos-nav-next::after {
    font-family: swiper-icons;
    font-size: 34px;
    font-weight: 800;
    color: #349B9A;
    line-height: 1;
}

.logos-swiper-wrapper .logos-nav-prev::after { content: 'prev'; }
.logos-swiper-wrapper .logos-nav-next::after { content: 'next'; }

.logos-swiper-wrapper .logos-nav-prev:hover::after,
.logos-swiper-wrapper .logos-nav-next:hover::after {
    color: #FF6633; /* charte: orange on hover */
}

.logos-swiper-wrapper .swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Desktop: reserve space left+right for arrows OUTSIDE the swiper */
@media (min-width: 992px) {
    .logos-swiper-wrapper {
        padding: 0 56px; /* 44px arrow + 12px gap */
    }
    .logos-swiper-wrapper .logos-nav-prev,
    .logos-swiper-wrapper .logos-nav-next {
        display: flex;
    }
    .logos-swiper-wrapper .logos-nav-prev { left: 0; }
    .logos-swiper-wrapper .logos-nav-next { right: 0; }
}

.logo-item {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.logo-client {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 300 / 220;
}

.logo-client:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

.logo-client img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-nom {
    font-size: 0.78rem;
    color: #444;
    margin-top: 6px;
    margin-bottom: 0;
    font-weight: 600;
    line-height: 1.2;
    min-height: 1.8em;
    overflow: visible;
}