/* ═══════════════════════════════════════════════════════════════
   HD PRO — FORMULAIRE D'ÉDITION STANDARD (composants Components/Shared/Form/)
   Référence : Features/Formateurs/Form/FormProfil.razor (préfixe historique fpr-)
   Feuille globale (pas de CSS scopée) car les classes hdpro-* sont partagées
   entre plusieurs composants Razor distincts (HdProInput, HdProFormSection,
   HdProFormGrid, HdProPasswordStrength, HdProActionButton) — voir SKILL.md
   "PATTERN — FORMULAIRE D'ÉDITION HD PRO".
   ═══════════════════════════════════════════════════════════════ */

/* ── Groupe de champ + label ── */
.hdpro-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hdpro-form-group-full {
    grid-column: 1 / -1;
}

.hdpro-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hdpro-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hdpro-required {
    color: var(--hdpro-danger);
    font-weight: 700;
}

/* ── Input ── */
.hdpro-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hdpro-input-icon {
    position: absolute;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--hdpro-text-placeholder);
    pointer-events: none;
    display: flex;
}
.hdpro-input-icon svg {
    width: 15px;
    height: 15px;
}

.hdpro-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border-radius: var(--hdpro-radius-input);
    border: 1px solid var(--hdpro-border-strong);
    background: var(--hdpro-surface);
    color: var(--hdpro-text-strong);
    font-size: 0.78rem;
    transition: var(--hdpro-transition);
}

.hdpro-input:focus {
    outline: none;
    border-color: var(--hdpro-accent);
    box-shadow: 0 0 0 3px var(--hdpro-accent-soft);
}

.hdpro-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hdpro-input-error {
    border-color: var(--hdpro-danger) !important;
    background: var(--hdpro-danger-soft);
}
.hdpro-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.hdpro-error-text {
    font-size: 0.66rem;
    color: var(--hdpro-danger);
    font-weight: 500;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Outils sur les inputs (afficher mot de passe / générer / copier) */
.hdpro-input-actions-group {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hdpro-input-actions-group .hdpro-input-action-btn {
    position: static;
    background: transparent;
    border: none;
    color: var(--hdpro-text-faint);
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}
.hdpro-input-actions-group .hdpro-input-action-btn:hover {
    color: var(--hdpro-accent);
    background: var(--hdpro-surface-alt);
}
.hdpro-input-actions-group .hdpro-input-action-btn svg {
    width: 13px;
    height: 13px;
}

/* ── Section de formulaire ── */
.hdpro-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--hdpro-text-strong);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.hdpro-section-icon {
    width: 16px;
    height: 16px;
    color: var(--hdpro-accent);
    display: flex;
}
.hdpro-section-icon svg {
    width: 16px;
    height: 16px;
}

.hdpro-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

/* ── Jauge de force du mot de passe ── */
.hdpro-strength-wrap {
    margin-top: 6px;
}

.hdpro-strength-bars {
    display: flex;
    gap: 4px;
    height: 4px;
    margin-bottom: 4px;
}

.hdpro-strength-bar {
    flex: 1;
    height: 100%;
    background: #e2e8f0;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.hdpro-strength-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--hdpro-text-faint);
}

/* ── Boutons d'action du formulaire ── */
.hdpro-btn-reset {
    background: var(--hdpro-surface-alt);
    border: 1px solid var(--hdpro-border-strong);
    color: var(--hdpro-text-muted);
    padding: 8px 16px;
    border-radius: var(--hdpro-radius-input);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.hdpro-btn-reset:hover:not([disabled]) {
    background: #f1f5f9;
    color: var(--hdpro-text-strong);
}
.hdpro-btn-reset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hdpro-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--hdpro-radius-input);
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--hdpro-accent) 0%, var(--hdpro-accent-dark) 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}
.hdpro-btn-submit:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
}
.hdpro-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hdpro-btn-svg,
.hdpro-btn-submit svg,
.hdpro-btn-reset svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.hdpro-spinner {
    animation: hdpro-spin 0.75s linear infinite;
}
@keyframes hdpro-spin {
    to { transform: rotate(360deg); }
}
