/* Nouveau design auth - Adapté de Figma */

:root {
    --color-yellow: #ffc107;
    --color-yellow-dark: #e3b04b;
    --color-yellow-darker: #d4a03e;
    --color-yellow-light: #ffb300;
    --color-bg-light: #e8f0fe;
    --color-text-dark: #1a1a1a;
    --color-text-gray: #666666;
    --color-text-light: #999999;
    --color-border: #e0e0e0;
    --color-border-focus: #ffc107;
    --color-bg-white: #ffffff;
    --color-bg-gray: #f5f5f5;
}

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

body {
    font-family: 'Lato', sans-serif;
    color: var(--color-text-dark);
    background: var(--color-bg-white);
}

/* Layout principal */
.auth-container {
    min-height: 100vh;
    display: flex;
}

/* Section formulaire (gauche) */
.auth-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .auth-form-section {
        padding: 3rem 4rem;
    }
}

@media (min-width: 1024px) {
    .auth-form-section {
        padding: 3rem 6rem;
    }
}

/* Éléments décoratifs */
.auth-decorative-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 8rem;
    height: 8rem;
    background: var(--color-yellow);
    border-radius: 0 0 100% 0;
    opacity: 0.2;
}

.auth-decorative-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 6rem;
    height: 6rem;
    background: var(--color-bg-light);
    border-radius: 100% 0 0 0;
}

/* Container du formulaire */
.auth-form-wrapper {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.auth-form-wrapper.register {
    max-width: 42rem;
}

/* Logo */
.auth-logo {
    margin-bottom: 3rem;
}

.auth-logo img {
    height: 3.5rem;
    width: auto;
}

/* Header */
.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
}

.auth-header p {
    color: var(--color-text-gray);
    font-size: 0.95rem;
}

/* Alert */
.auth-alert {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #fff9e6;
    border: 1px solid var(--color-yellow);
    border-radius: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.auth-alert svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-yellow);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.auth-alert p {
    color: #333;
    font-size: 0.875rem;
    margin: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form groups */
.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form-group label {
    font-size: 0.875rem;
    color: var(--color-text-gray);
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray-600 {
    color: var(--color-text-gray);
}

.d-none {
    display: none !important;
}

/* Inputs */
.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper.group {
    position: relative;
}

.auth-input-wrapper.group::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--color-yellow), var(--color-yellow-dark));
    border-radius: 0.75rem;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s;
}

.auth-input-wrapper.group:focus-within::before {
    opacity: 1;
}

.auth-input,
.auth-select,
.auth-textarea {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--color-bg-gray);
    border: 0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
}

.auth-input-wrapper.group .auth-input {
    position: relative;
}

.auth-input:focus,
.auth-select:focus,
.auth-textarea:focus {
    outline: none;
    background: var(--color-bg-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-input.bg-light {
    background: var(--color-bg-light);
}

.auth-input.bg-white {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
}

.auth-input.bg-white:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Password toggle */
.auth-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.3s;
}

.auth-password-toggle:hover {
    color: var(--color-text-gray);
}

.auth-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Select */
.auth-select {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.auth-select:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Grid layout pour register */
.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .auth-form-grid.two-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Forgot password link */
.auth-forgot-password {
    text-align: right;
    margin-top: -0.5rem;
}

.auth-forgot-password a,
.auth-forgot-password button {
    font-size: 0.875rem;
    color: var(--color-yellow-dark);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-forgot-password a:hover,
.auth-forgot-password button:hover {
    color: var(--color-yellow-darker);
}

/* Submit button */
.auth-submit-btn {
    position: relative;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--color-yellow), var(--color-yellow-dark));
    color: var(--color-text-dark);
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-bg-white);
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-submit-btn:hover::before {
    opacity: 0.2;
}

.auth-submit-btn span {
    position: relative;
    z-index: 10;
}

.auth-submit-btn.solid {
    background: var(--color-yellow);
}

.auth-submit-btn.solid:hover {
    background: var(--color-yellow-light);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Social buttons */
.auth-social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-social-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-social-btn:hover {
    border-color: var(--color-yellow);
    background: var(--color-bg-gray);
}

.auth-social-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s;
    fill: var(--color-text-light);
}

.auth-social-btn:hover svg {
    transform: scale(1.1);
}

/* Sign up / Login link */
.auth-switch-link {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
}

.auth-switch-link span {
    color: var(--color-text-gray);
}

.auth-switch-link a,
.auth-switch-link button {
    color: var(--color-yellow-dark);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-switch-link a:hover,
.auth-switch-link button:hover {
    color: var(--color-yellow-darker);
}

/* Category selection */
.auth-category-wrapper {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-bg-white);
}

.auth-category-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 8rem;
    overflow-y: auto;
}

.auth-category-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-gray);
    color: var(--color-text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.auth-category-btn:hover {
    border-color: var(--color-border);
    background: #e5e5e5;
}

.auth-category-btn.active {
    background: var(--color-yellow);
    border-color: var(--color-yellow);
    color: var(--color-text-dark);
}

/* File input */
.auth-file-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s;
    cursor: pointer;
}

.auth-file-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.auth-file-input::file-selector-button {
    margin-right: 1rem;
    padding: 0.375rem 1rem;
    border-radius: 0.5rem;
    border: 0;
    background: var(--color-bg-gray);
    color: var(--color-text-dark);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.auth-file-input::file-selector-button:hover {
    background: #e5e5e5;
}

/* Section image (droite) */
.auth-image-section {
    display: none;
    width: 45%;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-image-section {
        display: block;
    }
}

.auth-image-wrapper {
    position: absolute;
    inset: 0;
}

.auth-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 193, 7, 0.3), transparent, rgba(227, 176, 75, 0.2));
}

/* Floating card */
.auth-floating-card {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    right: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-floating-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.auth-floating-card p {
    color: var(--color-text-gray);
    font-size: 0.95rem;
}

/* Flash messages */
.auth-flash-messages {
    margin-bottom: 1.5rem;
}

.auth-alert-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-alert-message.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.auth-alert-message.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

.auth-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.auth-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.auth-slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Form errors styling */
.auth-form-group ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

/* Styles pour les erreurs Symfony par défaut */
.auth-form-group ul li,
.auth-form-group .invalid-feedback,
.auth-form-group .form-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-group ul li:before,
.auth-form-group .invalid-feedback:before,
.auth-form-group .form-error-message:before {
    content: '⚠';
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-form-group ul li:last-child,
.auth-form-group .invalid-feedback:last-child,
.auth-form-group .form-error-message:last-child {
    margin-bottom: 0;
}

/* Style pour les listes d'erreurs vides (masquées) */
.auth-form-group ul:empty {
    display: none;
}

/* Input error state */
.auth-input:invalid,
.auth-input.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.auth-input:invalid:focus,
.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .auth-form-wrapper.register {
        max-width: 100%;
    }
}

