/* Import de la police Inter depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CONTAINERS RESPONSIFS POUR GRANDS ÉCRANS ===== */
/* Container optimisé pour les très grands écrans (32" et plus) */
.container-responsive {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Breakpoints personnalisés pour une meilleure utilisation de l'espace */
@media (min-width: 576px) {
    .container-responsive {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container-responsive {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container-responsive {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container-responsive {
        max-width: 1140px;
    }
}

/* Breakpoint pour les écrans 1440p et plus */
@media (min-width: 1440px) {
    .container-responsive {
        max-width: 1400px;
    }
}

/* Breakpoint pour les écrans 4K et très grands moniteurs */
@media (min-width: 1920px) {
    .container-responsive {
        max-width: 1600px;
    }
}

/* Breakpoint pour les écrans ultra-larges (32" et plus) */
@media (min-width: 2560px) {
    .container-responsive {
        max-width: 1800px;
    }
}

/* Container fluid pour la section hero */
.container-responsive-fluid {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    margin-right: auto;
    margin-left: auto;
}

/* Styles généraux */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Pas de padding-top - la navbar ne prend jamais d'espace dans le document */
}

/* Uniformisation de la police pour tous les éléments */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

input, textarea, select, button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Styles pour la barre de recherche */
.search-container {
    position: relative;
}

/* Styles pour les dropdowns des filtres */
.form-select {
    min-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-select option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Assurer que le texte "Toutes sous-catégories" est visible */
#subcategoryFilter {
    min-width: 180px;
}

#subcategoryFilter option {
    min-width: 180px;
}

.search-container .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 14px;
}

.search-container .form-control:focus {
    box-shadow: none;
    border-color: #007bff;
}

.search-container .btn {
    border: none;
    padding: 12px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-container .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Barre de recherche dans la navbar */
.navbar .search-container {
    max-width: 250px;
}

.navbar .search-container .input-group {
    background: white;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.navbar .search-container .form-control {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 8px !important;
}



/* Barre de recherche par catégorie */
#categorySearchInput {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 16px;
    transition: all 0.3s ease;
}

#categorySearchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Barre de recherche dans la page produits */
#productsSearchForm .input-group {
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
}

#productsSearchForm .input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#productsSearchForm .form-control {
    border: none;
    font-size: 16px;
    padding: 12px 16px;
}

#productsSearchForm .btn {
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border: none;
    min-width: 50px;
}

/* Animation pour les résultats de recherche */
.search-results {
    animation: fadeInUp 0.5s ease;
}

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

/* Mise en surbrillance des termes de recherche */
.search-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-highlight:hover {
    background-color: #ffeaa7;
    transform: scale(1.05);
    transition: all 0.2s ease;
}



section {
    min-height: 400px;
}

/* Navbar fixe */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    padding: 1rem 0 !important;
    /* Navbar cachée par défaut (en haut de page) */
    opacity: 0;
    transform: translateY(-100%);
}

/* Navbar visible après animation */
.navbar.visible {
    opacity: 1;
    transform: translateY(0);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Assurer l'alignement horizontal logo + menu avec notre container custom */
.navbar .container-responsive {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Personnalisation des sections */
#accueil {
    background-color: #f8f9fa;
}

/* Section Pince Ebauche Double Cône avec dégradé */
#product-1 {
    background: linear-gradient(45deg, #ffffff 0%, #ffffff 60%, #504f4f 85%, #3a3a3a 100%);
    position: relative;
}

/* Section Pince Micromachines avec dégradé */
#product-3 {
    background: linear-gradient(135deg, #3a3a3a 0%, #504f4f 15%, #ffffff 40%, #ffffff 100%);
    position: relative;
}

/* Section Embase 100 */
#product-3bis {
    background: linear-gradient(135deg, #3a3a3a 0%, #504f4f 15%, #ffffff 40%, #ffffff 100%);
    position: relative;
}

/* Section Plaqueur avec dégradé */
#product-4 {
    background: linear-gradient(135deg, #dee2e6 0%, #f8f9fa 50%, #e9ecef 100%);
    position: relative;
}

/* Section Bobino avec dégradé */
#product-5 {
    background: linear-gradient(45deg, #ffffff 0%, #ffffff 60%, #504f4f 85%, #3a3a3a 100%);
    position: relative;
}

/* Section Mandrin avec dégradé */
#product-6 {
    background: linear-gradient(45deg, #ffffff 0%, #ffffff 60%, #504f4f 85%, #3a3a3a 100%);
    position: relative;
}

/* Style pour la section Embase SM32 */
#product-7 {
    background: linear-gradient(135deg, #3a3a3a 0%, #504f4f 15%, #ffffff 40%, #ffffff 100%);
}

/* Effet spotlight pour la section Embase SM32 */
#product-7 .section-title,
#product-7 .section-description,
#product-7 .features-list li {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.4);
}

