/* ==============================
   FONTS PERSONNALISÉS
   ============================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-optical-sizing: auto;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-VariableFont_opsz,wght.ttf') format('ttf');
}
html {
  scroll-behavior: smooth;
}

/* ==============================
   VARIABLES PERSONNALISÉES
   ============================== */
:root {
  /* Couleurs de base */
  --custom-text: #212121;
  --custom-background: #fefefe;
  --custom-primary: #2f504a;
  --custom-secondary: #97b6a7;
  --custom-accent: #caa270;
  --custom-accent-background: #faf9f7;

  /* Structure et contraste */
  --custom-border-radius: 8px;
  --custom-shadow-color: rgba(0, 0, 0, 0.15);
  --custom-divider: #eaeaea;

  /* Couleurs typographiques */
  --custom-heading-color: #463114;
  --custom-subheading-color: #6b5a46;

  /* Boutons */
  --custom-btn-primary-bg: #2f504a;
  --custom-btn-primary-hover: #3c665d;
  --custom-btn-primary-text: #ffffff;

  --custom-btn-secondary-bg: #ffffff;
  --custom-btn-secondary-border: #97b6a7;
  --custom-btn-secondary-text: #212121;
  --custom-btn-secondary-hover-bg: #f1f5f3;

  /* Fond spécifique */
  --custom-footer-bg: #172724;
  --custom-footer-text: #dcd0c1;
  --custom-section-alt-bg: #f5f3ef;
}

/*   content-wrapper   */
#content-wrapper {
	min-width: 320px;
    max-width: 1440px;
    margin: 0 auto;
}

.main_title{
	color: #222!important;
	font-family: 'Inter', sans-serif;
	font-size: 48px;
	/* line-height: 32px; */
	font-style: normal;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	margin: 64px auto;
}
/* ==============================
   CONFIGURATEUR SUR MESURE - TEST FORM 
   ============================== */

/*
 * CODE CSS COMPLET : Configurateur de Pergola (Deux Colonnes + Accordéon + Modale)
 * Ce code est préfixé avec 'cg-' pour éviter les conflits avec LiteCart.
 */

/* --- 1. MISE EN PAGE PRINCIPALE (FLEXBOX) --- */

 .cg-layout {
    display: flex; 
    gap: 30px; 
    max-width: 1200px; 
    margin: 20px auto; 
    padding: 20px;
    background-color: #f9f9f9; 
    /* border-radius: 8px;
    border: 1px solid #e0e0e0; */
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
} 

/* Colonne de Gauche : Image */
 .cg-colonne-image {
    flex: 1; 
    min-width: 350px; 
} 

/* Colonne de Droite : Formulaire */
 .cg-colonne-formulaire {
    flex: 1.5; 
    padding: 0;
    border: none;
} 

/* Conteneur de l'image (pour l'effet sticky) */
 .cg-image-container {
    margin-bottom: 0;
    position: sticky;
    top: 20px; 
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
} 

 #cg-pergola-image {
    width: 100%; 
    height: auto;
    display: block;
    transition: opacity 0.3s ease-in-out; 
} 

/* --- 2. STYLES DE L'ACCORDÉON/BOUTON DÉROULANT --- */

 .cg-accordion-item {
    border: none;
    padding: 0;
    margin-bottom: 20px; 
    min-width: 100%; 
} 

 .cg-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 5px;
    background-color: #ffffff; 
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s;
}

.cg-accordion-header:hover {
    background-color: #f0f0f0;
}

.cg-accordion-icon {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
} 

/* Contenu des options (caché par défaut) */
 .cg-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 5px; 
} 

/* Affichage lorsque la section est ouverte par JS */
 .cg-accordion-content.is-open {
    max-height: 500px; 
    padding: 10px 5px 20px 5px;
} 

/* Rotation de l'icône Moins (-) */
 .cg-accordion-header.is-active .cg-accordion-icon {
    color: var(--custom-primary); 
    font-weight: 900;
} 

/* NOUVEAU: Conteneur Flexbox uniquement pour les options */
 .cg-options-flex-group {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
    margin-bottom: 10px; 
    width: 100%;
} 


/* --- 3. STYLES DES OPTIONS (RADIO BUTTONS) --- */

/* .cg-option-wrapper {
    
} */

/* Styles pour transformer les labels en blocs cliquables */
 .cg-option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    margin: 0; 
    border: 1px solid #222;
    border-radius: 6px;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    min-height: 50px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
} 

/* Masque le bouton radio natif */
 .cg-accordion-item input[type="radio"] {
    display: none;
} 

.cg-accordion-item input[type="radio"].radio-visible{
    display: inline;
    border: 1px solid black;
}


/* Style de l'option au survol */
 .cg-option-label:hover {
    border-color: #a0a0a0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
} 

