/* 
 * MyCustomSong - Styles pour les pages d'authentification
 * (login et inscription)
 */

/* ---------- Structure générale de la page d'authentification ---------- */
.auth-page main {
    padding: 0;
    background-color: var(--light-color);
}

.auth-section {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 70px - 400px); /* Hauteur de l'écran - header - footer */
}

.auth-container {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-form-container {
    flex: 1;
    padding: var(--spacing-xl);
    max-width: 500px;
}

.auth-image {
    flex: 1;
    display: none; /* Masqué sur mobile, visible sur desktop */
}

/* ---------- En-tête du formulaire ---------- */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-header h1 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

/* ---------- Formulaire d'authentification ---------- */
.auth-form {
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: flex;
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

.form-group {
    margin-bottom: var(--spacing);
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    outline: none;
}

.form-group.has-error input {
    border-color: #ff7675;
    background-color: rgba(255, 118, 117, 0.05);
}

.error-message {
    color: #ff7675;
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

.auth-error-message {
    background-color: rgba(255, 118, 117, 0.2);
    color: #d63031;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* ---------- Password input avec toggle ---------- */
.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.password-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.forgot-password {
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* ---------- Checkbox style ---------- */
.checkbox-group {
    margin-bottom: var(--spacing);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: var(--spacing-sm);
    margin-top: 3px;
}

.checkbox-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ---------- Password strength meter ---------- */
.password-strength {
    margin-top: var(--spacing-sm);
}

.strength-meter {
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    margin-bottom: 4px;
}

.strength-meter-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.strength-meter-fill[data-strength="1"] {
    background-color: #ff7675;
    width: 25%;
}

.strength-meter-fill[data-strength="2"] {
    background-color: #fdcb6e;
    width: 50%;
}

.strength-meter-fill[data-strength="3"] {
    background-color: #74b9ff;
    width: 75%;
}

.strength-meter-fill[data-strength="4"],
.strength-meter-fill[data-strength="5"] {
    background-color: #55efc4;
    width: 100%;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* ---------- Boutons ---------- */
.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* ---------- Liens d'authentification ---------- */
.auth-links {
    text-align: center;
    margin-top: var(--spacing);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ---------- Séparateur ---------- */
.auth-separator {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--gray-color);
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.auth-separator span {
    padding: 0 var(--spacing);
    font-size: 0.9rem;
}

/* ---------- Social login buttons ---------- */
.social-login {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.btn-social {
    padding: 12px;
    text-align: center;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition);
}

.btn-google {
    background-color: white;
    color: #4285F4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background-color: #f8f8f8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-facebook {
    background-color: #4267B2;
    color: white;
}

.btn-facebook:hover {
    background-color: #365899;
    color: white;
}

.btn-social i {
    margin-right: var(--spacing-sm);
}

/* ---------- Image d'authentification ---------- */
.image-wrapper {
    height: 100%;
    position: relative;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.7), rgba(0, 206, 201, 0.7));
}

.auth-image-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
}

.auth-image-content h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing);
}

.auth-image-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ---------- Messages de succès ---------- */
.auth-success {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.success-icon {
    font-size: 4rem;
    color: #00b894;
    margin-bottom: var(--spacing);
}

.auth-success h2 {
    margin-bottom: var(--spacing);
}

.auth-success p {
    margin-bottom: var(--spacing-lg);
    color: #666;
}

.auth-actions {
    margin-top: var(--spacing-lg);
}

/* ---------- Démo ---------- */
.demo-credentials {
    margin-top: var(--spacing-lg);
    padding: var(--spacing);
    background-color: rgba(108, 92, 231, 0.05);
    border-radius: var(--border-radius);
    border: 1px dashed rgba(108, 92, 231, 0.3);
    position: relative;
    cursor: pointer;
    transition: all var(--transition);
}

.demo-credentials:hover {
    background-color: rgba(108, 92, 231, 0.1);
}

.demo-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--gradient-primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.demo-credentials p {
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    color: #666;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.credential-label {
    font-weight: 600;
}

.credential-value {
    color: var(--primary-color);
    font-family: monospace;
}

/* ---------- Media Queries ---------- */
@media (min-width: 768px) {
    .auth-image {
        display: block;
    }
    
    .social-login {
        flex-direction: row;
    }
    
    .social-login .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .auth-section {
        padding: var(--spacing-lg) 0;
    }
    
    .auth-form-container {
        padding: var(--spacing-lg);
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }
}