/* account.css - Styles pour la page de connexion/inscription */

/* Structure principale */
.account-main {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(145deg, #f8f8f8 0%, #f0f0f0 100%);
    position: relative;
    overflow: hidden;
}

/* Effet de fond décoratif */
.account-main::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 70%);
    pointer-events: none;
}

.account-main::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 70%);
    pointer-events: none;
}

.account-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    position: relative;
    z-index: 1;
    align-items: start;
}

/* Carte principale */
.account-card {
    background: white;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: cardAppear 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.account-card:hover {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

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

/* En-tête */
.account-header {
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.account-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #121212, transparent);
    border-radius: 3px;
}

.account-title {
    font-size: 2rem;
    font-weight: 800;
    color: #121212;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    -webkit-background-clip: text;
    background-clip: text;
}

.account-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* Onglets */
.account-tabs {
    display: flex;
    padding: 0 2rem;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.tab-btn i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.tab-btn:hover::before {
    width: 300px;
    height: 300px;
}

.tab-btn.active {
    background: #121212;
    color: white;
    box-shadow: 0 10px 20px -8px rgba(0,0,0,0.3);
}

.tab-btn.active i {
    color: white;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    padding: 0 2.5rem 2.5rem;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

/* Formulaire */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: #666;
    font-size: 0.9rem;
    width: 16px;
}

.form-group input {
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:hover {
    border-color: #bbb;
}

.form-group input:focus {
    outline: none;
    border-color: #121212;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

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

/* Wrapper pour champ mot de passe avec bouton toggle */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
    background: #f0f0f0;
    color: #121212;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Force du mot de passe */
.password-strength {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.strength-bar.active {
    background: #dc3545;
}

.strength-bar.active:nth-child(1) {
    background: #dc3545;
}

.strength-bar.active:nth-child(2) {
    background: #ffc107;
}

.strength-bar.active:nth-child(3) {
    background: #28a745;
}

.strength-bar.active:nth-child(4) {
    background: #28a745;
}

.password-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* Options du formulaire */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

/* Checkbox personnalisée */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    position: relative;
    padding-left: 28px;
    -webkit-tap-highlight-color: transparent;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #121212;
}

.checkbox-container input:checked ~ .checkmark {
    background: #121212;
    border-color: #121212;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Lien mot de passe oublié */
.forgot-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #121212;
    transition: width 0.3s ease;
}

.forgot-link:hover {
    color: #121212;
}

.forgot-link:hover::after {
    width: 100%;
}

/* Bouton de soumission */
.account-submit-btn {
    background: #121212;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid #121212;
}

.account-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.account-submit-btn:hover {
    background: white;
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.account-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.account-submit-btn:active {
    transform: translateY(0);
}

.account-submit-btn i {
    transition: transform 0.3s ease;
}

.account-submit-btn:hover i {
    transform: translateX(5px);
}

/* Connexion sociale */
.social-login {
    margin-top: 2rem;
    text-align: center;
    position: relative;
}

.social-text {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding: 0 10px;
    background: white;
}

.social-text::before,
.social-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: #e0e0e0;
}

.social-text::before {
    right: 100%;
}

.social-text::after {
    left: 100%;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid transparent;
}

.social-btn.google:hover {
    background: #db4437;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(219, 68, 55, 0.3);
}

.social-btn.facebook:hover {
    background: #4267B2;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(66, 103, 178, 0.3);
}

.social-btn.apple:hover {
    background: #000;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social-btn:active {
    transform: scale(0.95);
}

/* Pied de carte */
.account-footer {
    padding: 1rem 2.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.account-footer-text {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.account-footer-text i {
    color: #28a745;
}

/* Section des avantages */
.account-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slideInRight 0.5s ease 0.2s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.benefit-item {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.benefit-item:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: #f0f0f0;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #121212;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.benefit-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 0.2rem;
}

.benefit-content p {
    font-size: 0.8rem;
    color: #666;
}

/* Messages d'erreur/succès */
.alert-message {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: slideDown 0.4s ease;
}

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

.alert-error {
    background: #fff3f3;
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: #f0f9f0;
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-warning {
    background: #fff9e6;
    color: #ffc107;
    border-left: 4px solid #ffc107;
}

.alert-message i {
    font-size: 1.1rem;
}

/* ===== RESPONSIVE ===== */

/* Tablettes */
@media (max-width: 1024px) {
    .account-container {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .account-benefits {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .account-main {
        padding: 1rem 0.5rem;
        align-items: flex-start;
    }
    
    .account-card {
        border-radius: 24px;
    }
    
    .account-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .account-title {
        font-size: 1.6rem;
    }
    
    .account-tabs {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .tab-btn i {
        font-size: 1rem;
    }
    
    .tab-content {
        padding: 0 1.5rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .forgot-link {
        align-self: flex-start;
    }
    
    .account-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .account-benefits {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .benefit-item {
        padding: 1rem;
    }
    
    .benefit-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .benefit-content h3 {
        font-size: 0.95rem;
    }
    
    .benefit-content p {
        font-size: 0.75rem;
    }
}

/* Très petits écrans */
@media (max-width: 380px) {
    .account-header {
        padding: 1.2rem 1rem 0.8rem;
    }
    
    .account-title {
        font-size: 1.4rem;
    }
    
    .account-subtitle {
        font-size: 0.85rem;
    }
    
    .tab-content {
        padding: 0 1rem 1rem;
    }
    
    .form-group input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .account-submit-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .checkbox-container {
        font-size: 0.8rem;
    }
}

/* Améliorations tactiles */
@media (hover: none) and (pointer: coarse) {
    .tab-btn,
    .account-submit-btn,
    .social-btn,
    .password-toggle {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tab-btn:active,
    .account-submit-btn:active,
    .social-btn:active {
        transform: scale(0.97);
    }
    
    .form-group input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Animation de chargement pour le bouton */
.account-submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.account-submit-btn.loading i {
    animation: spin 1s linear infinite;
}

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

/* Style pour le bouton retour aux catégories */
.category-btn i.fa-arrow-left {
    margin-right: 4px;
}

.category-btn {
    text-decoration: none;
    color: #333;
}

.category-btn:hover {
    background: #121212;
    color: white;
}

/* Ajustement pour le header sur mobile */
@media (max-width: 768px) {
    .user-menu-item.active i {
        color: #ff3b5c;
    }
}

/* Animation de transition entre les onglets */
.tab-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content:not(.active) {
    display: none;
}

/* Effet de focus pour l'accessibilité */
.form-group input:focus-visible,
.tab-btn:focus-visible,
.account-submit-btn:focus-visible,
.social-btn:focus-visible {
    outline: 2px solid #121212;
    outline-offset: 2px;
}

/* Support du mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .account-main {
        background: linear-gradient(145deg, #1a1a1a, #222);
    }
    
    .account-card {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .account-title {
        background: linear-gradient(145deg, #fff, #aaa);
        -webkit-background-clip: text;
    }
    
    .account-subtitle {
        color: #999;
    }
    
    .form-group label {
        color: #ddd;
    }
    
    .form-group input {
        background: #333;
        border-color: #444;
        color: white;
    }
    
    .form-group input::placeholder {
        color: #777;
    }
    
    .checkbox-container {
        color: #bbb;
    }
    
    .checkmark {
        background: #333;
        border-color: #555;
    }
    
    .forgot-link {
        color: #bbb;
    }
    
    .social-text {
        background: #1e1e1e;
        color: #999;
    }
    
    .social-text::before,
    .social-text::after {
        background: #444;
    }
    
    .benefit-item {
        background: rgba(30, 30, 30, 0.9);
        border-color: #333;
    }
    
    .benefit-icon {
        background: linear-gradient(145deg, #333, #222);
        color: white;
    }
    
    .benefit-content h3 {
        color: #fff;
    }
    
    .benefit-content p {
        color: #aaa;
    }
    
    .account-footer {
        border-color: #333;
    }
    
    .account-footer-text {
        color: #999;
    }
}