:root {
    /* Bleus Marine - Charte Semosia Group */
    --semosia-primary: #2D5FAE;
    --semosia-primary-dark: #1B2A5C;
    --semosia-primary-light: #5BA8D4;
    --semosia-primary-lighter: #A8CEE5;
    --semosia-primary-lightest: #E8EDF5;
    /* Doré / Or - Accent Semosia */
    --semosia-accent: #C8A245;
    --semosia-accent-dark: #A08530;
    --semosia-accent-light: #F5EDD4;
    --semosia-accent-medium: #D4B55A;
    /* Marine */
    --semosia-navy: #1B2A5C;
    --semosia-navy-dark: #12204A;
    --semosia-navy-light: #263B70;
    /* Neutres */
    --semosia-gray: #4A6A8A;
    --semosia-white: #ffffff;
    --semosia-gray-light: #E8EBF2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--semosia-navy) 0%, var(--semosia-navy-dark) 50%, #0D2137 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 450px;
    background: var(--semosia-white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(18, 32, 74, 0.45);
    padding: 2rem;
    position: relative;
    z-index: 10;
    margin: auto;
    border-top: 3px solid var(--semosia-primary);
}

.logo-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-header img {
    max-width: 260px;
    height: auto;
    margin-bottom: 0.75rem;
}

.logo-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--semosia-navy);
    margin: 0;
}

.logo-header p {
    font-size: 0.9rem;
    color: #666;
    margin: 0.4rem 0 0 0;
}

h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--semosia-navy);
    margin-bottom: 1.5rem;
    text-align: center;
}

h1 i {
    color: var(--semosia-primary);
    margin-right: 0.5rem;
}

p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.error-message,
.success-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.error-message.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
    border-left-color: #b45309;
}

.success-message {
    background: var(--semosia-primary-lightest);
    color: var(--semosia-primary-dark);
    border-left: 4px solid var(--semosia-accent);
}

form {
    margin-bottom: 1.25rem;
}

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

label {
    display: block;
    font-weight: 500;
    color: var(--semosia-gray);
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}

label i {
    color: var(--semosia-primary);
    margin-right: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--semosia-white);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--semosia-primary-light);
    box-shadow: 0 0 0 3px rgba(45, 95, 174, 0.15);
}

input[type="submit"],
.btn,
button[type="submit"] {
    width: 100%;
    background: var(--semosia-primary);
    color: var(--semosia-white) !important;
    border: none;
    padding: 0.8rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

input[type="submit"]:hover,
.btn:hover,
button[type="submit"]:hover {
    background: var(--semosia-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 95, 174, 0.35);
}

input[type="submit"]:disabled,
button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--semosia-gray) !important;
}

.btn-secondary:hover {
    background: var(--semosia-navy) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.password-strength {
    margin-top: 0.4rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    background: #ef4444;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--semosia-accent);
}

.password-requirements {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.password-requirements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0;
}

.requirement i {
    font-size: 0.55rem;
    color: #d1d5db;
    flex-shrink: 0;
}

.requirement span {
    line-height: 1.3;
}

.requirement.met {
    color: var(--semosia-accent-dark);
}

.requirement.met i {
    color: var(--semosia-accent);
}

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-links p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.separator {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: #9ca3af;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.separator-text {
    padding: 0 1rem;
    font-size: 0.8rem;
}

.nav-link,
.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--semosia-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover,
.auth-link:hover {
    color: var(--semosia-primary-dark);
    transform: translateX(3px);
}

.forgot-password-link {
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: 0.875rem;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--semosia-primary);
}

@media (max-height: 800px) {
    body {
        padding: 1.5rem 2rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .logo-header {
        margin-bottom: 1.25rem;
    }
    
    .logo-header img {
        max-width: 220px;
        margin-bottom: 0.5rem;
    }
    
    .logo-header h1 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 1.75rem 1.5rem;
    }

    .logo-header img {
        max-width: 200px;
    }

    h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .container {
        padding: 1.5rem 1.25rem;
    }

    .logo-header img {
        max-width: 180px;
    }

    h1 {
        font-size: 1.3rem;
    }
    
    .password-requirements-grid {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
}