/* ==========================================================================
   AUTH.CSS - SÉCURISÉ & REFRESH LIGHT THEME (RestoFlow / MicroPOS)
   ========================================================================== */

:root {
    --bg-auth: #F9F6F0;       /* Fond signature chaud et épuré */
    --card-bg: #ffffff;
    --text-dark: #1C1C1E;
    --text-muted: #8E8E93;
    --accent-orange: #F04903; /* Orange d'origine */
    --accent-orange-hover: #D03E02;
    --border-color: rgba(0, 0, 0, 0.08);
    --input-focus: rgba(240, 73, 3, 0.1);
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'League Spartan', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-auth);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}
a{
    text-decoration: none;
}

/* Conteneur principal */
.auth-container {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.5s ease-out;
}

/* Carte Bento d'authentification */
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px; /* Coins arrondis style Bento */
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

/* Logo & En-tête */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.brand-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.brand-logo span {
    color: var(--accent-orange);
}

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Formulaire et Groupes d'inputs */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.forgot-link, .auth-footer a {
    font-size: 0.85rem;
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover, .auth-footer a:hover {
    color: var(--accent-orange-hover);
    text-decoration: underline;
}

/* Wrapper d'input avec icone interne */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    background-color: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #B8B8BC;
}

.input-wrapper input:focus {
    background-color: #ffffff;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px var(--input-focus);
}

.input-wrapper input:focus + .input-icon {
    color: var(--accent-orange);
}

/* Option : Se souvenir de moi (Custom Checkbox) */
.form-options {
    display: flex;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-orange);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Bouton Soumettre */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--text-dark);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--accent-orange);
    transform: translateY(-1px);
}

/* Pied de page */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   EXTENSIONS POUR FORMULAIRE DE RÉINITIALISATION DYNAMIQUE
   ========================================================================== */

/* Message d'erreur de recherche */
.error-message {
    color: #E02424;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* Boîte de sécurité / Captcha */
.captcha-box {
    display: none; /* Géré par JS */
    background-color: #FFF8E6;
    border: 1px solid rgba(240, 115, 3, 0.2);
    border-radius: 12px;
    padding: 16px;
    animation: fadeIn 0.3s ease-out;
}

.captcha-box p {
    color: #B45309;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Bouton Profil Dynamique (Bento Preview) */
.profile-preview-btn {
    display: none; /* Géré par JS */
    align-items: center;
    gap: 16px;
    background-color: #F9F6F0; /* Rappel du fond chaud signature */
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    width: 100%;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-align: left;
    animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.profile-preview-btn:hover {
    border-color: var(--accent-orange);
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(240, 73, 3, 0.06);
    transform: translateY(-2px);
}

.profile-preview-btn:active {
    transform: translateY(0);
}

.profile-preview-btn img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-info strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ==========================================================================
   OTP / VERIFY CODE STYLES (Segmented Inputs)
   ========================================================================== */

/* Grille pour les 6 inputs de code */
.otp-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 24px 0;
}

.otp-input {
    width: 100%;
    height: 56px;
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    background-color: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.otp-input:focus {
    background-color: #ffffff;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* Masquer les flèches d'incrémentation (spinners) pour les inputs de type number */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.otp-input[type=number] {
    -moz-appearance: textfield;
}

/* Zone du compte à rebours */
.countdown-box {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.countdown-box span {
    color: var(--text-dark);
    font-weight: 600;
}

.resend-link {
    color: var(--accent-orange);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    pointer-events: none; /* Désactivé par défaut pendant le décompte */
    opacity: 0.5;
    transition: all 0.2s ease;
}

.resend-link.active {
    pointer-events: auto;
    opacity: 1;
}

.resend-link.active:hover {
    color: var(--accent-orange-hover);
    text-decoration: underline;
}

/* Animation Fluent Fade */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Micro-ajustements */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
}