/* ============================================================
   APPAF — Page profil utilisateur (profile-page.css)
   ============================================================ */

/* ── Wrapper global ─────────────────────────────────────────── */
.appaf-profile-page {
  font-family: var(--appaf-font-ui);
  background: var(--appaf-gray-50, #F9FAFB);
  min-height: 60vh;
}

/* ════════════════════════════════════════════════════════════
   HERO PROFIL
════════════════════════════════════════════════════════════ */
.appaf-profile-hero {
  background: var(--appaf-navy);
  padding: 48px 20px 40px;
}
.appaf-profile-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* Identité */
.appaf-profile-hero__identity {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex: 1;
  min-width: 280px;
}
.appaf-profile-hero__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.appaf-profile-hero__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.appaf-profile-hero__verified {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  background: #16A34A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .75rem;
  border: 2px solid var(--appaf-navy);
}
.appaf-profile-hero__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.appaf-profile-hero__name {
  font-family: var(--appaf-font);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--appaf-white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.appaf-profile-hero__disabled {
  font-size: .7rem;
  font-weight: 700;
  background: rgba(220,38,38,.25);
  color: #FCA5A5;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.appaf-profile-hero__societe,
.appaf-profile-hero__secteur {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  color: rgba(255,255,255,.75);
  margin: 0;
}
.appaf-profile-hero__location-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.appaf-profile-hero__location,
.appaf-profile-hero__since {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}

/* Étoiles dans le hero */
.appaf-profile-hero__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.appaf-profile-hero__note-val {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  margin-left: 8px;
}
.appaf-profile-hero__note-count {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
}

/* Liens sociaux */
.appaf-profile-hero__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.appaf-profile-hero__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  transition: all .2s;
}
.appaf-profile-hero__link:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.appaf-profile-hero__link--linkedin { color: #7DD3FC; border-color: rgba(125,211,252,.3); }
.appaf-profile-hero__link--linkedin:hover { color: #BAE6FD; }

/* Droite hero */
.appaf-profile-hero__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
}

/* Stats hero */
.appaf-profile-hero__stats {
  display: flex;
  gap: 28px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--appaf-radius-lg);
  padding: 14px 24px;
}
.appaf-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.appaf-profile-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--appaf-white);
  line-height: 1;
}
.appaf-profile-stat__label {
  font-size: .68rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Actions hero */
.appaf-profile-hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Rôle badge */
.appaf-profile-hero__role {
  display: flex;
  align-items: center;
  gap: 8px;
}
.appaf-profile-hero__verified-label {
  font-size: .75rem;
  color: #4ADE80;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ════════════════════════════════════════════════════════════
   CORPS
════════════════════════════════════════════════════════════ */
.appaf-profile-body { padding: 36px 20px 60px; }
.appaf-profile-body__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .appaf-profile-body__inner { grid-template-columns: 1fr; }
}

/* Sections */
.appaf-profile-section {
  background: var(--appaf-white);
  border: 1px solid var(--appaf-gray-200);
  border-radius: var(--appaf-radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--appaf-shadow);
}
.appaf-profile-section:last-child { margin-bottom: 0; }
.appaf-profile-section__title {
  font-family: var(--appaf-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--appaf-navy);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--appaf-gray-100);
}
.appaf-profile-bio {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--appaf-gray-800);
  margin: 0;
}

/* ── TOP annonces ───────────────────────────────────────────── */
.appaf-profile-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.appaf-profile-top-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1.5px solid var(--appaf-gold);
  border-radius: var(--appaf-radius-lg);
  overflow: hidden;
  background: var(--appaf-white);
  transition: box-shadow .2s, transform .2s;
}
.appaf-profile-top-card:hover { box-shadow: var(--appaf-shadow-lg); transform: translateY(-2px); }
.appaf-profile-top-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--appaf-navy);
}
.appaf-profile-top-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.appaf-profile-top-card:hover .appaf-profile-top-card__img img { transform: scale(1.04); }
.appaf-profile-top-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.appaf-profile-top-card__body h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--appaf-navy);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.appaf-profile-top-card__body p {
  font-size: .78rem;
  color: var(--appaf-gray-600);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.appaf-profile-top-card__meta {
  display: flex;
  gap: 10px;
  font-size: .75rem;
  color: var(--appaf-gray-400);
  flex-wrap: wrap;
}
.appaf-profile-top-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Annonces section ───────────────────────────────────────── */
.appaf-profile-annonces__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}
.appaf-profile-section__title .appaf-profile-annonces__count {
  font-size: .78rem;
  font-weight: 600;
  background: var(--appaf-navy);
  color: var(--appaf-white);
  padding: 2px 9px;
  border-radius: 20px;
  margin-left: 4px;
}

/* Filtres annonces */
.appaf-profile-annonces__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--appaf-gray-100);
}

/* Grille annonces dans le profil */
.appaf-profile-annonces__grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .appaf-profile-annonces__grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .appaf-profile-annonces__grid { grid-template-columns: 1fr; } }

.appaf-annonce-card__vues {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .72rem;
  color: var(--appaf-gray-400);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.appaf-profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

/* Catégories tags */
.appaf-profile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.appaf-profile-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid var(--appaf-gray-200);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--appaf-gray-700);
  text-decoration: none;
  transition: all .15s;
}
.appaf-profile-cat-tag:hover { border-color: var(--appaf-navy); color: var(--appaf-navy); }
.appaf-profile-cat-tag.is-active {
  background: var(--appaf-navy);
  color: var(--appaf-white);
  border-color: var(--appaf-navy);
}
.appaf-profile-cat-tag span {
  font-size: .7rem;
  color: inherit;
  opacity: .7;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  .appaf-profile-hero__inner { flex-direction: column; }
  .appaf-profile-hero__right { align-items: flex-start; }
  .appaf-profile-hero__stats { width: 100%; justify-content: space-around; }
  .appaf-profile-hero__actions { justify-content: flex-start; }
  .appaf-profile-sidebar { position: static; }
}
