/* Styles pour la page compte */

/* Account Section */
.account-section {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Account Tabs */
.account-tabs {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tab-content {
    display: none;
    padding: 40px;
}

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

/* Form Container */
.account-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-header p {
    color: #6c757d;
    font-size: 1rem;
}

/* Account Form */
.account-form {
    margin-bottom: 30px;
}

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

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
}

.password-toggle:hover {
    color: #667eea;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    position: relative;
    padding-left: 30px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
}

.checkbox-label input:checked ~ .checkmark {
    background: #667eea;
    border-color: #667eea;
}

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

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

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Social Login */
.social-login {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.social-login p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.social-btn.google {
    color: #db4437;
    border-color: #db4437;
}

.social-btn.google:hover {
    background: #db4437;
    color: white;
}

.social-btn.facebook {
    color: #4267B2;
    border-color: #4267B2;
}

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

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-details h2 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.user-details p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Dashboard Navigation */
.dashboard-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.nav-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 150px;
}

.nav-btn:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.nav-btn.active {
    background: white;
    color: #667eea;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
}

/* Dashboard Content */
.dashboard-content {
    padding: 40px;
}

.content-section {
    display: none;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.btn-add {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.order-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.order-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-shipped {
    background: #cce5ff;
    color: #004085;
}

.status-delivered {
    background: #d1ecf1;
    color: #0c5460;
}

.order-items {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.order-item-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.order-total {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

/* Profile Form */
.profile-form {
    max-width: 600px;
}

/* Addresses List */
.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.address-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.address-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.address-card.default {
    border-color: #667eea;
    background: #f0f4ff;
}

.address-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.address-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.address-details {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.address-actions {
    display: flex;
    gap: 10px;
}

.address-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-default {
    background: #27ae60;
    color: white;
}

.address-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Wishlist Grid */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.wishlist-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.wishlist-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.wishlist-item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.wishlist-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.wishlist-item-price {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.wishlist-item-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.wishlist-remove:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.setting-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
}

.setting-card h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.preferences {
    margin-bottom: 25px;
}

.preferences .checkbox-label {
    margin-bottom: 15px;
    display: block;
}

/* Buttons */
.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-section {
        padding: 40px 0;
    }
    
    .tab-content {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-content {
        padding: 25px;
    }
    
    .dashboard-nav {
        flex-direction: column;
    }
    
    .nav-btn {
        justify-content: flex-start;
        border-bottom: 1px solid #e9ecef;
    }
    
    .nav-btn:last-child {
        border-bottom: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .addresses-list {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e9ecef;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .user-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .user-details h2 {
        font-size: 1.2rem;
    }
    
    .wishlist-item {
        padding: 15px;
    }
    
    .wishlist-item-image {
        height: 120px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Field Errors */
.field-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group.error input {
    border-color: #e74c3c;
    background: #fdf2f2;
}

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

.tab-content.active {
    animation: fadeInUp 0.5s ease;
}

.dashboard {
    animation: fadeInUp 0.6s ease;
}

/* Print Styles */
@media print {
    .dashboard-nav,
    .btn-logout,
    .btn-add,
    .btn-save,
    .btn-cancel {
        display: none !important;
    }
    
    .dashboard {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .order-card,
    .address-card,
    .wishlist-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
