/* Auth Pages CSS - Style thème public */
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

:root {
    --auth-primary: #119fb8;
    --auth-primary-hover: #0e8a9f;
    --auth-card-bg: #fff;
    --auth-border: #e0e0e0;
    --auth-text: #333;
    --auth-text-muted: #666;
    --auth-success: #2A9D8F;
    --auth-warning: #ffc107;
    --auth-danger: #E63946;
    --auth-red: #64113f;
}

* {
    box-sizing: border-box;
}

/* Typo principale */
.page-auth,
.page-auth body,
.page-auth input,
.page-auth button,
.page-auth .auth-card {
    font-family: 'Varela Round', sans-serif;
}

/* Page auth spécifique */
.page-auth .auth-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Permettre le scroll sur la section hero */
.page-auth .auth-hero.full-screen {
    height: auto;
    min-height: 100vh;
}

/* Fixer l'image de fond pour qu'elle ne change pas de taille */
.page-auth .auth-hero:after {
    background-size: cover !important;
    background-attachment: fixed !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Logo principal au-dessus du formulaire */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 60px;
}

/* Layout deux colonnes : formulaire + infos */
.auth-layout {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 800px;
    width: 100%;
}

.auth-form-wrapper {
    flex: 1;
    max-width: 580px;
}

.auth-info {
    flex: 0 0 auto;
    text-align: center;
    color: #fff;
}

.auth-info-logo img {
    height: 80px;
    margin-bottom: 1.5rem;
}

.auth-info-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.auth-info-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-info-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-info-separator {
    color: rgba(255, 255, 255, 0.5);
}

.auth-info-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
}

.auth-info-copyright a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.auth-info-copyright .sykso-logo {
    height: 20px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Responsive : infos en dessous sur mobile */
@media (max-width: 768px) {
    .page-auth .auth-hero {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .auth-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .auth-form-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .auth-info {
        margin-top: 1rem;
    }
    
    .auth-info-logo {
        display: none;
    }
}

.auth-container {
    width: 100%;
    max-width: 580px;
}

.auth-card {
    background: var(--auth-card-bg);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-red);
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Form styles */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--auth-text);
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 0;
    font-size: 1rem;
    background: #f8f9fa;
    color: var(--auth-text);
    transition: all 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: var(--auth-card-bg);
    box-shadow: 0 0 0 3px rgba(17, 159, 184, 0.15);
}

.auth-form input::placeholder {
    color: #aaa;
}

/* Checkbox remember me */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Row avec checkbox et lien mot de passe oublié */
.form-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

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

.form-check-row .forgot-password-link {
    font-size: 0.9rem;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.form-check-row .forgot-password-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.form-check input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.form-check label {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    cursor: pointer;
}

/* Checkbox avec label inline (CGV/CGU) */
.form-group-checkbox {
    margin-bottom: 1.25rem;
}

.form-group-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-group-checkbox input[type="checkbox"],
.form-check input[type="checkbox"] {
    display: block !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    border: 2px solid var(--auth-border) !important;
    border-radius: 0 !important;
    background: #fff !important;
    transition: all 0.2s ease;
    position: relative;
}

.form-group-checkbox input[type="checkbox"]:hover,
.form-check input[type="checkbox"]:hover {
    border-color: var(--auth-primary) !important;
}

.form-group-checkbox input[type="checkbox"]:checked,
.form-check input[type="checkbox"]:checked {
    background: var(--auth-primary) !important;
    border-color: var(--auth-primary) !important;
}

.form-group-checkbox input[type="checkbox"]:checked::after,
.form-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-group-checkbox .checkbox-text {
    font-size: 0.9rem;
    color: var(--auth-text);
    line-height: 1.5;
}

.form-group-checkbox .checkbox-text a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.form-group-checkbox .checkbox-text a:hover {
    text-decoration: underline;
}

/* Button full width */
.auth-form .button.full-width {
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

.auth-form .button i {
    margin-right: 0.5rem;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Alert messages */
.auth-card .alert {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-card .alert-danger {
    background: #ffebee;
    color: var(--auth-danger);
    border: 1px solid #ffcdd2;
}

.auth-card .alert-success {
    background: #e8f5e9;
    color: var(--auth-success);
    border: 1px solid #c8e6c9;
}

.alert-icon {
    font-size: 1.1rem;
}

/* Footer link */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* Form validation feedback */
.form-error {
    color: var(--auth-danger);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-error::before {
    content: '⚠️';
    font-size: 0.75rem;
}

/* Password strength indicator (optional enhancement) */
.password-strength {
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--auth-danger);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--auth-warning);
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

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

.auth-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Form section separator */
.form-section-separator {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--auth-border);
}

.form-section-separator .section-title {
    display: block;
    font-weight: 600;
    color: var(--auth-text);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.form-section-separator .section-hint {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Form row layout */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row-3 > .form-group {
    flex: 1;
    min-width: 100px;
}

.form-row-2 > .form-group {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 480px) {
    .form-row-3 > .form-group,
    .form-row-2 > .form-group {
        flex: 1 1 100%;
    }
}

/* Select et input styles pour les nouveaux champs */
.auth-form select,
.auth-form input[type="number"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 0;
    font-size: 0.9rem;
    background: #f8f9fa;
    color: var(--auth-text);
    transition: all 0.2s;
    font-family: 'Varela Round', sans-serif;
    height: 44px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.auth-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.auth-form select:focus,
.auth-form input[type="number"]:focus {
    outline: none;
    border-color: var(--auth-primary);
    background-color: var(--auth-card-bg);
    box-shadow: 0 0 0 3px rgba(17, 159, 184, 0.15);
}

.auth-form select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23119fb8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Accordion pour les options facultatives */
.form-accordion {
    margin: 1.25rem 0;
    border: 1px solid var(--auth-border);
    border-radius: 0;
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-family: 'Varela Round', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text);
    transition: background 0.2s;
}

.accordion-toggle:hover {
    background: #eef0f2;
}

.accordion-title {
    display: flex;
    align-items: center;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
}

.form-accordion.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1rem;
}

.form-accordion.open .accordion-content {
    max-height: 500px;
    padding: 1rem;
}

.accordion-content .section-hint {
    margin: 0 0 1rem 0;
    color: var(--auth-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}
