/* ============================================
   PRODUIT-V4.CSS
   Styles complets pour les pages produits
   Inclut : page produit + modal devis + barre sticky
   
   Version : 4.0.0
   Date : 8 Décembre 2025
   
   CE FICHIER REMPLACE :
   - produit-v2.css
   - Styles <style> intégrés dans produit.php
   ============================================ */

/* ============================================
   1. VARIABLES CSS
   ============================================ */

:root {
    --gs-primary: #c41e3a;
    --gs-primary-dark: #a01829;
    --gs-secondary: #2c3e50;
    --gs-text: #333;
    --gs-text-light: #666;
    --gs-border: #e0e0e0;
    --gs-bg-light: #f8f9fa;
    --gs-success: #2e7d32;
    --gs-danger: #dc3545;
}

/* ============================================
   2. BREADCRUMB
   ============================================ */

.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    margin: 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: var(--gs-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #999;
}

/* ============================================
   3. CONTAINER PRINCIPAL
   ============================================ */

.product-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ============================================
   4. SECTION PRODUCT HEADER
   ============================================ */

.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* ============================================
   5. GALERIE D'IMAGES
   ============================================ */

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--gs-primary);
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* ============================================
   6. INFO PRODUIT
   ============================================ */

.product-info h1 {
    font-size: 2.5rem;
    color: var(--gs-secondary);
    margin: 0 0 20px 0;
    font-weight: 700;
    line-height: 1.2;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--gs-primary);
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gs-text);
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

/* ============================================
   7. CARACTÉRISTIQUES CLÉS
   ============================================ */

.key-features {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.key-features h3 {
    font-size: 1.3rem;
    color: var(--gs-secondary);
    margin: 0 0 15px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-features h3 i {
    color: #ffc107;
    font-size: 1.2rem;
}

.key-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-features li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
    color: var(--gs-text);
}

.key-features li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--gs-success);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   8. BOUTONS CTA
   ============================================ */

.product-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.product-cta .btn-primary,
.product-cta .btn-secondary {
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
}

.product-cta .btn-primary {
    background: var(--gs-primary);
    color: white;
    border-color: var(--gs-primary);
}

.product-cta .btn-primary:hover {
    background: var(--gs-primary-dark);
    border-color: var(--gs-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    text-decoration: none;
    color: white;
}

.product-cta .btn-secondary {
    background: transparent;
    color: var(--gs-primary);
    border-color: var(--gs-primary);
}

.product-cta .btn-secondary:hover {
    background: var(--gs-primary);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Bouton devis modal */
.btn-devis-modal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-devis-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.4);
    color: #fff !important;
}

.btn-devis-modal i {
    font-size: 1.1rem;
}

/* ============================================
   9. SECTIONS DE CONTENU
   ============================================ */

.content-section {
    margin-bottom: 60px;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--gs-secondary);
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--gs-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.content-section h2 i {
    color: var(--gs-primary);
}

/* ============================================
   10. SPÉCIFICATIONS
   ============================================ */

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spec-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--gs-primary);
}

