/* =====================================================================
 * Destination : /assets/css/pages/kreditantrag.css
 * Rôle        : Styles PROPRES AU FORMULAIRE DE DEMANDE (/kreditantrag.php)
 *               Chargé automatiquement après /assets/css/main.css
 * Version     : 2.0 – Corporate / Trust & Security
 *
 * Sommaire : 01 En-tête · 02 Carte & progression · 03 Étapes
 *            04 Choix & champs · 05 Aperçu de la mensualité · 06 Budget
 *            07 Rachat de crédits · 08 Documents · 09 Récapitulatif
 *            10 Consentements & navigation · 11 Colonne latérale
 *            12 Responsive
 * ===================================================================== */

.text-gradient-light { background: linear-gradient(90deg, #93C5FD, #6EE7B7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* 01. EN-TÊTE ======================================================== */
.apply-hero { padding-bottom: calc(clamp(2.5rem, 5vw, 4rem) + 3rem); }
.apply-trust { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.apply-trust li { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: #E2E8F0; }
.apply-trust i { color: #6EE7B7; }

/* 02. CARTE & PROGRESSION =========================================== */
.apply-section { padding-top: 0; }
.apply-card {
    position: relative;
    z-index: 5;
    margin-top: -3rem;
    padding: clamp(1.25rem, 3.5vw, 2.5rem);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}
.apply-card > .ac-alert { margin-bottom: 1.5rem; }
.apply-steps { margin-bottom: 1.25rem; }
.apply-steps .ac-step { font-size: .74rem; }
.apply-steps .ac-step.is-clickable, .apply-steps .ac-step.is-done { cursor: pointer; }
.apply-steps .ac-step.is-clickable:hover::before { border-color: var(--blue); }
.apply-progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.apply-progress span { flex-shrink: 0; font-family: var(--font-display); font-size: .85rem; font-weight: 800; color: var(--navy); }
.apply-progress .ac-progress { flex: 1; }
.apply-progress .ac-progress-bar { transition: width .5s var(--ease); }

/* 03. ÉTAPES ======================================================== */
.apply-step { min-width: 0; margin: 0; padding: 0; border: 0; animation: fadeUp .45s var(--ease); }
.apply-step[hidden] { display: none !important; }
.step-title { display: flex; align-items: center; gap: .8rem; float: none; width: 100%; margin-bottom: .4rem; font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.55rem); font-weight: 800; color: var(--navy); }
.step-title:focus { outline: none; }
.step-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; font-size: 1.05rem; color: var(--white); background: var(--grad-blue); border-radius: var(--radius); }
.step-intro { margin-bottom: 1.75rem; color: var(--text-2); }
.step-sep { margin: .5rem 0; border-color: var(--border); opacity: 1; }
.sub-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: 1.1rem; color: var(--navy); }
.sub-title i { color: var(--blue); }
.sub-title .opt { font-family: var(--font-body); font-size: .82rem; font-weight: 500; color: var(--muted); }
.sub-intro { font-size: .92rem; color: var(--text-2); }
.sub-box { padding: 1.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sub-box .sub-title { margin-bottom: 1rem; }
.info-box { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; font-size: .94rem; color: var(--text-2); background: var(--blue-soft); border: 1px solid var(--blue-soft-2); border-radius: var(--radius); }
.info-box > i { margin-top: .2rem; font-size: 1.1rem; color: var(--blue); }
[data-form-section] { animation: fadeIn .4s var(--ease); }

/* 04. CHOIX & CHAMPS ================================================ */
.product-choice .ac-choice-body { gap: .65rem; padding: .8rem .85rem; font-size: .88rem; line-height: 1.25; }
.product-choice .ac-choice-body > i { font-size: 1.1rem; width: 1.3rem; flex-shrink: 0; }
.product-choice .ac-choice-body > span { min-width: 0; -webkit-hyphens: auto; hyphens: auto; }
.product-choice input:checked + .ac-choice-body::after { display: none; }
.product-choice input:checked + .ac-choice-body { background: color-mix(in srgb, var(--choice-color) 8%, white); border-color: var(--choice-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--choice-color) 18%, transparent); }
.choice-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice-row .ac-choice { flex: 1 1 140px; max-width: 240px; }
.choice-sm .ac-choice-body { padding: .75rem 1rem; }
.was-validated .ac-choice input:invalid + .ac-choice-body { border-color: var(--danger); background: #FFFBFB; }
.range-limits { display: flex; justify-content: space-between; margin-top: .3rem; font-size: .76rem; color: var(--muted); }
.label-out { float: right; font-family: var(--font-display); font-weight: 800; color: var(--blue); }
input[type="month"].ac-input, input[type="date"].ac-input { min-height: 50px; }

/* 05. APERÇU DE LA MENSUALITÉ ======================================= */
.rate-preview { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 110px; padding: 1rem 1.25rem; background: var(--green-soft-2); border: 1px solid #A7F3D0; border-radius: var(--radius); }
.rate-preview > span { font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.rate-preview strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; line-height: 1.2; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.rate-preview small { font-size: .8rem; color: var(--text-2); }

/* 06. BUDGET ======================================================== */
.budget-box { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; padding: 1.1rem; background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--border-2); border-radius: var(--radius); transition: border-color .3s; }
.budget-box > div { display: flex; flex-direction: column; }
.budget-box span { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.budget-box strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.budget-msg { grid-column: 1 / -1; margin: 0; font-size: .88rem; font-weight: 600; color: var(--text-2); }
.budget-box.is-ok { border-left-color: var(--green); }
.budget-box.is-ok .budget-free strong { color: var(--green-dark); }
.budget-box.is-warn { border-left-color: var(--amber, #D97706); }
.budget-box.is-warn .budget-free strong { color: #B45309; }
.budget-box.is-bad { border-left-color: var(--danger); }
.budget-box.is-bad .budget-free strong, .budget-box.is-bad .budget-msg { color: var(--danger); }

/* 07. RACHAT DE CRÉDITS ============================================= */
.refi-list { display: grid; gap: 1rem; margin-bottom: 1rem; }
.refi-item { padding: 1.1rem 1.2rem 1.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.refi-item.is-new { animation: fadeUp .4s var(--ease); }
.refi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; font-family: var(--font-display); color: var(--navy); }
.refi-remove { display: grid; place-items: center; width: 34px; height: 34px; color: var(--danger); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--speed); }
.refi-remove:hover { color: var(--white); background: var(--danger); border-color: var(--danger); }
.refi-item .ac-label { margin-bottom: 0; }
.refi-item .ac-label > .ac-input, .refi-item .ac-label > .ac-select, .refi-item .ac-label > .ac-input-group { display: block; margin-top: .45rem; font-family: var(--font-body); }
.refi-total { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1.25rem; padding: 1.1rem; color: var(--white); background: var(--grad-navy); border-radius: var(--radius); }
.refi-total span { display: block; font-size: .75rem; color: #CBD5E1; }
.refi-total strong { font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.refi-saving strong { color: #6EE7B7; }
.refi-saving.is-negative strong { color: #FCA5A5; }

/* 08. DOCUMENTS ===================================================== */
.doc-drop { min-height: 128px; padding: 1.1rem; gap: .25rem; }
.doc-drop i { font-size: 1.4rem; }
.doc-drop strong { font-size: .9rem; color: var(--navy); }
.doc-drop [data-file-label] { max-width: 100%; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.doc-grid [hidden] { display: none !important; }

/* 09. RÉCAPITULATIF ================================================= */
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin-bottom: 1.75rem; }
.summary-group { padding: 1rem 1.1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.summary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-family: var(--font-display); color: var(--navy); }
.summary-edit { padding: 0; font-size: .82rem; font-weight: 700; color: var(--blue); background: none; border: 0; cursor: pointer; }
.summary-edit:hover { text-decoration: underline; }
.summary dl { margin: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .86rem; border-bottom: 1px dashed var(--border); }
.summary dl div:last-child { border-bottom: 0; }
.summary dt { font-weight: 500; color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; color: var(--text); text-align: right; overflow-wrap: anywhere; }

/* 10. CONSENTEMENTS & NAVIGATION ==================================== */
.consents { margin-bottom: 1.5rem; padding: 1.25rem 1.25rem .5rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.consents .req { color: var(--danger); }
.consents .opt { color: var(--muted); font-size: .82rem; }
.apply-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.apply-nav-hint { margin-right: auto; font-size: .82rem; font-weight: 600; color: var(--muted); }
.apply-nav-hint i { color: var(--green); margin-right: .3rem; }
#btnPrev:not([hidden]) ~ .apply-nav-hint { margin-left: 0; }

/* 11. COLONNE LATÉRALE ============================================== */
.apply-aside { position: sticky; top: calc(var(--header-h, 76px) + 1.25rem); display: grid; gap: 1rem; }
.aside-card { padding: 1.4rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.aside-summary { margin-top: -3rem; position: relative; z-index: 5; border-top: 4px solid var(--green); box-shadow: var(--shadow-lg); }
.aside-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aside-product { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 1rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--navy); }
.aside-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--white); background: var(--grad-blue); border-radius: var(--radius-sm); }
.aside-summary dl { margin: 0; }
.aside-summary dl div { display: flex; justify-content: space-between; padding: .45rem 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.aside-summary dt { font-weight: 500; color: var(--text-2); }
.aside-summary dd { margin: 0; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.aside-rate { margin-top: 1rem; padding: .9rem 1rem; text-align: center; background: var(--green-soft-2); border-radius: var(--radius); }
.aside-rate span { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.aside-rate strong { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.aside-trust { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.aside-trust li { display: flex; gap: .8rem; }
.aside-trust i { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; color: var(--green-dark); background: var(--green-soft-2); border-radius: 50%; }
.aside-trust strong { display: block; font-size: .92rem; color: var(--navy); }
.aside-trust span { font-size: .82rem; color: var(--muted); }
.aside-help { display: flex; gap: .9rem; align-items: center; }
.aside-help .ac-icon { margin: 0; }
.aside-help strong, .aside-help a, .aside-help span { display: block; }
.aside-help a { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; }
.aside-help span { font-size: .8rem; color: var(--muted); }

/* 12. RESPONSIVE ==================================================== */
@media (max-width: 991.98px) {
    .apply-aside { position: static; }
    .aside-summary { margin-top: 0; }
    .apply-aside { grid-template-columns: 1fr 1fr; }
    .aside-summary { grid-row: span 2; }
}
@media (max-width: 767.98px) {
    .apply-steps .ac-step span { display: none; }
    .apply-steps .ac-step::before { width: 32px; height: 32px; font-size: .85rem; }
    .apply-steps .ac-step:not(:last-child)::after { top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); }
    .budget-box, .refi-total { grid-template-columns: 1fr 1fr; }
    .summary { grid-template-columns: 1fr; }
    .apply-aside { grid-template-columns: 1fr; }
    .apply-nav-hint { display: none; }
    .apply-nav .btn-ac-lg { flex: 1 1 auto; }
}
@media (max-width: 575.98px) {
    .apply-card { margin-top: -2.25rem; border-radius: var(--radius-lg); }
    .apply-progress { flex-direction: column; align-items: stretch; gap: .5rem; }
    .apply-progress .ac-progress { flex: none; width: 100%; }
    .product-choice .ac-choice-body { gap: .5rem; padding: .7rem .65rem; font-size: .8rem; }
    .rate-preview strong { font-size: 1.6rem; }
    .choice-row .ac-choice { max-width: none; }
}
@media (max-width: 439.98px) {
    .product-choices > div { flex: 0 0 100%; max-width: 100%; }
    .product-choice .ac-choice-body { padding: .6rem .85rem; font-size: .88rem; }
    .product-choice .ac-choice-body small { display: inline; margin-left: .35rem; }
}
