/* ============================================================
   AUTH.CSS — Pages de connexion & inscription
   Table des matières :
   1. Reset inputs
   2. Page & container
   3. Carte (auth-box)
   4. En-tête (logo, titre, sous-titre)
   5. Formulaire
   6. Bouton de soumission
   7. Lien de bascule (connexion ↔ inscription)
   8. Alertes
   9. Responsive
============================================================ */


/* ============================================================
   1. RESET INPUTS
============================================================ */

input,
button,
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}


/* ============================================================
   2. PAGE & CONTAINER
============================================================ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f2;
    font-family: 'Inter', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 24px 16px;
    margin: 0 auto;
}

.auth-back {
    display: inline-block;
    color: #999;
    text-decoration: none;
    font-size: 0.82rem;
    margin-bottom: 18px;
    transition: color 0.2s;
}

.auth-back:hover {
    color: #333;
}


/* ============================================================
   3. CARTE (auth-box)
============================================================ */

.auth-box {
    background: #ffffff;
    border: 1px solid #e0e0de;
    border-radius: 14px;
    padding: 44px 36px 40px;
    text-align: center;
    animation: fadeUp 0.45s ease-out;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}


/* ============================================================
   4. EN-TÊTE (logo, titre, sous-titre)
============================================================ */

.auth-logo {
    margin-bottom: 24px;
}

.auth-logo img {
    max-height: 68px;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.83rem;
    color: #888;
    margin-bottom: 30px;
    letter-spacing: 0.2px;
}


/* ============================================================
   5. FORMULAIRE
============================================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #555;
    padding-left: 2px;
}

/* Wrapper avec icône positionnée */
.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 16px;
    font-size: 15px;
    color: #bbb;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.form-group input {
    display: block;
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: #f9f9f7;
    border: 1px solid #d8d8d6;
    border-radius: 10px;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: #bbb;
    font-size: 0.85rem;
    font-style: italic;
}

/* États focus */
.form-group input:focus {
    background: #fff;
    border-color: #aaa;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group:focus-within label {
    color: #333;
}

.form-group:focus-within .input-icon {
    color: #888;
}


/* ============================================================
   6. BOUTON DE SOUMISSION
============================================================ */

.auth-btn {
    -webkit-appearance: none;
    appearance: none;
    display: block !important;
    width: 100% !important;
    padding: 13px !important;
    margin-top: 4px;
    background: #1a1a1a !important;
    color: #fff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: opacity 0.2s, transform 0.15s;
}

.auth-btn:hover {
    opacity: 0.82 !important;
    transform: translateY(-1px);
}


/* ============================================================
   7. LIEN DE BASCULE (connexion ↔ inscription)
============================================================ */

.auth-switch {
    margin-top: 22px;
    font-size: 0.82rem;
    color: #888;
}

.auth-switch a {
    color: #444;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    color: #000;
}


/* ============================================================
   8. ALERTES
============================================================ */

.alert {
    padding: 11px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 0.85rem;
}

.alert.error   {
    background: rgba(231, 76, 60, 0.10);
    border: 1px solid #c0392b;
    color: #e74c3c;
}

.alert.success {
    background: rgba(46, 204, 113, 0.10);
    border: 1px solid #27ae60;
    color: #2ecc71;
}


/* ============================================================
   9. RESPONSIVE
============================================================ */

@media (max-width: 480px) {
    .auth-body {
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-container {
        padding: 16px 12px;
    }

    .auth-box {
        padding: 32px 20px;
        border-radius: 10px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.8rem;
    }

    .form-group input {
        padding: 14px 14px 14px 40px;
        font-size: 1rem; /* évite le zoom auto sur iOS */
    }

    .auth-btn {
        padding: 15px !important;
        font-size: 0.85rem;
        min-height: 50px;
    }
}

/* Empêche iOS de zoomer sur les champs (font-size < 16px) */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }
}
