/* =====================================================================
   Public profile pages, design rules v3 (docs/DESIGN.md): a company
   (/entreprises/<slug>), a product (/produits/<slug>), an association
   (/associations/<slug>) and a person of the team (/equipe/<slug>). The page
   ground, hero, patch, buttons and topic words come from home.css and
   redesign.css. Here: the head of each profile, then one reading column.
   ===================================================================== */

/* ---------- the head ---------- */
.pf-id { display: flex; justify-content: center; align-items: center; gap: 24px; margin-bottom: 32px; }
.pf-logo { display: block; padding: 14px; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 26px -20px rgba(20,46,98,.4); }
/* the box takes the logo's own shape, so both share one centre and the padding is even on every side */
.pf-logo img { display: block; height: 112px; width: auto; max-width: 280px; object-fit: contain; }
.pf-logo.ini { display: grid; place-items: center; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font: 700 26px var(--display); letter-spacing: -.02em;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.pf-hd h1 { max-width: 22ch; }
/* a boxed logo (an association, or initials): on the same top left corner as the company patch, its centre 6px further out, so the disc never reaches the logo inside the padding */
.pf-mark > .pf-logo:not(.bare) + .patch { top: -28px; left: -28px; }   /* same corner as the company page */
:where(body.v3 main) p.pf-facts { margin-top: 16px; font-size: 15px; color: var(--mute); }

/* ---------- the reading column ---------- */
.wrap.pf-col { max-width: calc(760px + 32px); }
body.v3 main .pf-sec { padding-top: 0; }                    /* the hero or the section above already gives the room */
.pf-sec h2 { margin-bottom: 40px; }
.pf-md { font-size: 17px; line-height: 1.6; }
.pf-md > * + * { margin-top: 1em; }
.pf-md strong { font-weight: 600; color: var(--ink); }
.pf-md :is(ul, ol) { padding-left: 1.3em; margin: 0; }
.pf-md ul { list-style: disc; } .pf-md ol { list-style: decimal; }
.pf-md li + li { margin-top: .4em; }
.pf-md :is(h2, h3) { margin-top: 1.6em; font: 600 19px/1.35 var(--body); color: var(--ink); }
.pf-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.pf-gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--wash); }
:where(body.v3 main) p.pf-none { color: var(--mute); }

/* reports: a list of documents, one row each, the arrow its only marker */
.pf-docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pf-docs li { border-bottom: 1px solid var(--line); }
:where(body.v3 main) .pf-docs a { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 4px 24px; padding: 18px 0; color: var(--text); text-decoration: none; }
.pf-rt { font-weight: 600; color: var(--ink); }
.pf-rd { font-size: 15px; color: var(--mute); }
.pf-go { grid-column: 3; width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.pf-docs a:hover .pf-go { transform: translate(3px, -3px); }

/* the companies that support them: the partner tiles of the home bands, still */
.pf-tiles { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 10px; }

/* the end */
.pf-end { text-align: center; }
.pf-end h2 { max-width: 20ch; margin: 0 auto; }
:where(body.v3 main) .pf-end p.pf-line { margin-top: 16px; }   /* the one short line, 16px under its title everywhere */
.pf-end .cta { margin-top: 40px; }

@media (hover: none) { .pf-docs a:hover .pf-go { transform: none; } }

/* ---------- phone: one thing at a time ---------- */
@media (max-width: 760px) {
  .pf-id { gap: 16px; margin-bottom: 24px; }
  .pf-logo { padding: 10px; }
  .pf-logo img { height: 84px; max-width: 220px; }
  .pf-logo.ini { width: 76px; height: 76px; padding: 0; font-size: 21px; }
  .pf-mark > .pf-logo:not(.bare) + .patch { top: -22px; left: -22px; }
  .pf-sec h2 { margin-bottom: 28px; }
  .pf-end .cta { margin-top: 28px; }
  .pf-md { font-size: 16px; }
  .pf-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  :where(body.v3 main) .pf-docs a { grid-template-columns: minmax(0, 1fr) 20px; }
  .pf-rd { grid-row: 2; }
  .pf-go { grid-column: 2; grid-row: 1 / span 2; }
  .pf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .pf-tiles .tile { white-space: normal; min-width: 0; }
}

/* ---------- a person of the team: the open /equipe card at full size ---------- */
.pf-face { width: 160px; height: 160px; margin: 0 auto 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  font: 700 44px var(--display); letter-spacing: -.02em; color: #fff; background: var(--sky); box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--pink-100); }
.pf-face img { width: 100%; height: 100%; object-fit: cover; }
.pf-face.pink { background: var(--pink); } .pf-face.deep { background: var(--ink); } .pf-face.sun { background: var(--sun); color: var(--ink); }
:where(body.v3 main) p.pf-q { font: 600 clamp(20px, 2.2vw, 24px)/1.45 var(--display); letter-spacing: -.01em; color: var(--ink); text-wrap: pretty; }
.pf-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.pf-li { width: 48px; padding: 0; }
.pf-li svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 760px) {
  .pf-face { width: 108px; height: 108px; margin-bottom: 24px; font-size: 30px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--pink-100); }
  :where(body.v3 main) p.pf-q { font-size: 18px; }
}

