/**
 * Styles pour les pages d'authentification
 * login.php et request_access.php
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
}

/* ============================= */
/* LOGIN PAGE STYLES */
/* ============================= */

.login-section {
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(255,255,255,0.12), transparent 35%),
                linear-gradient(135deg, #0d1b2a 0%, #1b263b 45%, #234b7a 100%);
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.06), transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.06), transparent 35%);
    pointer-events: none;
}

.login-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 3fr 9fr;
    gap: 0;
    width: 100%;
    max-width: 1200px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 120px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    align-items: stretch;
}

.hero-panel {
    background: linear-gradient(145deg, #182b45 0%, #1f3b64 50%, #2d6dcc 100%);
    color: #f6f8fb;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    min-height: auto;
}

.hero-top {
    margin-bottom: 8px;
}

.hero-top .pill {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    color: #f6f8fb;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-title {
    font-size: 2.2rem;
    margin: 12px 0 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-title i {
    color: #ffc857;
    margin-right: 12px;
}

.hero-sub {
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature {
    display: flex;
    gap: 12px;
    padding: 12px 12px;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    color: #eaf1ff;
}

.feature i {
    font-size: 1.4rem;
    margin-top: 2px;
    color: #7ce7a0;
    flex-shrink: 0;
}

.feature strong {
    display: block;
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.feature p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Feature cards for request access */
.hero-features.hero-features-request {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.feature.feature-request {
    display: flex;
    gap: 16px;
    padding: 24px 18px;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    color: #eaf1ff;
    flex: 1;
}

.feature.feature-request i {
    font-size: 1.8rem;
    margin-top: 2px;
    color: #7ce7a0;
    flex-shrink: 0;
}

.feature.feature-request strong {
    display: block;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.feature.feature-request p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-panel {
    background: #ffffff;
    padding: 24px 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.form-header .eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6c7a89;
    margin: 0;
}

.form-header h2 {
    margin: 2px 0 0;
    font-weight: 800;
    color: #1f2d3d;
    font-size: 1.45rem;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f3b64, #2d6dcc);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 25px rgba(35, 109, 204, 0.35);
}

.input-group {
    margin-bottom: 12px;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.input-group-text {
    background: white;
    border: none;
    color: var(--secondary-color);
    padding: 0 18px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    min-width: 50px;
}

.form-control {
    border: none;
    padding: 10px 12px;
    font-size: 0.9rem;
    background: white;
    color: #333;
}

.form-control:focus {
    border: none;
    outline: none;
    background: #f9f9f9;
    box-shadow: none;
    color: #333;
}

.form-control::placeholder {
    color: #aaa;
}

.form-check {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input {
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--secondary-color);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    color: #555;
    font-weight: 500;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.25);
    width: 100%;
    margin-bottom: 12px;
}

.btn-login:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(44, 62, 80, 0.35);
}

.btn-login:active {
    transform: translateY(-2px);
}

.login-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #aaa;
    font-weight: 500;
    font-size: 0.9rem;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    z-index: 0;
}

.login-divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    z-index: 1;
}

.login-links {
    text-align: center;
    margin-bottom: 20px;
}

.form-panel .login-links {
    text-align: left;
    margin-bottom: 0;
}

.login-links p {
    margin: 12px 0;
    font-size: 0.95rem;
    color: #666;
}

.login-links a {
        color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;

}

.login-links a.link-primary {
    color: var(--secondary-color) !important;
}

.login-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateX(3px);
}

.demo-accounts {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    border-left: 5px solid var(--secondary-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    animation: slideInUp 1s ease-out 0.3s both;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.demo-accounts-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.demo-accounts-title i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.demo-account {
    margin-bottom: 10px;
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #555;
}

.demo-account:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.demo-account .badge {
    margin-right: 8px;
    font-weight: 700;
    padding: 4px 10px;
}

.demo-account code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    font-weight: 600;
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f9fc;
    border: 1px solid #e5ebf5;
    font-size: 0.85rem;
}

.link-muted {
    color: #6c7a89;
    text-decoration: none;
}

.link-muted:hover {
    color: #1f3b64;
    text-decoration: underline;
}

.btn-outline-secondary {
    border: 2px solid #e0e0e0;
    color: var(--secondary-color);
    background: white;
    transition: all 0.3s ease;
    padding: 12px 16px;
    height: 100%;
}

.btn-outline-secondary:hover {
    background: white;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ============================= */
/* ACCESS REQUEST PAGE STYLES */
/* ============================= */

.access-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.access-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.15),
                0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 800px;
    width: 100%;
}

.access-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.access-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 25s ease-in-out infinite;
}

.access-header > * {
    position: relative;
    z-index: 1;
}

.access-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.access-header h2 i {
    color: var(--warning-color);
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.access-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
}

.access-body {
    padding: 45px 40px;
}

.info-box {
    background: linear-gradient(135deg, #f0f4f8 0%, #f8f9fa 100%);
    border-left: 5px solid var(--secondary-color);
    padding: 22px 25px;
    margin-bottom: 35px;
    border-radius: 12px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.6s ease-out;
}

.info-box i {
    font-size: 1.6rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 3px;
}

.info-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.info-box p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-label {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label .required {
    color: var(--accent-color);
    font-weight: 900;
}

.form-control,
.form-select {
    border: 2px solid #e8e8e8;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.input-group .form-control,
.input-group .form-select {
    border: none;
    border-radius: 0;
    padding: 10px 12px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    background: white;
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
}

.form-select option {
    color: #333;
    padding: 8px;
}

.form-row {
    margin-bottom: 0;
}

.form-row > [class*='col-'] {
    margin-bottom: 25px;
}

.role-description {
    font-size: 0.85rem;
    color: #999;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e8e8e8;
    font-style: italic;
}

.role-description strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 16px 40px;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.25);
    width: 100%;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(44, 62, 80, 0.35);
}

.btn-submit:active {
    transform: translateY(-2px);
}

.link-login {
    text-align: center;
    margin-top: 35px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

.link-login p {
    margin: 12px 0;
    font-size: 0.95rem;
    color: #666;
}

.link-login a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-login a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateX(3px);
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
    animation: slideInUp 0.6s ease-out;
}

.success-message h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.success-message p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.btn-group-success {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-group-success a {
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.btn-group-success a.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.25);
}

.btn-group-success a.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(44, 62, 80, 0.35);
}

.btn-group-success a.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid #e8e8e8;
}

