/* =============================================================
   DAYOMI — Wizard création d'espace communautaire
   Hérite des tokens de style.css (parchemin / navy / laiton)
   ============================================================= */

.wizard-page {
    min-height: 100vh;
}

.wizard {
    max-width: 760px;
    margin: 0 auto;
    padding: 140px 24px 80px;
}

.wizard__intro {
    text-align: center;
    margin-bottom: 48px;
}
.wizard__title {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 500;
    color: var(--ink);
    margin: 14px 0 16px;
    line-height: 1.15;
}
.wizard__lead {
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0;
    font-size: 17px;
}

/* -------- Indicateur d'étapes -------- */
.steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    counter-reset: step;
}
.steps__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    color: var(--text-soft);
    transition: color var(--t-fast) var(--ease-out);
}
.steps__item::before {
    content: '';
    position: absolute;
    top: 17px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: rgba(180, 138, 58, 0.25);
    z-index: 0;
}
.steps__item:first-child::before { display: none; }

.steps__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--parchment-light);
    border: 2px solid rgba(180, 138, 58, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-soft);
    position: relative;
    z-index: 1;
    transition: all var(--t-fast) var(--ease-out);
}
.steps__label {
    font-size: 13px;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.steps__item.is-active { color: var(--ink); }
.steps__item.is-active .steps__num {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--brass-light);
}
.steps__item.is-done { color: var(--brass-deep); }
.steps__item.is-done .steps__num {
    background: var(--brass);
    border-color: var(--brass);
    color: var(--ink);
}
.steps__item.is-done::before,
.steps__item.is-active::before {
    background: var(--brass);
}

@media (max-width: 540px) {
    .steps__label { display: none; }
}

/* -------- Form / étapes -------- */
.wizard__form {
    background: var(--parchment-light);
    border: 1px solid rgba(180, 138, 58, 0.25);
    border-radius: var(--radius-lg);
    padding: 44px;
    box-shadow: var(--shadow-md);
}
@media (max-width: 600px) {
    .wizard__form { padding: 28px 22px; }
    .wizard { padding-top: 110px; }
}

.step {
    border: none;
    margin: 0;
    padding: 0;
    display: none;
    animation: stepIn var(--t-mid) var(--ease-out);
}
.step.is-active { display: block; }

@keyframes stepIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

.step__legend {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(180, 138, 58, 0.25);
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.step__legend span[lang="he"] {
    font-family: var(--font-hebrew);
    font-size: 22px;
    color: var(--brass-deep);
    font-weight: 700;
}

.step__note,
.step__hint {
    background: rgba(180, 138, 58, 0.08);
    border-left: 3px solid var(--brass);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-soft);
    margin: 0 0 24px;
    line-height: 1.6;
}

/* -------- Champs -------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}
.field__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 560px) {
    .field__row { grid-template-columns: 1fr; gap: 0; }
}
.field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.03em;
}
.field__label em {
    color: var(--terracotta);
    font-style: normal;
}
.field input,
.field textarea {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid rgba(21, 36, 61, 0.18);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
    resize: vertical;
    width: 100%;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(180, 138, 58, 0.15);
}
.field select {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid rgba(21, 36, 61, 0.18);
    border-radius: var(--radius);
    color: var(--text);
    width: 100%;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.field select:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(180, 138, 58, 0.15);
}

.field input.is-invalid,
.field textarea.is-invalid,
.field select.is-invalid {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(179, 89, 62, 0.12);
}

/* Pays + drapeau */
.field__country {
    display: flex;
    align-items: center;
    gap: 10px;
}
.field__flag {
    flex: 0 0 auto;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(21, 36, 61, 0.12);
    object-fit: cover;
}
.field__country select { flex: 1 1 auto; }

/* Statut identifiant (dispo / pris) */
.field__status {
    font-size: 12px;
    font-weight: 600;
    min-height: 14px;
    margin-top: 2px;
}
.field__status.is-checking { color: var(--text-soft); }
.field__status.is-ok       { color: var(--olive); }
.field__status.is-taken    { color: var(--terracotta); }
.field__hint {
    font-size: 12px;
    color: var(--text-soft);
}
.field__error {
    font-size: 12px;
    color: var(--terracotta);
    min-height: 14px;
    font-weight: 500;
}

/* -------- Jauge mot de passe -------- */
.pwd-meter {
    margin: 4px 0 24px;
}
.pwd-meter__bar {
    height: 6px;
    background: rgba(21, 36, 61, 0.10);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 14px;
}
.pwd-meter__fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--terracotta);
    border-radius: 100px;
    transition: width var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.pwd-meter__fill.s1 { width: 25%;  background: var(--terracotta); }
.pwd-meter__fill.s2 { width: 50%;  background: #c98a3a; }
.pwd-meter__fill.s3 { width: 75%;  background: var(--brass); }
.pwd-meter__fill.s4 { width: 100%; background: var(--olive); }

.pwd-rules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
}
.pwd-rules li {
    font-size: 12.5px;
    color: var(--text-soft);
    padding-left: 22px;
    position: relative;
    transition: color var(--t-fast) var(--ease-out);
}
.pwd-rules li::before {
    content: '○';
    position: absolute;
    left: 4px;
    color: var(--text-soft);
}
.pwd-rules li.ok {
    color: var(--olive);
}
.pwd-rules li.ok::before {
    content: '✓';
    color: var(--olive);
    font-weight: 700;
}

/* -------- Actions -------- */
.step__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}
.step__actions .btn { min-width: 140px; }
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* -------- Confirmation -------- */
.step--confirm.is-active { display: block; }
.confirm {
    text-align: center;
    padding: 16px 0;
}
.confirm__seal {
    width: 110px;
    height: 110px;
    margin: 0 auto 24px;
    color: var(--brass);
    animation: sealIn 700ms var(--ease-out);
}
@keyframes sealIn {
    from { opacity: 0; transform: scale(0.7) rotate(-20deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}
.confirm__title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 8px;
}
.confirm__ref {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass-deep);
    margin: 0 0 24px;
    font-weight: 600;
}
.confirm__text {
    color: var(--text-soft);
    line-height: 1.75;
    margin: 0 auto 16px;
    max-width: 520px;
    font-size: 16px;
}
.confirm__text strong { color: var(--ink); }
.confirm__verse {
    font-family: var(--font-hebrew);
    font-size: 24px;
    color: var(--brass-deep);
    margin: 28px 0 28px;
    direction: rtl;
}

/* -------- Bandeau RGPD -------- */
.wizard__rgpd {
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.6;
    margin: 28px auto 0;
    max-width: 620px;
}

/* -------- Statut global de soumission -------- */
.form__global-status {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
    display: none;
}
.form__global-status.is-error {
    display: block;
    background: rgba(179, 89, 62, 0.10);
    color: var(--terracotta);
    border: 1px solid rgba(179, 89, 62, 0.3);
}