/* ---------- a company and a product (they also load produits.css, for the product cards) ---------- */
/* the product picture, the patch at its corner (an engaged product carries it) */
.pf-pic { position: relative; width: min(520px, 100%); margin: 0 auto 32px; }
.pf-pic .pr-pic { border-radius: 18px; box-shadow: 0 0 0 1px rgba(20,46,98,.05), 0 18px 36px -24px rgba(20,46,98,.45); }
.pf-pic .pr-pic svg { width: 44px; height: 44px; }
.pf-pic > .patch { position: absolute; top: -14px; right: -14px; }
/* a company: its logo as it is (many carry their own coloured square, so no white box), the patch on its corner,
   « Entreprise engagée depuis 2026 » under the name (Matisse, 27 Oct.) */
.pf-mark { position: relative; display: inline-block; }
.pf-mark > .patch { position: absolute; top: -28px; left: -28px; }   /* half outside the logo's corner, never over it */
.pf-logo.bare { display: block; width: auto; height: auto; padding: 0; background: none; border: 0; border-radius: 14px; box-shadow: none; overflow: hidden; }
.pf-logo.bare img { display: block; height: 96px; width: auto; max-width: 260px; max-height: none; object-fit: contain; }
:where(body.v3 main) p.pf-since { margin-top: 12px; font: 600 15px/1.3 var(--body); color: var(--ink); }
/* the product cards of /produits, three a row in the reading column, each with the association it funds under it,
   joined by a dotted pink line */
.pf-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }   /* row gap = the line's length */
/* card and block sit on rows shared across the line (subgrid), so the cards and the blocks of a row line up */
.pf-pair { display: grid; grid-row: span 2; grid-template-rows: subgrid; min-width: 0; }
.pf-pair > .pf-for { position: relative; margin-bottom: 12px; }   /* 28 + 12 = 40px between two rows of products */
/* the 1 % going from the product to its association: a pink dotted line drawn up from the block's top edge through
   the list's 28px row gap to the card's bottom edge, so it touches both; 28px = 4 dots of 4px with 4px between them */
.pf-pair > .pf-for::before { content: ""; position: absolute; left: calc(50% - 1px); bottom: 100%; width: 2px; height: 29px;   /* 28 + the 1px border */
  background: repeating-linear-gradient(to bottom, var(--pink) 0 4px, transparent 4px 8px); }
/* the association under its product: its logo at a readable size, its full name; the whole block opens its page */
.pf-for { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
:where(body.v3 main) a.pf-for { text-decoration: none; transition: border-color .25s var(--ease), box-shadow .3s var(--ease); }
@media (hover: hover) { :where(body.v3 main) a.pf-for:hover { border-color: var(--sky-100); box-shadow: 0 12px 24px -18px rgba(20,46,98,.45); } }
.pf-for > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pf-for small { font-size: 12.5px; color: var(--mute); }
.pf-for b { font: 600 15px/1.3 var(--body); color: var(--ink); overflow-wrap: anywhere; }
.pf-al { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 10px; background: #fff; overflow: hidden; }
.pf-al img { width: 100%; height: 100%; object-fit: contain; }
.pf-al.ini { border-radius: 50%; background: var(--ink); color: #fff; font: 700 15px var(--display); letter-spacing: -.02em; }
.pf-al.fonds { border-radius: 50%; background: var(--pink-100); }
.pf-al.fonds svg { width: 62%; height: 62%; }

@media (max-width: 760px) {
  .pf-pic { margin-bottom: 24px; }
  .pf-pic > .patch { top: 10px; right: 10px; }
  .pf-mark > .patch { --s: 44px; top: -22px; left: -22px; }
  .pf-logo.bare img { height: 76px; max-width: 200px; }
  :where(body.v3 main) p.pf-since { font-size: 14px; }
  .pf-list { grid-template-columns: minmax(0, 1fr); }
  .pf-for { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .pf-al { width: 44px; height: 44px; }
  :where(body.v3 main) .pf-addr a { min-height: 44px; }
  :where(body.v3 main) .pf-end p.pf-line { margin-top: 16px; }
}
@media (max-width: 760px) { .pf-pic .pr-pic:not(:has(img)) { aspect-ratio: auto; height: 120px; } }
