/* ==========================================
   PAGES PORTFOLIO PAR PROJETS (studio-ia.html / tournages.html)
   Couleur d'accent : bleu néon pour Studio IA, rouge néon pour Tournages.
   ========================================== */
.pf-page { --pf-accent: var(--neon-blue); --pf-accent-rgb: 31, 182, 255; --pf-card: #0b0b10; --pf-line: rgba(245, 245, 247, 0.1); --pf-muted: rgba(245, 245, 247, 0.55); }
.pf-page[data-portfolio="tournages"] { --pf-accent: var(--neon-red); --pf-accent-rgb: 255, 45, 85; }
body.pf-body { background: var(--bg-color); }

.pf-wrap { max-width: 1440px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 80px; }

/* ---------- En-tête ---------- */
.pf-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.pf-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.05; margin: 0; color: var(--pf-accent);
    text-shadow: 0 0 10px rgba(var(--pf-accent-rgb), .85), 0 0 26px rgba(var(--pf-accent-rgb), .6), 0 0 50px rgba(var(--pf-accent-rgb), .4), 0 0 90px rgba(var(--pf-accent-rgb), .25);
    animation: titleBioGlow 3.2s ease-in-out infinite; }
.pf-subtitle { font-family: var(--font-tech); font-size: .85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--pf-muted); margin: 6px 0 0; max-width: 60ch; }
.pf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-btn { font-family: var(--font-tech); font-weight: 600; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
    padding: 10px 18px; border-radius: 999px; border: 1px solid var(--pf-line); background: transparent; color: var(--white); }
.pf-btn:hover { border-color: var(--pf-accent); box-shadow: 0 0 14px rgba(var(--pf-accent-rgb), .35); }
.pf-btn.pf-green { border-color: var(--neon-green); color: var(--neon-green); }

.pf-pitch { margin: 34px 0 0; font-family: var(--font-text); font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 600; max-width: 70ch; line-height: 1.4; color: var(--white); }
.pf-pitch strong { color: var(--pf-accent); font-weight: 700; }
.pf-refs { margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--pf-line); border-bottom: 1px solid var(--pf-line);
    display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 1px; color: rgba(245, 245, 247, .42); }
.pf-refs-label { font-family: var(--font-tech); font-size: .7rem; letter-spacing: 2px; color: var(--pf-muted); }
.pf-refs-viewport, .pf-refs-track { display: contents; }
.pf-refs-dup { display: none; }
/* Smartphone : les univers défilent doucement sur une seule ligne au lieu de s'empiler */
@media (max-width: 760px) {
    .pf-refs { display: block; font-size: 1.1rem; padding: 12px 0; }
    .pf-refs-label { display: block; margin-bottom: 8px; }
    .pf-refs-viewport { display: block; overflow: hidden;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); }
    .pf-refs-track { display: flex; width: max-content; animation: pfTicker 30s linear infinite; }
    .pf-refs-track span { display: inline; padding-right: 28px; white-space: nowrap; }
}
@keyframes pfTicker { to { transform: translateX(-50%); } }
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
    .pf-refs-track { animation: none; }
    .pf-refs-viewport { overflow-x: auto; }
}

/* ---------- Filtres ---------- */
.pf-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 22px; }
/* Boutons en verre : fond translucide flouté, liseré et halo dans la couleur néon du titre */
/* Au repos : transparent. Sélectionné : verre néon de la couleur du titre. */
.pf-chip { font-family: var(--font-tech); font-weight: 600; font-size: .78rem; letter-spacing: .8px; text-transform: uppercase; padding: 9px 16px; border-radius: 999px;
    color: rgba(245, 245, 247, .7); background: transparent; border: 1px solid rgba(245, 245, 247, .16);
    -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease, color .3s ease, text-shadow .3s ease; }
