/* ==========================================================================
   CDM — Configurateur d'application : choix guidés, estimation en direct
   et paiement de l'acompte de lancement.
   ========================================================================== */

.cfg-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px 100px;
}

.cfg-tete { margin-bottom: 40px; }

.cfg-kicker {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #8e8e96;
    margin-bottom: 10px;
}

.cfg-tete h1 {
    font-size: clamp(26px, 4.2vw, 40px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.cfg-tete p {
    font-size: 15px;
    color: #b4b4bb;
    line-height: 1.7;
    max-width: 620px;
}

.cfg-grille {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 1000px) {
    .cfg-grille { grid-template-columns: 1fr 360px; gap: 44px; }
}

/* ------------------------------------------------------------- Les étapes */
.cfg-etape {
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .03);
    border-radius: 14px;
    padding: 26px 26px 28px;
    margin-bottom: 18px;
}

.cfg-etape-tete {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.cfg-num {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #2563eb;
    flex-shrink: 0;
}

.cfg-etape h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.cfg-aide {
    font-size: 13px;
    color: #8e8e96;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Choix : cases masquées, la carte entière est cliquable */
.cfg-choix {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 640px) {
    .cfg-choix.est-double { grid-template-columns: 1fr 1fr; }
    .cfg-choix.est-triple { grid-template-columns: repeat(3, 1fr); }
}

.cfg-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .03);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.cfg-option:hover {
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .07);
}

.cfg-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cfg-coche {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: background .15s ease, border-color .15s ease;
}

.cfg-option input[type="radio"] + .cfg-coche { border-radius: 50%; }

.cfg-option:has(input:checked) {
    border-color: rgba(37, 99, 235, .8);
    background: rgba(37, 99, 235, .16);
}

.cfg-option:has(input:checked) .cfg-coche {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Les pages du site mettent les <label> en capitales : ici ce sont des choix
   à lire, pas des micro-étiquettes. */
.cfg-option,
.cfg-option-texte,
.cfg-option-nom,
.cfg-option-prix {
    text-transform: none;
    letter-spacing: 0;
}

.cfg-option-texte { min-width: 0; }

.cfg-option-nom {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #f5f5f5;
    line-height: 1.35;
}

.cfg-option-prix {
    display: block;
    font-size: 12px;
    color: #8e8e96;
    margin-top: 3px;
}

/* ------------------------------------------------------- Panneau estimation */
.cfg-estimation {
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(160deg, rgba(37, 99, 235, .14), rgba(255, 255, 255, .02));
    border-radius: 16px;
    padding: 26px 24px;
}

@media (min-width: 1000px) {
    .cfg-estimation { position: sticky; top: calc(var(--topbar-h, 58px) + 16px); }
}

.cfg-estimation-titre {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #9a9aa2;
    margin-bottom: 14px;
}

.cfg-fourchette {
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 6px;
}

.cfg-fourchette small {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: #9a9aa2;
    letter-spacing: 0;
    margin-top: 6px;
    line-height: 1.5;
}

.cfg-lignes {
    list-style: none;
    margin: 18px 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.cfg-lignes li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: #b4b4bb;
    line-height: 1.45;
}

.cfg-lignes li span:last-child {
    color: #f5f5f5;
    font-weight: 600;
    white-space: nowrap;
}

.cfg-recap {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #9a9aa2;
}

.cfg-recap div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cfg-recap strong { color: #f5f5f5; }

.cfg-acompte {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .12);
}

.cfg-acompte-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #8e8e96;
}

.cfg-acompte-valeur {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 4px 0 6px;
}

.cfg-acompte small {
    font-size: 12px;
    color: #8e8e96;
    line-height: 1.5;
    display: block;
}

.cfg-cta {
    display: block;
    width: 100%;
    margin-top: 18px;
    background: #f5f5f5;
    color: #0a0a0a;
    border: 1px solid #f5f5f5;
    border-radius: 999px;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.cfg-cta:hover { background: transparent; color: #f5f5f5; }
.cfg-cta:disabled { opacity: .5; cursor: default; }

.cfg-mention {
    font-size: 11.5px;
    color: #7c7c85;
    line-height: 1.55;
    margin-top: 12px;
}

/* ------------------------------------------------------------- Paiement */
.cfg-paiement {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    padding: 28px 26px;
    margin-top: 28px;
    scroll-margin-top: 90px;
}

.cfg-paiement h2 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 6px;
}

.cfg-champs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 20px 0;
}

@media (min-width: 640px) {
    .cfg-champs { grid-template-columns: 1fr 1fr; }
    .cfg-champs .cfg-champ-large { grid-column: 1 / -1; }
}

.cfg-champ span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8e8e96;
    margin-bottom: 6px;
}

