/* CPQ Form : styles migrés du bloc HTML brut (sélecteurs id -> classes). */
.cpq-famille[hidden],.cpq-btn-retour[hidden],.cpq-modal[hidden],.cpq-scroll-hint[hidden],.cpq-demande [hidden]{display:none!important}

/* Étape 1 */
.cpq-famille{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;margin:24px auto;max-width:900px}
.cpq-btn-choix{flex:1 1 320px;max-width:420px;padding:22px 28px;border:2px solid #fff;border-radius:6px;background:transparent;color:#fff;font:inherit;font-size:18px;font-weight:600;line-height:1.3;cursor:pointer;transition:background .2s,color .2s}
.cpq-btn-choix:hover,.cpq-btn-choix:focus-visible{background:#fff;color:#2e2360}
.cpq-btn-retour{display:block;margin:0 auto 16px;background:none;border:0;padding:0;color:#fff;font:inherit;text-decoration:underline;cursor:pointer}

/* Modale */
.cpq-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:999999 !important;display:flex;align-items:center;justify-content:center}
.cpq-modal-box{background:#fff;color:#222;max-width:760px;width:92%;max-height:92vh;display:flex;flex-direction:column;padding:24px;border-radius:8px;box-sizing:border-box}
.cpq-modal-box h3{color:#2e2360;margin:0;font-size:22px;line-height:1.3}
.cpq-modal-box label{color:#222;cursor:pointer}
.cpq-modal-texte{flex:1 1 auto;min-height:0;max-height:60vh;overflow:auto;border:1px solid #ddd;border-radius:4px;padding:16px 20px;margin:16px 0 8px;font-size:15px;line-height:1.55;color:#222}
.cpq-modal-texte h4{color:#2e2360;font-size:17px;margin:22px 0 8px;line-height:1.3}
.cpq-modal-texte p,.cpq-modal-texte ul{margin:0 0 10px}
.cpq-modal-texte ul{padding-left:22px}
.cpq-modal-texte li{margin-bottom:6px}
.cpq-modal-texte ul ul{margin-top:6px}
.cpq-modal-texte .encadre{background:#f3f1fa;border-left:4px solid #2e2360;padding:10px 14px;margin:0 0 12px}
.cpq-modal-texte .note{font-size:14px;color:#555;padding-left:22px}
.cpq-modal-texte table{width:100%;border-collapse:collapse;margin:8px 0 14px;font-size:14px}
.cpq-modal-texte th,.cpq-modal-texte td{border:1px solid #ddd;padding:6px 10px;text-align:left;vertical-align:top;color:#222}
.cpq-modal-texte th{background:#f3f1fa}
.cpq-modal-texte td:last-child,.cpq-modal-texte th:last-child{text-align:right;white-space:nowrap}
.cpq-modal-texte tfoot td{font-weight:700}
.cpq-modal-texte a{color:#2e2360}
.cpq-scroll-hint{font-size:13px;color:#777;margin:0 0 8px;text-align:center}
.cpq-modal-actions{margin-top:16px;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.cpq-modal-actions button{padding:10px 18px;border-radius:4px;border:1px solid #2e2360;font:inherit;cursor:pointer}
.cpq-btn-annuler{background:#fff;color:#2e2360}
.cpq-btn-confirmer{background:#2e2360;color:#fff}
.cpq-btn-confirmer:disabled,.cpq-chk-accepte:disabled+span{opacity:.4;cursor:not-allowed}

/* Formulaire de demande [cpq_form] */
/* Le thème et WPBakery annulent les marges des premiers et derniers enfants (titres, `.wpb_text_column :last-child`) :
   l'espacement vertical passe donc par des `gap` et des `padding` plutôt que par des marges. */
.cpq-demande{color:#fff;overflow-wrap:break-word}
.cpq-demande,.cpq-demande *{-webkit-hyphens:manual;hyphens:manual}
.cpq-demande-root{max-width:820px;margin:0 auto;text-align:left}
.cpq-demande-root *,.cpq-demande-root *::before,.cpq-demande-root *::after{box-sizing:border-box}
.cpq-demande a{color:inherit;text-decoration:underline}
.cpq-demande .cpq-demande-familles{gap:20px;margin:32px auto}
.cpq-demande .cpq-btn-choix{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 28px;text-align:center}
.cpq-demande .cpq-btn-sous-titre{font-size:14px;font-weight:400}
.cpq-demande .cpq-accueil-texte{margin:0 auto 8px;text-align:center}
.cpq-demande .cpq-btn-retour{margin:0 0 28px}

/* Famille : titre, introduction, choix du service. */
.cpq-demande .cpq-panneau{display:flex;flex-direction:column;gap:20px}
.cpq-demande .cpq-panneau-titre,.cpq-demande .cpq-service-titre,.cpq-demande .cpq-section-titre{margin:0;color:inherit;line-height:1.25}
.cpq-demande .cpq-panneau-titre{font-size:30px}
.cpq-demande .cpq-panneau-intro p{margin:0 0 12px}
.cpq-demande .cpq-panneau-titre:focus,.cpq-demande .cpq-service-titre:focus,.cpq-demande .cpq-section-titre:focus,.cpq-demande .cpq-status:focus{outline:none}

/* Service : titre, progression, sections en blocs, envoi. */
.cpq-demande .cpq-service{display:flex;flex-direction:column;gap:24px;margin-top:40px;padding-top:36px;border-top:1px solid rgba(255,255,255,.25)}
.cpq-demande .cpq-service-titre{font-size:26px}
.cpq-demande .cpq-section,.cpq-demande .cpq-final{display:flex;flex-direction:column;gap:32px;padding:36px 40px;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:rgba(255,255,255,.04)}
.cpq-demande .cpq-section-titre{padding:0 0 16px;border-bottom:1px solid rgba(255,255,255,.2);font-size:22px}
.cpq-demande .cpq-section-actions{margin:0;padding:4px 0 0}
.cpq-demande .cpq-section-actions:has(> [hidden]:only-child){display:none}

/* Questions */
.cpq-demande .cpq-question{display:block;margin:0;padding:0;border:0;min-width:0}
.cpq-demande .cpq-label,.cpq-demande legend.cpq-label{display:block;float:none;width:100%;margin:0;padding:0 0 10px;border:0;background:transparent;color:inherit;font-size:18px;font-weight:600;line-height:1.45}
.cpq-demande .cpq-facultatif{font-weight:400;font-size:14px;opacity:.85}
.cpq-demande .cpq-question .cpq-aide{margin:0;padding:0 0 14px;font-size:14px;line-height:1.55;opacity:.9}
.cpq-demande .cpq-question input[type=text],.cpq-demande .cpq-question input[type=tel],.cpq-demande .cpq-question input[type=email],.cpq-demande .cpq-question input[type=date],.cpq-demande .cpq-question select,.cpq-demande .cpq-question textarea{display:block;width:100%;max-width:100%;min-height:50px;margin:0;padding:12px 16px;border:2px solid #fff;border-radius:4px;background:transparent;color:#fff;font:inherit;font-size:16px;line-height:1.4}
.cpq-demande .cpq-question textarea{min-height:140px;resize:vertical}
.cpq-demande .cpq-question select option{color:#222;background:#fff}
.cpq-demande .cpq-question input[type=date]{color-scheme:dark}
.cpq-demande .cpq-question input:focus-visible,.cpq-demande .cpq-question select:focus-visible,.cpq-demande .cpq-question textarea:focus-visible,.cpq-demande button:focus-visible,.cpq-demande .cpq-option input:focus-visible{outline:3px solid #fff;outline-offset:3px;box-shadow:0 0 0 6px #2e2360}
.cpq-demande .cpq-question[aria-invalid=true] input,.cpq-demande .cpq-question--invalide input,.cpq-demande .cpq-question--invalide select,.cpq-demande .cpq-question--invalide textarea{border-color:#ffb3b3}
.cpq-demande .cpq-options{display:flex;flex-wrap:wrap;gap:12px 36px;padding:2px 0 0}
.cpq-demande .cpq-question--choix_multiple .cpq-options{flex-direction:column;gap:12px}
.cpq-demande .cpq-option{display:flex;align-items:flex-start;gap:12px;margin:0;padding:2px 0;color:inherit;font-weight:400;line-height:1.45;cursor:pointer}
.cpq-demande .cpq-option input[type=radio],.cpq-demande .cpq-option input[type=checkbox]{flex:0 0 auto;width:20px;height:20px;margin:1px 0 0;accent-color:#fff}

/* Messages des règles et erreurs */
.cpq-demande .cpq-q-msg:empty,.cpq-demande .cpq-q-err:empty{display:none}
.cpq-demande .cpq-question .cpq-q-err{margin:0;padding:10px 0 0;color:#ffb3b3;font-size:15px;font-weight:600}
.cpq-demande .cpq-question .cpq-q-msg{padding:14px 0 0}
.cpq-demande .cpq-msg{position:relative;margin:0;padding:16px 20px 16px 58px;border-radius:4px;background:#fff;color:#222;font-size:15px;line-height:1.55}
.cpq-demande .cpq-msg + .cpq-msg{margin-top:12px}
.cpq-demande .cpq-msg p{margin:0 0 10px;color:#222}
.cpq-demande .cpq-msg p:last-child{margin-bottom:0}
.cpq-demande .cpq-msg a{color:#2e2360}
.cpq-demande .cpq-msg::before{position:absolute;left:18px;top:15px;width:26px;height:26px;border-radius:50%;color:#fff;font-weight:700;font-size:18px;line-height:26px;text-align:center}
.cpq-demande .cpq-msg--blocage{border-left:4px solid #c62828}
.cpq-demande .cpq-msg--blocage::before{content:"\00d7";background:#c62828}
.cpq-demande .cpq-msg--avertissement{border-left:4px solid #b26a00}
.cpq-demande .cpq-msg--avertissement::before{content:"!";background:#b26a00}

/* Boutons */
.cpq-demande .cpq-btn-continuer,.cpq-demande .cpq-final .cpq-btn-envoyer{display:inline-block;height:auto;width:auto;margin:0;padding:15px 32px;border:2px solid #fff;border-radius:6px;background:#fff;color:#2e2360;font:inherit;font-size:17px;font-weight:600;line-height:1.3;cursor:pointer;transition:background .2s,color .2s}
.cpq-demande .cpq-btn-continuer:hover,.cpq-demande .cpq-final .cpq-btn-envoyer:hover{background:transparent;color:#fff}
.cpq-demande .cpq-btn-continuer:disabled,.cpq-demande .cpq-final .cpq-btn-envoyer:disabled{opacity:.5;cursor:not-allowed}

/* Fin, indisponibilité, état de l'envoi */
.cpq-demande .cpq-mot-de-fin p,.cpq-demande .cpq-indisponible p{margin:0 0 12px}
.cpq-demande .cpq-mot-de-fin p:last-child,.cpq-demande .cpq-indisponible p:last-child{margin-bottom:0}
.cpq-demande .cpq-indisponible{margin:0;padding:20px 24px;border:2px solid #fff;border-radius:6px}
.cpq-demande .cpq-status:empty{display:none}
.cpq-demande .cpq-status{margin:24px 0 0;padding:20px 24px;border:2px solid #fff;border-radius:6px}
.cpq-demande .cpq-status--erreur{border-color:#ffb3b3}
.cpq-demande .cpq-status--succes{background:#fff;color:#2e2360}
.cpq-demande .cpq-status p{margin:0 0 8px}
.cpq-demande .cpq-status p:last-child{margin:0}
.cpq-demande .cpq-status button{margin-top:10px;padding:10px 18px;border:2px solid currentColor;border-radius:4px;background:transparent;color:inherit;font:inherit;cursor:pointer}

/* Progression */
.cpq-demande .cpq-progress{margin:0}
.cpq-demande .cpq-progress-texte{display:block;margin:0 0 8px;font-size:14px;opacity:.9}
.cpq-demande .cpq-progress-piste{display:block;height:6px;border-radius:3px;background:rgba(255,255,255,.3);overflow:hidden}
.cpq-demande .cpq-progress-barre{display:block;height:100%;background:#fff;transition:width .3s}
.cpq-hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Sur téléphone, les sections ne sont plus encadrées : le texte garde toute la largeur. */
@media (max-width:600px){
  .cpq-demande .cpq-section,.cpq-demande .cpq-final{gap:28px;padding:28px 0 0;border:0;border-top:1px solid rgba(255,255,255,.2);border-radius:0;background:none}
  .cpq-demande .cpq-section-titre{padding:0;border:0}
  .cpq-demande .cpq-service{margin-top:32px;padding-top:28px}
  .cpq-demande .cpq-panneau-titre{font-size:26px}
  .cpq-demande .cpq-service-titre{font-size:22px}
  .cpq-demande .cpq-label,.cpq-demande legend.cpq-label{font-size:17px}
  .cpq-demande .cpq-btn-continuer,.cpq-demande .cpq-final .cpq-btn-envoyer{width:100%}
  .cpq-demande .cpq-options{gap:12px 28px}
  .cpq-demande .cpq-msg{padding:16px 16px 16px 48px}
  .cpq-demande .cpq-msg::before{left:12px;width:24px;height:24px;line-height:24px}
}
@media (prefers-reduced-motion:reduce){
  .cpq-demande .cpq-progress-barre,.cpq-demande .cpq-btn-continuer,.cpq-demande .cpq-final .cpq-btn-envoyer{transition:none}
}