.pf-chip:hover { color: var(--white); border-color: rgba(var(--pf-accent-rgb), .55); }
.pf-chip[aria-pressed="true"] { color: var(--white); border-color: var(--pf-accent);
    background: linear-gradient(180deg, rgba(var(--pf-accent-rgb), .38), rgba(var(--pf-accent-rgb), .14));
    text-shadow: 0 0 10px rgba(var(--pf-accent-rgb), .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 16px rgba(var(--pf-accent-rgb), .3), 0 0 14px rgba(var(--pf-accent-rgb), .6), 0 0 34px rgba(var(--pf-accent-rgb), .3); }
.pf-chip:focus-visible, .pf-btn:focus-visible, .pf-card:focus-visible { outline: 2px solid var(--neon-green); outline-offset: 3px; }

/* ---------- Grille de projets ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.pf-card { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--pf-card); border: 1px solid var(--pf-line);
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
.pf-card:hover { transform: translateY(-4px); border-color: rgba(var(--pf-accent-rgb), .55); box-shadow: 0 0 30px rgba(var(--pf-accent-rgb), .18); }
.pf-card.featured { grid-column: span 2; aspect-ratio: 16 / 10; }
@media (max-width: 760px) { .pf-card.featured { grid-column: auto; aspect-ratio: 4 / 5; } }
.pf-cover, .pf-cover-alt, .pf-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-cover, .pf-cover-alt { transition: opacity .6s ease, transform 1.2s ease; }
.pf-cover-alt { opacity: 0; }
.pf-card:hover .pf-cover-alt { opacity: 1; }
.pf-card:hover .pf-cover { transform: scale(1.04); }
.pf-slide { opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 4s ease; }
.pf-slide.on { opacity: 1; transform: scale(1); }
.pf-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 3, 5, .92) 0%, rgba(3, 3, 5, .35) 38%, rgba(3, 3, 5, 0) 62%); pointer-events: none; }
.pf-info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; display: grid; gap: 6px; }
.pf-info h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 2.3vw, 2.1rem); line-height: 1; margin: 0; letter-spacing: .5px; color: var(--white); }
.pf-kind { font-family: var(--font-tech); font-size: .72rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pf-accent); }
.pf-play { position: absolute; top: 14px; right: 14px; z-index: 2; font-family: var(--font-tech); font-size: .65rem; letter-spacing: 1px; font-weight: 700;
    padding: 4px 9px; border-radius: 999px; background: rgba(3, 3, 5, .6); border: 1px solid rgba(48, 255, 102, .6); color: var(--neon-green); }

/* ---------- Panneau projet ---------- */
.pf-panel { position: fixed; inset: 0; z-index: 50; background: rgba(3, 3, 5, .97); overflow-y: auto; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.pf-panel.open { opacity: 1; pointer-events: auto; }
.pf-panel-inner { max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }
.pf-panel-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; position: sticky; top: 0; padding: 24px 0 18px;
    background: rgba(3, 3, 5, .92); backdrop-filter: blur(8px); z-index: 2; }
.pf-panel-client { font-family: var(--font-tech); font-size: .72rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pf-accent); }
.pf-panel-head h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.4rem); margin: 4px 0 6px; line-height: 1; color: var(--white); }
.pf-panel-head p { margin: 0; font-family: var(--font-text); font-size: 1.12rem; line-height: 1.45; max-width: 75ch; color: rgba(245, 245, 247, .82); }
.pf-panel-nav { display: flex; gap: 8px; }
.pf-desc-toggle { display: none; }
.pf-minibar { display: none; }
/* Smartphone : une fine barre fixe (flèches, fermer, petit titre) + le titre et la description
   qui défilent normalement avec la page. Rien ne change de taille pendant le défilement : pas de saut. */
@media (max-width: 760px) {
    .pf-minibar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 3; height: 56px;
        margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 0 clamp(16px, 4vw, 48px);
        background: rgba(3, 3, 5, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
    .pf-mini-info { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: start;
        opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
    .pf-minibar.show-title .pf-mini-info { opacity: 1; transform: none; pointer-events: auto; }
    .pf-mini-title { max-width: 100%; font-family: var(--font-display); font-size: 1.25rem; line-height: 1; color: var(--white);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pf-mini-toggle { padding: 2px 0; background: none; border: none; cursor: pointer; font-family: var(--font-tech); font-weight: 600;
        font-size: .64rem; letter-spacing: 1.1px; text-transform: uppercase; color: var(--pf-accent); }
    .pf-mini-desc { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: 50vh; overflow-y: auto;
        padding: 14px clamp(16px, 4vw, 48px) 18px; font-family: var(--font-text); font-size: 1rem; line-height: 1.45; color: rgba(245, 245, 247, .88);
        background: rgba(3, 3, 5, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 30px rgba(0, 0, 0, .55); }
    .pf-minibar.desc-drop .pf-mini-desc { display: block; }
    .pf-minibar .pf-panel-nav { flex: none; }
    .pf-minibar .pf-btn { padding: 8px 12px; }
    .pf-panel-head { position: static; display: block; padding: 4px 0 6px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .pf-panel-head h3 { font-size: 2rem; }
    .pf-panel-head p { font-size: 1rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    .pf-panel-head.desc-open p { display: block; -webkit-line-clamp: unset; }
    .pf-desc-toggle { display: inline-block; margin-top: 8px; padding: 4px 0; background: none; border: none; cursor: pointer;
        font-family: var(--font-tech); font-weight: 600; font-size: .72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pf-accent); }
    .pf-panel-head.desc-fits .pf-desc-toggle { display: none; }
}
.pf-masonry { columns: 3 280px; column-gap: 14px; margin-top: 18px; }
.pf-masonry > * { break-inside: avoid; margin: 0 0 14px; width: 100%; display: block; border-radius: 10px; background: var(--pf-card); }

@media (prefers-reduced-motion: reduce) {
    .pf-title { animation: none; }
    .pf-card, .pf-cover, .pf-cover-alt, .pf-slide, .pf-panel { transition: none; }
}
