:root {
  --primary-dark: #112836;
  --accent: #00ff84;
  --light-bg: #f5f7f9;
  --white: #ffffff;
  --text-dark: #333333;
  --text-light: #777777;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --sidebar-width: 320px;
  --border-radius: 15px;
  --transition: all 0.3s ease;
}

html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  width: 100%;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}





/* Layout principal */
.page-container {
  display: flex;
  flex: 1;
  padding: 0 15px;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
}

.main-content {
  margin-left: 0;
}

/* ── PREMIUM PROFILE LAYOUT — Full Width Override ── */
.premium-profile-layout {
  width: 100%;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 20px 30px 40px !important;
}

.premium-profile-layout .main-content {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.premium-profile-layout .profile-main {
  width: 100% !important;
  display: flex;
  flex-direction: column;
}

/* ── PREMIUM PROFILE HEADER COMPONENTS ── */
.premium-profile-header {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(17,40,54,0.06);
    overflow: hidden;
    margin-bottom: 30px;
    width: 100%;
}

.premium-profile-cover {
  height: 150px;
  background: url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  position: relative;
}

.cover-gradient {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(17,40,54,0.7));
}

.premium-profile-content {
  padding: 0 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  align-items: flex-start;
}

.premium-avatar-section {
  position: relative;
  margin-top: -80px;
  z-index: 2;
}

.premium-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 5px solid #fff;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  background: #fff;
}

