/**
 * DogConnect - Nouveau style moderne pour le profil utilisateur public
 * 
 * Une refonte complète du design du profil utilisateur avec une esthétique
 * moderne, des animations subtiles et une meilleure organisation visuelle.
 */

:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #6cb2eb;
  --accent-color: #4ac1ff;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --text-color: #333;
  --text-muted: #6c757d;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s ease;
}

/* ===== BASE STYLES ===== */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* ===== PROFILE HEADER ===== */
.profile-header {
  position: relative;
  background: none;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.profile-cover {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.profile-info {
  position: relative;
  padding: 20px 30px;
  background-color: white;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.profile-picture {
  position: relative;
  margin-top: -80px;
  margin-right: 30px;
  z-index: 2;
}

.profile-picture img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  object-fit: cover;
}

.profile-details {
  flex: 1;
  padding-top: 10px;
}

.profile-details h1 {
  margin: 0 0 5px;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-color);
}

.profile-details p {
  margin: 0 0 15px;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 800px;
}

.profile-stats {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.stat:not(:last-child):after {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  width: 1px;
  background-color: var(--border-color);
}

.stat span:first-child {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat span:last-child {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary i {
  font-size: 16px;
}

.edit-btn {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 5;
}

.edit-btn:hover {
  background-color: white;
  box-shadow: var(--shadow-md);
  transform: scale(1.1);
}

#edit-profile-pic-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  font-size: 12px;
}

#edit-cover-btn {
  top: 20px;
  right: 20px;
}

#edit-profile-pic-btn {
  bottom: 10px;
  right: 10px;
}

#follow-btn, #edit-profile-btn {
  margin-top: 20px;
}

/* ===== PROFILE CONTENT ===== */
.profile-content {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Tabs Navigation */
.profile-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 60px;
  z-index: 10;
}

.tab-btn {
  padding: 15px 20px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.tab-btn:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: var(--transition);
}

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

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active:after {
  transform: scaleX(1);
}

/* Tab Content */
.tab-content {
  padding: 30px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* No Content States */
.no-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  color: var(--text-muted);
  text-align: center;
  background-color: var(--light-color);
  border-radius: var(--radius-md);
}

