/* ===== BK Devis Wizard v2 — Boomkartner ===== */
.bk-dw-wrap {
    --bk-dw-sidebar: #1A3A6B;
    --bk-dw-accent:  #2A5FC8;
    --bk-dw-btn:     #1A3A6B;
    --bk-dw-chrome:  #C0C8D8;
    display: flex;
    min-height: 540px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-family: inherit;
    box-shadow: 0 8px 40px rgba(13,27,42,0.15);
    max-width: 1000px;
    margin: 0 auto;
}

/* ── Sidebar ── */
.bk-dw-sidebar {
    flex: 0 0 280px;
    background: var(--bk-dw-sidebar);
    color: #fff;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bk-dw-sidebar-title {
    font-family: 'Barlow Condensed','Oswald',sans-serif;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #fff;
}

.bk-dw-steps-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bk-dw-step-nav {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    opacity: 0.4;
    transition: opacity 0.3s;
    cursor: default;
}
.bk-dw-step-nav.active { opacity: 1; }
.bk-dw-step-nav.done   { opacity: 0.65; }

.bk-dw-step-bar {
    width: 3px;
    min-height: 44px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    flex-shrink: 0;
    transition: background 0.3s;
}
.bk-dw-step-nav.active .bk-dw-step-bar { background: var(--bk-dw-accent); }
.bk-dw-step-nav.done .bk-dw-step-bar   { background: rgba(255,255,255,0.6); }

.bk-dw-step-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}
.bk-dw-step-info span {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    line-height: 1.4;
}

/* ── Main ── */
.bk-dw-main {
    flex: 1;
    padding: 40px 44px 28px;
    display: flex;
    flex-direction: column;
}

.bk-dw-question {
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 800;
    color: #0D1B2A;
    margin: 0 0 28px;
    line-height: 1.3;
}

/* ── Step content ── */
.bk-dw-step-content          { display: none; flex-direction: column; flex: 1; }
.bk-dw-step-content.active   { display: flex; }

/* ── Choices ── */
.bk-dw-choices {
    display: grid;
    gap: 14px;
    flex: 1;
    align-content: start;
}

/* 2 choix : 2 grandes colonnes pleine largeur */
.bk-dw-choices--2 {
    grid-template-columns: 1fr 1fr;
}

/* 4 choix : 2x2 */
.bk-dw-choices--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 8 choix : 4x2 */
.bk-dw-choices--8 {
    grid-template-columns: repeat(4, 1fr);
}

.bk-dw-choice {
    border: 2px solid #e0e8f4;
    border-radius: 10px;
    padding: 24px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    background: #fff;
    text-align: center;
    min-height: 130px;
    justify-content: center;
}

/* 2 choix = plus grands */
.bk-dw-choices--2 .bk-dw-choice {
    min-height: 180px;
    padding: 32px 24px;
}

.bk-dw-choice:hover {
    border-color: var(--bk-dw-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42,95,200,0.12);
}
.bk-dw-choice.selected {
    border-color: var(--bk-dw-accent);
    background: rgba(42,95,200,0.04);
    box-shadow: 0 0 0 3px rgba(42,95,200,0.12);
}

/* Radio indicator */
.bk-dw-choice-radio {
    position: absolute;
    top: 10px; right: 10px;
    width: 18px; height: 18px;
    border: 2px solid #c5d3e8;
    border-radius: 50%;
    transition: border-color 0.2s, background 0.2s;
}
.bk-dw-choice.selected .bk-dw-choice-radio {
    border-color: var(--bk-dw-accent);
    background: var(--bk-dw-accent);
    box-shadow: inset 0 0 0 3px #fff;
}

/* Icône FA */
.bk-dw-choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-dw-choice-icon i {
    font-size: 44px;
    color: var(--bk-dw-accent);
    transition: transform 0.2s;
}
.bk-dw-choices--2 .bk-dw-choice-icon i  { font-size: 60px; }
.bk-dw-choices--8 .bk-dw-choice-icon i  { font-size: 34px; }
.bk-dw-choice:hover .bk-dw-choice-icon i { transform: scale(1.1); }
.bk-dw-choice-icon svg {
    width: 44px; height: 44px;
    color: var(--bk-dw-accent);
    stroke: var(--bk-dw-accent);
}
.bk-dw-choices--2 .bk-dw-choice-icon svg { width: 60px; height: 60px; }
.bk-dw-choices--8 .bk-dw-choice-icon svg { width: 34px; height: 34px; }

.bk-dw-choice-label {
    font-size: 12px;
    font-weight: 700;
    color: #1A3A6B;
    letter-spacing: 0.3px;
    line-height: 1.3;
}
.bk-dw-choices--2 .bk-dw-choice-label {
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* ── Form fields ── */
.bk-dw-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    flex: 1;
}

.bk-dw-field { display: flex; flex-direction: column; gap: 5px; }
.bk-dw-field--full { grid-column: 1 / -1; }

.bk-dw-field label {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bk-dw-field input,
.bk-dw-field textarea {
    border: 2px solid #e0e8f4;
    border-radius: 6px;
    padding: 11px 13px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    color: #0D1B2A;
    resize: none;
}
.bk-dw-field input:focus,
.bk-dw-field textarea:focus {
    border-color: var(--bk-dw-accent);
    box-shadow: 0 0 0 3px rgba(42,95,200,0.10);
}

.bk-req { color: var(--bk-dw-accent); margin-left: 2px; }

/* ── RGPD ── */
.bk-dw-rgpd {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8f9ff;
    border: 1px solid #dce4f5;
    border-radius: 8px;
}

.bk-dw-rgpd-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.bk-dw-rgpd-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--bk-dw-accent);
    cursor: pointer;
}