.premium-online-badge {
  position: absolute;
  bottom: 25px;
  right: 5px;
  width: 22px;
  height: 22px;
  background: var(--accent, #00ff84);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.premium-user-info {
  flex: 1;
  padding-bottom: 5px;
}

.premium-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.verified-badge {
  color: #3b82f6;
  font-size: 1.4rem;
}

.premium-location {
  color: #64748b;
  font-weight: 500;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.premium-quick-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.quick-action-item {
  width: 45px;
  height: 45px;
  background: rgba(0, 255, 132, 0.1);
  border: 1px solid rgba(0, 255, 132, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.quick-action-item:hover {
  background: var(--accent-green);
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 132, 0.3);
}

.action-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.premium-stats-bar {
  display: flex;
  align-items: center;
  background: #f8fafc;
  padding: 12px 20px;
  border-radius: 12px;
  gap: 20px;
  width: fit-content;
}

.premium-stat {
  display: flex;
  flex-direction: column;
}

.premium-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 5px;
}

.premium-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.premium-stat-divider {
  width: 2px;
  height: 30px;
  background: #e2e8f0;
}

.profile-tab.active .badge-count,
.profile-tab.active .review-count-badge {
    background: #eef6f2;
    color: #00c46a;
}

/* ── UNIFIED PREMIUM PROFILE CARD ── */
.premium-profile-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(17,40,54,0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-tabs-header {
    padding: 10px 30px 0;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tabs-header .btn-add-annonce {
    margin-bottom: 10px; /* Vertically center with tabs better */
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Logic for button visibility based on active tab */
body:has(.profile-tab[data-tab="reviews"].active) #headerAddAnnonce {
    display: none;
}

.card-body-content {
    padding: 0;
}

.premium-annonces-section,
.premium-reviews-section {
    background: transparent !important;
    box-shadow: none !important;
    padding: 30px !important;
}

.premium-profile-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: -1px; /* Overlap border-bottom */
}

.profile-tab {
    padding: 15px 25px;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
    border-radius: 0; /* Flat bottom for border integration */
}

.profile-tab:hover {
    color: var(--primary-dark);
}

.profile-tab.active {
    color: var(--primary-dark);
    border-bottom-color: var(--accent);
    background: transparent;
}

.profile-tab.active::after {
    display: none; /* Remove any old indicator */
}

/* Tab panes visibility */
.tab-pane {
    display: none !important;
}
.tab-pane.active {
    display: block !important;
}

.annonces-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    min-height: 200px;
}

.premium-annonces-section .annonce-image {
    height: 170px !important;
}

.card-body-content {
    padding: 20px;
    min-height: 400px;
}

/* Section Avis */
.review-count-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.review-card {
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: 0.3s;
}

.review-card:hover {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,255,132,0.08);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-user-info .review-user-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.review-user-info .review-date {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

.review-stars {
    display: flex;
    gap: 2px;
    color: #FFD700;
    font-size: 0.85rem;
}

.review-comment {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.review-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #eef6f2;
    color: #00c46a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.premium-profile-actions {
  display: flex;
  gap: 12px;
  padding-top: 5px;
}

.premium-btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* profil.html specific buttons */
.btn-edit {
  background: linear-gradient(135deg, var(--accent, #00ff84), #00c46a);
  color: var(--primary-dark);
}
.btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,255,132,0.25);
}

.btn-logout {
  padding: 12px 16px;
  background: #fff1f1;
  color: #ef4444;
}
.btn-logout:hover {
  background: #fee2e2;
  transform: translateY(-2px);
}

/* Section Annonces (Unified Card handles styling) */

.premium-section-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}

.premium-section-header h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-count {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.btn-add-annonce {
  background: linear-gradient(135deg, var(--primary-dark, #112836), #1a3a4d);
  color: var(--accent, #00ff84);
}
.btn-add-annonce:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(17,40,54,0.3);
}

/* Responsive Premium Profile */
@media (max-width: 768px) {
  .premium-profile-header {
    margin-bottom: 4px !important;
  }
  .premium-profile-layout {
    padding: 15px 15px 30px !important;
  }
  .premium-profile-cover {
    height: 110px;
  }
  .premium-profile-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px 30px;
  }
  .premium-avatar-section {
    margin-top: -60px;
  }
  .premium-avatar {
    width: 120px; height: 120px;
  }
  .premium-location {
    justify-content: center;
  }
  .premium-stats-bar {
    margin: 0 auto 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 320px;
  }
  .premium-profile-actions {
    width: 100%;
    justify-content: center;
    margin-top: 5px;
    gap: 10px;
  }
  .premium-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  .premium-section-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  .annonces-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
}


/* Sidebar Styles */
.sidebar {
  position: sticky;
  top: 70px;
  width: 380px;
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.transaction-tabs {
  display: flex;
  border-bottom: 2px solid #e0f8ec;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
  background: #f5fcf9;
  border-radius: 10px;
  padding: 5px;
}

.tab {
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #556f7c;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
  border-radius: 8px;
  margin: 0 2px;
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
}

.tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #00c46a);
  box-shadow: 0 4px 8px rgba(0, 255, 132, 0.3);
}

.transaction-list {
  flex: 1;
  overflow-y: auto;
}

.transaction-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid #eee;
  position: relative;
}

.transaction-item:hover,
.transaction-item.active {
  background-color: #f0fffa;
  border-color: var(--accent);
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--accent);
}

.transaction-details {
  flex: 1;
}

.transaction-title {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.transaction-info {
  font-size: 0.8rem;
  color: #666;
}

.transaction-status {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.status-completed {
  background-color: #e6f7ee;
  color: #00a661;
}

.status-pending {
  background-color: #fff8e6;
  color: #d48806;
}

.status-cancelled {
  background-color: #ffe6e6;
  color: #d40000;
}

/* Delete button for transactions */
.delete-transaction {
  position: absolute;
  top: 5px;
  right: 5px;
  background: transparent;
  border: none;
  color: #ff4d4f;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  font-size: 0.9rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.transaction-item:hover .delete-transaction {
  opacity: 1;
}

.delete-transaction:hover {
  background: #ff4d4f;
  color: white;
}

/* Confirmation modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(17, 40, 54, 0.85); /* Darker, more premium backdrop */
  backdrop-filter: blur(8px); /* Increased blur */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.confirmation-modal {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--card-shadow);
  transform: translateY(-20px);
  transition: var(--transition);
}

.modal-overlay.active .confirmation-modal {
  transform: translateY(0);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.modal-message {
  margin-bottom: 20px;
  color: var(--text-dark);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.modal-btn-cancel {
  background: #f0f0f0;
  color: var(--text-dark);
}

.modal-btn-cancel:hover {
  background: #ddd;
}

.modal-btn-confirm {
  background: #ff4d4f;
  color: white;
}

.modal-btn-confirm:hover {
  background: #d9363e;
}

/* Modal Premium (Générique) */
.modal {
  background: #ffffff;
  border-radius: 28px;
  padding: 0;
  width: 95%;
  max-width: 550px;
  position: relative;
  z-index: 10001;
  box-shadow: 0 30px 70px rgba(0,0,0,0.3);
  overflow-y: auto;
  max-height: 90vh;
  margin: auto; /* Centrage supplémentaire */
  display: none;
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal {
  display: flex;
  flex-direction: column;
}

.modal::-webkit-scrollbar {
  width: 6px;
}

.modal::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  background: linear-gradient(135deg, #112836 0%, #1a3a4d 100%);
  padding: 25px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-bottom: 3px solid var(--accent);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title i {
  color: var(--accent);
  font-size: 1.2rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close:hover {
  background: #ff4757;
  transform: rotate(90deg);
}

.modal-body {
  padding: 35px;
  background: #ffffff;
}

/* Photo Section Design */
.edit-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  position: relative;
}

.photo-preview-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), #00c46a);
  box-shadow: 0 8px 25px rgba(0, 255, 132, 0.2);
  margin-bottom: 15px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.photo-preview-wrapper:hover {
  transform: scale(1.05);
}

#editPhotoPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid white;
  background: #f1f5f9;
}

.photo-overlay {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--primary-dark);
  color: var(--accent);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-size: 0.9rem;
}

/* Form Styling */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.input-wrapper {
  margin-bottom: 20px;
}

.input-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #f1f5f9;
  border-radius: 14px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f8fafc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 255, 132, 0.1);
  outline: none;
}

.input-field::placeholder {
  color: #94a3b8;
}

/* Footer & Buttons */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 10px;
  padding-top: 25px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #112836 0%, #1a3a4d 100%);
  color: var(--accent);
  box-shadow: 0 10px 20px rgba(17, 40, 54, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(17, 40, 54, 0.25);
  filter: brightness(1.1);
}

.btn-secondary {
  background: #f1f5f9;
  color: #64748b;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Structure principale */
.profile-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  width: 100%;
  align-items: start;
}

/* Colonne de GAUCHE */
.profile-left {
  display: grid;
  grid-template-columns: 140px 1fr;
  grid-template-rows: auto auto;
  gap: 12px 20px;
  align-items: start;
}

/* Photo de profil */
.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  grid-column: 1;
  grid-row: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 132, 0.5);
}