/* --- NOUVEAU : STYLES DES CHAMPS DE SAISIE DE DIMENSIONS --- */

 .cg-input-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%; 
} 

 .cg-input-wrapper label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.cg-input-wrapper input[type="number"] {
    padding: 10px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.cg-input-wrapper input[type="number"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
} 

/* Optionnel : Rendre les deux champs côte à côte si l'espace le permet */
 @media (min-width: 500px) {
    #dimensions-input-container {
        display: flex;
        gap: 15px;
    }
    .cg-input-wrapper {
        width: calc(50% - 7.5px);
    }
} 

/* Style de l'option SÉLECTIONNÉE (Bordure Bleue pour la visibilité) */
 .cg-accordion-item input[type="radio"]:checked + .cg-option-label {
    border-color: var(--custom-primary); 
    background-color: #e6f7eb; 
    color: #1a6d2c;
    font-weight: bold;
} 

/* --- 4. STYLES DES LIENS "EN SAVOIR PLUS" (Modifié pour s'intégrer) --- */
 .cg-info-link {
    display: block; 
    width: 100%; 
    text-align: left;
    font-size: 0.9em;
    color: var(--custom-footer-bg); 
    text-decoration: underline;
    cursor: pointer;
} 

/* --- 5. STYLES DU RÉCAPITULATIF ET BOUTON --- */

 .cg-recap-prix {
    text-align: right;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cg-recap-prix p {
    font-size: 1.3em;
    color: #333;
    margin: 0;
}

#cg-prix-actuel { 
    font-size: 1.6em;
    color: var(--custom-heading-color); 
}

.cg-button-add-to-cart {
    display: block;
    width: 100%;
    padding: 15px 25px;
    margin-top: 20px;
    background-color: var(--custom-primary); 
    color: var(--custom-btn-primary-text);
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cg-button-add-to-cart:hover {
    background-color: var(--custom-btn-primary-hover);
    transform: translateY(-1px);
} 

/* --- 6. STYLES DE LA MODALE --- */

 .cg-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.6);  */
    z-index: 999; 
    display: none; 
}

.cg-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    background: #fefefe!important;
    padding: 8px 16px!important;
    z-index: 1000; 
    display: none; 
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
}

.cg-modal-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.cg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f7f7f7;
}

.cg-modal-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.cg-modal-body {
    padding: 20px;
    line-height: 1.6;
}

.cg-modal-close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0 5px;
}

.cg-modal-close-btn:hover {
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
} 

/* --- 7. RESPONSIVE DESIGN --- */

 @media (max-width: 768px) {
    .cg-layout {
        flex-direction: column; 
        gap: 10px;
        padding: 10px;
    }
    
    .cg-colonne-image {
        min-width: 100%;
        margin-bottom: 20px;
    }

    .cg-image-container {
        position: static; 
    }
    
    
    .cg-option-label {
        width: 100%;
        box-sizing: border-box;
    }
    
    .cg-options-flex-group .cg-option-wrapper {
        width: 100%;
    }
} 


/* ==============================
   STYLES DU CATALOGUE DE PRODUITS (Étape 1) - Préfixe fo-
   ============================== */
/* --- STYLES DE LA SÉLECTION (Catalogue, Onglets & Grille 8px) --- */

.fo-selection-wrapper {
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 16px; 
}

.fo-main-title, .fo-form-title {
    text-align: center;
    margin-bottom: 32px; 
    color: #333;
    font-size: 2em;
}

.fo-category-description {
    font-size: 1em;
    color: #555;
    padding: 16px; 
    margin-bottom: 24px;
    background-color: var(--custom-background);
    border-radius: 4px; 
}

/* --- Menu des Onglets (Tabs) --- */
.fo-tabs-menu {
    display: flex;
    justify-content: center;
    margin-bottom: 24px; 
    border-bottom: 2px solid var(--custom-primary);
}

.fo-category-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 16px 24px; 
    margin: 0 8px; 
    font-size: 1.1em;
    font-weight: bold;
    color: #666;
    border-bottom: 4px solid transparent; 
    transition: all 0.3s ease;
}

.fo-category-link:hover {
    color: var(--custom-btn-primary-hover);
    border-bottom-color: var(--custom-btn-secondary-bg);
}

.fo-category-link.fo-active {
    color: var(--custom-primary);
    border-bottom-color: var(--custom-primary);
}

/* Affichage du contenu */
.fo-category-container.fo-hidden {
    display: none;
}
.fo-category-container.fo-visible {
    display: block;
}

/* --- Grille de Produits (Catalogue) --- */

.fo-product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px; 
    justify-content: center;
}

.fo-product-card {
    display: flex;
    flex-direction: column;
    width: 100%; 
    max-width: 350px; 
    border: 1px solid #e0e0e0;
    border-radius: 8px; 
    overflow: hidden;
    text-decoration: none; 
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.fo-product-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); 
}

.fo-product-image-wrapper {
    overflow: hidden;
    height: 200px; 
}

.fo-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.3s;
}

.fo-product-info {
    padding: 16px; 
    flex-grow: 1;
    display: flex; 
    flex-direction: column;
}

