/* Nav account link */
.nav-links .nav-account {
    color: var(--pink) !important;
    border: 1.5px solid var(--pink);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.25s, color 0.25s;
}
.nav-links .nav-account:hover {
    background: var(--pink);
    color: white !important;
}
@media (max-width: 900px) {
    .nav-links .nav-account {
        border: none;
        padding: 0;
    }
}

/* Auth pages - Bikini Tahiti */
.auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 130px 20px 60px;
    background: linear-gradient(135deg, #fdf2f7 0%, #f0f8ff 100%);
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius);
    padding: 42px 38px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    text-align: center;
}

.auth-card .section-tag {
    margin-bottom: 10px;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-sub {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
}

.auth-form label span {
    letter-spacing: 0.3px;
}

.auth-form input {
    padding: 13px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--dark);
    background: #fafafa;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--pink);
    background: white;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.auth-form small {
    color: var(--gray-400);
    font-size: 0.78rem;
    font-weight: 400;
}

.auth-btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 1.5px solid #e5e7eb;
    font-family: inherit;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s;
}

.btn-secondary:hover {
    border-color: var(--pink);
    color: var(--pink);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--gray-400);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    background: white;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #c5cad0;
}

.btn-google svg {
    flex-shrink: 0;
}

.auth-msg {
    min-height: 1.2em;
    margin-top: 14px;
    font-size: 0.9rem;
    padding: 10px 12px;
    border-radius: 8px;
    display: none;
}

.auth-msg.error,
.auth-msg.success {
    display: block;
}

.auth-msg.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alt {
    margin-top: 20px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.auth-alt a {
    color: var(--pink);
    font-weight: 500;
    text-decoration: none;
}

.auth-alt a:hover {
    text-decoration: underline;
}

/* Account page — full dashboard layout */
.account-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.account-header-text { flex: 1; min-width: 200px; }
.account-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fdf2f7, #f0f8ff);
    color: var(--pink);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    overflow: hidden;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-welcome {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    color: var(--dark);
    margin: 0 0 4px;
}
.account-email { color: var(--gray-500); font-size: 0.9rem; margin: 0; }
.account-logout { padding: 10px 18px; font-size: 0.88rem; }

.account-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 110px;
    align-self: start;
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--gray-600);
    text-align: left;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.tab-btn:hover { background: #faf9fb; color: var(--dark); }
.tab-btn.active {
    background: linear-gradient(135deg, #fdf2f7, #f0f8ff);
    color: var(--pink);
    font-weight: 500;
}
.tab-btn svg { flex-shrink: 0; }
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pink);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
}
.admin-tab {
    margin-top: 14px;
    border-top: 1px solid #eee;
    padding-top: 18px;
    color: #d97706;
}
.admin-tab:hover { color: #b45309; }

.account-content {
    background: white;
    border-radius: 16px;
    padding: 32px 34px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
}

.tab-panel { display: none; animation: fadePanel 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadePanel { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-header { margin-bottom: 22px; }
.panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--dark);
    margin: 0 0 6px;
}
.panel-header p { color: var(--gray-500); margin: 0; font-size: 0.93rem; }

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--dark);
    background: #fafafa;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: var(--pink);
    background: white;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}
.profile-form input:disabled { background: #f5f5f5; color: var(--gray-400); }
.profile-form small { font-size: 0.78rem; color: var(--gray-400); font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dark);
}
.checkbox-row input { width: 18px; height: 18px; }

.profile-form button[type="submit"] {
    align-self: flex-start;
    padding: 12px 28px;
    margin-top: 4px;
}

