/* Auth pages — login, signup, verify, reset */
body.auth-page {
    margin: 0;
    background: linear-gradient(135deg, #16213e 0%, #1a3a5c 100%);
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
}
.auth-card h1 {
    margin: 0 0 4px 0;
    font-size: 22px;
    color: #16213e;
    text-align: center;
}
.auth-card .auth-sub {
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}
.auth-card label {
    display: block;
    font-size: 13px;
    color: #444;
    margin: 12px 0 4px 0;
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ccd;
    border-radius: 6px;
    font-size: 14px;
    background: #fafbfc;
}
.auth-card input:focus {
    outline: none;
    border-color: #16213e;
    background: #fff;
}
.auth-card button {
    width: 100%;
    padding: 12px;
    background: #16213e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}
.auth-card button:hover { background: #1a3a5c; }
.auth-card button:disabled {
    background: #888;
    cursor: not-allowed;
}
.auth-card .auth-link {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}
.auth-card .auth-link a {
    color: #16213e;
    text-decoration: none;
}
.auth-card .auth-link a:hover { text-decoration: underline; }

.auth-msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.auth-msg.error { background: #ffe5e5; color: #a00; border: 1px solid #f5a; }
.auth-msg.success { background: #e5fff0; color: #064; border: 1px solid #5b8; }
.auth-msg.info { background: #e5f0ff; color: #036; border: 1px solid #58c; }

.auth-card .password-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Bouton secondaire (style outline pour actions auxiliaires : renvoyer email,
   copier mot de passe, etc.) */
.auth-card button.secondary {
    background: #fff;
    color: #16213e;
    border: 1px solid #16213e;
    margin-top: 0;
    padding: 8px 12px;
    font-size: 13px;
}
.auth-card button.secondary:hover { background: #f0f4ff; }
.auth-card button.secondary:disabled {
    background: #f5f5f5;
    color: #888;
    border-color: #ccc;
}

/* Lien "Generer un mot de passe fort" sous le champ password */
.password-tools {
    margin-top: 4px;
    font-size: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.password-tools a {
    color: #16213e;
    text-decoration: none;
    cursor: pointer;
}
.password-tools a:hover { text-decoration: underline; }
.password-tools .gen-output {
    margin-left: auto;
    color: #064;
    font-size: 11px;
}

/* Bouton "Continuer avec Google" — respecte les Sign-in branding guidelines :
   fond blanc, bordure grise discrete, logo G coloré, texte "Continuer avec Google". */
.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Separateur "ou" entre form classique et OAuth */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px 0;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Indicateur de force du mot de passe */
.strength-meter {
    margin-top: 6px;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    transition: opacity 0.2s;
}
.strength-meter > div {
    height: 100%;
    width: 0%;
    transition: width 0.2s, background 0.2s;
    background: #c44;
}
.strength-meter.weak > div   { width: 33%; background: #c44; }
.strength-meter.medium > div { width: 66%; background: #d80; }
.strength-meter.strong > div { width: 100%; background: #2a8; }
.strength-label {
    font-size: 11px;
    margin-top: 2px;
    color: #888;
}
.strength-label.weak   { color: #c44; }
.strength-label.medium { color: #d80; }
.strength-label.strong { color: #2a8; }

/* Header auth bar pour pages protégées */
#auth-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 13px;
}
#auth-bar .auth-user {
    color: #fff;
    opacity: 0.85;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
#auth-bar a.auth-user:hover {
    opacity: 1;
    text-decoration: underline;
}
#auth-bar .auth-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
#auth-bar .auth-logout:hover { background: rgba(255, 255, 255, 0.2); }

#email-verify-banner {
    background: #fff7d6;
    border-bottom: 1px solid #e0c060;
    padding: 6px 16px;
    font-size: 13px;
    color: #553;
    display: flex;
    align-items: center;
    gap: 12px;
}
#email-verify-banner button {
    background: #e0c060;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