.btn-group-success a.btn-secondary:hover {
    background: #f8f9fa;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ============================= */
/* ANIMATIONS */
/* ============================= */

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ============================= */
/* RESPONSIVE DESIGN */
/* ============================= */

@media (max-width: 1100px) {
    .login-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 40px 32px;
    }

    .form-panel {
        padding: 40px 32px;
    }
}

@media (max-width: 768px) {
    .login-section {
        padding: 20px 10px;
        min-height: 100vh;
        height: auto;
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .login-grid {
        margin: 20px 0;
    }

    .hero-panel {
        gap: 20px;
        padding: 30px 24px;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.9rem;
    }

    .form-panel {
        padding: 30px 24px;
        min-height: auto;
    }

    .form-header h2 {
        font-size: 1.4rem;
    }

    .btn-login,
    .btn-submit {
        padding: 14px 22px;
        font-size: 1rem;
    }

    .demo-chip {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .login-section {
        padding: 15px 8px;
        align-items: flex-start;
    }

    .login-grid {
        border-radius: 16px;
        margin: 10px 0;
    }

    .hero-panel {
        padding: 24px 20px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-sub {
        font-size: 0.85rem;
    }

    .form-panel {
        padding: 24px 20px;
    }

    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-header h2 {
        font-size: 1.3rem;
    }

    .feature {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .btn-group-success {
        flex-direction: column;
    }

    .btn-group-success a {
        width: 100%;
        justify-content: center;
    }

    .access-header,
    .access-body {
        padding: 24px 20px;
    }

    .info-box {
        padding: 16px 18px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }

    .form-row.row {
        margin: -10px;
    }

    .form-row.row > [class*='col-'] {
        padding: 10px;
        margin-bottom: 0;
    }

    .input-group {
        margin-bottom: 10px;
    }

    input.form-control,
    select.form-select {
        font-size: 14px;
        padding: 12px 14px;
    }

    .btn-login,
    .btn-submit {
        padding: 13px 20px;
        font-size: 0.95rem;
    }
}
