/* ========================================
   Modern Login Page Styles - Dark Theme with Orange Accents
   ======================================== */

/* Body and Container Styles */
body.login {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
}

/* Force text color for all inputs */
body.login input,
body.login textarea,
body.login select {
    color: #E5E5E5 !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

body.login input::placeholder,
body.login textarea::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}

.modern-login-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2rem 1rem;
}

/* Logo Styles */
.modern-logo-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(255, 140, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(255, 140, 0, 0.2);
}

.modern-logo {
    filter: brightness(1.1);
}

/* Card Styles */
.modern-login-card {
    background: rgba(30, 30, 30, 0.95) !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 140, 0, 0.2) !important;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.modern-card-header {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%) !important;
    border-bottom: none !important;
    padding: 2rem 1.5rem !important;
    position: relative;
}

.modern-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 140, 0, 0.3) 50%, transparent 100%);
}

.modern-card-title {
    color: #ffffff !important;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: 0.5px;
}

.modern-card-subtitle {
    color: rgba(255, 140, 0, 0.9) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0 !important;
}

.modern-card-body {
    padding: 2rem 1.5rem !important;
    background: rgba(25, 25, 25, 0.8);
}

.modern-card-footer {
    background: rgba(20, 20, 20, 0.9) !important;
    border-top: none !important;
    padding: 1.25rem 1.5rem !important;
    position: relative;
}

.modern-card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 140, 0, 0.2) 50%, transparent 100%);
}

/* Form Styles */
.modern-login-form {
    margin: 0;
}

.modern-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem !important;
}

/* Input Group Styles */
.modern-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    transition: all 0.3s ease;
    /* Bordure plus discrète */
    box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.15);
    background: rgba(30, 30, 30, 0.9);
}

.modern-input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.4);
    background: rgba(35, 35, 35, 0.95);
}

.modern-input-icon {
    background: rgba(60, 60, 60, 0.3) !important;
    border: none !important;
    color: rgba(255, 140, 0, 0.8) !important;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    margin: 0;
    /* Icon box: left side rounded, right side straight */
    border-radius: 12px 0 0 12px !important;
}

.modern-input {
    background: transparent !important;
    border: none !important;
    border-left: 0 !important;
    color: #E5E5E5 !important;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    transition: all 0.3s ease;
    flex: 1;
    margin: 0;
    -webkit-text-fill-color: #E5E5E5 !important;
    /* Input box: left side straight, right side rounded */
    border-radius: 0 12px 12px 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.modern-input::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}

