/* Account Page Styles - Sélecteurs spécifiques pour éviter les conflits WooCommerce */
.account-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin-top: 32px; /* Compensate for WordPress admin bar */
}

@media screen and (max-width: 782px) {
    .account-page-wrapper {
        margin-top: 46px; /* Compensate for mobile admin bar */
    }
}

/* Specific fixes for account page */
body.account-page {
    margin-top: 0;
}

body.account-page #wpadminbar {
    position: fixed !important;
    top: 0;
    z-index: 999999;
}

/* Better spacing for admin bar */
body.admin-bar .account-page-wrapper {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .account-page-wrapper {
        margin-top: 46px;
    }
}

/* Hero Section */
.account-hero {
    background: linear-gradient(135deg, #6b21a8 0%, #9333ea 100%);
    padding: 60px 0 40px;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Main Content */
.account-main {
    padding: 40px 0 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Messages */
.account-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.account-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.account-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.account-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.account-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Dashboard */
.user-dashboard {
    margin-top: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    align-items: start;
    justify-content: center;
}

/* Ensure equal height cards */
.dashboard-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(107, 33, 168, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.dashboard-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.card-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6b21a8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    font-size: 1.3rem;
}

/* Fix for WooCommerce disabled state */
.woocommerce-disabled-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.woocommerce-disabled-state i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

.woocommerce-disabled-state p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* User Info Card */
.user-info-card .card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.card-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #6b21a8;
}

.user-details h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 5px;
}

.user-details p {
    color: #64748b;
    margin: 0 0 5px;
}

.member-since {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Orders */
.orders-list {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.order-item:last-child {
    border-bottom: none;
}

.order-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 5px;
}

.order-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.status-pending {
    background: #f3f4f6;
    color: #374151;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-item:hover {
    background: #f1f5f9;
    color: #6b21a8;
    border-color: #6b21a8;
}

.action-item.logout:hover {
    color: #dc2626;
    border-color: #dc2626;
}

.action-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.action-item span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Auth Forms */
.auth-forms {
    margin-top: 30px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    align-items: start;
}

/* Auth Cards */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(107, 33, 168, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.auth-card .card-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.auth-card .card-content {
    padding: 30px;
}

/* ===== STYLES SPÉCIFIQUES POUR ÉVITER LES CONFLITS WOOCOMMERCE ===== */

/* Account Form Row - Remplace form-row */
.account-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    align-items: start !important;
    margin-bottom: 25px !important;
}

/* Account Form Group - Remplace form-group */
.account-form-group {
    margin-bottom: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

/* Dans les form-row, pas de margin-bottom */
.account-form-row .account-form-group {
    margin-bottom: 0 !important;
}

/* Account Form Label - Remplace form-label */
.account-form-label {
    display: block !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
    font-size: 0.95rem !important;
}

/* Account Form Input - Remplace form-input */
.account-form-input {
    width: 100% !important;
    padding: 15px 18px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: white !important;
    box-sizing: border-box !important;
    height: 48px !important;
}

.account-form-input:focus {
    outline: none !important;
    border-color: #6b21a8 !important;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1) !important;
}

/* Account Password Input Container */
.account-password-input {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.account-password-input .account-form-input {
    padding-right: 50px !important; /* Space for the toggle button */
    width: 100% !important;
}

/* Account Password Toggle - Remplace password-toggle */
.account-password-toggle {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    color: #64748b !important;
    cursor: pointer !important;
    padding: 5px !important;
    z-index: 10 !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    font-size: inherit !important;
}

.account-password-toggle:hover {
    color: #6b21a8 !important;
}

.account-password-toggle:focus {
    outline: none !important;
}

.account-password-toggle i {
    font-size: 16px !important;
    display: block !important;
    line-height: 1 !important;
}

/* Account Checkbox Label - Remplace checkbox-label */
.account-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

.account-checkbox-label.required .account-checkbox-text::after {
    content: " *" !important;
    color: #dc2626 !important;
}

.account-checkbox-input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #6b21a8 !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
}

.account-checkbox-text a {
    color: #6b21a8 !important;
    text-decoration: none !important;
}

.account-checkbox-text a:hover {
    text-decoration: underline !important;
}

/* Account Error Message - Remplace error-msg */
.account-error-msg {
    color: #dc2626 !important;
    font-size: 0.85rem !important;
    margin-top: 5px !important;
    min-height: 18px !important;
}

/* Account Form Error - Pour les messages d'erreur généraux */
.account-form-error {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.9rem !important;
}

/* Account Password Strength - Remplace password-strength */
.account-password-strength {
    margin-top: 10px !important;
}

.account-strength-bar {
    width: 100% !important;
    height: 4px !important;
    background: #e5e7eb !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}

.account-strength-fill {
    height: 100% !important;
    width: 0% !important;
    background: #dc2626 !important;
    transition: all 0.3s ease !important;
}

.account-strength-fill.weak {
    width: 25% !important;
    background: #dc2626 !important;
}

.account-strength-fill.fair {
    width: 50% !important;
    background: #f59e0b !important;
}

.account-strength-fill.good {
    width: 75% !important;
    background: #10b981 !important;
}

.account-strength-fill.strong {
    width: 100% !important;
    background: #059669 !important;
}

.account-strength-text {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: 5px !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6b21a8, #9333ea);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 33, 168, 0.3);
    color: white;
}

.btn-secondary {
    background: #f8fafc;
    color: #6b21a8;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #6b21a8;
    color: #6b21a8;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: block;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-link {
    color: #6b21a8;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Benefits Section */
.benefits-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.benefits-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 30px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
}

.benefit-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #6b21a8, #9333ea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.benefit-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px;
}

.benefit-item p {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #94a3b8;
}

.empty-state p {
    margin: 0 0 20px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .account-form-row {
        grid-template-columns: 1fr !important;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .user-info-card .card-content {
        flex-direction: column;
        text-align: center;
    }
    
    .card-actions {
        justify-content: center;
        margin-top: 20px;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .card-header {
        padding: 20px 20px 15px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .benefits-section {
        padding: 30px 20px;
    }
}