/* Style pour les features horizontales de la Pince Bobino */
#product-5 .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}

/* Style pour les features de la Pince EDC - 5 éléments */
#product-1 .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}

/* Centrer les éléments 4 et 5 de la Pince EDC */
#product-1 .features-vertical .feature-item:nth-child(4),
#product-1 .features-vertical .feature-item:nth-child(5) {
    justify-self: center;
}

/* Style pour les features de la Pince Micromachines - max 3 par ligne */
#product-3 .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}

/* Style pour les features du Mandrin 4 mors pour micromachines - max 3 par ligne */
#product-6 .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}

/* Style pour les features de l'Embase SERMEC 32 - max 3 par ligne */
#product-7 .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}

/* Style pour les features de l'Embase SERMEC 100 - max 3 par ligne */
#product-3bis .features-vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    gap: 5px;
    margin-bottom: 2rem;
}


/* Centrer les éléments de la deuxième ligne pour l'Embase SERMEC 100 (4, 5, 6) */
#product-3bis .features-vertical .feature-item:nth-child(n+4):not(:nth-child(7)) {
    justify-self: center;
}

/* Centrer le 7ème élément (dernier) pour l'Embase SERMEC 32 */
#product-7 .features-vertical .feature-item:nth-child(7) {
    justify-self: center;
    grid-column: 2;
}

/* Centrer le 7ème élément (dernier) pour l'Embase SERMEC 100 */
#product-3bis .features-vertical .feature-item:nth-child(7) {
    justify-self: center;
    grid-column: 2;
}