.cfg-champ input {
    width: 100%;
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    color: #f5f5f5;
    font-family: inherit;
    font-size: 14.5px;
    padding: 12px 14px;
}

.cfg-champ input:focus { outline: none; border-color: rgba(37, 99, 235, .8); }

.cfg-cgv {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: #9a9aa2;
    line-height: 1.6;
    margin-bottom: 18px;
    cursor: pointer;
}

.cfg-cgv input { margin-top: 3px; flex-shrink: 0; }
.cfg-cgv a { color: #60a5fa; }

#cfg-stripe { margin-bottom: 18px; }

.cfg-retour {
    font-size: 13px;
    margin-top: 14px;
    min-height: 20px;
    line-height: 1.55;
}

.cfg-retour.err { color: #f87171; }
.cfg-retour.ok { color: #22c55e; }

.cfg-succes {
    border: 1px solid rgba(34, 197, 94, .5);
    background: rgba(34, 197, 94, .1);
    border-radius: 16px;
    padding: 32px 28px;
    margin-top: 28px;
}

.cfg-succes h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cfg-succes p {
    font-size: 14.5px;
    color: #d4d4da;
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Précisions et garde-fous sous une étape */
.cfg-precision {
    font-size: 12.5px;
    color: #9a9aa2;
    line-height: 1.65;
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 2px solid rgba(37, 99, 235, .7);
    background: rgba(37, 99, 235, .08);
    border-radius: 0 10px 10px 0;
}

.cfg-precision strong { color: #f5f5f5; }
.cfg-precision a { color: #60a5fa; }

/* La durée n'est tenable que si le client répond : on l'annonce sur la même
   ligne que l'engagement, pas en petits caractères en bas de page. */
.cfg-condition-delai {
    font-size: 11.5px;
    color: #8e8e96;
    line-height: 1.55;
    margin: 2px 0 4px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, .18);
}

.cfg-condition-delai strong { color: #cfcfd6; }

/* ═══════════════════════ Aperçu gratuit, avant paiement ═══════════════════ */
.cfg-apercu {
    background: linear-gradient(150deg, rgba(37, 99, 235, .14), rgba(255, 255, 255, .02));
    border: 1px solid rgba(37, 99, 235, .42);
    border-radius: 16px;
    padding: 30px 32px;
    margin-bottom: 26px;
}

.cfg-apercu-tete { margin-bottom: 20px; }

.cfg-apercu h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}

.cfg-apercu .cfg-aide { max-width: 620px; }

/* Le bouton de l'aperçu ne doit pas rivaliser avec celui du paiement :
   c'est une invitation, pas l'action principale de la page. */
.cfg-cta-ghost {
    background: rgba(255, 255, 255, .07);
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, .28);
}

.cfg-cta-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .45);
    color: #f5f5f5;
}

.cfg-apercu-cadre { margin-top: 22px; }

.cfg-apercu-barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 11px 16px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .14);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-size: 12.5px;
    color: #9a9aa2;
}

.cfg-apercu-barre a { color: #60a5fa; text-decoration: none; font-weight: 600; }
.cfg-apercu-barre a:hover { text-decoration: underline; }

.cfg-apercu-cadre iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 0 0 12px 12px;
    background: #fff;
}

.cfg-apercu-note {
    font-size: 12.5px;
    color: #8e8e96;
    line-height: 1.65;
    margin-top: 14px;
    max-width: 620px;
}

@media (max-width: 640px) {
    .cfg-apercu { padding: 24px 18px; }
    .cfg-apercu-cadre iframe { height: 460px; }
}

/* ── Aperçu : lecture du site, ou questions de repli ───────────────────── */
.cfg-aide-serree { margin-top: 10px; max-width: 620px; }

.cfg-sans-site {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 4px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    font-size: 13.5px;
    color: #cfcfd6;
    cursor: pointer;
}