.bk-dw-rgpd-label span {
    font-size: 12px;
    color: #444;
    line-height: 1.6;
}

.bk-dw-rgpd-error {
    margin-top: 8px;
    font-size: 12px;
    color: #c0392b;
    font-weight: 600;
    display: none;
}

/* ── Footer ── */
.bk-dw-footer {
    margin-top: auto;
    padding-top: 24px;
}

.bk-dw-progress {
    height: 3px;
    background: #e8eef8;
    border-radius: 2px;
    margin-bottom: 18px;
    overflow: hidden;
}
.bk-dw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--bk-dw-sidebar), var(--bk-dw-accent));
    border-radius: 2px;
    transition: width 0.4s ease;
}

.bk-dw-nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bk-dw-prev {
    background: transparent;
    border: 2px solid #e0e8f4;
    color: #666;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.bk-dw-prev:hover { border-color: #aaa; color: #333; }

.bk-dw-next {
    background: var(--bk-dw-btn);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, transform 0.2s;
    font-family: inherit;
    margin-left: auto;
}
.bk-dw-next:hover    { opacity: 0.88; transform: translateX(2px); }
.bk-dw-next:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* ── Loader sur le bouton ── */
.bk-dw-next.loading {
    pointer-events: none;
    opacity: 0.7;
}
.bk-dw-next.loading::after {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bkSpin 0.7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes bkSpin {
    to { transform: rotate(360deg); }
}

/* ── Succès ── */
.bk-dw-success {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 40px 20px;
}
.bk-dw-success-icon { font-size: 64px; }
.bk-dw-success h2   { font-size: 24px; color: #0D1B2A; margin: 0; }
.bk-dw-success p    { color: #555; font-size: 15px; max-width: 380px; margin: 0 auto; }

/* ─── RESPONSIVE ─── */
@media (max-width: 800px) {
    .bk-dw-wrap {
        flex-direction: column;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    /* Masquer complètement la sidebar sur mobile */
    .bk-dw-sidebar { display: none; }

    /* Barre d'étapes mobile en haut du main */
    .bk-dw-main {
        padding: 16px 16px 20px;
    }

    /* Indicateur d'étapes mobile — dots numérotés */
    .bk-dw-steps-nav-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0;
        margin-bottom: 24px;
        padding: 0 8px;
    }

    .bk-dw-step-dot {
        width: 32px; height: 32px;
        border-radius: 50%;
        background: #e8eef8;
        color: #aaa;
        font-size: 12px;
        font-weight: 800;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
        transition: all 0.3s;
        border: 2px solid #e8eef8;
        position: relative;
        z-index: 1;
    }
    .bk-dw-step-dot.active {
        background: var(--bk-dw-sidebar);
        border-color: var(--bk-dw-sidebar);
        color: #fff;
        box-shadow: 0 4px 12px rgba(26,58,107,0.3);
    }
    .bk-dw-step-dot.done {
        background: var(--bk-dw-accent);
        border-color: var(--bk-dw-accent);
        color: #fff;
    }
    .bk-dw-step-line-mobile {
        flex: 1;
        height: 2px;
        background: #e8eef8;
        min-width: 20px;
        transition: background 0.3s;
    }
    .bk-dw-step-line-mobile.done {
        background: var(--bk-dw-accent);
    }

    /* Titre de l'étape courante */
    .bk-dw-step-current-label {
        text-align: center;
        font-size: 11px;
        font-weight: 700;
        color: var(--bk-dw-sidebar);
        letter-spacing: 1.5px;
        text-transform: uppercase;
        margin-bottom: 20px;
    }

    /* Grilles de choix */
    .bk-dw-choices--2 { grid-template-columns: 1fr 1fr; }
    .bk-dw-choices--4 { grid-template-columns: repeat(2, 1fr); }
    .bk-dw-choices--8 { grid-template-columns: repeat(2, 1fr); }
    .bk-dw-choices--2 .bk-dw-choice { min-height: 120px; padding: 20px 12px; }
    .bk-dw-choice { padding: 16px 10px 12px; }
    .bk-dw-question { font-size: 17px; margin-bottom: 20px; }
}

@media (max-width: 480px) {
    .bk-dw-form-fields { grid-template-columns: 1fr; }
    .bk-dw-choices--2 { grid-template-columns: 1fr 1fr; }
    .bk-dw-choices--4,
    .bk-dw-choices--8 { grid-template-columns: 1fr 1fr; }
    .bk-dw-choice-label { font-size: 11px; }
    .bk-dw-choice-icon i { font-size: 26px !important; }
    .bk-dw-choices--2 .bk-dw-choice-icon i { font-size: 36px !important; }
}

/* Masquer l'indicateur mobile sur desktop */
.bk-dw-steps-nav-mobile { display: none; }
.bk-dw-step-current-label { display: none; }
@media (max-width: 800px) {
    .bk-dw-steps-nav-mobile { display: flex !important; }
    .bk-dw-step-current-label { display: block !important; }
}