/* Sur mobile, maximum 2 colonnes pour la Pince EDC */
@media (max-width: 768px) {
    #product-1 .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sur mobile, maximum 2 colonnes pour la Pince Micromachines */
@media (max-width: 768px) {
    #product-3 .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sur mobile, maximum 2 colonnes pour le Mandrin 4 mors pour micromachines */
@media (max-width: 768px) {
    #product-6 .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sur mobile, maximum 2 colonnes pour l'Embase SERMEC 32 */
@media (max-width: 768px) {
    #product-7 .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sur mobile, maximum 2 colonnes pour la Pince Bobino */
@media (max-width: 768px) {
    #product-5 .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Sur mobile, maximum 2 colonnes pour l'Embase SERMEC 100 */
@media (max-width: 768px) {
    #product-3bis .features-vertical {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Règle générique de secours pour mobile: forcer 1 colonne partout */
@media (max-width: 768px) {
    .features-vertical { grid-template-columns: 1fr !important; }
}

/* Embases (SM32, SM100) – forcer une vraie colonne en mobile */
@media (max-width: 768px) {
    #product-7 .features-vertical,
    #product-3bis .features-vertical {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    #product-7 .features-vertical .feature-item,
    #product-3bis .features-vertical .feature-item { width: 100% !important; }
}

/* Dézoom vidéo Embase SM32 en mobile */
@media (max-width: 768px) {
    #product-7 video.product-image {         /* réduit la hauteur donc moins recadrée */
        height: 260px !important;          /* réduit la hauteur donc moins recadrée */
        object-fit: contain !important;     /* évite la coupe sur les bords */
        object-position: center center !important;
        background: #ffffff !important;
    }
}

.feature-item {
    display: flex;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
}

/* Aligner les cercles à gauche pour toutes les sections */
.features-vertical {
    justify-items: start;
    margin-left: 0;
    padding-left: 0;
}

.feature-circle {
    margin-left: 0;
    padding-left: 0;
}

.feature-circle {
    width: 220px;
    height: 100px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-circle::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 20px;
    border: 2px solid #333;
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-radius: 100px 100px 0 0;
}

.feature-circle::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 20px;
    border: 2px solid #333;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0 0 100px 100px;
}


.feature-text {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: #333;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.4);
}

/* Responsive pour les features horizontales */
@media (max-width: 768px) {
    .features-vertical {
        flex-direction: column;
        align-items: center;
    }
    
    /* Simplification des demi-cercles en points simples sur mobile */
    .feature-circle {
        width: auto;
        height: auto;
        padding: 0.5rem 0;
        background: none;
        border: none;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.2rem; /* espace automatique entre les fragments de texte */
        margin-bottom: 0.5rem;
    }
    
    .feature-circle::before,
    .feature-circle::after {
        display: none; /* Masquer les demi-cercles */
    }
    
    .feature-circle::before {
        content: "•";
        position: static;
        transform: none;
        width: auto;
        height: auto;
        border: none;
        border-radius: 0;
        font-size: 1.2rem;
        color: #007bff;
        margin-right: 0.75rem;
        display: inline-block;
        font-weight: bold;
    }
    
    .feature-text {
        font-size: 0.95rem;
        text-align: left;
        margin: 0;
        line-height: 1.4;
        color: #333;
        display: inline;
        white-space: normal;
        word-break: normal;
    }

    .feature-text::after { content: ' '; }
    
    /* Simplifier les sections de produits sur mobile */
    #product-1,
    #product-3,
    #product-3bis,
    #product-4,
    #product-5,
    #product-6,
    #product-7 {
        background: #ffffff !important; /* fond pleinement blanc sur mobile */
        position: relative;
    }
    
    /* Titres et descriptions plus simples */
    .section-title {
        font-size: 1.8rem !important;
        font-weight: 600 !important;
        color: #333 !important;
        margin-bottom: 1rem !important;
        text-shadow: none !important;
    }
    
    .section-description {
        font-size: 1rem !important;
        color: #666 !important;
        line-height: 1.5 !important;
        text-shadow: none !important;
    }
    
    /* Features list simplifiée */
    .features-list li {
        font-size: 0.9rem !important;
        color: #555 !important;
        margin-bottom: 0.5rem !important;
        text-shadow: none !important;
    }
    
    /* Cartes de produits plus simples */
    .card {
        border: 1px solid #e9ecef !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        background: white !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title {
        font-size: 1.1rem !important;
        color: #333 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .card-text {
        font-size: 0.9rem !important;
        color: #666 !important;
        line-height: 1.4 !important;
    }
    
    /* Simplifier les boutons */
    .btn {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
        border-radius: 6px !important;
    }
    
    .btn-primary {
        background-color: #007bff !important;
        border-color: #007bff !important;
    }
    
    .btn-secondary {
        background-color: #6c757d !important;
        border-color: #6c757d !important;
    }
    
    /* Simplifier les images et vidéos */
    .product-image,
    video.product-image {
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        margin-bottom: 1rem !important;
    }
    
    /* Espacement simplifié */
    section {
        padding: 2rem 0 !important;
    }
    
    .container-responsive {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Supprimer les effets complexes */
    .parallax-section { background: #ffffff !important; }
    .parallax-section:nth-child(odd) { background: #ffffff !important; }
    .parallax-section:nth-child(even) { background: #ffffff !important; }
}

/* CTA – réactiver l'image de fond sur mobile */
@media (max-width: 768px) {
    #cta-section {
        background-image: url('/images/Site/Embase_100_Man_eclatee_mobile.png') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-color: transparent !important;
    }
    /* Couleur de texte CTA en blanc pour lisibilité sur l'image */
    #cta-section .section-title,
    #cta-section .section-description,
    #cta-section p,
    #cta-section h1,
    #cta-section h2,
    #cta-section h3 {
        color: #ffffff !important;
        text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    }
}

/* Plus d'overlay nécessaire avec les dégradés clairs */

/* Contenu des sections */
#product-1 .container,
#product-3 .container,
#product-4 .container,
#product-5 .container,
#product-6 .container {
    position: relative;
    z-index: 2;
}

/* Texte sombre avec effet de lumière pour mettre en évidence */
#product-1 .section-title,
#product-1 .section-description,
#product-1 .features-list li,
#product-3 .section-title,
#product-3 .section-description,
#product-3 .features-list li,
#product-3bis .section-title,
#product-3bis .section-description,
#product-3bis .features-list li,
#product-4 .section-title,
#product-4 .section-description,
#product-4 .features-list li,
#product-5 .section-title,
#product-5 .section-description,
#product-5 .features-list li,
#product-6 .section-title,
#product-6 .section-description,
#product-6 .features-list li {
    color: #333;
    text-shadow: 
        0 0 12px rgba(255, 255, 255, 0.9),
        0 0 24px rgba(255, 255, 255, 0.7),
        0 0 36px rgba(255, 255, 255, 0.5),
        0 0 48px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2),
        0 0 72px rgba(255, 255, 255, 0.1);
}

#produits .card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Style du formulaire de contact */
#contact form {
    max-width: 600px;
    margin: 0 auto;
}

/* Ajoutez ces styles */
.category-card {
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-card .card-img-top {
    height: 300px;      /* Hauteur fixe pour toutes les images */
    object-fit: contain;  /* Évite le recadrage/zoom sur grands écrans */
    width: 100%;
    background: #f8f9fa; /* fond neutre si bandes latérales */
}

/* Garder la taille réelle (sans agrandir) pour certaines vignettes */
.category-card .card-img-top.natural-size {
    height: 300px;            /* limite de hauteur */
    width: 100%;
    object-fit: scale-down;   /* garde la taille réelle, réduit seulement si trop grand */
    display: block;
    margin: 0 auto;
}

.category-card .card-body {
    flex: 1;  /* Permet au contenu de s'ajuster tout en gardant les cartes alignées */
}

#filters {
    transition: all 0.3s ease;
}

/* Amélioration générale du rendu SVG */
img[src*=".svg"], svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Styles pour la modal des détails produit */
.modal-xl {
    max-width: 1200px;
}

.product-image-container img {
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.accessory-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.accessory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.accessory-card img {
    height: 100px;
    object-fit: cover;
    border-radius: 4px 0 0 4px;
}

.accessories-grid {
    max-height: 400px;
    overflow-y: auto;
}

.btn-details {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Optimisations spécifiques pour mobile */
@media (max-width: 768px) {
    img[src*=".svg"], svg {
        /* Forcer le rendu pixel-perfect sur mobile */
        image-rendering: pixelated;
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
        /* Éviter les problèmes de DPI sur mobile */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        /* Optimiser pour les écrans haute densité */
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: auto;
    }
    
    /* Optimisation spécifique pour le logo en navigation */
    .nav-logo {
        /* Forcer un rendu net sur mobile */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
        /* Éviter les artefacts de compression */
        will-change: auto;
    }
}

/* Optimisations pour écrans haute densité (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img[src*=".svg"], svg {
        /* Optimiser pour les écrans Retina */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        /* Forcer le rendu haute qualité */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Logo styles */
.nav-logo {
    height: 36px;
    margin-right: 10px;
    will-change: transform;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.hero-logo {
    max-width: 300px;
    height: auto;
}

/* Service Cards */
.service-card {
    padding: 2rem;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.service-icon {
    margin-bottom: 1.5rem;
    color: #007bff;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.service-details {
    height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-details.active {
    height: auto;
    opacity: 1;
    margin-top: 1rem;
}

.service-details ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 1rem;
}

.service-details ul li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.service-details ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007bff;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, #504f4f 0%, #3a3a3a 50%, #fcf9f9 100%) !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 0;
    position: relative;
    margin-top: 0; /* Pas de marge négative */
    padding-top: 5rem; /* Padding normal */
    min-height: 100vh; /* Prend toute la hauteur de l'écran */
    display: flex;
    align-items: center;
}

/* Overlay pour assurer la lisibilité du texte */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Assombrit légèrement pour la lisibilité */
    z-index: 1;
    display: none; /* FRI flex pour afficher sans assombrir  */
}

#hero .hero-content {
    position: relative;
    z-index: 2; /* Place le contenu au-dessus de l'overlay */
}

/* Couleur du titre principal dans le hero */
#hero .hero-content h1 {
    color: #ffffff; /* COULEUR DU TITRE - CHANGEZ ICI POUR PERSONNALISER */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Ombre pour la lisibilité */
}

/* Couleur du texte descriptif dans le hero */
#hero .hero-content p {
    color: #ffffff; /* COULEUR DU TEXTE DESCRIPTIF - CHANGEZ ICI POUR PERSONNALISER */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Ombre pour la lisibilité */
}

