
/* =========================
   SIDEBAR STYLING
========================= */
.profile-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;

  border: 1px solid var(--border-color);
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  background: transparent;
  font-weight: 500;
  font-size: 0.9375rem;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.sidebar-link.logout-link {
  color: var(--danger);
  font-weight: 600;
  margin-top: 8px;
}

.sidebar-link.logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-dark);
}

.link-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sidebar-link.active .link-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.link-text {
  flex: 1;
  min-width: 0;
}

.link-arrow {
  color: var(--gray-400);
  font-size: 12px;
  opacity: 0;
  transition: var(--transition);
}

.sidebar-link:hover .link-arrow {
  opacity: 1;
}

.sidebar-link.active .link-arrow {
  opacity: 1;
  color: white;
}

/* =========================
   PROFILE CARD
========================= */
.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
   border: 1px solid var(--border-color);
}

.profile-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-container {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border: 2px solid white;
}

.avatar-upload-btn:hover {
  transform: scale(1.05);
  background: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.avatar-delete-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: var(--danger);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 11px;
}

.avatar-delete-btn:hover {
  transform: scale(1.05);
  background: var(--danger-dark);
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.profile-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
}

.profile-meta i {
  margin-right: 4px;
  color: var(--text-muted);
}

.profile-badge {
  display: inline-block;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary);
  color: #333;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  align-self: flex-start;
}

.cta-button:hover {
  transform: translateY(-1px);
  background: var(--secondary-hover);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: white;
}

/* =========================
   STATS GRID
========================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-primary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.stat-info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
}

.stat-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* =========================
   ACTIONS CARD
========================= */
.actions-card,
.recent-ads-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

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

.view-all-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.view-all-link:hover {
  color: var(--primary-dark);
}

.actions-grid {
  display: grid;
  gap: 10px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.action-item:hover {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.icon-primary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.icon-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.icon-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.icon-secondary {
  background: rgba(100, 116, 139, 0.1);
  color: var(--secondary);
}

.action-content {
  flex: 1;
  min-width: 0;
}

.action-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.action-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.action-arrow {
  color: var(--gray-400);
  font-size: 14px;
}

/* =========================
   RESPONSIVE - MOBILE
========================= */
@media (max-width: 576px) {
  .profile-card {
    padding: 12px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .avatar-upload-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .profile-name {
    font-size: 1.4rem;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 8px;
  }

  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .actions-card,
  .recent-ads-card {
    padding: 20px;
  }

  .action-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .ad-image {
    width: 70px;
    height: 52px;
  }


  .ad-meta {
    font-size: 0.75rem;
  }
}

/* =========================
   RESPONSIVE - TABLET
========================= */
@media (min-width: 577px) and (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* =========================
   RESPONSIVE - DESKTOP
========================= */
@media (min-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   ANIMATIONS
========================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card,
.stat-card,
.actions-card,
.recent-ads-card,
.profile-sidebar {
  animation: fadeInUp 0.4s ease-out;
}

.stat-card:nth-child(1) {
  animation-delay: 0.05s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}
/* Base desktop */
.profile-tabs .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.profile-tabs .nav-link i {
  font-size: 16px;
}

/* Mobile only */
@media (max-width: 576px) {
  .profile-tabs {
    justify-content: space-around;
  }

  .profile-tabs .nav-link {
    padding: 12px;
  }

  /* Masquer le texte */
  .profile-tabs .tab-text {
    display: none;
  }

  /* Icônes plus grandes */
  .profile-tabs .nav-link i {
    font-size: 22px;
  }
}

.tab-content {
  padding-bottom: 90px; /* hauteur navbar fixe */
}
/* Boutons communs */
.form-actions .btn {
  padding: 12px 0;
  font-size: 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

/* Bouton principal */
.form-actions .btn-primary {
  background-color: #007bff;
  border: none;
  color: #fff;
}

.form-actions .btn-primary:hover {
  background-color: #0069d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Bouton secondaire */
.form-actions .btn-light {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

.form-actions .btn-light:hover {
  background-color: #e2e6ea;
  transform: translateY(-1px);
}

/* Mobile : garder les boutons sur la même ligne avec espacement */
@media (max-width: 576px) {
  .form-actions .btn {
    font-size: 0.95rem;
    padding: 10px 0;
  }
}
.icon-dark {
  background-color: #dadada;
  color: #fff;
}
.icon-dark i {
  color: #f76d6d;
}

/* =========================
   PASSWORD TOGGLE BUTTON
========================= */
.password-toggle-btn {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
  transition: all 0.2s ease;
  padding: 0.375rem 0.75rem;
}

.password-toggle-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.password-toggle-btn:focus {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

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

/* =====================================================
   PROFILE PAGE PUBLIC STYLES
   Design pour la page profile public (compte/profile.php)
   ===================================================== */

.profile-header-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Avatar spécifique pour profile public (carré au lieu de rond) */
.profile-header-card .profile-avatar {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

@media (min-width: 768px) {
    .profile-header-card .profile-avatar {
        width: 120px;
        height: 120px;
    }
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-info-row:last-child {
    margin-bottom: 0;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.profile-meta-item i {
    font-size: 14px;
    color: #1a73e8;
}

/* Badges spécifiques pour profile public */
.profile-header-card .profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.profile-header-card .profile-badge.verified {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.profile-header-card .profile-badge.individual {
    background: #f5f3ff;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

.profile-header-card .profile-badge.professional {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Boutons spécifiques pour profile public */
.profile-header-card .btn-outline-secondary {
    border-color: #6b7280;
    color: #374151;
    background: #f3f4f6;
    padding: 8px 12px;
    font-size: 13px;
}

.profile-header-card .btn-outline-secondary:hover {
    background: #e5e7eb;
    border-color: #4b5563;
}

.profile-header-card .btn-primary {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #ffffff;
}

.profile-header-card .btn-primary:hover {
    background: #1558b0;
    border-color: #1558b0;
}

.profile-header-card .btn-success {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
}

.profile-header-card .btn-success:hover {
    background: #1aab52;
    border-color: #1aab52;
}