.spec-card h3 {
    font-size: 1.1rem;
    color: var(--gs-secondary);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.spec-card h3 i {
    color: var(--gs-primary);
}

.spec-card p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   11. APPLICATIONS
   ============================================ */

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.application-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.application-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gs-primary), var(--gs-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.application-icon i {
    font-size: 1.8rem;
    color: white;
}

.application-icon .emoji-icon {
    font-size: 2rem;
    line-height: 1;
}

.application-card h3 {
    font-size: 1.2rem;
    color: var(--gs-secondary);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.application-card p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   12. FAQ
   ============================================ */

.faq-list {
    max-width: 900px;
}

.faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    font-weight: 600;
    color: var(--gs-secondary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f0f0f0;
}

.faq-question i {
    color: var(--gs-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 20px;
    margin: 0;
    color: #666;
    line-height: 1.8;
}

/* ============================================
   13. HTML CONTENT
   ============================================ */

.html-content {
    line-height: 1.8;
    color: var(--gs-text);
}

.html-content h3 {
    color: var(--gs-secondary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.html-content ul,
.html-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.html-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.html-content p {
    margin-bottom: 15px;
}

/* ============================================
   14. CTA FINAL
   ============================================ */

.final-cta {
    background: linear-gradient(135deg, var(--gs-primary), var(--gs-primary-dark));
    color: white;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-top: 80px;
}

.final-cta h2 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    color: white;
    border: none;
    padding: 0;
    font-weight: 700;
}

.final-cta p {
    font-size: 1.2rem;
    margin: 0 0 30px 0;
    opacity: 0.95;
}

.final-cta .btn-primary {
    background: white;
    color: var(--gs-primary);
    border-color: white;
}

.final-cta .btn-primary:hover {
    background: #f8f9fa;
    border-color: #f8f9fa;
    color: var(--gs-primary);
}

/* ============================================
   15. MODAL DE DEVIS
   ============================================ */

.gs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gs-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gs-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    z-index: 1000000 !important;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gs-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.gs-modal-header {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: #fff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gs-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    border: none;
    padding: 0;
}

.gs-modal-header h2 i {
    font-size: 1.2rem;
}

.gs-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gs-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.gs-modal-product-info {
    background: #f8f9fa;
    padding: 12px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.gs-modal-product-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gs-modal-product-info .product-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.gs-modal-product-info .product-category {
    font-size: 0.85rem;
    color: #666;
}

.gs-modal-body {
    padding: 25px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.gs-modal-body::-webkit-scrollbar {
    width: 6px;
}

.gs-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gs-modal-body::-webkit-scrollbar-thumb {
    background: #c41e3a;
    border-radius: 3px;
}

/* ============================================
   16. FORMULAIRE MODAL
   ============================================ */

.gs-form-section {
    margin-bottom: 25px;
}

.gs-form-section h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c41e3a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gs-form-section h3 i {
    color: #c41e3a;
}

.gs-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

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

.gs-form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.gs-form-group label .required {
    color: #c41e3a;
}

.gs-form-group input,
.gs-form-group select,
.gs-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
}

.gs-form-group input:focus,
.gs-form-group select:focus,
.gs-form-group textarea:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.gs-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.gs-form-group.error input,
.gs-form-group.error select {
    border-color: var(--gs-danger);
}

.gs-form-group .error-message {
    color: var(--gs-danger);
    font-size: 0.8rem;
    margin-top: 5px;
}

.gs-form-submit {
    margin-top: 20px;
}

.gs-form-submit button {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gs-form-submit button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
}

.gs-form-submit button:active {
    transform: translateY(0);
}

.gs-form-notice {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gs-form-notice i {
    color: #28a745;
}

/* ============================================
   17. MESSAGE DE SUCCÈS
   ============================================ */

.gs-success-message {
    background: linear-gradient(135deg, #28a745 0%, #20903a 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.gs-success-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.gs-success-message h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: #fff;
}

.gs-success-message p {
    margin: 0;
    opacity: 0.9;
}

/* ============================================
   18. BARRE STICKY EN BAS
   ============================================ */

.gs-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 0;
    z-index: 9000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
}

.gs-sticky-bar.visible {
    transform: translateY(0);
}

.gs-sticky-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gs-sticky-bar-product {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.gs-sticky-bar-product img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.gs-sticky-bar-product .product-info {
    min-width: 0;
}

.gs-sticky-bar-product .product-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-sticky-bar-product .product-tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.gs-sticky-bar-cta {
    flex-shrink: 0;
}

.gs-sticky-bar-cta button {
    background: linear-gradient(135deg, #c41e3a 0%, #e8304a 100%);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    position: relative;
}

.gs-sticky-bar-cta button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(196, 30, 58, 0.5);
}

.gs-sticky-bar-cta button i {
    font-size: 1.1rem;
}

/* Animation pulse sur le bouton sticky */
.gs-sticky-bar-cta button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(196, 30, 58, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0);
    }
}

/* Padding bottom pour compenser la barre sticky */
body.sticky-active {
    padding-bottom: 80px;
}

/* ============================================
   19. FIX Z-INDEX MODAL
   ============================================ */

/* Quand la modale est active, réduire z-index du header */
body:has(.gs-modal-overlay.active) .main-header,
body:has(.gs-modal-overlay.active) .main-navigation,
body:has(.gs-modal-overlay.active) .top-bar,
body:has(.gs-modal-overlay.active) #logo,
body:has(.gs-modal-overlay.active) #header,
body:has(.gs-modal-overlay.active) #menuprincipal {
    z-index: 1 !important;
}

/* Alternative si :has() n'est pas supporté - via JavaScript */
body.modal-open .main-header,
body.modal-open .main-navigation,
body.modal-open .top-bar,
body.modal-open #logo,
body.modal-open #header,
body.modal-open #menuprincipal {
    z-index: 1 !important;
}

/* ============================================
   20. RESPONSIVE - TABLETTE (max 992px)
   ============================================ */

@media (max-width: 992px) {
    .product-header {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-gallery {
        position: static;
    }
}

/* ============================================
   21. RESPONSIVE - MOBILE (max 768px)
   ============================================ */

@media (max-width: 768px) {
    .product-info h1 {
        font-size: 2rem;
    }
    
    .product-cta {
        flex-direction: column;
    }
    
    .product-cta .btn-primary,
    .product-cta .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .final-cta {
        padding: 40px 20px;
    }
    
    .final-cta h2 {
        font-size: 1.8rem;
    }
    
    .product-header {
        gap: 20px;
    }
    
    /* Modal mobile */
    .gs-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translate(-50%, -50%) translateY(50px);
    }
    
    .gs-modal.active {
        transform: translate(-50%, -50%) translateY(0);
    }
    
    .gs-modal-body {
        max-height: calc(100vh - 180px);
    }
    
    .gs-form-row {
        grid-template-columns: 1fr;
    }
    
    /* Sticky bar mobile */
    .gs-sticky-bar-content {
        padding: 10px 15px;
    }
    
    .gs-sticky-bar-product .product-name {
        font-size: 0.9rem;
    }
    
    .gs-sticky-bar-product .product-tagline {
        display: none;
    }
    
    .gs-sticky-bar-cta button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .gs-sticky-bar-cta button span {
        display: none;
    }
    
    .gs-sticky-bar-product img {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   22. RESPONSIVE - PETIT MOBILE (max 576px)
   ============================================ */

@media (max-width: 576px) {
    .product-container {
        padding: 0 15px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FIN DU FICHIER PRODUIT-V4.CSS
   ============================================ */