/* Info profil */
.profile-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  grid-column: 2 / -1;
  grid-row: 1 / span 1;
}

.profile-info .name {
  font-weight: bold;
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.profile-info .address {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.rating-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: #FFD700;
  display: flex;
  gap: 2px;
}

.rating-count {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
}

.vertical-divider {
  width: 1px;
  height: 20px;
  background-color: #e0e0e0;
}

.stat-pill-inline {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-pill-value {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.stat-pill-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-width: 60px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-value {
  font-weight: bold;
  font-size: 1rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.empty-star {
  color: #ccc;
  margin-left: 5px;
}

/* Colonne de DROITE */
.profile-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 180px;
}

/* Bouton de déconnexion */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  width: 100%;
  justify-content: center;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

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

.logout-btn i {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  /* Fix excessive padding on mobile to match home page width */
  .premium-profile-layout {
    padding: 10px 15px 40px !important;
  }
  .premium-profile-content {
    padding: 0 15px 20px !important;
    align-items: center !important;
  }
  .premium-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .premium-stats-bar {
    width: 100%;
    justify-content: space-around;
  }

  .profile-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-left {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 15px;
  }

  .profile-photo {
    grid-column: 1;
    grid-row: 1;
  }

  .profile-info {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }

  .profile-right {
    align-items: center;
  }

  .profile-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .logout-btn {
    width: auto;
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .profile-actions {
    flex-direction: column;
    width: 100%;
  }

  .logout-btn {
    width: 100%;
  }

  .profile-stats {
    justify-content: center;
  }
}

/* Annonces Styles */
.annonces-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
  width: 100%;
}
@media (max-width: 1100px) {
  .annonces-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .annonces-container {
    grid-template-columns: 1fr;
  }
}

.annonce-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
}

.annonce-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 255, 132, 0.15);
  border-color: rgba(0, 255, 132, 0.3);
}

