/* ==========================================================================
   Profil public — /profil/:uid  (classes préfixées .pf-)
   ========================================================================== */

.pf-page { padding-top: 32px; padding-bottom: 24px; }

/* ---------- Bandeau « votre profil » ---------- */
.pf-banner {
  margin-bottom: 32px; padding: 16px 20px; border-radius: var(--radius-lg);
  background: var(--brand-soft); border: 1px solid #ffd8c2;
}
.pf-banner-row { display: flex; align-items: center; gap: 14px; }
.pf-banner-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--brand);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-xs);
}
.pf-banner-text { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; color: var(--brand-ink); }
.pf-banner-text span { font-size: var(--fs-sm); color: var(--ink-2); }
.pf-banner .btn { flex-shrink: 0; }
.pf-complete { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(154, 52, 18, 0.16); }
.pf-complete-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: var(--fs-sm); }
.pf-complete .progress { background: #fff; height: 8px; }
.pf-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pf-missing-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-right: 2px; }
.pf-missing .chip { padding: 5px 12px; font-size: var(--fs-xs); border-color: #f3c7ad; }
.pf-admin-note { margin-bottom: 24px; }

/* ---------- Mise en page ---------- */
.pf-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: start; }
.pf-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf-main { min-width: 0; }
@media (min-width: 961px) and (min-height: 820px) {
  .pf-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.pf-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.pf-card-title { font-size: var(--fs-base); margin: 0 0 16px; }

/* ---------- Carte d'identité ---------- */
.pf-identity { display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: var(--radius-xl); box-shadow: var(--shadow); border-color: var(--line); }
.pf-id-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.pf-avatar { position: relative; flex-shrink: 0; }
.pf-avatar .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.pf-avatar-check {
  position: absolute; right: 2px; bottom: 4px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--verified); color: #fff; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-xs);
}
.pf-id-names { min-width: 0; max-width: 100%; }
.pf-name { font-size: var(--fs-xl); line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.pf-person { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-base); overflow-wrap: anywhere; }
.pf-verified { margin-top: 12px; display: flex; justify-content: center; }
.pf-verified .badge { padding: 5px 12px; font-size: var(--fs-sm); }

