/* Styles pour le simulateur de ROI */
.roi-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    position: relative; /* Ajouté pour le positionnement de l'image */
}

/* Pseudo-élément pour l'image entre les colonnes */
.roi-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background-image: url('https://www.rman-sync.com/wp-content/uploads/2025/05/Anim-ROI-export-score.svg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Afficher l'image quand on a la classe show-result */
.roi-container.show-result::before {
    opacity: 1;
}

/**colonne 1 **/

#col-1, #col-2 {
    display: flex;
    align-items: center;
}

#roi-form-step1,#roi-form-step2 {width:100%;height: 100%;}

.roi-column input, .roi-column select, .roi-column textarea {width: calc(100% - 40px);margin-bottom: 10px;}

.roi-column {
    flex: 1; 
    min-width: 300px; 
    width: 50%;
    padding: 0.625rem;
    position: relative;
    z-index: 2; /* S'assurer que les colonnes sont au-dessus de l'image */
}

/*forms*/
#roi input {
	background-color: var(--bg);
	border-color: var(--border-30);
	color:var(--base-white-30);
	padding: 12px;
	border-radius: 8px;
	height: 42px;
	margin:0px;
	font-size: 1rem;
	}

#roi input:focus {
		background-color: var(--secondary);
		border-color: var(--border);
		box-shadow: 0 0 5px var(--border);
		transition: 0.3s;
	}

#roi input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#roi input[type="number"] {
    -moz-appearance: textfield;
}

.infos-wrapper {
    padding: 2rem;
    border-radius: 8px;
    height:fit-content;
    position: relative;
    display: flex;
    align-items: center;  
}

.input-wrapper {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    margin-bottom: 1rem;
    align-items: center;
}

.input-wrapper input[type="number"],
.input-wrapper input[type="text"],
.input-wrapper input[type="email"],
.input-wrapper input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-wrapper input[type="number"]:focus,
.input-wrapper input[type="text"]:focus,
.input-wrapper input[type="email"]:focus,
.input-wrapper input[type="tel"]:focus {
    border-color: var(--border);
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.ca {
    display: flex;
    flex-direction: row;
    flex: 1;
    align-items: center !important;
}

.ca input {
    /*border-radius: 4px 0 0 4px !important;
    border-radius: 4px 0 0 4px !important;*/
}

/* Correction des styles pour le sélecteur de devise */
.currency-selector {
    display: flex;
    gap: .5rem;
    width: auto;
    height: 100%;
    margin-left: 1rem;
    align-items: center;
    /* Suppression du z-index négatif qui empêchait le clic */
    z-index: 1; 
}

.currency-selector label {
    display: inline-block;
    cursor: pointer; /* Important pour montrer que c'est cliquable */
}

.currency-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.currency-selector span {
    display: inline-block;
    padding: 8px 16px;
    color:var(--base-white-60);
    border: 1px solid transparent;
    /*border-radius: 5px;*/   
    border-radius: 16px;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer; /* Ajouter le curseur pointer pour indiquer que c'est cliquable */
}

.currency-selector label:hover span {
   background: 
    linear-gradient(148deg, var(--secondary) 0.3%, var(--bg) 50.33%) padding-box,
    linear-gradient(148deg, #ffffff00 0.3%, #ffffff00 50.33%) border-box;
    transition: 0.3s;
}

.currency-selector input[type="radio"]:checked + span {
    background-color:var(--primary);
    border:1px solid var(--border);
    background: 
    linear-gradient(148deg, var(--primary) 0.3%, var(--primary) 50.33%) padding-box,
    linear-gradient(148deg, #ffffff00 0.3%, #ffffff00 50.33%) border-box;
    color: var(--base-white);
}

.types-wrapper {
    position: absolute;
    top:0;
    display: flex;
    align-items: center;
    padding: 0 0 0 1rem;
    height: 42px;
    border-left: none;
    border-radius: 0 4px 4px 0;
    right:50px;
	color:var(--base-white-30);
	opacity: 0.5;
	text-align: right;
   
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: bold;
    cursor: help;
    position: relative;
   margin-left: 1rem;
   z-index: 100;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    width: fit-content;
    transform: translateX(-50%);
    background-color: var(--bg);
    color: var(--base-white-30);
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
}

.required, .info-tooltip, .simulation_result, #roi #consent-container  {
    color: var(--base-white-30);
    font-size: .8rem;
}

.required {
    margin-top:2rem;
}


/**colonne 2 **/

#col-2 {
    text-align: center;
    background-image: url('https://www.rman-sync.com/wp-content/uploads/2025/03/Anim-ROI-cal-export.svg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    position: relative;
    display: flex;
    align-items: center;
}

/* Supprimer l'ancienne image de fond sur #col-2 */
#col-2.show-result {
    background-image: url('https://www.rman-sync.com/wp-content/uploads/2025/05/Anim-ROI-export-score.svg');
    background-position: top center;
    background-size: contain;
}

/* Correction des styles pour .top-res et .bottom-res */
.top-res {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.bottom-res {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Correction pour #simulation_result */
#simulation_result {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Assurer que ça prend toute la hauteur disponible */
}

/* Correction pour result-wrapper */
.result-wrapper {
    padding: 32px;
    height: 570px; /* Hauteur fixe pour maintenir la cohérence */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgba(var(--bg-rgb), 0.9); /* Fond semi-transparent pour la lisibilité */
    border-radius: 8px;
}

/* Assurer que les contenus internes s'étirent correctement */
#simulation_result .top-res,
#simulation_result .bottom-res {
    width: 100%;
}

/* Correction pour le positionnement vertical */
#simulation_result .top-res {
    margin-bottom: auto; /* Pousse vers le haut */
}

