/* ==========================================================================
   CARDS DE PROFESSIONNELS - CATEGORIE V2 (Glasmorphisme Clair)
   Styles élégants, épurés et professionnels pour les cartes de profils
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* Variables de couleurs et styles principaux */
:root {
  --text-primary: #2c3e50;
  --text-secondary: #576574;
  --card-bg: rgba(255, 255, 255, 0.65);
  --accent-color: #2575fc;
  --border-radius: 20px;
  --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Conteneur principal des cartes */
.professionals-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 20px;
}

/* Message quand aucun profil n'est disponible */
.no-profile-message {
  font-size: 18px;
  width: 100%;
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  color: var(--text-secondary);
  font-weight: 500;
  margin: 30px auto;
  max-width: 500px;
}

/* Carte de profil professionnelle */
.profile-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  width: 290px;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}

.profile-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--box-shadow-hover);
}

/* Indicateur de statut */
.status-indicator {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-indicator span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.status-indicator.available span {
  background-color: #2ecc71;
}

.status-indicator.busy span {
  background-color: #e74c3c;
}

/* En-tête de la carte avec image */
.profile-header {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.profile-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.profile-card:hover .profile-header img {
  transform: scale(1.1);
}

/* Overlay pour le nom & Localisation */
.profile-name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  padding: 30px 20px 15px;
  transition: var(--transition);
  color: white;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.profile-location {
  font-size: 0.85rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  opacity: 0.9;
}

.profile-location i {
  margin-right: 6px;
  font-size: 13px;
}

/* Contenu de la carte */
.profile-content {
  flex-grow: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Titre de compétence principal (fonction) */
.profile-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.4;
  height: 45px; /* S'assure que le titre prend 2 lignes max */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges de compétences */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.skill-badge {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill-badge:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.skill-badge.highlighted {
  background-color: rgba(37, 117, 252, 0.15);
  color: #1a5cbf;
  font-weight: 600;
  border-color: rgba(37, 117, 252, 0.3);
}

.skill-badge.highlighted i {
  margin-right: 5px;
  font-size: 10px;
}

/* Détails sur l'éducation et l'expérience */
.profile-details {
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 5px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item strong {
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-item span {
  color: var(--text-primary);
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Bouton de visualisation du profil */
.view-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: #41b2f9;
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease-in-out;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-profile-btn i {
  margin-right: 8px;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.view-profile-btn:hover {
  color: white;
  border-color: transparent;
}

.view-profile-btn:hover i {
  transform: translateX(-3px);
}

/* Variantes de couleurs basées sur les catégories */
.profile-card.cat-color-1:hover .view-profile-btn {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
}
.profile-card.cat-color-2:hover .view-profile-btn {
  background: linear-gradient(135deg, #36d1dc, #5b86e5);
}
.profile-card.cat-color-3:hover .view-profile-btn {
  background: linear-gradient(135deg, #33b1fa, #272627);
}
.profile-card.cat-color-4:hover .view-profile-btn {
  background: linear-gradient(135deg, #02aabb, #00cdac);
}
.profile-card.cat-color-5:hover .view-profile-btn {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
}
/* Ajoutez d'autres couleurs si nécessaire */

/* Compteur de résultats et Pagination (styles existants, légèrement ajustés) */
.results-counter {
  text-align: center;
  margin: 30px 0;
}

.results-counter p {
  display: inline-block;
  background: white;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.results-counter strong {
  color: var(--accent-color);
  font-weight: 700;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin: 40px 0 20px;
  width: 100%;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background-color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination a {
  color: var(--text-primary);
}

.pagination a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--accent-color);
}

.pagination .current {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  font-weight: 600;
}

.pagination .page-nav {
  background-color: rgba(0, 0, 0, 0.03);
}
.pagination .page-nav:hover {
  background-color: rgba(0, 0, 0, 0.08);
}
.pagination .text-label {
  display: none;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
  .professionals-grid {
    gap: 25px;
  }
  .profile-card {
    width: 270px;
  }
}

@media screen and (max-width: 768px) {
  .professionals-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  .profile-card {
    width: 100%;
  }
  .pagination a,
  .pagination span {
    width: 35px;
    height: 35px;
  }
}

@media screen and (max-width: 480px) {
  .professionals-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
    gap: 25px;
  }
  .profile-card {
    min-height: 400px;
  }
  .profile-name {
    font-size: 1.1rem;
  }
  .profile-title {
    font-size: 0.95rem;
  }
  .skill-badge {
    font-size: 11px;
    padding: 5px 10px;
  }
  .pagination {
    padding: 8px 15px;
  }
  .pagination a,
  .pagination span {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}
