/* ============================================
   COMPONENTS.CSS - Boutons, Forms, Cards, Swiper
   ============================================ */

/* --- Boutons --- */
.btn-primary {
    display: inline-block;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.15em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 30px;
    pointer-events: auto;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #796747;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-second {
    display: inline-block;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.15em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 30px;
    pointer-events: auto;
}

.btn-second:hover {
    background-color: #796747;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* CTA Center - Centrage des boutons d'appel à l'action */
.cta-center {
    text-align: center;
    margin: 40px 0;
}

.btn-dynamic {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    animation: pulse-grow 2s infinite ease-in-out;
}

.section-buttons {
    text-align: center;
    margin-top: 50px;
}

button {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

button:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* --- Formulaires --- */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(60, 123, 135, 0.2);
    outline: none;
}

.form-group input[type="number"] {
    width: calc(100% - 25px);
}

.privacy-policy {
    font-size: 0.85em;
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
    color: var(--dark-grey);
}

.privacy-policy input[type="checkbox"] {
    /* Reset complet pour contrôle total */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Dimensions et style explicites */
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    
    margin-right: 12px;
    margin-top: 0;
    flex-shrink: 0;
    
    cursor: pointer;
    border: 2px solid var(--primary-color); /* Bordure visible */
    border-radius: 4px;
    background-color: #fff; /* Fond blanc forcé */
    
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.privacy-policy input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    /* Coche SVG encodée */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.privacy-policy input[type="checkbox"]:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.privacy-policy label {
    line-height: 1.4;
    color: var(--dark-grey);
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
    cursor: pointer;
    flex: 1;
}

.privacy-policy a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.privacy-policy a:hover {
    text-decoration: underline;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 16px 32px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px;
}

.form-submit button:hover {
    background: #796747;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Configurateur --- */
#configurator1 {
    background: white;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26);
    margin-bottom: 25px;
    scroll-margin-top: 80px;
    position: relative;
    overflow: hidden;
}

#configurator1 h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.6em;
    line-height: 1.2;
}

#configurator1 p {
    font-size: 1.0em;
    color: var(--dark-grey);
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 0 15px;
    text-align: center;
}

.step {
    padding: 30px 15px 0px 15px;
    margin-bottom: 25px;
}

.step h3 {
    font-family: var(--font-primary);
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-weight: 600;
}

.reassurance-elements {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.reassurance-elements img {
    height: 80px;
    width: auto;
}

/* --- Swiper (Carrousels) --- */
.reviews-swiper-container .swiper-button-prev,
.reviews-swiper-container .swiper-button-next {
    display: none;
}

.swiper-horizontal>.swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
    display: none;
}

.reviews-swiper-container {
    width: 100%;
    height: auto;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.reviews-swiper-container .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
}

.individual-review-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.individual-review-card .review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.individual-review-card .guaranteed-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9em;
}

.individual-review-card .verified-icon,
.individual-review-card .verified-icon-small {
    width: 20px;
    height: 20px;
}

.individual-review-card .verified-icon-small {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 3px;
}

.individual-review-card .purchase-date {
    font-size: 0.85em;
    color: var(--dark-grey);
    flex-grow: 1;
    text-align: right;
}

.individual-review-card .stars {
    margin-bottom: 0;
    margin-right: 10px;
}

.individual-review-card .review-text {
    font-size: 1em;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.reviewer-info {
    font-size: 0.9em;
    color: var(--dark-grey);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.reviewer-info .reviewer-name {
    font-weight: bold;
    color: var(--primary-color);
}

.reviewer-info .reviewer-date {
    font-size: 0.8em;
    color: var(--dark-grey);
    margin-left: auto;
    white-space: nowrap;
}

.reviewer-info .verified-buyer {
    font-weight: 500;
    color: #008000;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 5px;
    width: 100%;
    justify-content: flex-start;
}

.owner-response {
    margin-top: 20px;
    padding: 15px;
    border-left: 5px solid var(--primary-color);
    background: var(--light-bg);
    border-radius: 0 8px 8px 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text-color);
}

.owner-response .response-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-style: italic;
}

.owner-response .response-text {
    font-style: italic;
    color: var(--dark-grey);
}

.reviews-swiper-container .swiper-button-prev,
.reviews-swiper-container .swiper-button-next {
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.reviews-swiper-container .swiper-button-prev:hover,
.reviews-swiper-container .swiper-button-next:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.reviews-swiper-pagination.swiper-pagination-bullets {
    bottom: 0px !important;
}

.reviews-swiper-pagination .swiper-pagination-bullet {
    background: var(--dark-grey);
    opacity: 0.7;
    width: 10px;
    height: 10px;
    margin: 0 5px;
}

.reviews-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
    color: var(--white) !important;
    width: 30px;
    height: 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    color: var(--white);
}

.swiper-pagination {
    bottom: 0px !important;
}

