/* ===== Kitchen Leads — Configurateur ===== */

.kl-configurator {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Barre de progression */
.kl-progress {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 40px;
    padding: 0 20px;
}
.kl-progress__bar {
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}
.kl-progress__fill {
    height: 100%;
    background: #2271b1;
    transition: width 0.4s ease;
    width: 0%;
}
.kl-progress__step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}
.kl-progress__dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0e0e0;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}
.kl-progress__step.active .kl-progress__dot {
    background: #2271b1;
    box-shadow: 0 0 0 2px #2271b1;
}
.kl-progress__step.done .kl-progress__dot {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}
.kl-progress__label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}
.kl-progress__step.active .kl-progress__label { color: #2271b1; font-weight: 700; }

/* Image d'en-tête (étape 1) — image entière, jamais rognée */
.kl-hero { margin: -10px 0 22px; border-radius: 12px; overflow: hidden; text-align: center; }
.kl-hero img { width: 100%; height: auto; max-width: 100%; display: block; margin: 0 auto; }

/* Étapes */
.kl-step__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a2e;
}
.kl-step__subtitle {
    color: #666;
    margin-bottom: 28px;
}

/* Bouton "Je ne sais pas encore" */
.kl-skip-btn {
    display: block; width: 100%; text-align: center; cursor: pointer;
    background: #fff7e6; border: 2px dashed #fd7e14; border-radius: 10px;
    padding: 14px 18px; margin: 0 0 24px; font-size: 16px; font-weight: 700; color: #b35900;
    transition: background .15s, border-color .15s;
}
.kl-skip-btn:hover { background: #ffefd6; border-color: #e06400; }
.kl-skip-btn span { display: block; font-size: 13px; font-weight: 500; color: #a06a30; margin-top: 4px; }

.kl-field-hint { display: block; font-size: 12px; color: #888; margin-top: 4px; }

/* Sélecteur de forme */
.kl-shapes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.kl-shape-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.2s;
    user-select: none;
}
.kl-shape-card input[type="radio"] { display: none; }
.kl-shape-card:hover { border-color: #2271b1; box-shadow: 0 2px 8px rgba(34,113,177,.15); }
.kl-shape-card:has(input:checked) {
    border-color: #2271b1;
    background: #e8f4fd;
    box-shadow: 0 2px 10px rgba(34,113,177,.2);
}
.kl-shape-card__icon { font-size: 28px; margin-bottom: 10px; }
.kl-shape-card__label { font-size: 13px; font-weight: 600; color: #333; }

/* Dimensions */
.kl-dimensions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 600px) { .kl-dimensions { grid-template-columns: 1fr; } }

/* Champs généraux */
.kl-field { margin-bottom: 18px; }
.kl-field--full { grid-column: 1 / -1; }
.kl-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #333; }
.kl-label--required::after { content: ' *'; color: #dc3545; }
.kl-input, .kl-select, .kl-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 7px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fff;
}
.kl-input:focus, .kl-select:focus, .kl-textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,.12);
    outline: none;
}
.kl-textarea { min-height: 80px; resize: vertical; }

/* Checkboxes */
.kl-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; }
.kl-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.kl-checkbox input { width: 18px; height: 18px; cursor: pointer; accent-color: #2271b1; }

/* Grille de photos */
.kl-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.kl-photo-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
    user-select: none;
}
.kl-photo-card input { display: none; }
.kl-photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.kl-photo-card__placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.kl-photo-card__label { padding: 6px 8px; font-size: 12px; font-weight: 600; text-align: center; }
.kl-photo-card__meta { padding: 0 8px 6px; font-size: 11px; color: #888; text-align: center; }
.kl-photo-card__check {
    position: absolute;
    top: 6px; right: 6px;
    width: 24px; height: 24px;
    background: #2271b1;
    border-radius: 50%;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
}
.kl-photo-card:hover { border-color: #2271b1; }
.kl-photo-card:has(input:checked) {
    border-color: #2271b1;
    box-shadow: 0 2px 10px rgba(34,113,177,.25);
}
.kl-photo-card:has(input:checked) .kl-photo-card__check { display: flex; }

/* Sélecteur de quantité (meubles) */
.kl-photo-card--qty { cursor: default; }
.kl-photo-card--qty.has-qty {
    border-color: #2271b1;
    box-shadow: 0 2px 10px rgba(34,113,177,.25);
}
.kl-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px;
    border-top: 1px solid #f0f0f0;
}
.kl-qty__btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #d0d0d0;
    background: #f8f9fa;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.kl-qty__btn:hover { background: #2271b1; border-color: #2271b1; color: #fff; }
.kl-configurator .kl-qty__input {
    width: 46px !important;
    min-width: 46px !important;
    height: 32px !important;
    text-align: center !important;
    border: 1.5px solid #d0d0d0 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #1a1a2e !important;
    -webkit-text-fill-color: #1a1a2e !important;
    background: #fff !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    box-sizing: border-box !important;
    display: inline-block !important;
    visibility: visible !important;
}
.kl-qty__input::-webkit-outer-spin-button,
.kl-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kl-qty__minus { border-radius: 6px 0 0 6px; }
.kl-qty__plus  { border-radius: 0 6px 6px 0; }

/* Aperçu unique d'un matériau (cliquable) */
.kl-mat-trigger {
    display: flex; align-items: center; gap: 16px; cursor: pointer;
    border: 2px solid #e0e0e0; border-radius: 12px; overflow: hidden;
    background: #fff; margin-bottom: 8px; transition: all .15s; max-width: 520px;
}
.kl-mat-trigger:hover { border-color: #2271b1; box-shadow: 0 2px 12px rgba(34,113,177,.15); }
.kl-mat-trigger.is-chosen { border-color: #2271b1; }
.kl-mat-trigger__img { width: 150px; min-width: 150px; height: 130px; object-fit: cover; display: block; }
.kl-mat-trigger__noimg { display: flex; align-items: center; justify-content: center; font-size: 44px; background: #f5f5f5; }
.kl-mat-trigger__info { padding: 10px 14px; }
.kl-mat-trigger__title { font-size: 16px; font-weight: 700; color: #1a1a2e; }
.kl-mat-trigger__finish { font-size: 13px; color: #666; margin-top: 2px; }
.kl-mat-trigger__cta { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: #2271b1; }
@media (max-width: 600px) {
    .kl-mat-trigger__img { width: 110px; min-width: 110px; height: 100px; }
}

/* Vue carrousel dans la fenêtre plein écran */
.kl-mat-view { position: relative; display: flex; align-items: center; }
.kl-mat-view__content { flex: 1; overflow-y: auto; }
.kl-mat-view__content img { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.kl-mat-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 46px; height: 46px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.92); color: #2271b1; font-size: 30px; line-height: 1;
    cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2);
    display: flex; align-items: center; justify-content: center;
}
.kl-mat-nav:hover { background: #fff; }
.kl-mat-nav--prev { left: 12px; }
.kl-mat-nav--next { right: 12px; }
.kl-mat-counter { display: inline-block; margin-top: 10px; padding: 3px 12px; background: #f0f0f0; border-radius: 20px; font-size: 13px; font-weight: 600; color: #555; }

.kl-section-title { font-size: 17px; font-weight: 700; margin: 24px 0 8px; color: #1a1a2e; }
.kl-section-hint { font-size: 12px; color: #888; margin: -6px 0 10px; }
.kl-furniture-section, .kl-material-section { margin-bottom: 32px; }

/* Modèles de cuisine prêts */
.kl-models-block { margin-bottom: 20px; }
.kl-models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 22px; margin-top: 12px; }
.kl-model-card { position: relative; cursor: pointer; border: 2px solid #e0e0e0; border-radius: 12px; overflow: hidden; transition: all .15s; background: #fff; display: flex; flex-direction: column; }
.kl-model-card input { display: none; }
.kl-model-card img { width: 100%; height: 400px; object-fit: cover; display: block; }
.kl-model-card__noimg, .kl-model-card__custom-icon { height: 400px; display: flex; align-items: center; justify-content: center; font-size: 72px; background: #f5f5f5; }
@media (max-width: 520px) { .kl-models-grid { grid-template-columns: 1fr; } .kl-model-card img { height: 300px; } }
.kl-model-card--custom .kl-model-card__custom-icon { height: 120px; }
.kl-model-card__body { padding: 12px 14px; flex: 1; }
.kl-model-card__name { font-size: 16px; font-weight: 700; line-height: 1.25; color: #1a1a2e; }
.kl-model-card__meta { font-size: 13px; color: #666; margin-top: 3px; }
.kl-model-card__meta strong { color: #2271b1; }
.kl-model-card__length { font-size: 13px; font-weight: 600; color: #2271b1; margin-top: 6px; }
.kl-model-card__desc { font-size: 12px; color: #777; margin-top: 8px; line-height: 1.4; }
.kl-model-modal__info .kl-model-card__length { font-size: 15px; margin-top: 8px; }
.kl-model-card__elements { margin-top: 10px; font-size: 12px; color: #555; }
.kl-model-card__elements strong { display: block; margin-bottom: 4px; color: #333; }
.kl-model-card__elements ul { margin: 0; padding-left: 16px; }
.kl-model-card__elements li { margin: 2px 0; line-height: 1.35; }
.kl-model-card__check { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; background: #2271b1; color: #fff; border-radius: 50%; display: none; align-items: center; justify-content: center; font-weight: bold; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.kl-model-card:hover { border-color: #2271b1; }
.kl-model-card.selected { border-color: #2271b1; box-shadow: 0 3px 16px rgba(34,113,177,.28); }
.kl-model-card.selected .kl-model-card__check { display: flex; }
.kl-model-card__view { display: inline-block; margin-top: 8px; color: #2271b1; font-weight: 600; font-size: 13px; }
/* Détails masqués dans la carte (visibles dans la fenêtre plein écran) */
.kl-model-card .kl-model-card__desc, .kl-model-card .kl-model-card__elements { display: none; }

/* Fenêtre plein écran d'un modèle */
.kl-model-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.kl-model-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.kl-model-modal__box { position: relative; background: #fff; border-radius: 14px; max-width: 720px; width: 100%; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 50px rgba(0,0,0,.3); }
.kl-model-modal__close { position: absolute; top: 10px; right: 14px; z-index: 2; background: rgba(255,255,255,.9); border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; color: #333; }
.kl-model-modal__close:hover { background: #fff; }
.kl-model-modal__content { overflow-y: auto; }
.kl-model-modal__content img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.kl-model-modal__content .kl-model-card__noimg { height: 240px; font-size: 70px; }
.kl-model-modal__info { padding: 20px 24px; }
.kl-model-modal__info .kl-model-card__name { font-size: 22px; }
.kl-model-modal__info .kl-model-card__meta { font-size: 15px; margin-top: 4px; }
.kl-model-modal__info .kl-model-card__desc { display: block; font-size: 14px; color: #555; margin-top: 12px; line-height: 1.5; }
.kl-model-modal__info .kl-model-card__elements { display: block; margin-top: 16px; font-size: 14px; }
.kl-model-modal__info .kl-model-card__elements ul { padding-left: 18px; }
.kl-model-modal__info .kl-model-card__elements li { margin: 3px 0; }
.kl-model-modal__info .kl-model-card__view { display: none; }
.kl-model-modal__actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid #eee; background: #fafafa; }
@media (max-width: 600px) {
    .kl-model-modal__actions { flex-direction: column-reverse; }
    .kl-model-modal__actions .kl-btn { width: 100%; }
}

.kl-link-btn { background: none; border: none; color: #2271b1; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 6px; }
.kl-link-btn:hover { color: #135e96; }

/* Option "Je compose moi-même" — distincte, hors accordéon */
.kl-compose-separate { margin: 18px 0 24px; }
.kl-compose-or { text-align: center; color: #999; font-weight: 600; margin: 0 0 14px; }
.kl-compose-separate .kl-model-card--custom { display: flex; flex-direction: row; align-items: center; max-width: 480px; margin: 0 auto; cursor: pointer; }
.kl-compose-separate .kl-model-card__custom-icon { height: auto; width: 80px; min-width: 80px; align-self: stretch; font-size: 38px; }
.kl-compose-separate .kl-model-card__body { text-align: left; }

/* En-tête de l'accordéon modèles avec photo d'aperçu */
.kl-models-teaser { gap: 14px; padding: 0 !important; align-items: stretch !important; min-height: 140px; }
.kl-models-teaser__img { width: 220px; min-width: 220px; height: 140px; object-fit: cover; border-radius: 8px 0 0 8px; display: block; }
.kl-models-teaser__label { flex: 1; display: flex; align-items: center; padding: 14px 8px; font-size: 16px; font-weight: 700; }
.kl-models-teaser .kl-accordion__arrow { align-self: center; margin-right: 16px; }
@media (max-width: 480px) {
    .kl-models-teaser__img { width: 120px; min-width: 120px; height: 100px; }
    .kl-models-teaser__label { font-size: 14px; }
}

/* Accordéon des sections de meubles */
.kl-accordion { margin-bottom: 12px; border: 1.5px solid #e0e0e0; border-radius: 10px; overflow: hidden; }
.kl-accordion.is-open { border-color: #2271b1; }
.kl-accordion.has-selection { border-color: #2271b1; }
.kl-accordion__header {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: #f8f9fa; border: none; padding: 14px 18px; cursor: pointer;
    font-size: 16px; font-weight: 700; color: #1a1a2e; text-align: left; transition: background .15s;
}
.kl-accordion__header:hover { background: #eef2f6; }
.kl-accordion.is-open .kl-accordion__header { background: #e8f4fd; }
.kl-accordion__count { font-size: 13px; font-weight: 400; color: #888; margin-left: 4px; }
.kl-accordion__badge { display: inline-block; background: #2271b1; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-left: 8px; }
.kl-accordion__arrow { font-size: 16px; color: #2271b1; transition: transform .2s; }
.kl-accordion.is-open .kl-accordion__arrow { transform: rotate(180deg); }
.kl-accordion__body { padding: 16px; }
.kl-accordion__body .kl-photo-grid { margin-bottom: 0; }

/* Formulaire projet */
.kl-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) { .kl-form-grid { grid-template-columns: 1fr; } }
.kl-separator { border: none; border-top: 1px solid #e0e0e0; margin: 24px 0; }

/* RGPD */
.kl-rgpd-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}
.kl-checkbox--rgpd { align-items: flex-start; }
.kl-checkbox--rgpd input { margin-top: 3px; flex-shrink: 0; }

/* Navigation */
.kl-nav {
    display: flex;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    gap: 12px;
}
.kl-nav__spacer { flex: 1; }

/* Boutons */
.kl-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.kl-btn--primary { background: #2271b1; color: #fff; }
.kl-btn--primary:hover { background: #135e96; color: #fff; }
.kl-btn--secondary { background: #f0f0f0; color: #333; }
.kl-btn--secondary:hover { background: #ddd; }
.kl-btn--submit { background: #28a745; color: #fff; font-size: 16px; padding: 14px 32px; }
.kl-btn--submit:hover { background: #218838; }

/* États */
.kl-success {
    text-align: center;
    padding: 48px 24px;
    background: #f0fff4;
    border-radius: 12px;
    border: 1px solid #28a745;
}
.kl-success__icon { font-size: 56px; margin-bottom: 16px; }
.kl-success h2 { color: #155724; }
.kl-error {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 16px;
}
.kl-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.kl-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: kl-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes kl-spin { to { transform: rotate(360deg); } }

/* Sélection des cuisinistes (annuaire) */
.kl-region-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.kl-region-tab { cursor: pointer; }
.kl-region-tab input { display: none; }
.kl-region-tab span { display: inline-block; padding: 8px 18px; border: 2px solid #e0e0e0; border-radius: 24px; font-weight: 600; font-size: 14px; transition: all .15s; }
.kl-region-tab:hover span { border-color: #2271b1; }
.kl-region-tab:has(input:checked) span { background: #2271b1; color: #fff; border-color: #2271b1; }

.kl-island { background: #f0f7ff; border: 1.5px solid #2271b1; border-radius: 8px; padding: 10px 14px; }
.kl-island:has(input:checked) { background: #2271b1; color: #fff; }
.kl-island-note { font-size: 13px; color: #155724; background: #f0fff4; border: 1px solid #c3e6cb; border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; }

.kl-makers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px; }
.kl-maker-card { position: relative; cursor: pointer; border: 2px solid #e0e0e0; border-radius: 10px; padding: 12px 8px; text-align: center; transition: all .15s; user-select: none; background: #fff; }
.kl-maker-card input { display: none; }
.kl-maker-card img { width: 100%; height: 60px; object-fit: contain; display: block; margin: 0 auto; }
.kl-maker-card__noimg { height: 60px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.kl-maker-card__name { font-size: 12px; font-weight: 700; line-height: 1.25; margin-bottom: 8px; min-height: 30px; display: flex; align-items: center; justify-content: center; }
.kl-maker-card__city { font-size: 11px; color: #888; margin-top: 2px; }
.kl-maker-card__check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; background: #2271b1; color: #fff; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }
.kl-maker-card:hover { border-color: #2271b1; }
.kl-maker-card.selected { border-color: #2271b1; box-shadow: 0 2px 10px rgba(34,113,177,.22); }
.kl-maker-card.selected .kl-maker-card__check { display: flex; }

.kl-error-highlight { border: 2px solid #dc3545 !important; border-radius: 10px; padding: 8px; }
.kl-input--error { border-color: #dc3545 !important; box-shadow: 0 0 0 3px rgba(220,53,69,.15) !important; }

.kl-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.kl-notice--info { background: #e8f4fd; border: 1px solid #bee5eb; color: #0c5460; }
.kl-notice--success { background: #f0fff4; border: 1px solid #c3e6cb; color: #155724; }
.kl-notice--error { background: #fff3f3; border: 1px solid #f5c6cb; color: #721c24; }
