/* Portfolio public par entreprise (lot P1, 06/10/2026).
   Style neutre de la plateforme : le nom, le logo et les textes viennent
   de la fiche de chaque entreprise. */
:root {
    --pf-accent: #F2B705;
    --pf-dark: #161616;
    --pf-text: #222;
    --pf-muted: #6b6b6b;
    --pf-bg: #f6f6f4;          /* fond : personnalisable par l'entreprise (style du <body>) */
    --pf-on-bg: #161616;       /* texte posé directement sur le fond : calculé côté serveur */
    --pf-on-bg-muted: rgba(22, 22, 22, .66);
    --pf-card: #fff;           /* les cartes gardent une surface neutre, lisible sur tout fond */
    --pf-border: #e5e5e1;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--pf-bg);
    color: var(--pf-text);
    line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; }

/* En-tête */
.pf-hero {
    background: var(--pf-dark);
    color: #fff;
    text-align: center;
    padding: 40px 16px 44px;
    border-bottom: 4px solid var(--pf-accent);
}
.pf-logo { display: block; max-width: 180px; max-height: 110px; margin: 0 auto 16px; object-fit: contain; }
.pf-hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: 0.3px; }
.pf-tagline { max-width: 640px; margin: 10px auto 0; color: #d6d6d6; font-size: 1.05rem; }
.pf-subtitle { margin-top: 14px; color: var(--pf-accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.85rem; }
.pf-hero-small { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; text-align: left; }
.pf-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.pf-logo-small { max-height: 44px; max-width: 120px; margin: 0; }
.pf-back { color: var(--pf-accent); text-decoration: none; font-weight: 600; }

main.pf-main { max-width: 1100px; margin: 0 auto; padding: 28px 16px 48px; }
.pf-empty { text-align: center; color: var(--pf-on-bg-muted); padding: 60px 16px; font-size: 1.1rem; }
.pf-area { margin-top: 6px; color: #d6d6d6; }
.pf-intro { max-width: 760px; margin: 0 auto 24px; text-align: center; color: var(--pf-on-bg); font-size: 1.05rem; white-space: pre-line; }
.pf-section-title { color: var(--pf-on-bg); font-size: 1.3rem; margin: 8px 0 14px; }
.pf-brand-by { font-weight: 400; font-size: 0.85rem; opacity: 0.8; }

/* Filtres : surface neutre (lisible sur tout fond) ; panneau repliable sur téléphone */
.pf-filters-panel { background: var(--pf-card); border-radius: 14px; padding: 4px 16px; margin-bottom: 18px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05); }
.pf-filters-panel > summary { cursor: pointer; padding: 12px 0; font-weight: 700; list-style: none; }
.pf-filters-panel > summary::-webkit-details-marker { display: none; }
.pf-filters-panel > summary::after { content: '▾'; float: right; transition: transform 0.2s; }
.pf-filters-panel[open] > summary::after { transform: rotate(180deg); }
.pf-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; padding-bottom: 14px; }
.pf-chips small { opacity: 0.7; font-weight: 400; }
.pf-button {
    display: inline-block; padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--pf-dark); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
}

/* Barre : nombre de résultats + sélecteur Grille / Grand */
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pf-count { color: var(--pf-on-bg-muted); font-weight: 600; }
.pf-mode { display: inline-flex; background: var(--pf-card); border-radius: 999px; padding: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.pf-mode[hidden] { display: none; }
.pf-mode button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
    background: transparent; color: var(--pf-dark); font: inherit; font-weight: 600; cursor: pointer;
}
.pf-mode button[aria-pressed="true"] { background: var(--pf-dark); color: #fff; }
.pf-mode button:focus-visible { outline: 2px solid var(--pf-accent); outline-offset: 2px; }

/* Réalisations : mode Grille (2 colonnes sur téléphone) et mode Grand (1 par ligne) */
.pf-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .pf-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; } }
.pf-item { display: flex; flex-direction: column; background: var(--pf-card); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.pf-item-link { display: flex; flex-direction: column; text-decoration: none; color: var(--pf-text); flex: 1 1 auto; }
.pf-item-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #eee; }
.pf-item-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 16px; }
.pf-item-title { font-size: 1.02rem; color: var(--pf-dark); }
.pf-item-place { color: #8a6a00; font-weight: 600; font-size: 0.88rem; }
.pf-item-meta { color: var(--pf-muted); font-size: 0.85rem; }
.pf-item-detail { display: none; }   /* détail : mode Grand seulement */
.pf-item-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 14px 14px; font-size: 0.85rem; color: var(--pf-muted); }
.pf-item-by strong { color: var(--pf-dark); }
.pf-item-by a { color: var(--pf-dark); font-weight: 600; }
.pf-item-by-logo { max-height: 22px; max-width: 70px; object-fit: contain; }
.pf-item-by-label { width: 100%; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; }