.annonce-image {
  position: relative;
  height: 320px;
  overflow: hidden;
}

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

.annonce-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.annonce-content {
  padding: 20px 24px;
}

.annonce-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.annonce-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 4px;
  background: #00ff84;
  border-radius: 2px;
}

.annonce-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0fff4;
  border: 1px solid #dcfce7;
  padding: 12px 16px;
  border-radius: 14px;
  transition: all 0.3s ease;
}

.detail-icon, .detail-item i {
  color: #00ff84;
  font-size: 1.1rem;
  width: auto;
  height: auto;
  background: none;
}

.detail-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #112836;
}

.annonce-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.action-btn-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.action-btn-card:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.delete-annonce {
  background: #fff1f1;
  color: #ef4444;
  border-color: #fee2e2;
}

.edit-annonce {
  background: #f8fafc;
  color: #475569;
  border-color: #edf2f7;
}

/* Detail Pages Styles */
.detail-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: none;
  /* Hidden by default */
  width: 100%;
  padding: 20px;
  max-width: 1000px;
  margin: 0;
}

.detail-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 20px;
  background-color: var(--primary-dark);
  border-bottom: 3px solid var(--accent);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  margin: -20px -20px 20px -20px;
}

.back-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  cursor: pointer;
  transition: var(--transition);
  color: white;
}

.back-button:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.detail-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detail-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 250px;
  position: relative;
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-section {
  padding: 15px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
}

.info-section h3 {
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 1.1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.info-label {
  font-weight: 600;
  color: var(--text-dark);
}

.info-value {
  color: var(--text-light);
}

.description {
  line-height: 1.6;
  color: var(--text-dark);
}

.detail-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* Messaging Section Styles */
.messaging-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: none;
  /* Hidden by default */
  width: 100%;
  margin: 0;
}

.chat-header {
  padding: 15px 20px;
  background-color: var(--primary-dark);
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-user-info {
  flex: 1;
}

.chat-user-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
}

.chat-user-status {
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

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

.chat-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  color: white;
}

.chat-action-btn:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 65%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.message.received {
  align-self: flex-start;
  background: none;
  color: #2d3436;
  padding-left: 0;
}

.message.sent {
  align-self: flex-end;
  background: none;
  color: var(--accent);
  font-weight: 600;
  padding-right: 0;
}

.message-content {
  margin-bottom: 2px;
  line-height: 1.5;
  font-size: 0.92rem;
}

.message-time {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-top: 4px;
  display: block;
}

.message.sent .message-time {
  text-align: right;
}

.message.received .message-time {
  text-align: left;
}

.message-input-container {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 15px;
  align-items: center;
}

.message-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 24px;
  outline: none;
  font-family: 'Inter', sans-serif;
  resize: none;
  min-height: 50px;
  max-height: 120px;
}

.message-input:focus {
  border-color: var(--accent);
}

.attachment-btn,
.send-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.attachment-btn {
  background: #f5f5f5;
  color: var(--primary-dark);
}

.attachment-btn:hover {
  background: #e0e0e0;
}

.send-btn {
  background: var(--accent);
  color: var(--primary-dark);
}

.send-btn:hover {
  background: #00d46e;
}