.swiper-pagination-bullet {
    background: var(--dark-grey);
    opacity: 0.5;
    width: 10px;
    height: 10px;
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

/* --- Cookie Consent Banner --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 500px;
    background-color: rgba(51, 51, 51, 0.95);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000; /* Au-dessus de tout */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* Ajustement mobile pour ne pas chevaucher la Sticky Bar */
@media (max-width: 768px) {
    #cookie-consent-banner {
        bottom: 85px; /* Au-dessus de la sticky bar (~70px) */
        padding: 12px;
    }
}

#cookie-consent-banner.cookie-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(50px);
}

#cookie-consent-banner p {
    font-size: 0.85em;
    line-height: 1.3;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.cookie-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn-accept {
    background-color: #3C7B87;
    color: #fff;
}

.cookie-btn-accept:hover {
    background-color: #796747;
}

.cookie-btn-reject {
    background-color: white;
    color: grey;
}

.cookie-btn-reject:hover {
    background-color: #c0392b;
}

.cookie-btn-manage {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.cookie-btn-manage:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Image Compare (Avant/Après Slider) --- */
.image-compare-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.image-compare-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: #2c3e50;
}

.image-compare-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    -webkit-user-select: none;
    user-select: none;
}

.image-compare-container img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.image-compare-before {
    position: relative;
    width: 100%;
}

.image-compare-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
}

.image-compare-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #fff;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.image-compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border: 3px solid #3498db;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

.image-compare-handle:active {
    cursor: grabbing;
}

.image-compare-handle::before,
.image-compare-handle::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.image-compare-handle::before {
    left: 12px;
    border-width: 10px 12px 10px 0;
    border-color: transparent #3498db transparent transparent;
}

.image-compare-handle::after {
    right: 12px;
    border-width: 10px 0 10px 12px;
    border-color: transparent transparent transparent #3498db;
}

.image-compare-label {
    position: absolute;
    top: 20px;
    background-color: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    pointer-events: none;
    z-index: 5;
}

.image-compare-label.before {
    left: 20px;
}

.image-compare-label.after {
    right: 20px;
}

/* --- Animation Slider --- */
@keyframes slideHint {
    0%, 100% { left: 50%; }
    40% { left: 45%; }
    60% { left: 55%; }
}

.image-compare-slider.animate-hint {
    animation: slideHint 2s ease-in-out infinite;
    animation-delay: 1s;
}

/* --- Section Matériaux de Qualité (Terrasse) --- */
.materials-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.materials-section h2 {
    text-align: center;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.materials-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
    font-size: 1.15em;
    line-height: 1.8;
    color: #555;
}

.materials-hero-image {
    max-width: 1000px;
    margin: 0 auto 60px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.materials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.material-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.material-card h3 {
    font-size: 1.8em;
    color: #3498db;
    margin-bottom: 15px;
}

.material-card .material-subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 20px;
}

.material-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.material-card ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.material-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.materials-cta {
    text-align: center;
    margin-top: 60px;
}

.materials-cta .btn-primary {
    padding: 18px 40px;
    font-size: 1.2em;
}

/* --- Mobile Sticky Bar --- */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    z-index: 9999;
    padding: 10px;
    gap: 10px;
    /* Masqué par défaut sur desktop */
    display: none; 
}

@media (max-width: 768px) {
    .mobile-sticky-bar {
        display: flex;
    }
    /* Ajouter un padding-bottom au body pour ne pas cacher le contenu */
    body {
        padding-bottom: 70px;
    }
}

.sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 12px 5px;
    transition: transform 0.2s;
}

.sticky-btn:active {
    transform: scale(0.98);
}

.sticky-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.btn-call {
    width: 35%;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-quote {
    width: 65%;
    background-color: var(--secondary-color); /* Orange PGI */
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-quote:hover {
    background-color: #796747; /* Darker shade */
}

/* --- Media Queries Components --- */
@media (max-width: 767px) {
    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
    
    .reviews-swiper-container .swiper-button-prev,
    .reviews-swiper-container .swiper-button-next {
        display: none;
    }
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .btn-primary {
        padding: 18px 40px;
        font-size: 1.25em;
    }
    
    .reassurance-elements img {
        height: 130px;
        padding: 0 20px;
        margin-top: 20px;
    }
    
    #configurator1 {
        scroll-margin-top: 100px;
    }
    
    #configurator1 h2 {
        font-size: 2.2em;
    }
    
    .step h3 {
        font-size: 1.4em;
    }
    
    .form-submit button {
        padding: 18px 40px;
        font-size: 1.2em;
        max-width: 400px;
    }
    
    .reviews-swiper-container {
        padding-bottom: 60px;
    }
}

@media (min-width: 1024px) {

    
    #configurator1::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.9);
        z-index: 1;
        pointer-events: none;
    }
    
    #configurator1 > * {
        position: relative;
        z-index: 2;
    }
    
    #configurator1 h2 {
        font-size: 2.8em;
    }
}