#simulation_result .bottom-res {
    margin-top: auto; /* Pousse vers le bas */
}

/**button**/
.cta a {cursor: pointer;}

#simulate-button{background-color: var(--primary);}

#roi .et_pb_button {
	background-color: var(--primary);
	border-radius: 25px;
	font-size: .8rem;
	padding: 8px 12px !important;
	border:1 solid var(--primary);
}

#roi .et_pb_button::after {
	content: none!important;
}


#roi .et_pb_button:hover {
	background-color: var(--base-white)!important;
   color: var(--primary)!important;
	cursor: pointer;

   
}

.et_pb_button:disabled {
    background-color: var(--base-white-30);
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/**checkbox**/

#wrapper-consent-container {
     display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: start; 
	gap: 16px;
	text-align: left;
    margin-bottom: 20px; /* Ajouter de l'espace en bas */
}

#wrapper-consent-container span {
     margin-left:1rem;
}
#consent-container-result {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}
#consent-container-result input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    background-color: var(--bg);
   border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}


#roi input[type="checkbox"]:hover {
    background-color: var(--secondary);
    border: 1px solid var(--border);
}

#roi input[type="checkbox"]:checked {
    background-color: var(--primary);
}

#roi input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--base-white);
    font-size: 0.75rem;
    font-weight: bold;
}


#consent-container-result span {
    font-size: 14px;
    color: var(--base-white-30);
}
/* Textes & Messages */

#instructions-text, #result-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.privacy-policy {
    color: var(---base-white-30); 
    margin-top: 2rem;
    font-size: 0.8rem;
}

.privacy-policy a {
    color: var(--base-white-30);
    transition: 0.3s;
    text-decoration: none;
}

.privacy-policy a:hover {
    color: var(--base-white);
    transition: 0.3s;
    text-decoration: underline;
}

.result-message {
    font-size: 18px;
    color: var(--base-white);
    margin: 20px 0;
}

.result-message.error {
    color: var(--primary);
}

.simulation_result_error {
    color: var(--primary);
    margin: 10px 0;
}

/* Mode Téléphone (moins de 768px) */
@media (max-width: 767px) {
    /* Masquer l'image centrale sur mobile */
    .roi-container::before {
        display: none;
    }
    
    /* Container principal centré et en colonne */
    .roi-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 1rem;
    }
    
    /* Colonnes centrées et pleine largeur */
    .roi-column {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Colonne 1 - formulaire */
    #col-1 {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    /* Colonne 2 - résultats */
    #col-2 {
        order: 2;
        width: 100%;
        background-image: none;
        justify-content: center;
        min-height: 200px;
    }
    #col-2.show-result, #col-2  {
        background-image: none;
    }

    /* Wrapper des infos centré */
    .infos-wrapper {
        padding: 1rem;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Wrapper des résultats centré */
    .result-wrapper {
        width: 100%;
        height: fit-content;
        padding: 1rem;
        margin: 0 auto;
        text-align: center;
        background-color: transparent; /* Pas de fond sur mobile */
    }
    
    /* Ajustements des marges */
    .required {
        margin-top: 1rem;
    }
    
    .simulation_result_error {
        color: var(--secondary-normal);
        margin: 0 0 1rem 0;
    }
    .top-res {
    min-height: 50px;
    }

}

/* Mode Tablette (entre 768px et 980px) */
@media (min-width: 768px) and (max-width: 980px) {
    /* Masquer l'image centrale sur tablette */
    .roi-container::before {
        display: none;
    }
    
    /* Container principal centré et en colonne */
    .roi-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 25px;
        padding: 1.5rem;
    }
    
    /* Colonnes centrées avec largeur maximale */
    .roi-column {
        width: 100%;
        max-width: 500px;
        min-width: unset;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Colonne 1 - formulaire */
    #col-1 {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    /* Colonne 2 - résultats */
    #col-2 {
        order: 2;
        width: 100%;
        justify-content: center;
        min-height: 200px;
        background-image: none;
    }
        #col-2.show-result, #col-2  {
        background-image: none;
    }
    /* Wrapper des infos centré */
    .infos-wrapper {
        padding: 2rem;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Wrapper des résultats centré */
    .result-wrapper {
        width: 100%;
        max-width: 550px;
        height: fit-content;
        padding: 2rem;
        margin: 0 auto;
        text-align: center;
        background-color: transparent; /* Pas de fond sur tablette */
    }
}

/* Mode Desktop (plus de 980px) */
@media (min-width: 981px) {
    /* Styles desktop restent inchangés - affichage côte à côte */
    .roi-container {
        flex-direction: row;
        align-items: stretch;
    }
    
    .roi-column {
        width: 50%;
        flex: 1;
    }
}