/* ==========================================================================
   ARANGÛR - STYLES DE LA PAGE D'INSCRIPTION & VALIDATION IA
   Harmonisé fidèlement avec la page index du jeu (maincss.css)
   ========================================================================== */

/* Structure Principale - Utilise le même conteneur principal que l'accueil */
.inscription-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 60px auto;
    padding: 0 15px;
}

/* Stepper de Progression (Étapes 1, 2, 3) */
.inscription-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: rgba(11, 14, 20, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.step-node {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f131a;
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.step-text {
    display: flex;
    flex-direction: column;
}

.step-num {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    font-weight: 600;
}

.step-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.step-node.active .step-circle {
    background-color: #d4af37;
    border-color: #fef08a;
    color: #0b0e14;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
    transform: scale(1.05);
}

.step-node.active .step-title {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.step-node.active .step-num {
    color: #d4af37;
}

.step-node.completed .step-circle {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #4ade80;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.step-node.completed .step-title {
    color: #e2e8f0;
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(212, 175, 55, 0.2);
    margin: 0 18px;
    transition: background 0.3s ease;
}

.step-line.active {
    background: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Carte Principale de Contenu - Même verre dépoli et ombre que <main> et .popup-box de l'index */
.registration-card {
    background-color: rgba(11, 14, 20, 0.75) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2) !important;
    padding: 35px 40px !important;
    box-sizing: border-box;
}

/* Titres Médiévaux - Harmonisés avec Cinzel & #d4af37 de l'index */
.gold-title {
    font-family: 'Cinzel', serif !important;
    color: #d4af37 !important;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.gold-title-section {
    font-family: 'Cinzel', serif !important;
    color: #d4af37 !important;
    font-size: 1.35rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 30px 0 18px 0 !important;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.gold-title-section:first-of-type {
    margin-top: 0 !important;
}

.gold-title-section i {
    color: #d4af37;
    font-size: 1.25rem;
}

/* Labels & Champs - Calqués sur .login-form label et input de l'accueil */
.form-label-rpg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1rem;
    font-weight: 600;
    margin: 14px 0 6px 0;
    letter-spacing: 0.04em;
}

.form-label-rpg .label-hint {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #aaa;
    font-weight: normal;
    font-style: italic;
}

.input-dark-rpg {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    background: #0f131a !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.input-dark-rpg:focus {
    outline: none !important;
    border-color: #d4af37 !important;
    background: #141a24 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4) !important;
}

.input-dark-rpg::placeholder {
    color: #64748b;
    font-size: 0.92rem;
}

select.input-dark-rpg {
    cursor: pointer;
}

select.input-dark-rpg option {
    background: #0f131a;
    color: #fff;
    padding: 8px;
}

/* Groupe Mot de passe avec oeil */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .input-dark-rpg {
    padding-right: 44px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toggle-password-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Badges de statut de validation en direct (Email & Mdp) */
.validation-feedback-pill {
    font-size: 0.82rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.validation-feedback-pill.valid {
    color: #4ade80;
}

.validation-feedback-pill.invalid {
    color: #f87171;
}

/* Compteur de mots dynamique pour TinyMCE */
.word-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 6px;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.25s ease;
}

.word-counter-badge.under {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.word-counter-badge.reached {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

/* Encart d'Arbitrage du Grand Juge d'Arangûr (IA) */
.judge-feedback-box {
    background: rgba(11, 14, 20, 0.95);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 22px 26px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), inset 0 0 15px rgba(212, 175, 55, 0.1);
    animation: fadeInSlide 0.3s ease-out;
}

.judge-feedback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding-bottom: 8px;
}

.judge-feedback-header i {
    color: #d4af37;
    font-size: 1.3rem;
}

.judge-feedback-body {
    font-size: 0.98rem;
    line-height: 1.65;
    color: #cbd5e1;
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
}

/* Grille flexible responsive */
.form-grid-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 8px;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 8px;
}

/* Groupe Génération de Nom */
.name-gen-group {
    display: flex;
    gap: 10px;
}

.btn-generate-name {
    background-color: #d4af37;
    color: #0b0e14;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.btn-generate-name:hover {
    background-color: #b08b2f;
    color: #0b0e14;
}

/* Boutons Principaux de Soumission - Exactement identiques à .btn de maincss.css */
.btn-rpg-submit {
    background-color: #d4af37 !important;
    color: #0b0e14 !important;
    padding: 14px 28px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace !important;
    transition: background-color 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: 100%;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.05rem !important;
}

.btn-rpg-submit:not(:disabled):hover {
    background-color: #b08b2f !important;
    color: #0b0e14 !important;
}

.btn-rpg-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #64748b !important;
    color: #cbd5e1 !important;
}

/* Conteneur d'aide pour critères */
.criteria-info-card {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-left: 3px solid #d4af37;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.criteria-info-card strong {
    color: #d4af37;
}

/* Animation d'apparition fluide */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 820px) {
    .form-grid-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .inscription-stepper {
        padding: 15px;
    }
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .step-title {
        font-size: 0.85rem;
    }
    .step-line {
        margin: 0 10px;
    }
}

@media (max-width: 580px) {
    .registration-card {
        padding: 20px 16px !important;
    }
    .step-title {
        display: none;
    }
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}