.modern-input:focus {
    background: transparent !important;
    color: #E5E5E5 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

/* Override Bootstrap input-group classes */
.modern-input-group .input-group-prepend {
    margin: 0 !important;
}

.modern-input-group .input-group-text {
    border-radius: 12px 0 0 12px !important;
    margin: 0 !important;
    border: none !important;
}

.modern-input-group .form-control {
    border-radius: 0 12px 12px 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
    margin: 0 !important;
}

/* Super specific selectors to override everything */
.input-group.modern-input-group > .input-group-prepend > .input-group-text.modern-input-icon {
    border-radius: 12px 0 0 12px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group.modern-input-group > input.form-control.modern-input,
.input-group.modern-input-group > .form-control.modern-input {
    border-radius: 0 12px 12px 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
}

/* Button Styles */
.btn-modern-orange {
    background: linear-gradient(135deg, #E77D01 0%, #D16D01 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 12px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.btn-modern-orange:hover {
    background: linear-gradient(135deg, #E77D01 0%, #E77D01 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 140, 0, 0.5) !important;
    color: #ffffff !important;
}

.btn-modern-orange:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.4) !important;
}

.btn-modern-orange:focus {
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3) !important;
    outline: none !important;
}

/* Link Styles */
.modern-link {
    color: rgba(255, 140, 0, 0.9) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.modern-link:hover {
    color: #E77D01 !important;
    text-decoration: none !important;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.footer-text {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem;
}

.modern-link-register {
    color: #E77D01 !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.modern-link-register:hover {
    color: #E77D01 !important;
    text-decoration: underline !important;
}

/* Alert Styles */
.modern-alert {
    border-radius: 12px !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modern-alert-success {
    background: rgba(40, 167, 69, 0.15) !important;
    color: #4ade80 !important;
    box-shadow: inset 4px 0 0 0 #4ade80;
}

.modern-alert-danger {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #ff6b6b !important;
    box-shadow: inset 4px 0 0 0 #ff6b6b;
}

.modern-close {
    color: inherit !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease;
}

.modern-close:hover {
    opacity: 1 !important;
}

/* Responsive Design */
@media (max-width: 576px) {
    .modern-logo-container {
        width: 8rem !important;
        height: 8rem !important;
    }
    
    .modern-card-title {
        font-size: 1.5rem !important;
    }
    
    .modern-card-body {
        padding: 1.5rem 1rem !important;
    }
    
    .modern-card-header {
        padding: 1.5rem 1rem !important;
    }
}

/* Animation for card entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus visible improvements */
*:focus-visible {
    outline: 2px solid rgba(255, 140, 0, 0.5);
    outline-offset: 2px;
}

/* Autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #E5E5E5 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 30, 30, 0.98) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #E5E5E5 !important;
    color: #E5E5E5 !important;
    border-radius: 0 12px 12px 0 !important;
}

/* Autofill pour les inputs dans les input-groups */
.modern-input-group input:-webkit-autofill,
.modern-input-group input:-webkit-autofill:hover,
.modern-input-group input:-webkit-autofill:focus,
.modern-input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 30, 30, 0.98) inset !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

/* Error Messages */
.modern-error-message {
    color: #ff6b6b !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
    display: block;
}

.modern-error-message ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-error-message li {
    margin-bottom: 0.25rem;
}

/* Checkbox Styles */
.modern-checkbox {
    margin-bottom: 0 !important;
}

.modern-checkbox-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    cursor: pointer;
}

.modern-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #E77D01 !important;
    border-color: #E77D01 !important;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2) !important;
}

.modern-checkbox .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.25) !important;
}

.modern-checkbox .custom-control-label::before {
    background-color: rgba(40, 40, 40, 0.8) !important;
    border: none !important;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.4) !important;
    border-radius: 4px !important;
}

/* Form Widget Overrides for Symfony Forms */
.modern-login-form input[type="text"],
.modern-login-form input[type="email"],
.modern-login-form input[type="password"],
.modern-login-form textarea,
.modern-login-form select {
    background: rgba(30, 30, 30, 0.9) !important;
    border: none !important;
    box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.15) !important;
    color: #E5E5E5 !important;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    transition: all 0.3s ease;
    border-radius: 12px !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

.modern-login-form input[type="text"]:focus,
.modern-login-form input[type="email"]:focus,
.modern-login-form input[type="password"]:focus,
.modern-login-form textarea:focus,
.modern-login-form select:focus {
    background: rgba(35, 35, 35, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.4) !important;
    color: #E5E5E5 !important;
    outline: none !important;
    -webkit-text-fill-color: #E5E5E5 !important;
}

.modern-login-form input::placeholder,
.modern-login-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}

/* Autofill pour les formulaires Symfony */
.modern-login-form input:-webkit-autofill,
.modern-login-form input:-webkit-autofill:hover,
.modern-login-form input:-webkit-autofill:focus,
.modern-login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 30, 30, 0.98) inset !important;
    -webkit-text-fill-color: #E5E5E5 !important;
    box-shadow: 0 0 0 1000px rgba(30, 30, 30, 0.98) inset, 0 0 0 1px rgba(255, 140, 0, 0.15) !important;
}

/* Invalid/Error State */
.modern-login-form input.is-invalid,
.modern-login-form textarea.is-invalid,
.modern-login-form select.is-invalid {
    box-shadow: 0 0 0 2px #ff6b6b !important;
}

.modern-login-form input.is-invalid:focus,
.modern-login-form textarea.is-invalid:focus,
.modern-login-form select.is-invalid:focus {
    box-shadow: 0 0 0 2px #ff6b6b, 0 0 0 5px rgba(255, 107, 107, 0.25) !important;
}
