/* ========================== */
/* Les textes cachés ne doivent pas s'afficher */
/* ========================== */
.hidden {
  display: none;
}


/* ========================== */
/* Overlay (fond gris) */
/* ========================== */
body.page-id-7470 .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(128, 128, 128, 0.35);
  z-index: 999;              /* Toujours sous la modale */
  display: none;
  opacity: 0;
  visibility: hidden;
}

body.page-id-7470 .modal-overlay.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* ========================== */
/* Modales (conteneur principal) */
/* ========================== */
body.page-id-7470 .modal-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;                  /* Ne dépasse pas 90% de la hauteur écran */
  overflow-y: auto;                  /* Permet de scroller si le contenu dépasse */
  -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
  z-index: 1000;
  padding: 25px;
  display: none;
  opacity: 0;
  visibility: hidden;
  font-family: "Roboto", sans-serif;
}

body.page-id-7470 .modal-wrapper:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  opacity: 1;
  visibility: visible;
}

/* Forcer les modales à être centrées horizontalement, sans décalage vertical */
body.page-id-7470 .modal-wrapper {
  position: fixed;
  top: 0;                         /* Collé en haut */
  left: 50%;                      /* Centré horizontalement */
  transform: translateX(-50%);    /* Décalage horizontal uniquement */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;               /* Toujours limité en hauteur */
  overflow-y: auto;               /* Scroll interne si contenu trop long */
  -webkit-overflow-scrolling: touch;
  z-index: 1000;
  padding: 25px;
  display: none;
  opacity: 0;
  visibility: hidden;
  font-family: "Roboto", sans-serif;
}

/* Quand la modale devient visible */
body.page-id-7470 .modal-wrapper:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  opacity: 1;
  visibility: visible;
}

/* ========================== */
/* Contenu interne */
/* ========================== */
body.page-id-7470 .modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

/* Titres centrés */
body.page-id-7470 .modal-content h2 {
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #000;
  text-align: center;
  margin-bottom: 10px;
}

/* Paragraphes et textes */
body.page-id-7470 .modal-content p,
body.page-id-7470 .modal-content strong {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.4;
  text-align: justify;
}

/* Nom et date (modale 0) */
body.page-id-7470 #confirmationPrenomsNom,
body.page-id-7470 #confirmationDateNaissance {
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

/* Réponses alignées à gauche (questions) */
body.page-id-7470 .modal-content label {
  font-size: 14px;
  color: #222;
  display: block;
  margin-bottom: 4px;
  line-height: 1.4;
  text-align: left;
}

/* Séparateurs fins (modale 1) */
body.page-id-7470 .modal-content hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Forcer la page à ne pas dépasser la largeur de l’écran */
body.page-id-7470 {
  overflow-x: hidden;
  width: 100%;
  margin: 0 auto;
  max-width: 100%;
}

/* Réorganiser Oui/Non : l’un sous l’autre, alignés à gauche */
body.page-id-7470 #conteneurQuestionsActivation label {
  display: block;           /* Forcer un retour à la ligne */
  margin: 3px 0;            /* Réduit l’espace entre chaque option */
  text-align: left;         /* Alignement à gauche */
  line-height: 1.3;         /* Compact mais lisible */
}

/* Réduire l’espace sous chaque question */
body.page-id-7470 #conteneurQuestionsActivation p {
  margin-bottom: 5px;
}

/* Gras plus fin pour tout le texte en strong dans les modales */
body.page-id-7470 .modal-content strong {
  font-weight: 600;
}



body.page-id-7470 #conteneurQuestionsActivation p {
  margin-bottom: 5px;           /* Réduit la marge sous les questions */
}

/* ========================== */
/* Loader (spinner) */
/* ========================== */
body.page-id-7470 .loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3366cc;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}

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

/* ========================== */
/* Bouton (rapport prêt) */
/* ========================== */
body.page-id-7470 #btn-ouvrir-rapport {
  margin-top: 1.5em;
  padding: 0.8em 1.2em;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: #0073e6;
  color: white;
}

