/* ============================================================
   FICHIER : assets/css/pages/richiesta-patente.css
   Styles du formulaire multi-étapes de demande de permis
   ============================================================ */

.page-banner-form { padding: 130px 0 60px; }

/* --- Barre de progression --- */
.wizard-progress { max-width: 900px; margin: 0 auto 50px; }
.wizard-progress-bar { height: 6px; background: var(--border-light); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.wizard-progress-fill { height: 100%; width: 20%; background: linear-gradient(90deg, var(--ocean-teal), var(--accent-coral)); border-radius: 10px; transition: width .5s ease; }
.wizard-steps-labels { display: flex; justify-content: space-between; }
.wizard-step-label { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-muted); font-weight: 600; text-align: center; flex: 1; }
.wizard-step-label span { width: 32px; height: 32px; border-radius: 50%; background: var(--border-light); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.wizard-step-label.active span, .wizard-step-label.completed span { background: linear-gradient(135deg, var(--ocean-teal), var(--ocean-navy)); color: var(--white); }
.wizard-step-label.active { color: var(--ocean-dark); }

/* --- Carte du wizard --- */
.wizard-card { max-width: 900px; margin: 0 auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 44px; }
.wizard-step { display: none; animation: fadeInUp .5s ease; }
.wizard-step.active { display: block; }
.wizard-step-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wizard-step-subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 26px; }

/* --- Choix de service (step 1) --- */
.service-choice-card {
    display: block; position: relative; background: var(--bg-light); border-radius: var(--radius-md);
    padding: 30px 20px; text-align: center; cursor: pointer; border: 2px solid transparent; transition: var(--transition-base); height: 100%;
}
.service-choice-card input { position: absolute; opacity: 0; }
.service-choice-card:hover { border-color: var(--ocean-teal); }
.service-choice-card input:checked ~ .service-choice-icon,
.service-choice-card:has(input:checked) { border-color: var(--ocean-teal); background: var(--white); box-shadow: var(--shadow-soft); }
.service-choice-icon { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(135deg, var(--ocean-teal), var(--ocean-navy)); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.service-choice-card h5 { margin-bottom: 8px; }
.service-choice-card p { font-size: .85rem; color: var(--text-muted); }

/* --- Choix de catégorie (step 2) --- */
.category-group-tabs { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 26px; padding-bottom: 4px; }
.cat-group-tab { white-space: nowrap; padding: 10px 20px; border-radius: 50px; background: var(--bg-light); font-weight: 600; font-size: .88rem; border: none; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.cat-group-tab.active { background: linear-gradient(135deg, var(--ocean-teal), var(--ocean-navy)); color: var(--white); }
.category-group-panel { display: none; }
.category-group-panel.active { display: block; animation: fadeInUp .4s ease; }

.category-choice-card { display: block; position: relative; background: var(--bg-light); border-radius: var(--radius-md); padding: 18px 20px; cursor: pointer; border: 2px solid transparent; transition: var(--transition-base); }
.category-choice-card input { position: absolute; opacity: 0; }
.category-choice-card:hover { border-color: var(--ocean-teal); }
.category-choice-card:has(input:checked) { border-color: var(--ocean-teal); background: var(--white); box-shadow: var(--shadow-soft); }
.category-choice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.category-choice-code { font-weight: 800; color: var(--ocean-dark); font-size: 1.05rem; }
.category-choice-price { font-weight: 700; color: var(--accent-coral); }
.category-choice-card p { font-size: .84rem; color: var(--text-muted); margin: 0; }

/* --- Formulaire dati personali (step 3) --- */
.form-control-ocean { width: 100%; padding: 13px 16px; border-radius: 10px; border: 1.5px solid var(--border-light); font-family: var(--font-body); margin-top: 6px; transition: var(--transition-base); }
.form-control-ocean:focus { outline: none; border-color: var(--ocean-teal); box-shadow: 0 0 0 3px rgba(0,180,216,.15); }
.wizard-step label { font-weight: 600; font-size: .9rem; color: var(--ocean-dark); }

/* --- Upload de documents (step 4) --- */
.upload-box { background: var(--bg-light); border: 2px dashed var(--border-light); border-radius: var(--radius-md); padding: 24px; text-align: center; transition: var(--transition-base); }
.upload-box:hover { border-color: var(--ocean-teal); }
.upload-box label { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.upload-box input[type="file"] { width: 100%; font-size: .85rem; }
.upload-filename { display: block; margin-top: 10px; font-size: .8rem; color: var(--text-muted); font-style: italic; }

/* --- Riepilogo (step 5) --- */
.summary-box { background: var(--bg-light); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 26px; }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border-light); font-size: .95rem; }
.summary-total { border-bottom: none; padding-top: 18px; font-size: 1.2rem; color: var(--ocean-dark); }
.form-check-ocean { display: flex; align-items: flex-start; gap: 12px; font-size: .9rem; color: var(--text-muted); }
.form-check-ocean input { margin-top: 4px; width: 18px; height: 18px; }
.form-check-ocean a { color: var(--ocean-teal); font-weight: 600; }

/* --- Navigation du wizard --- */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--border-light); }
.btn-wizard-prev, .btn-wizard-next, .btn-wizard-submit { display: flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 50px; border: none; font-weight: 600; }
.btn-wizard-prev { background: var(--bg-light); color: var(--text-dark); }
.btn-wizard-prev:hover { background: var(--border-light); }
.btn-wizard-next, .btn-wizard-submit { background: linear-gradient(135deg, var(--accent-coral), var(--accent-gold)); color: var(--white); margin-left: auto; }
.btn-wizard-next:hover, .btn-wizard-submit:hover { transform: translateY(-2px); filter: brightness(1.05); }

.field-error { border-color: var(--accent-magenta) !important; }
.field-error-msg { color: var(--accent-magenta); font-size: .78rem; margin-top: 4px; display: block; }

@media (max-width: 576px) {
    .wizard-card { padding: 26px 20px; }
    .wizard-step-label span { width: 26px; height: 26px; font-size: .78rem; }
    .wizard-nav { flex-wrap: wrap; gap: 12px; }
    .btn-wizard-prev, .btn-wizard-next, .btn-wizard-submit { flex: 1; justify-content: center; }
}