/* Public profile (registration/user_profile.html) */

/* Header: the cover of the category pages (the map, darkened, 360px high), the person on it in white:
   photo | name, "Auteur · membre depuis 2024", the links as icons | the bio. The figures are in the tabs */
.pf-head { position: relative; display: grid; grid-template-columns: 168px minmax(260px, max-content) minmax(0, 1fr); grid-template-areas: "photo id bio" "photo edit bio";
           gap: .5rem 2.25rem; align-items: center; min-height: 360px; padding: 2.5rem; overflow: hidden; border-radius: 6px;
           background: var(--brand) url('../images/cover-map.webp') center / cover; color: #fff; }
.pf-head::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.pf-head > * { position: relative; }
.pf-photo { grid-area: photo; display: grid; place-items: center; width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
            background: #e6e6f2; font-size: 48px; font-weight: 600; color: var(--brand); box-shadow: 0 0 0 4px rgba(255,255,255,.9); }
.pf-id { grid-area: id; align-self: end; display: grid; gap: .4rem; }
.pf h1 { max-width: 20ch; margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 2.6rem; line-height: 1.12; color: #fff; }  /* a long name wraps instead of squeezing the bio */
.pf-meta { margin: 0; font-size: 14.5px; color: rgba(255,255,255,.85); }
.pf-links { display: flex; gap: .15rem; margin-left: -.4rem; }
.pf-links:not(:has(a)) { display: none; }  /* no links: no empty row under the name */
.pf-links a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; color: rgba(255,255,255,.9); }
.pf-links a:hover { background: rgba(255,255,255,.15); color: #fff; }
.pf-edit { grid-area: edit; align-self: start; display: inline-flex; align-items: center; gap: .4rem; padding-top: .25rem; font-size: 14px; font-weight: 500; color: #fff; }
.pf-edit:hover { color: #fff; }
.pf-bio { grid-area: bio; margin: 0; padding-left: 2.25rem; border-left: 1px solid rgba(255,255,255,.3); font-size: 16px; line-height: 1.7; color: #fff; }

.pf-tabs { display: flex; gap: .25rem; margin: 2rem 0 1.5rem; border-bottom: 1px solid var(--border-soft); }
.pf-tabs button { margin-bottom: -1px; padding: .6rem .9rem; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 15px; color: var(--text-meta); cursor: pointer; }
.pf-tabs button span { margin-left: .2rem; font-size: 12.5px; color: var(--text-meta); }
.pf-tabs button[aria-selected=true] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.pf-section h2 { display: none; margin: 0 0 1rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; color: var(--text-heading); }
/* Only section (a reader): its title shows, with the line the tabs would draw */
.pf-alone { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--border-soft); }
.pf-alone h2 { display: block; }
/* Comments as cards: the article's picture | the article, the comment, its date */
.pf-cms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.pf-cm { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; align-items: start; padding: .9rem; border: 1px solid var(--border-soft);
         border-radius: 8px; background: #fff; color: inherit; text-decoration: none; }
.pf-cm:hover { text-decoration: none; color: inherit; }
.pf-cm-text { display: grid; gap: .35rem; min-width: 0; }
.pf-cm-body { font-size: 15px; line-height: 1.5; color: var(--text-strong); }
.pf-cm-post { font-family: var(--font-serif); font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text-heading); }
.pf-cm:hover .pf-cm-post { color: var(--brand); }
.pf-cm-date { font-size: 12px; color: var(--text-meta); }
.pf-private { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 13.5px; color: var(--text-meta); }
.pf-private a { font-weight: 600; color: var(--brand); }
.pf-empty { margin: 0; font-size: 15px; color: var(--text-meta); }

/* The author's (or the liked) articles: small cards, four in a row (as the home cards, smaller); paging brings the tabs back to the top */
#scroll-container, #likes-list, #comments-list { scroll-margin-top: calc(var(--head-h) + 5.25rem); }  /* the tabs at the top of the screen, as on the home page */
.pf-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
.pf-row { position: relative; display: grid; align-content: start; gap: .6rem; }
/* Pictures and hover as the home cards: the picture zooms a little, the title turns blue; no shadow */
.pf-pic { display: block; overflow: hidden; border-radius: 6px; }
.pf-pic img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.pf-row:hover .pf-pic img, .pf-cm:hover .pf-pic img { transform: scale(1.03); }
.pf-row > div { display: grid; align-content: start; gap: .25rem; }
.pf-row-cat { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.pf-row h3 { margin: 0; font-size: 1rem; line-height: 1.35; } .pf-row h3 a { color: var(--text-heading); }
.pf-row:hover h3 a { color: var(--brand); text-decoration: none; }
.pf-row-date { font-size: 12px; color: var(--text-meta); }

@media (max-width: 991px) {
  .pf-head { grid-template-columns: 128px minmax(0, 1fr); grid-template-areas: "photo id" "photo edit" "bio bio"; min-height: 0; }
  .pf-photo { width: 128px; height: 128px; font-size: 38px; }
  .pf-bio { padding: 1.1rem 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.3); }
  .pf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-cms { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .pf-head { grid-template-columns: 1fr; grid-template-areas: "photo" "id" "edit" "bio"; justify-items: center; text-align: center; gap: .75rem; padding: 2rem 1.25rem; }
  .pf-photo { width: 112px; height: 112px; font-size: 34px; }
  .pf-id { justify-items: center; } .pf-links { margin-left: 0; } .pf-edit { padding-top: 0; }
  .pf h1 { font-size: 1.9rem; }
  .pf-bio { font-size: 15px; text-align: left; }
  .pf-tabs { overflow-x: auto; margin: 1.5rem -15px 1.25rem; padding: 0 15px; }
  .pf-tabs button { flex: 0 0 auto; }
  .pf-cm { grid-template-columns: 80px minmax(0, 1fr); gap: .8rem; }
}