/* Logo blanc avec carré rouge dans le hero */
#hero .hero-logo {
    /* Pas de filtre nécessaire - le SVG a déjà les bonnes couleurs */
}

/* Ajustement pour les pages avec en-tête d'image */
.page-header {
    margin-top: -100px; /* Compense le padding-top du body */
    padding-top: 120px; /* Ajoute l'espace pour la navbar + décalage supplémentaire */
    background-image: url('/images/Site/Photos-outillage-test.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding-bottom: 40px;
    margin-bottom: 40px;
    position: relative;
}

/* Overlay sombre pour les page-header */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.page-header h1,
.page-header p {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    font-weight: 600;
    text-align: left; /* Remettre l'alignement à gauche comme avant */

}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    text-align: left; /* Remettre l'alignement à gauche comme avant */
}

/* Style pour les images des pinces dans les cartes de produits */
#productsContainer .card-img-top {
    height: 200px;          /* Hauteur réduite */
    object-fit: contain;    /* Garde les proportions sans couper l'image */
    padding: 15px;          /* Ajoute un peu d'espace autour de l'image */
    background: #f8f9fa;    /* Fond léger pour mieux voir l'image */
}

/* Pour s'assurer que toutes les cartes de produits ont la même hauteur */
#productsContainer .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 380px; /* Hauteur minimale réduite pour des cartes plus compactes */
}

#productsContainer .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Styles pour les boutons d'action */
.product-actions {
    display: flex;
    gap: 10px;
}

/* Nouveaux styles pour la mise en page uniformisée des cartes */
.product-actions.d-flex.flex-column {
    gap: 8px;
}

.product-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.product-actions .btn-icon {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.product-actions .btn-icon:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.product-actions .btn-details {
    background: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 500;
}

.product-actions .btn-details:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Ajustements pour les cartes de produits */
#productsContainer .card-body {
    padding: 1.25rem;
}

#productsContainer .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    min-height: 2.6rem; /* Hauteur minimale pour uniformiser */
    max-height: 5.2rem; /* Permet jusqu'à 4 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Permet jusqu'à 4 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#productsContainer .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    min-height: 2.8rem; /* Hauteur minimale pour uniformiser */
    max-height: 5.6rem; /* Permet jusqu'à 4 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Permet jusqu'à 4 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* Permet au texte de s'étendre */
}