.pf-rating {
  display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius); text-decoration: none !important;
  transition: background 0.15s;
}
.pf-rating:hover { background: var(--surface-2); }
.pf-rating-num { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.pf-rating-num.is-muted { color: var(--faint); display: flex; }
.pf-rating-detail { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pf-rating-count { font-size: var(--fs-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pf-rating.is-empty .pf-rating-count { text-decoration: none; color: var(--ink-2); }
.pf-rating-sub { font-size: var(--fs-xs); color: var(--muted); }

.pf-facts { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-sm); }
.pf-facts li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.4; }
.pf-facts .icon { color: var(--ink-2); margin-top: 1px; }

.pf-actions { display: flex; flex-direction: column; gap: 10px; }
.pf-report {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px;
  font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; text-underline-offset: 2px;
}
.pf-report:hover { color: var(--ink); }

/* ---------- Informations vérifiées ---------- */
.pf-trust { padding: 22px 24px; }
.pf-trust-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pf-trust-list li { display: flex; gap: 12px; align-items: flex-start; }
.pf-trust-list li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-trust-list strong { font-size: var(--fs-sm); }
.pf-trust-list span:not(.pf-trust-ico) { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.pf-trust-ico { flex-shrink: 0; display: flex; margin-top: 1px; color: var(--faint); }
.pf-trust-list .is-ok .pf-trust-ico { color: var(--success); }
.pf-trust-list .is-pending .pf-trust-ico { color: var(--warning); }
.pf-trust-list .is-neutral .pf-trust-ico { color: var(--ink-2); }

/* ---------- Sections (colonne principale) ---------- */
.pf-section { padding: 36px 0; border-top: 1px solid var(--line); }
.pf-main > .pf-section:first-child { padding-top: 0; border-top: 0; }
.pf-main > .pf-section:last-child { padding-bottom: 0; }
.pf-h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pf-h { margin: 0; font-size: var(--fs-lg); }
.pf-h-count { color: var(--muted); font-size: var(--fs-sm); }

.pf-bio { margin: 0 0 20px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.pf-bio a { text-decoration: underline; color: var(--ink); }
.pf-bio.is-empty { color: var(--muted); }
.pf-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-meta-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--surface); font-size: var(--fs-sm); font-weight: 500; color: var(--ink); max-width: 100%;
}
.pf-meta-item .icon { color: var(--ink-2); }
.pf-meta-link { overflow-wrap: anywhere; transition: background 0.15s; }
.pf-meta-link:hover { background: var(--surface-2); text-decoration: none; }

/* Savoir-faire */
.pf-skills { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-skill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: #fff;
  font-size: var(--fs-sm); font-weight: 600; transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-skill:hover { border-color: var(--ink); box-shadow: var(--shadow-xs); text-decoration: none; }
.pf-skill-ico {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cat) 14%, #fff); color: var(--cat);
}

/* Parc machines */
.pf-machines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-machine { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.pf-machine-ico {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--surface);
  color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.pf-machine > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pf-machine strong { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.pf-machine span { font-size: var(--fs-sm); color: var(--muted); }

/* Certifications & capacités */
.pf-certs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pf-cert {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius);
  background: var(--success-soft); color: var(--success); font-size: var(--fs-sm); font-weight: 600;
}
.pf-capacity { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); color: var(--ink-2); }
.pf-capacity .icon { color: var(--ink-2); margin-top: 2px; }
.pf-capacity p { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }

/* Réalisations */
.pf-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pf-shot { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.pf-shot.is-broken { display: none; }
.pf-shot-btn { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pf-shot-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.pf-shot-btn:hover .pf-shot-img { transform: scale(1.04); }
.pf-shot-btn:focus-visible { border-radius: var(--radius); }
.pf-shot-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; text-align: left;
  color: #fff; font-size: var(--fs-xs); font-weight: 600; line-height: 1.35;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0; transition: opacity 0.2s;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pf-shot-btn:hover .pf-shot-cap, .pf-shot-btn:focus-visible .pf-shot-cap { opacity: 1; }
@media (hover: none) { .pf-shot-cap { opacity: 1; } }

/* ---------- Avis ---------- */
.pf-rv-summary {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 24px 28px; margin-bottom: 32px; background: var(--surface); border-radius: var(--radius-lg);
}
.pf-rv-score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pf-rv-avg { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.pf-rv-count { font-size: var(--fs-sm); color: var(--muted); }
.pf-hist { display: flex; flex-direction: column; gap: 8px; }
.pf-hist-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 28px; align-items: center; gap: 12px; font-size: var(--fs-sm); }
.pf-hist-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pf-hist-label .icon { color: #f5a524; }
.pf-hist-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pf-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--ink); }

.pf-review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; }
.pf-review { min-width: 0; }
.pf-review-author { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
a.pf-review-author:hover { text-decoration: none; }
a.pf-review-author:hover strong { text-decoration: underline; }
.pf-review-author > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pf-review-author strong { font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-review-sub { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-review-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: var(--fs-sm); color: var(--muted); }
.pf-review-text { margin: 10px 0 0; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.pf-review-listing { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
.pf-review-listing a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.pf-review-listing a:hover { color: var(--ink); }

.pf-empty {
  display: flex; align-items: flex-start; gap: 16px; padding: 24px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg); background: var(--surface);
}
.pf-empty-ico { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--faint); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-xs); }
.pf-empty.is-error .pf-empty-ico { color: var(--danger); }
.pf-empty h3 { margin: 2px 0 4px; font-size: var(--fs-md); }
.pf-empty p { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-sm); }
.pf-empty p:last-child { margin-bottom: 0; }

/* ---------- Squelettes ---------- */
.pf-skel-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px; }
.pf-skel-avatar { width: 120px; height: 120px; border-radius: 50%; }
.pf-skel-block { width: 100%; height: 72px; border-radius: var(--radius); }
.pf-skel-card .skeleton-line { width: 70%; }
.pf-skel-card .skeleton-line.w-90 { width: 90%; }
.pf-main > .skeleton-line { margin-bottom: 14px; }
.pf-skel-text { height: 96px; margin-bottom: 36px; border-radius: var(--radius); }
.pf-loading { display: flex; flex-direction: column; gap: 16px; }
.pf-skel-review { height: 96px; border-radius: var(--radius); }

/* ---------- Visionneuse ---------- */
.pf-lightbox {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 11, 18, 0.97); opacity: 0; transition: opacity 0.16s;
}
.pf-lightbox.is-visible { opacity: 1; }
.pf-lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: calc(100vw - 168px); }
.pf-lb-img { max-width: 100%; max-height: calc(100vh - 150px); border-radius: var(--radius); object-fit: contain; background: #111; transition: opacity 0.15s; }
.pf-lightbox.is-loading .pf-lb-img { opacity: 0.35; }
.pf-lb-caption { margin-top: 14px; max-width: 720px; text-align: center; color: rgba(255, 255, 255, 0.92); font-size: var(--fs-sm); line-height: 1.5; }
.pf-lb-count { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; pointer-events: none; }
.pf-lb-btn {
  position: absolute; z-index: 1; width: 48px; height: 48px; border-radius: 50%; color: #fff;
  background: rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.pf-lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.pf-lb-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5); }
