/* ============================================================
   E-ROCK — Styles authentification
   ============================================================ */

.auth-body {
    background: #0B0E11;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* ============================================================
   BACKGROUND ANIMÉ
   ============================================================ */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(240,185,11,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240,185,11,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}

.auth-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.auth-bg-glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(240, 185, 11, 0.35);
    top: -150px;
    right: -150px;
}

.auth-bg-glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(0, 212, 255, 0.25);
    bottom: -100px;
    left: -100px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* ============================================================
   CONTAINER
   ============================================================ */
.auth-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-container .auth-card-wide ~ .auth-back-link,
.auth-container:has(.auth-card-wide) {
    max-width: 720px;
}

/* Pour navigateurs sans :has() */
.auth-container.wide {
    max-width: 720px;
}

/* ============================================================
   LOGO
   ============================================================ */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: transform 0.2s;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-logo .logo-badge {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
}

.auth-logo .brand-text {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

/* ============================================================
   CARTE
   ============================================================ */
.auth-card {
    background: rgba(30, 35, 41, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(240, 185, 11, 0.05);
    animation: slideUp 0.5s ease;
}

.auth-card-wide {
    max-width: 720px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.auth-card .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}

.auth-card .form-label i {
    color: var(--erock-yellow);
    margin-right: 4px;
}

.auth-card .form-control,
.auth-card .form-select {
    background: rgba(11, 14, 17, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all 0.2s;
}

.auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    background: rgba(11, 14, 17, 0.8);
    border-color: var(--erock-yellow);
    box-shadow: 0 0 0 0.2rem rgba(240, 185, 11, 0.15);
    color: #fff;
}

.auth-card .form-control.is-invalid,
.auth-card .form-select.is-invalid {
    border-color: var(--erock-red);
    background-image: none;
    padding-right: 1rem;
}

.auth-card .invalid-feedback {
    color: #FF6B7E;
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.auth-card .form-select option {
    background: #1E2329;
    color: #fff;
}

.auth-card .form-check-input {
    background-color: rgba(11, 14, 17, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-card .form-check-input:checked {
    background-color: var(--erock-yellow);
    border-color: var(--erock-yellow);
}

.auth-card .form-check-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.auth-card small.text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.3rem;
    z-index: 5;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--erock-yellow);
}

/* ============================================================
   STRENGTH METER
   ============================================================ */
.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    background: var(--erock-red);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak    { width: 25%; background: var(--erock-red); }
.strength-fill.medium  { width: 50%; background: #FFA500; }
.strength-fill.strong  { width: 75%; background: #FFD700; }
.strength-fill.very-strong { width: 100%; background: var(--erock-green); }

.strength-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.8rem 0;
    color: rgba(255, 255, 255, 0.3);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn-google {
    background: #fff;
    color: #444;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover:not(:disabled) {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-google i {
    color: #4285F4;
    font-size: 1.2rem;
}

/* ============================================================
   BADGES SÉCURITÉ
   ============================================================ */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.badge-item i {
    font-size: 1rem;
}

/* ============================================================
   FLASH TOASTS
   ============================================================ */
.auth-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideDown 0.4s ease, fadeOut 0.4s ease 5s forwards;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
}

.auth-toast-success {
    background: rgba(14, 203, 129, 0.15);
    border: 1px solid rgba(14, 203, 129, 0.4);
    color: #0ECB81;
}

.auth-toast-error {
    background: rgba(246, 70, 93, 0.15);
    border: 1px solid rgba(246, 70, 93, 0.4);
    color: #FF6B7E;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translate(-50%, -20px); }
}

/* ============================================================
   RETOUR
   ============================================================ */
.auth-back-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 2rem;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--erock-yellow);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 575px) {
    .auth-card {
        padding: 1.8rem 1.3rem;
    }
    .auth-title {
        font-size: 1.5rem;
    }
}