/* Animation Styles */
.slide-in {
  animation: slideIn 0.3s forwards;
}

.slide-out {
  animation: slideOut 0.3s forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(50px);
  }
}

/* Nouveaux styles pour la galerie d'images */
.detail-gallery {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.gallery-item {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.gallery-item.active {
  border-color: var(--accent);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
}

.user-profile-mini img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info-mini {
  flex: 1;
}

.user-name-mini {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-rating-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.rating-stars-mini,
.user-stars-mini {
  color: #ffc107;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.action-button {
  flex: 1;
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-accept {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-accept:hover {
  background: #00d46e;
}

.btn-refuse {
  background: #ff4d4f;
  color: white;
}

.btn-refuse:hover {
  background: #d9363e;
}

.btn-modify {
  background-color: #112836;
  color: white;
  border: none;
}

.btn-modify:hover {
  background-color: #1a3a4d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 40, 54, 0.3);
}

/* Styles pour la section d'échange */
.exchange-section {
  padding: 15px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
  margin-top: 15px;
}

.exchange-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.exchange-image {
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
}

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

/* Indicateur de galerie */
.gallery-indicator {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Styles pour la nouvelle disposition */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gallery-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.thumbnails {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
  border: 2px solid transparent;
}

.thumbnails img:hover,
.thumbnails img.active {
  transform: scale(1.05);
  border: 2px solid var(--accent);
}

.product-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.product-item {
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.product-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.product-item.active {
  background: var(--accent);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.product-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.product-category {
  font-size: 0.8rem;
  color: #666;
}

.product-item.active .product-category {
  color: var(--primary-dark);
  font-weight: 500;
}

.exchange-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.exchange-details {
  padding: 15px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
}

.annonce-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.image-gallery {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-slides {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-nav {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background-color: white;
  transform: scale(1.2);
}

.gallery-arrows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  z-index: 2;
}

.gallery-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.annonce-image:hover .gallery-arrow {
  opacity: 1;
}

/* Styles pour les modals (removed duplicate) */

/* Modal definition removed (using global one) */

.modal-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Animation de fade in/out */
.fade-in {
  animation: fadeIn 0.3s ease;
}

.fade-out {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Duplicates removed */

.modal-overlay.active {
  display: flex;
}

/* Modal de modification */
.modify-modal {
  background: white;
  border-radius: 12px;
  padding: 0;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-overlay.active .modify-modal {
  transform: translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 3px solid var(--accent);
  background: var(--primary-dark);
  border-radius: 12px 12px 0 0;
}

.modal-header .modal-title {
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header .modal-title::before {
  content: "✏️";
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #ff4d4f;
  color: white;
}

.modify-content {
  padding: 20px;
}

/* Indicateur de modification */
.modification-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f0fffa 0%, #e6f7f0 100%);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent);
}

.modification-indicator i {
  color: var(--accent);
  font-size: 1.1rem;
}

.modification-indicator span {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

/* Échange actuel compact */
.current-exchange h4 {
  margin-bottom: 15px;
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 600;
}

.exchange-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.exchange-item.compact {
  background: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 160px;
  text-align: center;
  transition: var(--transition);
}

.exchange-item.compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.item-badge {
  background: var(--accent);
  color: var(--primary-dark);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
}

.change-btn {
  background: var(--primary-dark);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  transition: var(--transition);
}

.change-btn:hover {
  background: var(--accent);
  color: var(--primary-dark);
  transform: rotate(90deg);
}

.item-image-compact {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 10px;
  border: 2px solid #f0f0f0;
}

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

.item-info-compact {
  text-align: center;
}

.item-name-compact {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.item-condition {
  font-size: 0.7rem;
  color: var(--text-light);
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 8px;
  display: inline-block;
}

.exchange-arrow-compact {
  color: var(--accent);
  font-size: 1.2rem;
  background: white;
  padding: 8px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Produits disponibles compacts */
.available-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.products-column h5 {
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.products-grid.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.product-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.product-item-compact:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}

.product-item-compact.selected {
  border-color: var(--accent);
  background: #f0fffa;
  box-shadow: 0 2px 6px rgba(0, 255, 132, 0.2);
}

.product-image-small {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
}

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

.product-info-small {
  flex: 1;
  min-width: 0;
}

.product-name-small {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--primary-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-details-small {
  display: flex;
  gap: 8px;
  font-size: 0.65rem;
}

.product-category-small {
  color: var(--text-light);
  background: #f0f0f0;
  padding: 1px 4px;
  border-radius: 4px;
}

.product-condition-small {
  color: var(--accent);
  font-weight: 600;
}

/* Message section compact */
.message-section.compact {
  margin-bottom: 15px;
}

.message-section.compact h4 {
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 600;
}

.message-input.compact {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
  background: #f8f9fa;
}

.message-input.compact:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 132, 0.1);
  background: white;
}

.message-counter {
  text-align: right;
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* Résumé de la modification */
.modification-summary {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border: 1px solid #e9ecef;
}

.modification-summary h4 {
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 600;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.summary-item i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}

/* Modal de sélection compact */
.product-selection-modal.compact {
  background: white;
  border-radius: 12px;
  padding: 0;
  max-width: 500px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-overlay.active .product-selection-modal.compact {
  transform: translateY(0);
  opacity: 1;
}

.product-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.product-card-compact {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  background: white;
  text-align: center;
}

.product-card-compact:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card-compact.selected {
  border-color: var(--accent);
  background: #f0fffa;
  box-shadow: 0 4px 12px rgba(0, 255, 132, 0.2);
}

.product-image-select-compact {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 8px;
  border: 2px solid #f0f0f0;
}

.product-image-select-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-select-compact {
  text-align: center;
}

.product-name-select-compact {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
  line-height: 1.2;
  height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-category-select-compact {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.product-condition-select-compact {
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  background: #f0fffa;
  padding: 2px 6px;
  border-radius: 8px;
  display: inline-block;
}

/* Boutons compacts */
.modal-actions {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  justify-content: center;
}

.modal-btn-cancel {
  background: #f8f9fa;
  color: var(--text-dark);
  border: 1px solid #ddd;
}

.modal-btn-cancel:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.modal-btn-save {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
}

.modal-btn-save:hover {
  background: #00d46e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 132, 0.3);
}

.modal-btn-confirm {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
}

.modal-btn-confirm:hover {
  background: #00d46e;
  transform: translateY(-1px);
}

/* Scrollbar personnalisée */
.products-grid.compact::-webkit-scrollbar,
.product-grid-compact::-webkit-scrollbar {
  width: 4px;
}

.products-grid.compact::-webkit-scrollbar-track,
.product-grid-compact::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.products-grid.compact::-webkit-scrollbar-thumb,
.product-grid-compact::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

.products-grid.compact::-webkit-scrollbar-thumb:hover,
.product-grid-compact::-webkit-scrollbar-thumb:hover {
  background: #00d46e;
}

/* Animation d'entrée */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modify-modal,
.product-selection-modal.compact {
  animation: modalSlideIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .modal-overlay.active {
    display: flex !important;
  }

  .modal {
    max-height: 85vh;
    width: 92%;
    margin: auto !important; /* Force centering */
  }

  .modify-modal {
    max-height: 80vh;
  }

  .available-products {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .exchange-visual {
    flex-direction: column;
    gap: 10px;
  }

  .exchange-arrow-compact {
    transform: rotate(90deg);
  }

  .product-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-btn {
    min-width: auto;
    width: 100%;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modify-content {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .product-grid-compact {
    grid-template-columns: 1fr;
  }

  .exchange-item.compact {
    width: 140px;
  }

  .item-image-compact {
    width: 60px;
    height: 60px;
  }
}

/* États de focus pour l'accessibilité */
.modal-btn:focus,
.change-btn:focus,
.message-input.compact:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Transition pour tous les éléments interactifs */
.modal-btn,
.change-btn,
.product-item-compact,
.product-card-compact,
.exchange-item.compact {
  transition: all 0.2s ease;
}

.logout-container {
  position: relative;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  position: relative;
  overflow: hidden;
}

.logout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.logout-btn:hover::before {
  left: 100%;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.logout-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.logout-btn:hover i {
  transform: translateX(2px);
}

.logout-text {
  white-space: nowrap;
}

/* Version compacte pour mobile */
@media (max-width: 768px) {
  .logout-btn {
    padding: 8px 12px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .logout-text {
    display: none;
  }

  .logout-btn i {
    font-size: 1.1rem;
    margin: 0;
  }
}

/* Animation de pulsation au survol */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  }

  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.6);
  }

  100% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  }
}

.logout-btn:hover {
  animation: pulse 2s infinite;
}



/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }

  .profile-main,
  .messaging-container,
  .detail-container {
    margin-left: 0;
    width: 100%;
  }

  .footer-nav {
    gap: 200px;
  }
}

@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    max-height: none;
  }

  .profile-main,
  .messaging-container,
  .detail-container {
    margin-left: 0;
    width: 100%;
  }

  .header-text {
    font-size: 1.1rem;
  }

  .search-input {
    min-width: 120px;
  }

  .footer-nav {
    gap: 80px;
  }

  .profile-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-info {
    grid-column: 1;
    grid-row: 2;
  }

  .profile-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: center;
  }

  .annonces-container {
    grid-template-columns: 1fr;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.available-products {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.products-column {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.products-column h5 {
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.product-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
}

.product-info {
  padding: 10px;
}

.product-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.product-price {
  color: var(--primary-color);
  font-weight: bold;
}

.image-upload-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.image-upload-btn {
  background-color: var(--light-color);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  transition: background-color 0.3s;
  width: 100%;
}

.image-upload-btn:hover {
  background-color: #e9ecef;
}

.image-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.image-preview {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
}

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

.image-preview .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-count {
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
}

.image-count.max-reached {
  color: var(--error-color);
  font-weight: bold;
}



.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
}

.modal-title {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.image-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  margin-bottom: 15px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.image-upload-area:hover {
  border-color: var(--secondary-color);
}

.image-upload-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(74, 111, 165, 0.05);
}

.upload-icon {
  font-size: 48px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.upload-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.upload-btn:hover {
  background-color: var(--secondary-color);
}

.upload-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.selected-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  max-height: 200px;
  overflow-y: auto;
}

.selected-image {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
}

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

.selected-image .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-footer {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .available-products {
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .modal-footer span {
    text-align: center;
  }
}

/* Footer Navigation - Updated with correct variables */
.footer-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 90px;
  }

  .footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #112836, #1a3a4d);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px 5px;
    border-top: #00ff84 3px solid;
    z-index: 100;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    height: 70px;
    backdrop-filter: blur(10px);
  }
}





/* Responsive Design */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
  }

  .hero-search-wrapper {
    width: 100%;
  }

  .search-container {
    width: 100%;
  }

  .container {
    flex-direction: column;
    padding: 20px;
  }

  .form-container {
    margin: 20px;
    width: auto;
  }

  .avatar {
    width: 180px;
  }
}

/* ── PREMIUM PROFILE LAYOUT ── */
.premium-profile-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px 40px 40px !important;
}

.premium-profile-layout .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

.premium-profile-layout .profile-main {
    width: 100% !important;
    max-width: none !important;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
}

/* Header Cover & Info */
.premium-profile-header {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(17,40,54,0.06);
    overflow: hidden;
    margin-bottom: 30px;
    width: 380px;
    flex-shrink: 0;
}

.premium-profile-cover {
    height: 150px;
    background: url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    position: relative;
}
.cover-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(17,40,54,0.7));
}

.premium-profile-content {
    padding: 0 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    align-items: flex-start;
}

.premium-avatar-section {
    position: relative;
    margin-top: -80px;
    z-index: 2;
}

.premium-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid #fff;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: #fff;
}

.premium-online-badge {
    position: absolute;
    bottom: 25px;
    right: 5px;
    width: 22px;
    height: 22px;
    background: var(--accent-green, #00ff84);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.premium-user-info {
    flex: 1;
    padding-bottom: 5px;
}

.premium-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.verified-badge {
    color: #3b82f6;
    font-size: 1.4rem;
}

.premium-location {
    color: #64748b;
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-stats-bar {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: 12px;
    gap: 20px;
    width: fit-content;
}

.premium-stat {
    display: flex;
    flex-direction: column;
}
.premium-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}
.premium-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.premium-stat-divider {
    width: 2px;
    height: 30px;
    background: #e2e8f0;
}

.premium-profile-actions {
    display: flex;
    gap: 12px;
    padding-bottom: 10px;
}

.premium-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit {
    background: #f1f5f9;
    color: var(--primary-dark);
}
.btn-edit:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-logout {
    padding: 12px 16px;
    background: #fff1f2;
    color: #e11d48;
}
.btn-logout:hover {
    background: #ffe4e6;
    transform: translateY(-2px);
}

/* Section Annonces */
.premium-annonces-section {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(17,40,54,0.04);
    flex: 1;
}

.premium-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.premium-section-header h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.premium-section-header h2 i {
    color: var(--accent-green, #00ff84);
}
.badge-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-add-annonce {
    background: linear-gradient(135deg, var(--accent-green, #00ff84), #00c46a);
    color: var(--primary-dark);
}
.btn-add-annonce:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,255,132,0.25);
}

@media (max-width: 992px) {
    .premium-profile-layout {
        padding: 0 0 30px !important;
        margin: 0 auto !important;
        width: 92% !important;
        max-width: 500px !important;
    }
    .premium-profile-layout .profile-main {
        flex-direction: column;
        align-items: center;
        gap: 4px !important;
    }
    .premium-profile-header {
        width: 100%;
        max-width: 500px;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    .premium-profile-card {
        width: 100%;
        max-width: 500px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .premium-profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 30px;
    }
    .premium-avatar-section {
        margin-top: -60px;
    }
    .premium-avatar {
        width: 120px; height: 120px;
    }
    .premium-location {
        justify-content: center;
    }
    .premium-stats-bar {
        margin: 0 auto 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .premium-profile-actions {
        width: 100%;
        justify-content: center;
    }
    .premium-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .premium-annonces-section {
        padding: 0 20px 20px !important;
    }
    .annonces-container {
        margin-top: 0 !important;
    }
}

/* ── Premium Profile Actions alignment with Stats Bar ── */
.premium-profile-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  justify-content: flex-start;
  margin-top: 15px;
}

.premium-profile-actions .premium-stats-bar {
  margin: 0 !important;
  padding: 6px 14px !important;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  max-width: none !important;
  border: 1px solid #f1f5f9;
  flex-shrink: 0;
  height: 45px;
}

.premium-profile-actions .premium-stat-label {
  display: none !important;
}

.premium-profile-btns {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.premium-profile-actions .premium-btn {
  flex-shrink: 0;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .premium-profile-actions {
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 10px;
  }
  .premium-profile-actions .premium-stats-bar {
    height: 40px;
    padding: 4px 10px !important;
  }
  .premium-profile-btns {
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  .premium-profile-actions .premium-btn {
    height: 40px;
  }
}

/* ── Premium User Info (Name & Location on the same line) ── */
.premium-user-info {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.premium-user-info .premium-name {
  margin-bottom: 0 !important;
}

.premium-user-info .premium-location {
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center;
}

@media (max-width: 768px) {
  .premium-user-info {
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .premium-user-info .premium-name {
    font-size: 1.5rem !important;
  }
  .premium-user-info .premium-location {
    font-size: 0.9rem !important;
  }
}