/* Style spécifique pour la référence */
#productsContainer .card-text:last-of-type {
    margin-top: auto; /* Pousse la référence vers le bas */
    margin-bottom: 0;
    flex: 0 0 auto; /* Empêche la référence de s'étendre */
}

/* Zone de contenu principal */
#productsContainer .col-8 {
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Zone des boutons */
#productsContainer .col-4 {
    padding-left: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    #productsContainer .card-body .row {
        flex-direction: column;
    }
    
    #productsContainer .col-8,
    #productsContainer .col-4 {
        width: 100%;
        padding: 0;
    }
    
    #productsContainer .col-8 {
        margin-bottom: 1rem;
    }
    
    .product-actions.d-flex.flex-column {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .product-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .product-actions .btn-icon {
        width: 50px;
        height: 40px;
        flex: 0 0 auto;
    }
    
    #productsContainer .card-title,
    #productsContainer .card-text {
        min-height: auto;
    }
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.3s ease;
}

/* Style pour le tooltip */
.tooltip {
    font-size: 0.875rem;
}

/* Styles pour le visualiseur 3D */
#viewer-container {
    width: 100%;
    height: 100%;        /* Utilise toute la hauteur disponible */
    background: #e0e0e0;
    position: relative;
    overflow: hidden;    /* Empêche le dépassement */
}

#viewer {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

/* Ajustement de la modal pour le nouveau ratio */
#viewer3dModal .modal-dialog {
    max-width: 1000px;
    height: 80vh;        /* Réduit la hauteur */
    margin: 1.75rem auto;
}

#viewer3dModal .modal-content {
    height: 100%;
    background-color: #e0e0e0; /* Gris légèrement plus foncé */
}

#viewer3dModal .modal-header {
    background-color: #e0e0e0;
    border-bottom: 1px solid #ccc;
    padding: 0.5rem 1rem; /* En-tête plus compact */
}

#viewer3dModal .modal-body {
    height: calc(100% - 45px); /* Ajusté pour l'en-tête plus compact */
    padding: 0;
    overflow: hidden;
    background-color: #e0e0e0;
}

/* Styles pour le panier */
.cart-item {
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 8px;
}

/* Styles pour les notifications */
.notification {
    animation: slideIn 0.5s forwards;
    padding: 0.5rem 1rem;    /* Réduit la hauteur */
    font-size: 0.9rem;       /* Texte légèrement plus petit */
    display: flex;
    align-items: center;
    min-height: 40px;        /* Hauteur fixe minimale */
}

.notification-success {
    background: #28a745;
}

.notification-warning {
    background: #ffc107;
    color: #000;
}

.notification-error {
    background: #dc3545;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

#loading-indicator {
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
}

/* Style pour le bouton panier */
.cart-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #212529;
}

.cart-button:hover {
    color: #0d6efd;
}

#cartBadge {
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Styles pour l'animation du code */
.code-animation {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    height: 200px;
    overflow: hidden; /* Cache la barre de scroll */
    font-family: 'Consolas', monospace;
    position: relative;
}

.typing-code {
    color: #d4d4d4;
    white-space: pre;
    margin: 0;
    display: inline-block;
    position: absolute;
    top: 15px;
    left: 15px;
    transform: translateY(0);
    transition: transform 0.5s linear;
}

.typing-code span {
    opacity: 0;
    position: relative;
    animation: typeCharacter 0.05s forwards;
}

@keyframes typeCharacter {
    to {
        opacity: 1;
    }
}