.cfg-sans-site:hover { border-color: rgba(255, 255, 255, .3); color: #f5f5f5; }
.cfg-sans-site input { accent-color: #2563eb; width: auto; margin: 0; }

.cfg-manuel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
}

.cfg-manuel textarea {
    width: 100%;
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    color: #f5f5f5;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    padding: 11px 13px;
    resize: vertical;
}

.cfg-manuel textarea:focus { outline: none; border-color: rgba(37, 99, 235, .8); }

/* Le champ « site » s'estompe quand on coche « je n'ai pas de site » */
.cfg-champ input:disabled { opacity: .5; cursor: not-allowed; }

/* Une règle `display` d'auteur l'emporte sur l'attribut `hidden` du navigateur :
   sans ce rappel, le bloc de repli s'affiche dès le chargement. */
.cfg-manuel[hidden] { display: none; }

/* ── Options à description longue : une par ligne ──────────────────────────
   Le formulaire partage la largeur avec le panneau d'estimation : trois
   colonnes n'y laissent que ~170 px de texte, où « Maquettes interactives
   assistées par IA » se casse sur trois lignes. En liste, chaque option a la
   largeur entière et se lit d'un trait. */
.cfg-choix.est-liste { grid-template-columns: 1fr; }

@media (min-width: 720px) {
    .cfg-choix.est-liste { grid-template-columns: 1fr; }
}

.est-liste .cfg-option {
    /* Le rond se cale sur le titre plutôt que de flotter au milieu du vide. */
    align-items: flex-start;
    padding: 16px 18px;
}

.est-liste .cfg-coche { margin-top: 1px; }

/* Titre à gauche, prix à droite : les deux se comparent d'un coup d'œil, au
   lieu de s'empiler dans le flux du texte. */
.est-liste .cfg-option-texte {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 18px;
    align-items: baseline;
    width: 100%;
}

.est-liste .cfg-option-nom { grid-column: 1; font-size: 14.5px; }

.est-liste .cfg-option-prix {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    color: #cfe0ff;
}

/* La description passe sous les deux, sur toute la largeur. */
.est-liste .cfg-option-detail {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 13px;
    /* Les <label> du site sont en gras : une description doit rester en texte
       courant, sinon elle rivalise avec le titre qu'elle explique. */
    font-weight: 400;
    line-height: 1.6;
    color: #8e8e96;
}

.est-liste .cfg-option:has(input:checked) .cfg-option-detail { color: #b9c9e8; }

/* Exemple concret et destinataire, sous chaque type de projet. Une catégorie
   technique ne dit rien à un artisan ; une situation, si. */
.cfg-option-exemple,
.cfg-option-pourqui {
    grid-column: 1 / -1;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.6;
}

.cfg-option-exemple {
    color: #9a9aa2;
    font-style: italic;
    margin-top: 6px;
}

.cfg-option-pourqui {
    color: #7c7c85;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.cfg-option:has(input:checked) .cfg-option-exemple { color: #b9c9e8; }
.cfg-option:has(input:checked) .cfg-option-pourqui { color: #9fb4dd; }

/* Sur mobile, « à partir de 3 500 € · ~4 sem. » ne peut pas tenir à droite du
   titre : maintenu sur une ligne, il élargit la carte au-delà de l'écran. On
   repasse en une colonne, le prix sous le titre. */
@media (max-width: 620px) {
    .est-liste .cfg-option-texte { grid-template-columns: 1fr; }

    .est-liste .cfg-option-prix {
        grid-column: 1;
        grid-row: auto;
        text-align: left;
        white-space: normal;
        margin-top: 2px;
    }

    .est-liste .cfg-option-nom { grid-row: auto; }

    /* Sans ça, la description reste forcée en ligne 2 et rejette le prix
       derrière elle : on lirait le nom, l'explication, puis le montant. */
    .est-liste .cfg-option-detail { grid-row: auto; }
}

/* ── Familles de fonctionnalités ───────────────────────────────────────────
   Quinze options décrites font près de deux mille pixels : rangées par
   famille et repliées, on n'ouvre que ce qui concerne son métier. */
.cfg-famille {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
    margin-bottom: 10px;
}

.cfg-famille > summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.cfg-famille > summary::-webkit-details-marker { display: none; }

.cfg-famille > summary::before {
    content: "+";
    color: #60a5fa;
    font-weight: 700;
    width: 12px;
    flex-shrink: 0;
}

.cfg-famille[open] > summary::before { content: "–"; }
.cfg-famille > summary:hover { background: rgba(255, 255, 255, .04); border-radius: 12px; }

.cfg-famille-titre { font-size: 14.5px; font-weight: 700; color: #f5f5f5; }

.cfg-famille-resume {
    flex: 1;
    min-width: 180px;
    font-size: 12.5px;
    font-weight: 400;
    color: #7c7c85;
    line-height: 1.5;
}

/* Nombre d'options cochées dans une famille repliée : sans lui, on ne saurait
   plus ce qu'on a coché en refermant. */
.cfg-famille-compte:not(:empty) {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: #cfe0ff;
    background: rgba(37, 99, 235, .2);
    border: 1px solid rgba(37, 99, 235, .5);
    border-radius: 999px;
    padding: 2px 10px;
}

.cfg-famille .cfg-choix { padding: 0 14px 14px; }
