﻿/*
============================================================
 AUTH.CSS  Styles spécifiques pages d'authentification
------------------------------------------------------------
Rôle :
    - Contient tous les styles strictement spécifiques aux pages d'authentification
    - Login, OTP, inscription, no-account, enrolment, etc.

Ce fichier doit contenir :
    - Les styles propres à l'authentification : OTP, keypad, progress steps, option-card, notices, etc.

Ce fichier ne doit PAS contenir :
    - Aucun style de composant générique (boutons, alertes, badges, formulaires, etc.)
    - Aucun utilitaire global ou de layout (voir components.css et layout.css)
    - Aucun style de variables globales (voir base.css)

Utilisation :
    - À inclure uniquement sur les pages d'authentification via block extra_css
============================================================
*/


/* ============================================
   AUTH PAGE CONTAINER
   ============================================ */

.auth-page-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}


/* ============================================
   OTP DISPLAY (affichage du code saisi)
   ============================================ */

.otp-display {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem 0;
}

.otp-digit {
    width: 2.5rem;
    height: 3rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #E1E8F0);
    background: var(--input-bg, #141923);
    border: 2px solid var(--border-color, #2a3347);
    border-radius: 0.5rem;
    text-align: center;
    line-height: 3rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-digit.active {
    border-color: var(--accent-green, #1ED760);
    box-shadow: 0 0 0 3px var(--accent-green-dim, #1ED76020);
}

@media (max-width: 480px) {
    .otp-display {
        gap: 0.5rem;
    }
    .otp-digit {
        width: 1.8rem;
        height: 2.2rem;
        font-size: 1.2rem;
        line-height: 2.2rem;
    }
}


/* ============================================
   OTP NUMERIC KEYPAD (clavier numérique OTP)
   ============================================ */

.numeric-keypad {
    display: grid;
    grid-template-columns: repeat(3, 3.5rem);
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto 1.5rem auto;
    max-width: 14rem;
}

.keypad-btn {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #E1E8F0);
    background: var(--card-bg, #1a2030);
    border: 2px solid var(--border-color, #2a3347);
    border-radius: 0.75rem;
    margin: 0;
    outline: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(30, 215, 96, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.keypad-btn:focus {
    border-color: var(--accent-green, #1ED760);
    box-shadow: 0 0 0 3px var(--accent-green-dim, #1ED76020);
    z-index: 2;
}

.keypad-btn:active {
    background: var(--accent-green-dim, #1ED76020);
    color: var(--accent-green, #1ED760);
}

.keypad-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .numeric-keypad {
        gap: 0.5rem;
        max-width: 240px;
        grid-template-columns: repeat(3, 2.5rem);
    }
    .keypad-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}


/* ============================================
   OPTIONS GRID (No Account Page)
   ============================================ */

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ============================================
   OPTION CARD
   ============================================ */

.option-card {
    padding: 2rem 1.5rem;
    background: var(--card-bg, #1a2030);
    border: 2px solid var(--border-color, #2a3347);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: var(--accent-green, #1ED760);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 215, 96, 0.1);
}

.option-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    padding: 1rem;
    background: var(--accent-green-dim, #1ED76020);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--accent-green, #1ED760);
}

.option-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--text-primary, #E1E8F0);
}

.option-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary, #9CA3AF);
    margin-bottom: 1.5rem;
    text-align: center;
}


/* ============================================
   DOCUMENT LIST
   ============================================ */

.document-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
}

.document-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary, #9CA3AF);
}

.document-list li:before {
    content: "";
    position: absolute;
    left: 0;
    color: var(--accent-green, #1ED760);
    font-weight: bold;
}


/* ============================================
   ENROL CONTAINER
   ============================================ */

.enrol-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.enrol-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.enrol-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #E1E8F0);
    margin-bottom: 0.5rem;
}

.enrol-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #9CA3AF);
}


/* ============================================
   PROGRESS STEPS (Auth specific)
   ============================================ */

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--step-bg, #2a3347);
    color: var(--text-secondary, #9CA3AF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border-color, #2a3347);
}

.step.active .step-number {
    background: var(--accent-green, #1ED760);
    color: #000;
    border-color: var(--accent-green, #1ED760);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #9CA3AF);
    text-align: center;
}

.step.active .step-label {
    color: var(--accent-green, #1ED760);
    font-weight: 500;
}

.step-connector {
    width: 3rem;
    height: 2px;
    background: var(--border-color, #2a3347);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}


/* ============================================
   IMPORTANT NOTICE
   ============================================ */

.important-notice {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
}

.notice-icon-large {
    flex-shrink: 0;
}

.notice-icon-large svg {
    width: 2rem;
    height: 2rem;
    color: #F59E0B;
}

.notice-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #F59E0B;
    margin-bottom: 0.5rem;
}

.notice-content p {
    font-size: 0.875rem;
    color: var(--text-secondary, #9CA3AF);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.notice-content p:last-child {
    margin-bottom: 0;
}

.notice-content strong {
    color: var(--text-primary, #E1E8F0);
}


/* ============================================
   FORM GRID (Auth specific layout)
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group.full-width {
    grid-column: 1 / -1;
}


/* ============================================
   FORM NOTICE (Auth specific)
   ============================================ */

.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
}

.form-notice .notice-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #60A5FA;
}

.form-notice p {
    font-size: 0.875rem;
    color: var(--text-secondary, #9CA3AF);
    margin: 0;
    line-height: 1.5;
}


/* ============================================
   HELP SECTION
   ============================================ */

.help-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg, #1a2030);
    border: 1px solid var(--border-color, #2a3347);
    border-radius: 0.75rem;
}

.help-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #E1E8F0);
    margin-bottom: 0.75rem;
}

.help-section p {
    font-size: 0.875rem;
    color: var(--text-secondary, #9CA3AF);
    margin-bottom: 0.5rem;
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    font-size: 0.875rem;
    color: var(--text-secondary, #9CA3AF);
    padding: 0.25rem 0;
}

.help-section a {
    color: var(--accent-green, #1ED760);
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}


/* ============================================
   ICON STYLES (Auth specific)
   ============================================ */

.icon-sm {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .otp-digit,
    .keypad-btn,
    .option-card {
        transition: none;
        animation: none;
    }
}