/* Animation pour les éléments de la liste */
.service-details ul li {
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.service-details.active ul li {
    animation: typeText 1s forwards;
    animation-delay: calc(0.5s * var(--item-index));
}

@keyframes typeText {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Ajuster le style du conteneur de service pour l'animation */
.service-details {
    text-align: left;
    padding: 15px;
}

/* Style pour le carrousel de vidéos */
.video-showcase {
    margin: 50px 0;
    background: #f8f9fa;
    padding: 30px 0;
}

.carousel-item {
    transition: transform 2s ease-in-out;
}

.carousel-item video {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Style pour la section vidéo */
.video-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 30px;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* Ratio 16:9 */
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-caption {
    padding: 20px;
    background: white;
}

.video-caption h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.video-caption p {
    margin: 10px 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Animation d'apparition au scroll */
.video-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.video-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour le bouton "En savoir plus" */
.learn-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.learn-more:hover {
    background-color: #0b5ed7;
    color: white;
}

/* Empêcher le toggle quand on clique sur le lien */
.service-details a {
    position: relative;
    z-index: 2;
}

/* Styles pour les pages de service - Supprimé car en conflit avec .page-header principal */

/* Cards des services */
.service-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
}

.service-card ul {
    list-style-type: none;
    padding-left: 0;
}

.service-card ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.service-card ul li:before {
    content: "•";
    color: #0d6efd;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Équipements */
.equipment-section {
    padding: 40px 0;
}

.equipment-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    transition: background-color 0.3s ease;
}

.equipment-card:hover {
    background: #e9ecef;
}

.equipment-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.equipment-card ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.equipment-card ul li {
    margin-bottom: 8px;
    color: #666;
}

/* Vidéos */
.video-section {
    padding: 40px 0;
}

.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* Ratio 16:9 */
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-caption {
    padding: 20px;
}

.video-caption h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.video-caption p {
    margin: 10px 0 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        /* Pas de padding-top - navbar en position fixe */
    }
    
    .navbar {
        padding: 0.75rem 0 !important;
    }
    
    .page-header {
        padding: 40px 0;
        margin-top: -85px; /* Ajustement pour mobile */
        padding-top: 105px; /* Ajoute l'espace pour la navbar sur mobile + décalage supplémentaire */
        background-image: url('/images/Site/Photos-outillage-test.jpeg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: white;
        text-align: center;
        padding-bottom: 40px;
        margin-bottom: 40px;
    }
    
    .service-card, .equipment-card {
        margin-bottom: 20px;
    }
    
    .video-section {
        padding: 20px 0;
    }

    /* Image de fond dans le menu hamburger (offcanvas) */
    #mobileMenu .offcanvas-body {
        background-image: url('/images/Site/Embase_100_Man_eclatee_mobile.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    #mobileMenu .navbar-nav { background: rgba(255,255,255,0.92); }

    /* Améliorations pour mobile */
    .hero-logo {
        max-width: 200px !important;
    }

    .display-4 {
        font-size: 2rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }
    
    /* Amélioration de la lisibilité des textes sur mobile */
    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .section-description {
        font-size: 1rem !important;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem !important;
        line-height: 1.5;
    }
    
    /* Espacement amélioré pour les sections */
    section {
        padding: 2rem 0 !important;
    }
    
    /* Cartes plus compactes sur mobile */
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .card-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Compactage des sections et listes (mobile) */
    .parallax-section { padding: 24px 0 !important; }
    .section-title { font-size: 1.6rem !important; margin-bottom: 0.5rem !important; }
    .section-description { font-size: 0.95rem !important; margin-bottom: 0.75rem !important; line-height: 1.45 !important; }
    .features-vertical { gap: 6px !important; }
    .feature-circle { gap: 0.15rem !important; padding: 0.0rem 0 !important; }
    .feature-text { font-size: 0.9rem !important; line-height: 1.25 !important; }
    .features-list { margin-bottom: 0.75rem !important; }
    .features-list li { margin-bottom: 0.35rem !important; }
    .product-content .btn { margin-top: 6px !important; margin-bottom: 8px !important; padding: 0.5rem 0.9rem !important; }

    /* Ajustement de la section hero pour mobile */
    #hero {
        margin-top: -75px; /* Compense le padding-top du body sur mobile */
        padding-top: calc(5rem + 85px); /* Ajoute l'espace pour la navbar sur mobile + décalage supplémentaire */
    }

    /* Section Hero Mobile Simplifiée */
    .hero-section {
        min-height: 100vh !important;
        background: none !important; /* pas de fond rose global en mobile */
    }
    
    .hero-section .row {
        flex-direction: column !important;
        min-height: 100vh !important;
        margin: 0 !important;
    }

    /* Fond dégradé sous "Découvrez nos solutions" en mobile */
    .hero-section::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 200px;
        background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 40%, #504f4f 80%, #3a3a3a 100%);
        pointer-events: none;
        z-index: 1;
    }

    .scroll-indicator { z-index: 2; }
    
    /* Zone texte en haut - dégradé gris sous SERMEC */
    .hero-text-side {
        min-height: 60vh !important;
        order: 1 !important;
        padding: 3rem 1rem !important;
        background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #504f4f 85%, #3a3a3a 100%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .hero-text-content {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .hero-logo {
        max-width: 180px !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #333 !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        color: #666 !important;
        margin-bottom: 2rem !important;
        line-height: 1.5 !important;
    }
    
    /* Zone vidéo en bas - simplifiée */
    .hero-video-side {
        min-height: 40vh !important;
        order: 2 !important;
        transform: none !important;
        position: relative !important;
        background: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero-video-container {
        height: 40vh !important;
        width: 100% !important;
        position: relative !important;
    }
    
    .hero-video {
        height: 40vh !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    /* Supprimer les ombres sous les viewers/vidéos en mobile */
    .product-image,
    video.product-image,
    model-viewer {
        box-shadow: none !important;
    }
    
    .hero-video-fallback {
        height: 40vh !important;
        width: 100% !important;
        background: #f8f9fa !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero-video-placeholder {
        text-align: center !important;
        color: #666 !important;
    }
    
    .hero-video-placeholder i {
        font-size: 3rem !important;
        color: #007bff !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-video-placeholder p {
        font-size: 1rem !important;
        margin: 0 !important;
    }

    /* Menu mobile moderne avec overlay central */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        padding: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
        pointer-events: auto;
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Désactiver les animations Bootstrap */
    .navbar-collapse.collapsing {
        transition: none !important;
        height: auto !important;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        background: white;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        min-width: 250px;
        text-align: center;
        margin: 0;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem;
        border-radius: 8px;
        text-align: center;
        font-size: 1.1rem;
        font-weight: 500;
        transition: all 0.2s ease;
        color: #333 !important;
        display: block;
        text-decoration: none;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(0, 123, 255, 0.1);
        color: #007bff !important;
        transform: translateY(-2px);
    }
    
    .navbar-nav .nav-link.active {
        background: rgba(0, 123, 255, 0.15);
        color: #007bff !important;
    }
    
    /* Bouton hamburger personnalisé */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        background: none;
        position: relative;
        z-index: 1001;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-toggler-icon {
        width: 20px;
        height: 2px;
        background: #333;
        position: relative;
        display: block;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: #333;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    .navbar-toggler-icon::before {
        top: -6px;
    }
    
    .navbar-toggler-icon::after {
        top: 6px;
    }
    
    /* Animation du bouton hamburger */
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        background: transparent;
    }
    
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
        transform: rotate(-45deg);
        top: 0;
    }
    
    /* Masquer la recherche sur mobile */
    .navbar .search-container {
        display: none;
    }
    
    /* Style pour le panier sur mobile */
    .navbar-nav .nav-link i {
        font-size: 1.2rem;
    }
    
    .cart-badge {
        background: #dc3545;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 0.7rem;
        margin-left: 5px;
    }
    
/* Styles pour les écrans plus larges - masquer le menu mobile */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
    
    .navbar-collapse {
        position: static !important;
        transform: none !important;
        background: none !important;
        backdrop-filter: none !important;
        display: flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
        padding: 0 !important;
    }
    
    .navbar-nav {
        flex-direction: row !important;
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        min-width: auto !important;
        text-align: left !important;
        gap: 0 !important;
    }
    
    .navbar-nav .nav-item {
        width: auto !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 1rem !important;
        text-align: left !important;
        display: inline-block !important;
        transform: none !important;
    }
    
    .navbar-nav .nav-link:hover {
        transform: none !important;
    }
    
    .navbar .search-container {
        display: block !important;
    }
}

/* Inversion responsive: toujours Texte -> 3D dans les sections produits */
@media (max-width: 768px) {
    /* Utilise :has() pour cibler la colonne contenant le bloc souhaité */
    #product-1 .row.align-items-center > .col-md-6:has(.product-content),
    #product-3 .row.align-items-center > .col-md-6:has(.product-content),
    #product-3bis .row.align-items-center > .col-md-6:has(.product-content),
    #product-4 .row.align-items-center > .col-md-6:has(.product-content),
    #product-5 .row.align-items-center > .col-md-6:has(.product-content),
    #product-6 .row.align-items-center > .col-md-6:has(.product-content),
    #product-7 .row.align-items-center > .col-md-6:has(.product-content) {
        order: 1 !important;
    }

    #product-1 .row.align-items-center > .col-md-6:has(.product-visual),
    #product-3 .row.align-items-center > .col-md-6:has(.product-visual),
    #product-3bis .row.align-items-center > .col-md-6:has(.product-visual),
    #product-4 .row.align-items-center > .col-md-6:has(.product-visual),
    #product-5 .row.align-items-center > .col-md-6:has(.product-visual),
    #product-6 .row.align-items-center > .col-md-6:has(.product-visual),
    #product-7 .row.align-items-center > .col-md-6:has(.product-visual) {
        order: 2 !important;
    }
}

    /* Cartes de produits mobile */
    .category-card .card-img-top {
        height: 200px !important;
    }

    #productsContainer .card-img-top { 
        height: 200px !important;
        padding: 10px !important;
    }

    /* Boutons d'action mobile */
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-icon {
        width: 100%;
        height: 40px;
        border-radius: 4px;
    }

    /* Mini-fenêtre 3D mobile */
    .mini-window {
        width: 95vw !important;
        height: 80vh !important;
        right: 2.5vw;
        bottom: 10vh;
    }

    .mini-window-content {
        height: calc(80vh - 60px) !important;
    }

    /* Modal 3D mobile */
    #viewer3dModal .modal-dialog {
        max-width: 95vw;
        margin: 2.5vh auto;
    }

    #viewer3dModal #viewer-container {
        height: 70vh;
    }

    /* Cartes de produits */
    .product-card {
        margin-bottom: 1.5rem;
    }

    /* Footer mobile */
    .footer {
        padding: 1rem 0;
        text-align: center;
    }
}

