/* ===== Pages d'inscription et connexion ===== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(circle at top left, #e0e6ff, #f3f4ff 45%, #f9fbff 80%);
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    padding: 2.4rem 2rem;
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
    text-align: center;
    animation: card-pop 0.5s ease-out forwards;
    transform: translateY(12px);
    opacity: 0;
}

@keyframes card-pop {
    0%   { transform: translateY(12px) scale(0.97); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-title {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
}

.auth-subtitle {
    margin: 0 0 1.4rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.auth-errors {
    margin-bottom: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    text-align: left;
}

.auth-errors p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    color: #b91c1c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(var(--primary-blue-rgb), 0.15);
}

/* ---------- Champ mot de passe avec toggle ---------- */

.input-pwd-wrap {
    position: relative;
}

.input-pwd-wrap input {
    padding-right: 2.6rem;
}

.pwd-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.15rem;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.pwd-toggle:hover {
    opacity: 0.85;
}

/* ---------- Barre de force du mot de passe ---------- */

.pwd-strength {
    height: 5px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-top: 0.45rem;
    overflow: hidden;
}

.pwd-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.3s ease, background 0.3s ease;
}

.pwd-strength-text {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    min-height: 1rem;
}

.pwd-rules {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.7rem;
}

.pwd-rules li {
    font-size: 0.68rem;
    font-style: italic;
    color: #b0b5c0;
    transition: color 0.2s;
}

.pwd-rules li::before {
    content: '○ ';
    font-style: normal;
}

.pwd-rules li.rule-pass {
    color: #16a34a;
}

.pwd-rules li.rule-pass::before {
    content: '✓ ';
}

.pwd-rules li.rule-fail {
    color: #ef4444;
}

.pwd-rules li.rule-fail::before {
    content: '✗ ';
}

.pwd-match-text {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 1rem;
}

/* ---------- Bouton submit ---------- */

.auth-btn {
    width: 100%;
    margin-top: 0.6rem;
}

.auth-link {
    margin-top: 1.2rem;
    font-size: 0.88rem;
    color: #6b7280;
}

.auth-link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 2rem 1.4rem;
    }
}