.save-feedback {
    font-size: 0.88rem;
    display: inline-block;
    margin-left: 14px;
    padding: 4px 10px;
    border-radius: 6px;
}
.save-feedback.success { background: #f0fdf4; color: #166534; }
.save-feedback.error { background: #fef2f2; color: #b91c1c; }

.security-block {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 14px;
    border: 1px solid #eee;
}
.security-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--dark);
}
.security-block p { margin: 0 0 12px; color: var(--gray-500); font-size: 0.92rem; }
.security-block.danger {
    background: #fef2f2;
    border-color: #fecaca;
}
.security-block.danger h3 { color: #b91c1c; }

.btn-danger {
    background: white;
    color: #b91c1c;
    border: 1.5px solid #fecaca;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger:hover { background: #b91c1c; color: white; border-color: #b91c1c; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.empty-state svg { color: var(--gray-400); margin-bottom: 14px; }
.empty-state h3 {
    font-family: 'Playfair Display', serif;
    color: var(--dark);
    margin: 0 0 8px;
}
.empty-state p { max-width: 360px; margin: 0 auto 20px; }
.empty-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.order-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
}
.order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.order-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: capitalize;
}
.status-nouvelle { background: #fef3c7; color: #b45309; }
.status-confirmee { background: #dbeafe; color: #1e40af; }
.status-expediee { background: #ede9fe; color: #6d28d9; }
.status-livree { background: #d1fae5; color: #065f46; }
.status-annulee { background: #fee2e2; color: #b91c1c; }
.order-items { list-style: none; padding: 0; margin: 0 0 10px; }
.order-items li { padding: 4px 0; color: var(--gray-600); font-size: 0.92rem; }
.order-items li span { color: var(--gray-400); }
.order-total { text-align: right; color: var(--dark); font-size: 0.95rem; }

@media (max-width: 820px) {
    .account-layout { grid-template-columns: 1fr; }
    .account-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 6px;
    }
    .tab-btn { padding: 10px 14px; white-space: nowrap; font-size: 0.88rem; }
    .admin-tab { margin-top: 0; border-top: none; padding-top: 10px; }
    .account-content { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
    .auth-card {
        padding: 34px 24px 28px;
    }
    .auth-title {
        font-size: 1.7rem;
    }
}

/* ============================================
   DARK MODE — Espace compte / auth
   ============================================ */
html[data-theme="dark"] .account-content {
    background: #181b22;
    border-color: #2a2e37;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .account-header { border-color: #2a2e37; }
html[data-theme="dark"] .panel-header h2,
html[data-theme="dark"] .security-block h3 { color: var(--dark); }
html[data-theme="dark"] .profile-form input,
html[data-theme="dark"] .profile-form select,
html[data-theme="dark"] .profile-form textarea {
    background: #11141a;
    border-color: #2a2e37;
    color: var(--dark);
}
html[data-theme="dark"] .profile-form input:focus,
html[data-theme="dark"] .profile-form select:focus,
html[data-theme="dark"] .profile-form textarea:focus {
    background: #0e1015;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.18);
}
html[data-theme="dark"] .profile-form input:disabled {
    background: #0e1015;
    color: #7c828d;
}
html[data-theme="dark"] .tab-btn:hover { background: #20242d; }
html[data-theme="dark"] .security-block { background: #11141a; border-color: #2a2e37; }
html[data-theme="dark"] .security-block.danger { background: #2a1416; border-color: #5b2326; }
html[data-theme="dark"] .save-feedback.success { background: #0f2e1c; color: #86efac; }
html[data-theme="dark"] .save-feedback.error { background: #3a1416; color: #fca5a5; }

/* DARK MODE — pages connexion / inscription */
html[data-theme="dark"] .auth-wrap { background: linear-gradient(135deg, #1a1d25 0%, #14161c 100%); }
html[data-theme="dark"] .auth-card { background: #181b22; box-shadow: 0 20px 60px rgba(0,0,0,0.55); }
html[data-theme="dark"] .auth-title { color: var(--dark); }
html[data-theme="dark"] .auth-form input { background: #11141a; border-color: #2a2e37; color: var(--dark); }
html[data-theme="dark"] .auth-form input:focus { background: #0e1015; }
html[data-theme="dark"] .btn-secondary { background: #20242d; color: var(--dark); border-color: #2a2e37; }