body.page-id-7470 #btn-ouvrir-rapport:hover {
  background: #005bb5;
}





/* ===== PACTH ===== */

/* Conteneur principal : max 600px sur desktop, fluide sur mobile */
body.page-id-7470 .container {
  width: 100%;
  max-width: 600px;      /* limite sur écran large */
  margin: 0 auto;
  padding: 0 1em;        /* marges internes sur mobile */
  box-sizing: border-box;
}

/* Modales (chargement et affichage) : même largeur, responsive */
body.page-id-7470 .modal-wrapper:not(.hidden) {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;            /* occupe 90% sur petits écrans */
  max-width: 600px;       /* jamais plus large que 600px */
  background: white;
  border-radius: 8px;
  padding: 2em;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1001;          /* au-dessus de l’overlay */
  text-align: center;
  box-sizing: border-box;
}




/* ===== STYLES GÉNÉRAUX ===== */
body {
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #222;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
}

/* Conteneur centré pour la page Calculateur (ID 7470) */
body.page-id-7470 .container {
  padding-left: 0;
  padding-right: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== TITRES ET TEXTES ===== */
body.page-id-7470 h1 {
  text-align: center;
  font-size: 42px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: -1.5px;
  color: #000;
  max-width: 600px;
  margin: 30px auto 20px;
}

body.page-id-7470 h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.3px;
  margin: 0 0 5px;
}

/* Paragraphes par défaut */
body.page-id-7470 p,
body.page-id-7470 .tab-content,
body.page-id-7470 .extra-info,
body.page-id-7470 .rapport-block p {
  font-size: 14px;
  line-height: 1.5;
  color: #000;
}

/* Paragraphe sous "Vos informations" reste gris */
body.page-id-7470 .form-section p {
  color: #777;
}

/* Labels et textes de formulaire */
body.page-id-7470 label,
body.page-id-7470 .gender-label {
  font-size: 14px;
  font-weight: 400;
  color: #222;
  letter-spacing: -0.3px;
}

/* Placeholders */
body.page-id-7470 ::placeholder {
  color: #aaa;
  font-size: 13px;
  text-align: left;
}

/* ===== FORMULAIRE ===== */
.form-section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

/* Champs texte et nombre : angles modérés et contour gris par défaut */
body.page-id-7470 .form-section input[type="text"],
body.page-id-7470 .form-section input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px !important;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -moz-appearance: textfield;
  text-align: left;
  box-shadow: none;
}

/* Bleu uniquement quand actif */
body.page-id-7470 .form-section input[type="text"]:focus,
body.page-id-7470 .form-section input[type="number"]:focus {
  border: 2px solid #3366cc !important;
  box-shadow: 0 0 0 2px rgba(51,102,204,0.2) !important;
  border-radius: 8px !important;
}

/* Désactive tout encadré forcé quand le champ est vide (invalid) */
body.page-id-7470 .form-section input[type="text"]:invalid,
body.page-id-7470 .form-section input[type="number"]:invalid {
  border: 1px solid #ccc;
  box-shadow: none;
}

/* ===== CHAMPS DE DATE (JJ/MM/AAAA) ===== */
body.page-id-7470 .date-fields {
  display: flex;
  justify-content: flex-start; /* alignés à gauche */
  gap: 10px;
  margin-top: 5px;
  margin-bottom: 25px;
}

/* Supprime les largeurs forcées du thème */
body.page-id-7470 .date-fields input {
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  text-align: center !important;
}

/* Largeurs fixes et centrage */
body.page-id-7470 .date-fields input.day-field,
body.page-id-7470 .date-fields input.month-field {
  width: 50px !important;
}

body.page-id-7470 .date-fields input.year-field {
  width: 70px !important;
}

/* Centrer le placeholder (JJ, MM, AAAA) */
body.page-id-7470 .date-fields input::placeholder {
  text-align: center !important;
}