.pf-lb-close { top: 20px; right: 20px; }
.pf-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.pf-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .pf-layout { gap: 40px; grid-template-columns: 320px minmax(0, 1fr); }
  .pf-review-list { gap: 32px 32px; }
}

@media (max-width: 960px) {
  .pf-page { padding-top: 20px; }
  /* Une seule colonne : identité → contenu → informations vérifiées */
  .pf-layout { display: flex; flex-direction: column; gap: 32px; }
  .pf-aside { display: contents; }
  .pf-identity { order: 1; }
  .pf-main { order: 2; width: 100%; }
  .pf-trust { order: 3; }
  .pf-identity { box-shadow: var(--shadow-sm); }
}

@media (max-width: 744px) {
  .pf-banner { margin-bottom: 24px; padding: 14px 16px; }
  .pf-banner-row { flex-wrap: wrap; }
  .pf-banner-text { flex-basis: calc(100% - 56px); }
  .pf-banner .btn { width: 100%; }

  .pf-identity { padding: 22px 20px; gap: 18px; border-radius: var(--radius-lg); }
  .pf-id-head { flex-direction: row; text-align: left; align-items: center; gap: 16px; }
  .pf-avatar .avatar { width: 84px !important; height: 84px !important; font-size: 34px !important; }
  .pf-avatar-check { width: 28px; height: 28px; right: -2px; bottom: 0; border-width: 2px; }
  .pf-avatar-check .icon { width: 15px; height: 15px; }
  .pf-name { font-size: var(--fs-lg); }
  .pf-person { font-size: var(--fs-sm); margin-top: 4px; }
  .pf-verified { justify-content: flex-start; margin-top: 8px; }
  .pf-verified .badge { font-size: var(--fs-xs); padding: 4px 10px; }
  .pf-rating { justify-content: flex-start; }
  .pf-rating-num { font-size: 2rem; }

  .pf-section { padding: 28px 0; }
  .pf-h { font-size: var(--fs-md); }
  .pf-bio { font-size: var(--fs-base); }
  .pf-machines { grid-template-columns: 1fr; gap: 8px; }
  .pf-machine { padding: 10px 14px; gap: 12px; }
  .pf-machine-ico { width: 38px; height: 38px; }
  .pf-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pf-rv-summary { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .pf-rv-score { flex-direction: row; justify-content: flex-start; gap: 14px; text-align: left; flex-wrap: wrap; }
  .pf-rv-avg { font-size: 2.75rem; }
  .pf-review-list { grid-template-columns: 1fr; gap: 28px; }
  .pf-empty { padding: 18px; flex-direction: column; gap: 12px; }

  .pf-shot-cap { -webkit-line-clamp: 2; padding-top: 24px; }
  .pf-lb-figure { max-width: 100vw; padding: 0 12px; }
  .pf-lb-img { max-height: calc(100vh - 190px); }
  .pf-lb-close { top: 12px; right: 12px; }
  .pf-lb-prev, .pf-lb-next { top: auto; bottom: 14px; transform: none; width: 44px; height: 44px; }
  .pf-lb-prev { left: 16px; }
  .pf-lb-next { right: 16px; }
}

/* ---------- Partage du profil ---------- */
.pf-share .pf-card-title { margin-bottom: 8px; }
.pf-share-text { margin: 0 0 14px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