.no-content i {
  font-size: 50px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-content p {
  font-size: 16px;
}

/* Posts Section */
.create-post {
  background-color: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.create-post textarea {
  width: 100%;
  border: none;
  resize: none;
  padding: 10px 0;
  font-size: 16px;
  min-height: 80px;
  outline: none;
  font-family: inherit;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.btn-icon:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Posts */
.posts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background-color: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
}

.post-author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.post-author-info {
  flex: 1;
}

.post-author-name {
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
  font-size: 16px;
  display: block;
  text-decoration: none;
}

.post-time {
  font-size: 14px;
  color: var(--text-muted);
}

.post-menu {
  position: relative;
}

.post-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.post-menu-btn:hover {
  background-color: var(--light-color);
}

.post-content {
  padding: 0 20px 15px;
  font-size: 16px;
  line-height: 1.6;
}

.post-media {
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: 10px;
  overflow: hidden;
}

.post-media img, .post-media video {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  max-height: 500px;
}

.post-actions-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  transition: var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.post-action:hover {
  background-color: var(--light-color);
}

.post-action.liked {
  color: var(--danger-color);
}

.post-action.liked i {
  color: var(--danger-color);
}

/* Pets Section */
.pets-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.pet-card {
  background-color: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.pet-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.pet-header {
  position: relative;
  height: 150px;
  background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
}

.pet-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-info {
  padding: 15px;
  text-align: center;
}

.pet-name {
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 5px;
  color: var(--dark-color);
}

.pet-breed {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.pet-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  font-size: 14px;
}

.pet-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pet-stat span:first-child {
  font-weight: 600;
  color: var(--primary-color);
}

.pet-stat span:last-child {
  font-size: 12px;
  color: var(--text-muted);
}

/* Photos Section */
.photos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  aspect-ratio: 1/1;
  cursor: pointer;
}

.photo-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

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

/* About Section */
.about-section {
  background-color: white;
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.about-section h3 {
  margin-top: 0;
  color: var(--dark-color);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.info-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.info-item {
  margin-bottom: 20px;
}

.info-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
}

.info-value {
  font-size: 16px;
  color: var(--dark-color);
}

/* Following/Followers Sections */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.user-card {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: var(--radius-md);
  padding: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.user-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--dark-color);
  margin: 0 0 5px;
  font-size: 16px;
}

.user-bio {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Styles améliorés pour les cartes de publication */
.post-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  position: relative;
}

.post-author-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.post-author-info {
  margin-left: 12px;
  flex: 1;
}

.post-author-name {
  color: #333;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
  transition: color 0.2s ease;
}

.post-author-name:hover {
  color: var(--primary-color);
}

.post-time {
  color: #777;
  font-size: 13px;
  display: block;
}

.post-menu {
  position: relative;
}

.post-menu-btn {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.post-menu-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10;
  min-width: 150px;
  overflow: hidden;
}

.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.dropdown-menu button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.post-content {
  padding: 0 16px 16px;
}

.post-content p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-media {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.post-media img, .post-media video {
  width: 100%;
  border-radius: 8px;
  max-height: 400px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.post-media img:hover {
  transform: scale(1.01);
}

.post-actions-footer {
  display: flex;
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(249, 250, 251, 0.8);
}

.post-action {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  margin-right: 12px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.post-action:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.post-action i {
  margin-right: 6px;
  font-size: 16px;
}

.post-action.liked {
  color: #e53935;
}

.post-action.liked i {
  color: #e53935;
}

/* Styles modernisés pour l'en-tête du profil */
.profile-header {
  background-color: rgba(255, 255, 255, 0.15);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  min-height: 220px;
  transition: all 0.3s ease;
}

/* Ancien style de couverture, maintenant déprécié */
.profile-cover {
  display: none;
}

/* Image de couverture appliquée directement au header */
#cover-image {
  display: none; /* Caché car utilisé uniquement par JavaScript */
}

.profile-avatar-container {
  position: absolute;
  bottom: 80px;
  left: 70px;
  z-index: 3;
  height: 90px;
  width: 90px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 0;
  overflow: hidden;
  border: 3px solid #fff;
  transition: all 0.3s ease;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fff;
  z-index: 2;
  object-fit: cover;
  display: block;
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.profile-info {
  padding: 15px 24px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  min-height: 60px;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.85));
  border-radius: 0 0 12px 12px;
  backdrop-filter: blur(5px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-info {
  flex: 1;
  min-width: 200px;
  margin-left: 120px;
}

.user-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #333;
}

.user-details {
  display: flex;
  color: #666;
  font-size: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.user-detail {
  display: flex;
  align-items: center;
}

.user-detail i {
  margin-right: 6px;
  color: var(--primary-color);
}

.user-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

.stat-item {
  text-align: center;
  min-width: 70px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.stat-label {
  font-size: 13px;
  color: #777;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn i {
  margin-right: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.btn-secondary {
  background-color: #f0f2f5;
  color: #333;
}

.btn-secondary:hover {
  background-color: #e4e6eb;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(var(--primary-color-rgb), 0.05);
  transform: translateY(-2px);
}

.following {
  background-color: #e4e6eb;
  color: #333;
}

.following:hover {
  background-color: #d8dadf;
}

/* Styles modernes pour les onglets et le contenu */
.profile-content {
  margin-top: 20px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid #e4e6eb;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.profile-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  min-height: 300px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Animation pour le changement d'onglet */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Style pour les conteneurs d'animaux */
.pets-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.pet-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.pet-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.pet-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pet-card:hover .pet-image img {
  transform: scale(1.05);
}

.pet-info {
  padding: 15px;
}

.pet-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 5px 0;
  color: #333;
}

.pet-breed {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.pet-age {
  color: #777;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.pet-age i {
  margin-right: 5px;
  color: var(--primary-color);
}

/* Style pour la section photos */
.photos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.photo-item {
  position: relative;
  padding-top: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.photo-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

/* Styles pour les publications partagées */
.shared-post-container {
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 15px 0;
    padding: 15px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shared-post-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #f8f9fa;
    z-index: 2;
}

.shared-post-container::after {
    content: '';
    position: absolute;
    top: -11px;
    left: 19px;
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-bottom: 11px solid #e5e7eb;
    z-index: 1;
}

.shared-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.shared-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shared-post-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.shared-post-info small {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-top: 2px;
}

.shared-post-content {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.shared-post-content p {
    margin-bottom: 12px;
    color: #4b5563;
}

.shared-post-media {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.shared-post-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
}

.shared-post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #6b7280;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.shared-post-stats span {
    display: flex;
    align-items: center;
}

.shared-post-stats i {
    margin-right: 5px;
    font-size: 14px;
}

.shared-post-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shared-post-action-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.shared-post-action-btn:hover {
    background-color: #e5e7eb;
    color: #4b5563;
}

.shared-post-action-btn i {
    font-size: 14px;
}

/* Styles pour les médias dans les posts partagés */
.shared-post-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 8px;
    margin-bottom: 12px;
}

.shared-media-grid-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
}

.shared-media-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shared-post-media video {
    width: 100%;
    max-height: 350px;
    border-radius: 8px;
    background-color: #000;
}

/* Animation pour le chargement lors du partage */
@keyframes shareLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.share-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: shareLoader 0.8s linear infinite;
    margin-right: 8px;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
  .profile-container {
    padding: 0 15px;
  }
  
  .profile-cover {
    height: 250px;
  }
  
  .profile-picture img {
    width: 120px;
    height: 120px;
  }
  
  .profile-details h1 {
    font-size: 24px;
  }
}

@media screen and (max-width: 768px) {
  .profile-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-picture {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .profile-stats {
    justify-content: center;
  }
  
  .tab-content {
    padding: 20px 15px;
  }
  
  .info-container {
    grid-template-columns: 1fr;
  }
  
  .pets-container, 
  .photos-container, 
  .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media screen and (max-width: 576px) {
  .profile-cover {
    height: 180px;
  }
  
  .profile-picture img {
    width: 100px;
    height: 100px;
    margin-top: -50px;
  }
  
  .profile-details h1 {
    font-size: 20px;
  }
  
  .profile-details p {
    font-size: 14px;
  }
  
  .stat span:first-child {
    font-size: 20px;
  }
  
  .stat span:last-child {
    font-size: 12px;
  }
  
  .tab-btn {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .pets-container, 
  .photos-container, 
  .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 1.5s infinite;
}

/* Animation de fade-out pour la suppression des commentaires */
@keyframes fadeOut {
  from { 
    opacity: 1; 
    transform: translateY(0);
  }
  to { 
    opacity: 0; 
    transform: translateY(-10px);
  }
}

.comment-item.fade-out {
  animation: fadeOut 0.5s ease forwards;
  pointer-events: none; /* Désactiver les interactions pendant l'animation */
}

/* Styles pour les commentaires */
.comments-section {
    /* ... existing code ... */
}

/* Formulaire de commentaire */
.comment-form {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background-color: var(--input-bg-color);
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ... existing code ... */

/* Boutons d'action pour les commentaires */
.send-comment-btn, .comment-media-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.send-comment-btn:hover, .comment-media-btn:hover {
    background-color: var(--primary-color-hover);
    transform: scale(1.05);
}

.comment-media-btn {
    background-color: var(--secondary-color);
}

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

/* Prévisualisation des médias pour les commentaires */
.comment-media-preview {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--card-bg-color);
    border-radius: 10px;
}

.comment-media-preview .preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-media-preview .preview-item img,
.comment-media-preview .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-media-preview .preview-item .remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.comment-media-preview .preview-item .remove-preview:hover {
    background-color: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Indicateur de chargement pour les commentaires */
.comment-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: var(--light-bg-color);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Affichage des médias dans les commentaires */
.comment-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.comment-media img,
.comment-media video {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.comment-media img:hover,
.comment-media video:hover {
    transform: scale(1.03);
}

/* Styles spécifiques pour les vidéos */
.comment-media .media-item.video-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

.comment-media .media-item.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-media .media-item.video-container::before {
    content: '\f144';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 2;
    pointer-events: none;
    transition: all 0.2s ease;
}

.comment-media .media-item.video-container:hover::before {
    color: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Animation de suppression pour les commentaires */
.comment.deleting {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
}

/* Spinner de chargement */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ... existing code ... */

/* Styles pour la modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: 25px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 10px;
}

/* Styles pour la modal de partage */
.share-modal .share-content-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}

.share-modal .btn-cancel {
    background-color: #f1f1f1;
    color: #333;
}

.share-modal .btn-primary {
    background-color: #4267B2;
    color: white;
}

/* Styles pour l'indicateur de chargement */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #4267B2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Styles pour le conteneur d'erreur */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
}

.error-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-container p {
    margin-bottom: 20px;
    color: #333;
}

/* ... existing code ... */

/* Styles pour la modal de partage */
.share-modal .share-content-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Options de partage */
.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: 2px solid transparent;
}

.share-option:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
}

.share-option.selected {
    border-color: #4267B2;
    background-color: rgba(66, 103, 178, 0.1);
}

.share-option i {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.share-option i.fa-whatsapp {
    color: #25D366;
}

.share-option i.fa-facebook {
    color: #4267B2;
}

.share-option i.fa-instagram {
    color: #E1306C;
}

.share-option i.fa-link {
    color: #6c757d;
}

.share-option i.fa-newspaper {
    color: #3498db;
}

.share-option span {
    font-size: 0.9rem;
    color: #495057;
}

/* Animation pour la copie réussie */
.copy-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.copy-success i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 15px;
}

.copy-success span {
    font-size: 1.1rem;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ... existing code ... */