/* Responsive pour très petits écrans */
@media (max-width: 576px) {
    body {
        /* Pas de padding-top - navbar en position fixe */
    }
    
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    .page-header {
        margin-top: -75px; /* Compense le padding-top du body sur très petits écrans */
        padding-top: 95px; /* Ajoute l'espace pour la navbar sur très petits écrans + décalage supplémentaire */
        background-image: url('/images/Site/Photos-outillage-test.jpeg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: white;
        text-align: center;
        padding-bottom: 40px;
        margin-bottom: 40px;
    }
    
    .hero-logo {
        max-width: 150px !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }

    .page-header h1 {
        font-size: 2rem !important;
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .page-header p {
        font-size: 1rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Boutons plus grands pour le touch */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Espacement des sections */
    section {
        padding: 2rem 0 !important;
    }

    /* Cartes plus compactes */
    .card-body {
        padding: 1rem;
    }
}

/* Amélioration de l'accessibilité tactile */
@media (hover: none) and (pointer: coarse) {
    /* Désactiver les effets hover sur mobile */
    .category-card:hover,
    .service-card:hover,
    .product-card:hover,
    .equipment-card:hover {
        transform: none;
    }

    /* Augmenter la taille des zones cliquables */
    .nav-link,
    .btn,
    .card {
        min-height: 44px;
    }

    /* Espacement pour éviter les clics accidentels */
    .product-actions {
        gap: 12px;
    }
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    display: none;
}

.nav-item {
    position: relative;
}

.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

.auth-container p {
    text-align: center;
    margin-top: 15px;
}

.auth-container a {
    color: #007bff;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* Styles pour la mini-fenêtre de visualisation 3D */
.mini-window {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 700px !important;
    height: 600px !important;
    max-width: 90vw;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mini-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: move;
}

.mini-window-header h6 {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
}

.mini-window-controls {
    display: flex;
    gap: 8px;
}

.mini-window-controls button {
    background: none;
    border: none;
    padding: 2px 6px;
    font-size: 1rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mini-window-controls button:hover {
    color: #343a40;
}

.mini-window-content {
    height: 500px !important;
    min-height: 400px;
    background-color: #e0e0e0;
}

.mini-window-content model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

.btn-view-3d {
    background: white;
    color: #212529;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.btn-view-3d:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Animation d'entrée */
.service-card, .equipment-card, .video-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délai d'animation pour les cartes */
.service-card:nth-child(2) {
    animation-delay: 0.2s;
}
.service-card:nth-child(3) {
    animation-delay: 0.4s;
}
.service-card:nth-child(4) {
    animation-delay: 0.6s;
}
@media (max-width: 768px) {
    .mobile-cart-items {
      display: block !important;
      opacity: 1 !important;
      background: transparent !important;
    }
    .mobile-cart-item {
      display: block !important;
      opacity: 1 !important;
      background: #fff !important;
      color: #000 !important;
      min-height: 100px !important;
      margin-bottom: 1rem;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      border-radius: 8px;
      padding: 1rem;
    }
  }
  .quantity-controls button {
    font-size: 1.5rem !important;
    font-weight: bold;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #ccc;
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quantity-controls .quantity-display {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 32px;
    text-align: center;
    display: inline-block;
}

/* Styles pour le bouton retour dans les modals */
#backToOriginalProduct {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

#backToOriginalProduct:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateX(-2px);
}

#backToOriginalProduct:active {
    transform: translateX(-1px);
}

/* ===== MODEL VIEWER CENTRALISÉ ===== */
/* Assombrir le modèle tout en préservant les couleurs multiples */
model-viewer::part(model) {
    filter: brightness(0.15) contrast(1.4);
}

/* Ajouter des arêtes visibles */
model-viewer {
    --edge-color: #666666;
    --edge-width: 1px;
}

/* Animation pour le curseur flottant */
@keyframes float {
    0% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
    100% { transform: translate(-50%, -50%) translateY(0px); }
}

/* Curseur personnalisé pour le viewer 3D */
model-viewer {
    cursor: grab;
}

model-viewer:active {
    cursor: grabbing;
}

/* ===== SPINNER DE CHARGEMENT ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.spinner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    z-index: 2;
    animation: logoPulse 2s ease-in-out infinite;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffa600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    animation: textFade 2s ease-in-out infinite;
}

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

@keyframes logoPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes textFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==== NAVBAR – simplifications mobile ==== */
@media (max-width: 991.98px) {
    /* Masquer l'ancien collapse Bootstrap sur mobile (on utilise offcanvas) */
    .navbar .navbar-collapse { display: none !important; }
}

/* Icône hamburger FA propre */
.navbar .navbar-toggler .fa-bars { font-size: 1.25rem; color: #333; }