.fo-product-name {
    font-size: 1.2em;
    margin: 0 0 8px 0; 
    color: var(--custom-primary); 
}

.fo-product-description {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 16px 0; 
    min-height: 48px; 
}

.fo-product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--custom-primary); 
    margin-top: auto;
    text-align: right;
    padding-top: 8px; 
    border-top: 1px solid #eee;
}

/* Styles pour les cartes vides (si utilisées pour l'alignement) */
.fo-card-empty {
    visibility: hidden; 
    border: none;
    box-shadow: none;
    background-color: transparent !important;
    height: 0; 
    margin: 0;
    padding: 0;
}

/* RESPONSIVE DESIGN (Grille de produits) */
@media (min-width: 600px) {
    .fo-product-card {
        width: calc(50% - 12px); 
        max-width: none;
    }
    .fo-card-empty {
        display: none;
    }
}
@media (min-width: 1024px) {
    .fo-product-card {
        width: calc(25% - 18px); 
    }
}
/* Permet aux cartes vides de s'afficher sur une grille à 4 colonnes pour l'alignement */
@media (min-width: 1024px) {
    .fo-product-grid:has(.fo-is-pergola) .fo-card-empty {
         display: block; 
         visibility: hidden; 
         width: calc(25% - 18px); 
         height: 1px;
    }
}


/* --- STYLES DU CONFIGURATEUR (Layout) --- */

.fo-layout {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 40px auto; 
    padding: 0 16px;
    gap: 32px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fo-visualisation {
    flex: 1;
    min-width: 300px; 
    padding: 24px 0; 
}

.fo-options-form {
    flex: 1;
    min-width: 300px; 
    padding: 24px 0;
}

.fo-image-display img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}

.price-configurateur {
    text-align: left;
    padding: 16px;
    margin-bottom: 16px;
    font-size: 32px;
    font-weight: 600;
    color: var(--custom-primary);
}

#valid_button {
    width: 80%;
}

.fo-label {
    font-size: 1.1em;
    font-weight: 500;
    color: #555;
    display: block;
}

.fo-prix {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--custom-primary);
    display: block;
}

.fo-btn-add-cart {
    width: 100%;
    padding: 16px;
    background-color: var(--custom-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fo-btn-add-cart:hover {
    background-color: var(--custom-secondary);
}

/* --- STYLES DE BOUTON SECONDAIRE (Retour) --- */

.fo-btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 24px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    text-align: center;
}

.fo-btn-secondary:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
}

/* --- ACCORDÉON & OPTIONS --- */

.fo-option-group {
    border: none;
    padding: 0;
    margin-bottom: 16px;
}

.fo-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 24px; 
    background-color: #f8f8f8;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.fo-accordion-header:hover {
    background-color: #f0f0f0;
}

.fo-accordion-header.fo-active {
    background-color: #e0e0e0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.fo-accordion-icon {
    font-size: 1.2em;
    font-weight: normal;
    transition: transform 0.3s;
}

.fo-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    border: 1px solid #dcdcdc;
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.fo-accordion-content.fo-open {
    max-height: 500px;
    padding: 16px 24px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

/* --- OPTIONS RADIO/CHECKBOX (Flexbox) --- */

.fo-options-flex-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; 
    margin-bottom: 16px;
}

.fo-option-wrapper {
    flex-grow: 1;
    min-width: 150px; 
    position: relative;
}

.fo-option-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fo-option-label {
    display: block;
    padding: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.fo-option-wrapper input[type="radio"]:checked + .fo-option-label {
    border-color: var(--custom-primary);
    background-color: #e6f0ff;
    box-shadow: 0 0 0 1px var(--custom-text);
}

.fo-option-label:hover {
    border-color: var(--custom-secondary);
}

.fo-option-title {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.fo-option-price {
    font-size: 0.9em;
    color: var(--custom-primary);
    display: block;
}

/* --- CHAMPS DE SAISIE (Dimensions) --- */

.fo-input-wrapper {
    margin-bottom: 16px;
}

.fo-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.fo-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.fo-info-link {
    display: block;
    margin-top: 8px;
    text-align: right;
    font-size: 0.9em;
    color: var(--custom-primary);
    text-decoration: none;
}

/* --- MODALES --- */

.fo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.fo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 32px; 
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    z-index: 1000;
}

.fo-modal-content {
    position: relative;
}

.fo-modal-close-btn {
    position: absolute;
    top: -16px; 
    right: -16px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* --- RESPONSIVE LAYOUT GÉNÉRAL --- */
@media (max-width: 767px) {
    .fo-layout {
        flex-direction: column;
        padding: 0;
        box-shadow: none;
    }
    .fo-visualisation, .fo-options-form {
        width: 100%;
        padding: 16px;
    }
    .fo-visualisation {
        order: -1;
    }
}


/*Css v1*/
#configurateur-form {
    background-color: transparent!important;
}

.input_opt {
    background-color: var(--custom-accent-background);
    border: transparent! important;
}

