/* 🌌 THEME FINTECH FUTURISTE PREMIUM */
.credit-form {
    /* 🎨 Palette dynamique */
    --primary: #6a11cb;
    --primary-light: #8e54e9;
    --primary-dark: #4d0ca1;
    --success: #00e5b0;

    /* 🖌️ Surfaces & bordures */
    --bg: #f4f6fc;
    --surface: #ffffff;
    --border: #e4e1f5;
    --surface-soft: #f9f7ff;
    --surface-alt: #ece8ff;

    /* 📝 Texte */
    --text-dark: #1d1e24;
    --text-muted: #6f7c8c;

    /* 🎛️ Effets */
    --radius: 14px;
    --shadow: 0 8px 35px rgba(106,17,203,0.12);
    --shadow-soft: 0 6px 18px rgba(106,17,203,0.06);
    --transition: .25s ease;
}

.credit-form * {
    font-family: "Inter", "Segoe UI", sans-serif;
}

/* 🧱 Layout */
.credit-form .container {
    background: var(--surface);
    max-width: 900px;
    margin: 25px auto;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 🏷️ Titres */
.credit-form h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 🔁 Steps */
.credit-form .step {
    display: none;
    animation: fadeIn .3s ease;
}
.credit-form .step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🧩 Grilles */
.credit-form .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media(max-width:700px){
    .credit-form .grid { grid-template-columns: 1fr; }
}

/* ✍️ Inputs */
.credit-form label {
    font-size: .92rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.credit-form input,
.credit-form select,
.credit-form textarea {
    width: 100%;
    padding: 12px 10px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px var(--surface-alt);
    font-size: .9rem;
    transition: var(--transition);
}

.credit-form input:focus,
.credit-form select:focus,
.credit-form textarea:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(106,17,203,.35);
}

/* 📊 Progression */
.credit-form #progressContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.credit-form .progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    color: var(--surface);
}

.credit-form .progress-step.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 10px rgba(106,17,203,.4);
}

.credit-form .progress-line {
    flex: 1;
    height: 4px;
    background: var(--surface-alt);
    margin: 0 6px;
    border-radius: 4px;
}

/* 🛠 Step 3 */
.credit-form .step[data-step="3"] .grid {
    display: block !important;
}
.credit-form .step[data-step="3"] .grid > div {
    width: 100% !important;
    margin-bottom: 16px;
}

/* ▶️ Boutons */
.credit-form .actions {
    text-align: right;
    margin-top: 28px;
}

.credit-form .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--surface);
    padding: 11px 26px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: .2s;
}
.credit-form .btn-primary:hover {
    transform: translateY(-3px);
}

/* 🦴 Skeleton */
.credit-form .step-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: none;
    z-index: 10;
    padding: 20px;
}
.credit-form .step-loader-overlay.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.credit-form .skeleton {
    height: 13px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-soft) 50%, var(--surface-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
    from { background-position:200% 0; }
    to { background-position:-200% 0; }
}

/* 👶 Step 4 — Compteur enfants */
.credit-form .enfants-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 20px;
}

.credit-form .counter-btn {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--primary);
    color: var(--surface);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.credit-form #nbEnfants {
    width: 80px;
    height: 42px;
    text-align: center;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    border: 2px solid var(--border);
}

/* 🔘 Radios */
.credit-form input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border) !important;
    position: relative;
    transition: var(--transition);
}

.credit-form input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    transition: .18s;
}

.credit-form input[type="radio"]:checked {
    border-color: var(--primary) !important;
}

.credit-form input[type="radio"]:checked::before {
    transform: translate(-50%,-50%) scale(1);
}

.credit-form .radio-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 10px 0 16px;
}
.credit-form .radio-group label {
    font-weight: 600;
    font-size: .92rem;
}

/* 🧾 Step 5 — Récapitulatif */
#recapFinal {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}

.recap-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.recap-section:last-child { border-bottom: none; }

.recap-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.recap-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.recap-edit {
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary);
}

.recap-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.recap-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.recap-value {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-dark);
    max-width: 60%;
    text-align: right;
}

@media(max-width:700px){
    .recap-row {
        flex-direction: column;
        gap: 2px;
    }
    .recap-value {
        max-width: 100%;
        text-align: left;
    }
}

