/* assets/css/style.css - Design moderne avec transparence */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {/* assets/css/style.css - Design moderne avec transparence */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --danger-color: #ef4444;
        --success-color: #22c55e;
        --warning-color: #f59e0b;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: hsla(0, 0%, 100%, 0.85);
    background-color: #170d24;
    background-image:
        radial-gradient(ellipse at 10% 90%, #3c2d83 0%, transparent 55%),
        radial-gradient(ellipse at 90% 90%, #c33c65 0%, transparent 55%),
        radial-gradient(ellipse at 90% 10%, #4a74dc 0%, transparent 55%),
        radial-gradient(ellipse at 10% 10%, #35244f 0%, transparent 55%);
    min-height: 100vh;
    transition: background 0.3s ease;
}

[data-theme="light"] body {
    color: #0f172a;
    background-color: #f8fafc;
    background-image:
        radial-gradient(ellipse at 10% 90%, rgba(167, 139, 250, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 90%, rgba(244, 114, 182, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(96, 165, 250, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 10%, rgba(139, 92, 246, 0.1) 0%, transparent 55%);
}

/* Layout deux colonnes */
.split-layout {
    display: flex;
    min-height: 100vh;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    position: relative;
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Logo */
.logo-top {
    position: absolute;
    top: 40px;
    left: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-top:hover {
    opacity: 0.8;
}

.logo-img {
    height: 32px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

[data-theme="light"] .logo-text {
    color: #0f172a;
}

/* Hero section */
.hero-content {
    max-width: 500px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 40px;
    color: white;
}

[data-theme="light"] .hero-icon {
    color: #0f172a;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

[data-theme="light"] .hero-title {
    color: #0f172a;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

[data-theme="light"] .hero-subtitle {
    color: #64748b;
}

/* Formulaire dans une card */
.form-container {
    width: 100%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 40px;
}

[data-theme="light"] .form-container {
    background: rgba(255, 255, 255, 0.7);
}

/* Thème */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: white;
    transition: all 0.2s ease;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #0f172a;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.15);
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    overflow: hidden;
}

[data-theme="dark"] .theme-dropdown {
    background: rgba(30, 41, 59, 0.95);
}

.theme-dropdown.show {
    display: block;
}

.theme-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #0f172a;
    transition: background 0.2s ease;
}

[data-theme="dark"] .theme-option {
    color: #f1f5f9;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.theme-icon {
    width: 16px;
    height: 16px;
}

/* Champs */
.form-label {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    font-size: 0.875rem;
    display: block;
}

[data-theme="light"] .form-label {
    color: #0f172a;
}

.form-label-optional {
    font-weight: 400;
}

.form-control, .form-select {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    width: 100%;
    font-family: inherit;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

.mb-3 {
    margin-bottom: 20px;
}

/* Champ avec icône copier à l'intérieur */
.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-copy input {
    padding-right: 50px !important;
}

.btn-copy-inside {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .btn-copy-inside {
    color: rgba(0, 0, 0, 0.4);
}

.btn-copy-inside:hover {
    color: var(--primary-color);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.password-wrapper > div:first-child {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.password-wrapper input {
    flex: 1;
    padding-right: 90px !important;
    min-height: 42px;
}

.password-icons {
    position: absolute;
    right: 8px;
    display: flex;
    gap: 4px;
}

.btn-eye, .btn-copy-pwd {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

[data-theme="light"] .btn-eye,
[data-theme="light"] .btn-copy-pwd {
    color: rgba(0, 0, 0, 0.4);
}

.btn-eye:hover, .btn-copy-pwd:hover {
    color: var(--primary-color);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.invalid-feedback {
    display: none;
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Générateur de mot de passe */
.password-generator-box {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-top: 10px;
}

[data-theme="light"] .password-generator-box {
    background: rgba(0, 0, 0, 0.05);
}

.generator-icon {
    width: 18px;
    height: 18px;
    color: white;
    flex-shrink: 0;
}

[data-theme="light"] .generator-icon {
    color: #0f172a;
}

.generator-text {
    font-size: 0.8rem;
    color: white;
    flex: 1;
    white-space: nowrap;
}

[data-theme="light"] .generator-text {
    color: #0f172a;
}

.generator-buttons {
    display: flex;
    gap: 6px;
}

.btn-generator {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .btn-generator {
    background: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

.btn-generator:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .btn-generator:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Grille */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Boutons */
.btn {
    border-radius: 20px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: #0f172a;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-primary {
    background: #0f172a;
    color: white;
}

.alert {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: none;
    font-size: 0.95rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 40px;
        min-height: auto;
    }
    
    .logo-top {
        left: 40px;
        top: 30px;
    }
    
    .hero-content {
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 30px 20px;
        order: 2;
    }
    
    .logo-top {
        left: 20px;
        top: 20px;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .hero-content {
        margin-top: 40px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .right-panel {
        order: 1;
        padding: 30px 20px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .password-generator-box {
        flex-wrap: wrap;
    }
    
    .generator-text {
        width: 100%;
    }
    
    .generator-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-selector {
        top: 10px;
        right: 10px;
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 3px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.toast-success { background-color: var(--success-color); }
.toast-error { background-color: var(--danger-color); }
.toast-info { background-color: var(--primary-color); }
.toast-warning { background-color: var(--warning-color); }
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --danger-color: #ef4444;
        --success-color: #22c55e;
        --warning-color: #f59e0b;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    transition: background 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
    }
}

/* Layout deux colonnes */
.split-layout {
    display: flex;
    min-height: 100vh;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    position: relative;
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .right-panel {
    background: rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .right-panel {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Logo */
.logo-top {
    position: absolute;
    top: 40px;
    left: 80px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Hero section */
.hero-content {
    max-width: 500px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 40px;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Formulaire */
.form-container {
    width: 100%;
    max-width: 500px;
}

/* Thème */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: white;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    overflow: hidden;
}

[data-theme="dark"] .theme-dropdown {
    background: rgba(30, 41, 59, 0.95);
}

.theme-dropdown.show {
    display: block;
}

.theme-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #0f172a;
    transition: background 0.2s ease;
}

[data-theme="dark"] .theme-option {
    color: #f1f5f9;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.theme-icon {
    width: 16px;
    height: 16px;
}

/* Champs */
.form-label {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    font-size: 0.875rem;
    display: block;
}

.form-control, .form-select {
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    width: 100%;
}

.form-control::placeholder {
    color: #64748b;
    opacity: 0.6;
}

.form-control:focus, .form-select:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.mb-3 {
    margin-bottom: 20px;
}

/* Champ avec icône copier à l'intérieur */
.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-copy input {
    padding-right: 50px !important;
}

.btn-copy-inside {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-inside:hover {
    color: var(--primary-color);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.password-wrapper > div:first-child {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.password-wrapper input {
    flex: 1;
    padding-right: 90px !important;
    min-height: 42px;
}

.password-icons {
    position: absolute;
    right: 8px;
    display: flex;
    gap: 4px;
}

.btn-eye, .btn-copy-pwd {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
    transition: color 0.2s ease;
}

.btn-eye:hover, .btn-copy-pwd:hover {
    color: var(--primary-color);
}

.form-control.is-invalid {
    border: 2px solid var(--danger-color);
}

.form-control.is-valid {
    border: 2px solid var(--success-color);
}

.invalid-feedback {
    display: none;
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Générateur de mot de passe */
.password-generator-box {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.generator-icon {
    width: 20px;
    height: 20px;
    color: white;
    flex-shrink: 0;
}

.generator-text {
    font-size: 0.875rem;
    color: white;
    flex: 1;
    min-width: 150px;
}

.generator-buttons {
    display: flex;
    gap: 8px;
}

.btn-generator {
    background: white;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-generator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-generator {
    background: #0f172a;
    color: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-generator {
        background: #0f172a;
        color: white;
    }
}

/* Grille */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Boutons */
.btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: #0f172a;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-primary {
    background: #0f172a;
    color: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-primary {
        background: #0f172a;
        color: white;
    }
}

.alert {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: none;
    font-size: 0.95rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 40px;
        min-height: auto;
    }
    
    .logo-top {
        left: 40px;
        top: 30px;
    }
    
    .hero-content {
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 30px 20px;
        order: 2;
    }
    
    .logo-top {
        left: 20px;
        top: 20px;
        font-size: 1.25rem;
    }
    
    .hero-content {
        margin-top: 40px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .right-panel {
        order: 1;
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .password-generator-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .generator-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-selector {
        top: 10px;
        right: 10px;
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 3px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-success { background-color: var(--success-color); }
.toast-error { background-color: var(--danger-color); }
.toast-info { background-color: var(--primary-color); }
.toast-warning { background-color: var(--warning-color); }
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --danger-color: #ef4444;
        --success-color: #22c55e;
        --warning-color: #f59e0b;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    transition: background 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
    }
}

/* Layout deux colonnes */
.split-layout {
    display: flex;
    min-height: 100vh;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    position: relative;
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .right-panel {
    background: rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .right-panel {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Logo */
.logo-top {
    position: absolute;
    top: 40px;
    left: 80px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Hero section */
.hero-content {
    max-width: 500px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 40px;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Formulaire */
.form-container {
    width: 100%;
    max-width: 500px;
}

/* Thème */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: white;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    overflow: hidden;
}

[data-theme="dark"] .theme-dropdown {
    background: rgba(30, 41, 59, 0.95);
}

.theme-dropdown.show {
    display: block;
}

.theme-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #0f172a;
    transition: background 0.2s ease;
}

[data-theme="dark"] .theme-option {
    color: #f1f5f9;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.theme-icon {
    width: 16px;
    height: 16px;
}

/* Champs */
.form-label {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    font-size: 0.875rem;
    display: block;
}

.form-control, .form-select {
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    width: 100%;
}

.form-control::placeholder {
    color: #64748b;
    opacity: 0.6;
}

.form-control:focus, .form-select:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.mb-3 {
    margin-bottom: 20px;
}

/* Champ avec icône copier à l'intérieur */
.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-copy input {
    padding-right: 50px !important;
}

.btn-copy-inside {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-inside:hover {
    color: var(--primary-color);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.password-wrapper > div:first-child {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.password-wrapper input {
    flex: 1;
    padding-right: 90px !important;
    min-height: 42px;
}

.password-icons {
    position: absolute;
    right: 8px;
    display: flex;
    gap: 4px;
}

.btn-eye, .btn-copy-pwd {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
    transition: color 0.2s ease;
}

.btn-eye:hover, .btn-copy-pwd:hover {
    color: var(--primary-color);
}

.form-control.is-invalid {
    border: 2px solid var(--danger-color);
}

.form-control.is-valid {
    border: 2px solid var(--success-color);
}

.invalid-feedback {
    display: none;
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Générateur de mot de passe */
.password-generator-box {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.generator-icon {
    width: 20px;
    height: 20px;
    color: white;
    flex-shrink: 0;
}

.generator-text {
    font-size: 0.875rem;
    color: white;
    flex: 1;
    min-width: 150px;
}

.generator-buttons {
    display: flex;
    gap: 8px;
}

.btn-generator {
    background: white;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-generator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-generator {
    background: #0f172a;
    color: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-generator {
        background: #0f172a;
        color: white;
    }
}

/* Grille */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Boutons */
.btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: #0f172a;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-primary {
    background: #0f172a;
    color: white;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-primary {
        background: #0f172a;
        color: white;
    }
}

.alert {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: none;
    font-size: 0.95rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Responsive */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 40px;
        min-height: auto;
    }
    
    .logo-top {
        left: 40px;
        top: 30px;
    }
    
    .hero-content {
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 30px 20px;
        order: 2;
    }
    
    .logo-top {
        left: 20px;
        top: 20px;
        font-size: 1.25rem;
    }
    
    .hero-content {
        margin-top: 40px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .right-panel {
        order: 1;
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .password-generator-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .generator-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-selector {
        top: 10px;
        right: 10px;
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 3px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-success { background-color: var(--success-color); }
.toast-error { background-color: var(--danger-color); }
.toast-info { background-color: var(--primary-color); }
.toast-warning { background-color: var(--warning-color); }