.pf-list[data-mode="large"] { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin: 0 auto; gap: 28px; }
.pf-list[data-mode="large"] .pf-item-img { aspect-ratio: auto; max-height: 80vh; object-fit: cover; }
.pf-list[data-mode="large"] .pf-item-body { padding: 18px 22px 22px; gap: 6px; }
.pf-list[data-mode="large"] .pf-item-title { font-size: clamp(1.2rem, 3vw, 1.6rem); }
.pf-list[data-mode="large"] .pf-item-detail { display: block; color: #444; }
.pf-list[data-mode="large"] .pf-item-products { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-list[data-mode="large"] .pf-item-by { padding: 0 22px 18px; }
@media (max-width: 699px) {
    .pf-list[data-mode="large"] { margin: 0 -8px; }
    .pf-item-body { padding: 10px 10px 12px; }
    .pf-item-title { font-size: 0.95rem; }
}

/* Pagination */
.pf-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin-top: 28px; color: var(--pf-on-bg); }
.pf-pagination a { background: var(--pf-card); color: var(--pf-dark); padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; }

/* Carte des poseurs (galerie) */
.pf-map-section { margin-bottom: 30px; }
.pf-map { height: min(60vh, 460px); border-radius: 16px; overflow: hidden; background: #e8e8e4; z-index: 0; }
.pf-map-note { font-size: 0.8rem; color: var(--pf-on-bg-muted); margin-top: 6px; }
.pf-company-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pf-company-list a { display: inline-block; background: var(--pf-card); color: var(--pf-dark); padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.pf-company-list small { font-weight: 400; opacity: 0.7; }

/* Fiche d'un poseur : panneau bas (téléphone), carte flottante à droite (ordinateur) */
.pf-company-card {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; max-height: 78vh; overflow-y: auto;
    background: var(--pf-card); color: var(--pf-text); border-radius: 18px 18px 0 0; padding: 20px 18px 24px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
.pf-company-card[hidden] { display: none; }
@media (min-width: 900px) {
    .pf-company-card { left: auto; right: 24px; bottom: 24px; width: 380px; border-radius: 18px; max-height: calc(100vh - 48px); }
}
.pf-card-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f0f0ec; cursor: pointer; font-size: 16px; }
.pf-card-head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.pf-card-logo { max-width: 80px; max-height: 56px; object-fit: contain; }
.pf-card-name { font-size: 1.2rem; color: var(--pf-dark); }
.pf-card-area { color: #8a6a00; font-weight: 600; font-size: 0.9rem; }
.pf-card-desc { margin-top: 10px; color: #444; white-space: pre-line; }
.pf-card-count { margin-top: 10px; font-weight: 700; }
.pf-card-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 14px; }
.pf-card-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.pf-card-secondary { display: block; margin-top: 10px; font-weight: 600; }
.pf-card-contact { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pf-border); }
.pf-card-contact a { font-weight: 600; text-decoration: none; color: var(--pf-dark); }
.pf-filter { display: flex; flex-direction: column; gap: 6px; border: 0; font-size: 0.9rem; font-weight: 600; }
.pf-filter select {
    min-height: 44px; padding: 0 12px; border: 1px solid #cfcfca; border-radius: 10px;
    background: #fff; font: inherit; font-weight: 400; min-width: 220px;
}
.pf-chips { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.pf-chips legend { width: 100%; margin-bottom: 6px; }
.pf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-chip span {
    display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid #cfcfca;
    background: #fff; font-weight: 500; cursor: pointer;
}
.pf-chip input:checked + span { background: var(--pf-dark); border-color: var(--pf-dark); color: #fff; }
.pf-chip input:focus-visible + span { outline: 2px solid var(--pf-accent); outline-offset: 2px; }
.pf-reset { font-weight: 600; padding-bottom: 10px; }

/* Page d'une réalisation */
.pf-real { background: var(--pf-card); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07); }
.pf-real-media { background: #111; }
.pf-cover { width: 100%; display: block; max-height: 75vh; object-fit: cover; }
.pf-real-body { padding: 24px 26px 28px; }
.pf-real-body h1 { font-size: clamp(1.4rem, 4vw, 2rem); color: var(--pf-dark); }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: #8a6a00; font-weight: 600; margin-top: 4px; }
.pf-summary { margin-top: 14px; font-size: 1.1rem; }
.pf-description { margin-top: 10px; color: #444; white-space: pre-line; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; }
.pf-facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--pf-muted); }
.pf-facts dd { font-weight: 600; }
.pf-products { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-product { background: var(--pf-dark); color: var(--pf-accent); border-radius: 20px; padding: 5px 12px; font-size: 0.9rem; font-weight: 600; }
.pf-product small { color: #fff; font-weight: 500; }

/* Avant / après */
.pf-compare { position: relative; overflow: hidden; user-select: none; touch-action: pan-y; background: #111; }
.pf-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* n° 52 b : la photo Avant est dans un cadre découpé (le recadrage éventuel s'applique à l'image, pas à la découpe) */
.pf-compare .pf-before { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.pf-compare .pf-before img { transform-origin: 50% 50%; }
.pf-divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 4px; margin-left: -2px; background: var(--pf-accent); pointer-events: none; }
.pf-divider::after {
    content: '⟷'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 46px; height: 46px; border-radius: 50%; background: var(--pf-accent); color: var(--pf-dark);
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
}
.pf-compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.pf-tag { position: absolute; top: 14px; padding: 6px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.72); font-weight: 800; letter-spacing: 1px; font-size: 0.9rem; pointer-events: none; }
.pf-tag-left { left: 14px; color: #fff; }
.pf-tag-right { right: 14px; color: var(--pf-accent); }

/* LOT 3 : Avant / Après côte à côte (deux photos visibles en même temps) */
.pf-side { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #111; }
.pf-side figure { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.pf-side img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-side .pf-tag { top: 10px; }
.pf-side figure:first-child .pf-tag { left: 10px; }
.pf-side figure:last-child .pf-tag { left: auto; right: 10px; }

/* Galerie */
.pf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 22px; }
/* LOT 3 : galerie élégante (photo principale en grand, puis les autres en plus grand format) */
.pf-gallery.pf-showcase { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pf-gallery.pf-showcase button { aspect-ratio: 4 / 3; }
.pf-gallery figure { margin: 0; }
.pf-gallery button { border: none; padding: 0; background: #eee; cursor: zoom-in; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: block; }
.pf-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-gallery figcaption { font-size: 0.8rem; color: var(--pf-muted); margin-top: 4px; }
/* Visuels du Studio Communication : affichés entiers (jamais recadrés) */
.pf-visuals-title { font-size: 1.05rem; margin: 26px 0 0; }
.pf-visuals { margin-top: 10px; }
.pf-visuals button { aspect-ratio: auto; height: auto; background: transparent; }
.pf-visuals img { height: auto; object-fit: contain; }
dialog.pf-lightbox { border: none; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; margin: auto; }
dialog.pf-lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
dialog.pf-lightbox img { max-width: 96vw; max-height: 90vh; display: block; border-radius: 8px; }
dialog.pf-lightbox button {
    position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
    border: none; background: var(--pf-accent); color: var(--pf-dark); font-size: 22px; font-weight: 700; cursor: pointer;
}
/* n° 53 : photo précédente / suivante (en boucle) et compteur */
dialog.pf-lightbox .pf-lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; line-height: 1; padding-bottom: 4px; opacity: .92; }
dialog.pf-lightbox .pf-lb-prev { left: 12px; right: auto; }
dialog.pf-lightbox .pf-lb-next { right: 12px; }
dialog.pf-lightbox .pf-lb-nav:hover, dialog.pf-lightbox .pf-lb-nav:focus-visible { opacity: 1; }
dialog.pf-lightbox .pf-lb-count { position: fixed; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
dialog.pf-lightbox.is-single .pf-lb-nav, dialog.pf-lightbox.is-single .pf-lb-count { display: none; }
@media (max-width: 600px) {
    dialog.pf-lightbox .pf-lb-nav { width: 44px; height: 44px; font-size: 28px; }
    dialog.pf-lightbox .pf-lb-prev { left: 6px; }
    dialog.pf-lightbox .pf-lb-next { right: 6px; }
}

/* Pied de page */
.pf-footer { background: var(--pf-dark); color: #bbb; text-align: center; padding: 28px 16px; border-top: 4px solid var(--pf-accent); }
.pf-footer-name { color: #fff; font-weight: 700; }
.pf-footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 6px; }
.pf-footer-contact a { text-decoration: none; }
.pf-footer-cta { display: inline-block; margin-top: 14px; padding: 12px 24px; background: var(--pf-accent); color: var(--pf-dark); border-radius: 30px; text-decoration: none; font-weight: 700; }

@media (max-width: 600px) {
    .pf-real-body { padding: 18px 16px 22px; }
    .pf-gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .pf-filter select { min-width: 0; width: 100%; }
    .pf-filters > label { width: 100%; }
}

/* Studio n° 66 (29/10/2026) : cadrage de la photo principale réglé dans le Studio (point gardé en vue et zoom) */
.pf-item-frame { display: block; overflow: hidden; }
.pf-item-img { object-position: var(--fx, 50%) var(--fy, 50%); transform: scale(var(--fz, 1)); transform-origin: var(--fx, 50%) var(--fy, 50%); }

/* Studio n° 67 (29/10/2026) : cadrage aussi en mode Grand et sur la grande photo de la page de la réalisation (cadre 4:3, comme les cartes) */
.pf-list[data-mode="large"] .pf-item-img { aspect-ratio: 4 / 3; max-height: none; }
.pf-cover-frame { overflow: hidden; aspect-ratio: 4 / 3; width: min(100%, calc(75vh * 4 / 3)); margin: 0 auto; }
.pf-cover-frame .pf-cover { height: 100%; max-height: none; object-position: var(--fx, 50%) var(--fy, 50%); transform: scale(var(--fz, 1)); transform-origin: var(--fx, 50%) var(--fy, 50%); }

/* n° 76 (18/11/2026) : carte de visite du portfolio (bas de page) : QR code du portfolio + « Ajouter à mes contacts » */
.pf-vcard { max-width: 480px; margin: 0 auto 18px; }
.pf-vcard-box { display: flex; align-items: center; gap: 16px; background: #fff; color: var(--pf-dark); text-align: left; border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); border-left: 5px solid var(--pf-accent); }
.pf-vcard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.pf-vcard-logo { max-width: 110px; max-height: 44px; object-fit: contain; margin-bottom: 6px; }
.pf-vcard-name { font-weight: 800; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.pf-vcard-job { color: #8a6a00; font-weight: 700; font-size: 0.9rem; }
.pf-vcard-area { color: var(--pf-muted); font-size: 0.85rem; margin-bottom: 4px; }
.pf-vcard-line { color: var(--pf-dark); text-decoration: none; font-size: 0.9rem; overflow-wrap: anywhere; }
.pf-vcard-qr { flex: 0 0 auto; width: 118px; }
.pf-vcard-qr svg { display: block; width: 100%; height: auto; }
.pf-vcard-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.pf-vcard-btn { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.pf-vcard-btn-main { background: var(--pf-accent); border-color: var(--pf-accent); color: var(--pf-dark); }
@media (max-width: 420px) {
    .pf-vcard-box { padding: 14px; gap: 12px; }
    .pf-vcard-qr { width: 96px; }
}