/* Labels sous les champs */
body.page-id-7470 .date-fields label {
  text-align: center;
  font-size: 12px;
  color: #555;
  display: block;
  margin-top: 4px;
}


/* Espacement sous homme/femme */
body.page-id-7470 .gender-section {
  margin-bottom: 30px;
}
body.page-id-7470 .gender-options {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* Suppression complète des icônes d'aide */
.help-icon {
  display: none !important;
}

/* ===== BOUTONS (INCLUANT VALIDATION) ===== */
body.page-id-7470 button.bouton-valider,
body.page-id-7470 button.bouton-valider:focus,
body.page-id-7470 button.bouton-valider:hover {
  font-family: "Roboto", sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  background: #3366cc !important;
  color: #fff !important;
  border-radius: 8px !important;
  border: none !important;
  padding: 10px !important;
  width: 100% !important;
  display: block !important;
  text-transform: none !important;
  text-align: center !important;
  cursor: pointer !important;

  /* Ajout pour espacer le bouton des questions */
  margin-top: 30px !important;
}


/* Hover */
body.page-id-7470 button:hover,
body.page-id-7470 .bouton-valider:hover,
body.page-id-7470 .rapport-block a:hover,
body.page-id-7470 .form-section input[type="submit"]:hover {
  background: #2850a8;
}

/* Supprimer le soulignement sur bouton rapport */
body.page-id-7470 .rapport-block a,
body.page-id-7470 .rapport-block a:hover {
  text-decoration: none !important;
}

/* ===== ONGLET ===== */
body.page-id-7470 .tabs {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}

body.page-id-7470 .tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #3366cc;
}

/* Onglet actif reste fond bleu + texte blanc */
body.page-id-7470 .tab.active {
  background: #3366cc;
  color: #fff;
}

/* ===== CONTENU DES ONGLET ET BLOCS ===== */
body.page-id-7470 .tab-content {
  display: none;
  color: #000;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  font-size: 14px;
}
body.page-id-7470 .tab-content.active {
  display: block;
}

body.page-id-7470 .extra-info {
  margin-top: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

/* ===== BLOC RAPPORT ===== */
body.page-id-7470 .rapport-block {
  padding: 20px;
  background: #eef3ff;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body.page-id-7470 .rapport-block h3 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
}
body.page-id-7470 .rapport-block p {
  color: #000;
}
body.page-id-7470 .rapport-block a {
  display: inline-block;
  padding: 12px 25px;
  background: #3366cc;
  color: #fff;
}

/* ========================== */
/* Loader circulaire (spinner) */
/* ========================== */
body.page-id-7470 .loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3366cc;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}

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



/* ========================== */
/* Bouton "Découvrir votre rapport" */
/* ========================== */
body.page-id-7470 #btn-ouvrir-rapport {
  margin-top: 1.5em;
  padding: 0.8em 1.2em;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: #0073e6;
  color: white;
  display: none; /* Masqué par défaut */
}

body.page-id-7470 #btn-ouvrir-rapport:hover {
  background: #005bb5;
}

body.page-id-7470 #btn-ouvrir-rapport.visible {
  display: inline-block;
}


/* ========================== */
/* Style communs */
/* ========================== */
body.page-id-7470 .modal-wrapper,
body.page-id-7470 #modal-chargement {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 500px;
  z-index: 1000;
  padding: 25px;
  font-family: "Roboto", sans-serif;

  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


/* ===== CONTENU DES ONGLET (TITRES, PARAGRAPHES, LISTES) ===== */
body.page-id-7470 .onglet-contenu h2,
body.page-id-7470 .onglet-contenu h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 1.4;
  color: #000;
  margin-top: 2em;
  margin-bottom: 0.8em;
}

body.page-id-7470 .onglet-contenu p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 1em;
  color: #000;
  text-align: justify; /* Ajout pour la justification */
}

body.page-id-7470 .onglet-contenu ol,
body.page-id-7470 .onglet-contenu ul {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

body.page-id-7470 .onglet-contenu li {
  margin-bottom: 0.8em;
  line-height: 1.5;
}