/* =====================================================================
 * Fichier : assets/css/pages/konto-registrieren.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la page d'inscription (konto/registrieren.php) :
 *           blocs numérotés du formulaire, bascule particulier /
 *           professionnel et champs société repliables, suggestion de
 *           correction de l'e-mail, concordance des mots de passe,
 *           consentements, champ piège anti-robot.
 *           Les styles communs (kt-*) sont dans components/konto.css.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. Blocs du formulaire
 * ------------------------------------------------------------------- */
.rg-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.rg-block { min-width: 0; margin: 0; padding: 0; border: 0; animation: hfk-fade-up .55s var(--hfk-ease) both; }
.rg-block:nth-of-type(2) { animation-delay: .08s; }
.rg-block:nth-of-type(3) { animation-delay: .16s; }
.rg-block > legend { float: none; width: 100%; display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; padding: 0 0 .7rem; border-bottom: 1px solid var(--hfk-border); font-family: var(--hfk-font-head); font-size: 1.1rem; font-weight: 700; color: var(--hfk-charcoal); }
.rg-step { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; background: var(--hfk-charcoal); color: var(--hfk-amber); font-size: .95rem; transition: background .3s, color .3s, transform .35s var(--hfk-ease-bounce); }
.rg-block:focus-within .rg-step { background: var(--hfk-flame); color: #fff; transform: scale(1.1) rotate(-6deg); }
.rg-block.is-complete .rg-step { background: var(--hfk-forest); color: #fff; }

/* Champ piège : hors écran, jamais visible ni atteignable au clavier */
.rg-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------------
 * 2. Particulier / professionnel
 * ------------------------------------------------------------------- */
.rg-type label { min-height: 48px; }
.rg-type label i { width: 18px; text-align: center; transition: color .3s, transform .35s var(--hfk-ease); }
.rg-type label:hover { color: var(--hfk-charcoal); background: var(--hfk-cream); }
.rg-type label:has(input:checked):hover, .rg-type label.is-selected:hover { color: #fff; background: var(--hfk-charcoal); }
.rg-type label:has(input:checked) i { transform: scale(1.15); }

.rg-business { margin-top: 1rem; padding: 1rem 1.1rem 1.1rem; border-left: 4px solid var(--hfk-flame); background: var(--hfk-cream); }
/* Avec JavaScript : replié tant que « Geschäftskunde » n'est pas choisi */
.js .rg-business:not(.is-open) { display: none; }
.js .rg-business.is-open { animation: rg-open .4s var(--hfk-ease) both; }
@keyframes rg-open { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
 * 3. Aides en direct
 * ------------------------------------------------------------------- */
.rg-block .kt-input-wrap > i { width: 18px; text-align: center; }
.rg-block [data-password-toggle] { min-height: 44px; }

/* Suggestion de correction du domaine e-mail */
.rg-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; margin: .45rem 0 0; padding: .5rem .7rem; border-left: 4px solid var(--hfk-sky); background: #E3F0FC; font-size: .86rem; color: var(--hfk-text); animation: hfk-fade-up .35s var(--hfk-ease) both; }
.rg-suggest[hidden] { display: none; }
.rg-suggest button { padding: 0; border: 0; background: none; font-weight: 700; color: var(--hfk-flame-dark); text-decoration: underline; overflow-wrap: anywhere; text-align: left; transition: color .25s; }
.rg-suggest button:hover { color: var(--hfk-charcoal); }
.rg-suggest .rg-suggest-close { margin-left: auto; width: 26px; height: 26px; flex: 0 0 26px; font-size: 1.1rem; line-height: 1; color: var(--hfk-muted); text-decoration: none; }
.rg-exists { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin: .4rem 0 0; font-size: .88rem; font-weight: 600; }
.rg-exists a { text-decoration: underline; }

/* Concordance des deux mots de passe */
.rg-match { display: flex; align-items: center; gap: .45rem; margin: .5rem 0 0; font-size: .84rem; font-weight: 600; color: var(--hfk-muted); }
.rg-match[hidden] { display: none; }
.rg-match::before { content: ''; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--hfk-ash); transition: background .3s, transform .35s var(--hfk-ease-bounce); }
.rg-match.is-ok { color: var(--hfk-forest-dark); }
.rg-match.is-ok::before { background: var(--hfk-forest); transform: scale(1.25); }
.rg-match.is-off { color: var(--hfk-ember-dark); }
.rg-match.is-off::before { background: var(--hfk-ember); }

/* ---------------------------------------------------------------------
 * 4. Consentements et envoi
 * ------------------------------------------------------------------- */
.rg-consents { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.1rem 1.2rem; background: var(--hfk-cream); border-top: 3px solid var(--hfk-amber); }
.rg-consents em { font-style: normal; color: var(--hfk-muted); }
.rg-consents .kt-check small { margin-top: .2rem; }
.rg-consents .kt-check a { font-weight: 600; }
.rg-req { color: var(--hfk-ember); }
.rg-terms .kt-error { margin-left: calc(22px + .75rem); }
.rg-submit { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 56px; }
.rg-submit i { transition: transform .35s var(--hfk-ease-bounce); }
.rg-submit:hover i { transform: scale(1.2) rotate(-8deg); }
.rg-note { margin: -.8rem 0 0; font-size: .82rem; color: var(--hfk-muted); text-align: center; }
.rg-note span { color: var(--hfk-ember); font-weight: 700; }

/* ---------------------------------------------------------------------
 * 5. Adaptation aux écrans
 * ------------------------------------------------------------------- */
@media (max-width: 1199.98px) and (min-width: 992px) {
    /* Colonne du formulaire plus étroite : champs sur deux colonnes */
    .rg-form .kt-col-2 { grid-column: span 3; }
    .rg-form .kt-col-2:first-child:nth-last-child(5) { grid-column: span 6; }
    .rg-business .kt-col-4, .rg-form .rg-business .kt-col-2 { grid-column: span 6; }
}
@media (max-width: 575.98px) {
    .rg-consents { padding: 1rem; }
    .rg-business { padding: .9rem; }
    .rg-terms .kt-error { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .rg-block, .rg-suggest, .js .rg-business.is-open { animation: none; }
}