/* ==========================================================
   Tala Niang — Portfolio sur ordinateur (inc/portfolio-ordi.php)
   1 l'en-tête plein écran : la couverture des séries en grand, coins arrondis, le grand titre,
     les pilules et les cartes en verre ; 2 « Mes séries » : les cartes décalées.
   Noir, crème et verre : les couleurs du site (style.css). Le téléphone garde ses écrans de séries.
   ========================================================== */

.pf-ordi { display: none; }

@media (min-width: 901px) and (min-height: 521px) {
  /* la page : ni l'en-tête du site (la barre est dans la photo) ni l'ancienne galerie */
  .vue-series .entete,
  .vue-series .wp-block-post-content > :not(.pf-ordi) { display: none; }
  .vue-series .wp-site-blocks > main, .vue-series .wp-block-post-content { margin: 0; padding-top: 0; }
  html.vue-series, html.vue-series body { background: var(--fond); }
  .pf-ordi { display: block; position: relative; z-index: 3; background: var(--fond); color: var(--texte); }

  /* ---------- 1. L'en-tête plein écran ---------- */
  .pf-heros {
    --bord: clamp(10px, 1vw, 16px);
    --marge: clamp(24px, 2.4vw, 44px);
    position: relative; isolation: isolate; overflow: hidden;
    height: calc(100svh - 2 * var(--bord)); min-height: 600px; max-height: 1300px;
    margin: var(--bord); border-radius: clamp(20px, 1.8vw, 30px);
    background: #0b0b0b;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto auto;
    padding: var(--marge); column-gap: 24px;
  }
  .pf-fonds { position: absolute; inset: 0; z-index: -1; }
  .pf-fond { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease); }
  .pf-fond.actif { opacity: 1; }
  .pf-fond img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
  .pf-fonds::after {                                  /* un dégradé sombre en haut et en bas : le texte reste lisible */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, .66) 100%),
      linear-gradient(30deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 38%);   /* sans titre : le centre de la photo reste clair */
  }

  /* la barre du haut */
  .pf-barre { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .pf-logo { justify-self: start; display: block; line-height: 0; }
  .pf-logo-img { width: clamp(92px, 7.4vw, 124px); height: auto; }
  .pf-menu ul { display: flex; gap: clamp(22px, 2.6vw, 44px); margin: 0; padding: 0; list-style: none; }
  .pf-menu a {
    display: inline-flex; align-items: center; min-height: 44px; padding-bottom: 2px; border-bottom: 1px solid transparent;
    color: var(--texte); font-size: clamp(13px, 1vw, 16px); letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .35); transition: opacity .3s var(--ease);
  }
  .pf-menu ul:hover a { opacity: .6; }
  .pf-menu a:hover, .pf-menu a[aria-current] { opacity: 1; }
  .pf-menu a[aria-current] { border-bottom-color: var(--texte); }
  .pf-reserver { justify-self: end; }

  /* les pilules en verre : « Réserver » (barre), « Réserver une séance » (lumineuse), « Voir les séries » (discrète) */
  .pf-reserver, .pf-pilule {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 999px; white-space: nowrap;
    color: #fff; font-family: var(--police); font-weight: 400; letter-spacing: .01em; text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 20px rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
    transition: background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
  }
  .pf-reserver { height: 44px; padding: 0 21px; font-size: 16px; }
  .pf-pilule { height: 54px; padding: 0 27px; font-size: 17px; }
  .pf-pilule svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
  .pf-reserver:hover, .pf-pilule:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .02) 55%), rgba(255, 255, 255, .28);
    border-color: rgba(255, 255, 255, .6); transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 30px rgba(0, 0, 0, .35);
  }
  .pf-pilule:hover svg { transform: translateX(3px); }
  .pf-pilule.discret {
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 55%), rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 20px rgba(0, 0, 0, .22);
  }
  .pf-pilule.discret:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 55%), rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .38);
  }

  /* le titre « Portfolio » : invisible, la photo prend toute la place (il reste pour Google et les lecteurs d'écran) */
  .pf-titre { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .pf-boutons { grid-column: 2; grid-row: 3; align-self: end; display: flex; gap: 12px; margin: 0 0 clamp(18px, 3vh, 34px); }

  /* en bas à gauche : la carte en verre */
  .pf-carte {
    grid-column: 1; grid-row: 4; justify-self: start; align-self: end;
    display: flex; align-items: stretch; gap: 0; width: clamp(320px, 24vw, 400px); padding: 6px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 55%), rgba(0, 0, 0, .32);
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 20px 50px rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  }
  .pf-carte-mono {
    flex: none; display: grid; place-items: center; width: clamp(96px, 7.6vw, 128px); aspect-ratio: 1; border-radius: 17px;
    background: rgba(0, 0, 0, .72); color: var(--texte);
  }
  .pf-carte-mono svg { width: 42%; height: auto; }
  .pf-carte-texte { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 12px 0 18px; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.3; }
  .pf-carte-texte > span:first-child { white-space: nowrap; }
  .pf-carte-serie { color: var(--texte-doux); font-size: clamp(13px, 1vw, 15px); }
  .pf-fleches { align-self: flex-end; display: flex; gap: 2px; padding: 0 4px 2px 0; }
  .pf-fleches button {
    display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none;
    color: var(--texte); font: 400 15px/1 var(--police); cursor: pointer; transition: background-color .25s var(--ease);
  }
  .pf-fleches button:hover { background: rgba(255, 255, 255, .14); }
  .pf-fleches svg { width: 17px; height: 17px; }
  .pf-prec svg { transform: scaleX(-1); }

  /* en bas à droite : les trois séries suivantes */
  .pf-apercus {
    grid-column: 2; grid-row: 4; align-self: end; justify-self: end; display: flex; align-items: center; gap: 10px;
    margin-right: calc(-1 * var(--marge) - 30px);             /* la dernière carte sort du cadre, comme une suite */
  }
  .pf-apercu {
    position: relative; overflow: hidden; flex: none; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px;
    width: clamp(118px, 9.4vw, 160px); aspect-ratio: 1; background: #111; cursor: pointer;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35); transition: transform .3s var(--ease), border-color .3s var(--ease);
  }
  .pf-apercu:first-child { width: clamp(138px, 11vw, 190px); aspect-ratio: 4 / 5; }
  .pf-apercu:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .4); }
  .pf-apercu img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .5s var(--ease); }
  .pf-apercu-nom {
    position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 5px 9px; border-radius: 999px; font-size: 11.5px; color: #fff;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }

  /* ---------- 2. Mes séries ---------- */
  .pf-series { padding: clamp(80px, 10vw, 160px) var(--pad) clamp(70px, 8vw, 130px); overflow: hidden; }
  .pf-etiquettes { display: flex; justify-content: space-between; gap: 20px; margin-bottom: clamp(40px, 5vw, 80px); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-doux); }
  .pf-tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .pf-grand { margin: 0; font: 300 clamp(40px, 4vw, 76px)/1 var(--police); letter-spacing: -.03em; text-transform: uppercase; color: var(--texte); }
  .pf-grand > span { display: block; }
  .pf-ligne-fleche { display: flex !important; align-items: center; gap: .22em; }
  .pf-ligne-fleche svg { width: .82em; height: .82em; stroke-width: 1.1; flex: none; }
  .pf-texte { justify-self: end; max-width: 25em; margin: 0; font-size: clamp(18px, 1.5vw, 25px); line-height: 1.3; letter-spacing: -.01em; color: var(--texte); }
  .pf-texte span { color: rgba(232, 230, 221, .5); }

  .pf-rangee { position: relative; display: flex; gap: clamp(24px, 3vw, 56px); margin-top: clamp(60px, 7vw, 110px); }
  .pf-defiler { flex: none; align-self: flex-start; margin-top: 10px; }
  .pf-rangee:not(.deborde) .pf-defiler { visibility: hidden; }
  .pf-piste {
    flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: clamp(20px, 2vw, 34px);
    overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: none;
    padding-bottom: 10px; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad);
  }
  .pf-piste::-webkit-scrollbar { display: none; }

  /* les cartes : largeur commune, hauteurs et hauteurs de départ décalées */
  .pf-serie { --u: clamp(300px, 25vw, 470px); flex: none; width: clamp(240px, 19vw, 360px); scroll-snap-align: start; color: var(--texte); text-decoration: none; }
  .pf-serie:nth-child(4n + 1) { margin-top: calc(var(--u) * .38); --k: 1; }
  .pf-serie:nth-child(4n + 2) { margin-top: 0;                    --k: 1.32; }
  .pf-serie:nth-child(4n + 3) { margin-top: calc(var(--u) * .5);  --k: 1.12; }
  .pf-serie:nth-child(4n + 4) { margin-top: calc(var(--u) * .12); --k: 1.4; }
  .pf-serie-photo {
    position: relative; display: block; overflow: hidden; height: calc(var(--u) * var(--k)); border-radius: clamp(22px, 1.8vw, 30px);
    background: #111; box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
  }
  .pf-serie-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--ease); }
  .pf-serie:hover .pf-serie-photo img { transform: scale(1.04); }
  .pf-serie-photo::after {                                   /* la phrase reste lisible en haut de la photo */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 40%);
  }
  .pf-serie-pilule {
    position: absolute; z-index: 1; left: 16px; top: 16px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; color: #fff;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  }
  .pf-serie-phrase {
    position: absolute; z-index: 1; left: 20px; right: 20px; top: 62px;
    font-size: clamp(16px, 1.25vw, 20px); line-height: 1.25; letter-spacing: -.01em; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
  }
  .pf-serie-pied { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 20px; }
  .pf-serie-nom { font: 300 clamp(20px, 1.6vw, 28px)/1.1 var(--police); letter-spacing: -.01em; text-transform: uppercase; }

  /* le petit bouton rond en verre « → » */
  .pf-rond {
    flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; color: #fff; cursor: pointer;
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 55%), rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
    transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  }
  .pf-rond svg { width: 18px; height: 18px; }
  .pf-rond:hover, .pf-serie:hover .pf-rond { background-color: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); transform: translateY(-2px); }

  .pf-ordi a:focus-visible, .pf-ordi button:focus-visible { outline: 1px solid var(--texte); outline-offset: 4px; }

  /* ---------- Apparitions : un fondu et un léger glissement ---------- */
  @keyframes pf-monte { from { opacity: 0; transform: translateY(24px); } }
  @keyframes pf-fondu { from { opacity: 0; } }
  .pf-fond.actif img { animation: pf-fondu 1.2s var(--ease) both; }
  .pf-barre { animation: pf-fondu 1s var(--ease) .1s both; }
  .pf-boutons { animation: pf-monte 1s var(--ease) .5s both; }
  .pf-carte, .pf-apercus { animation: pf-monte 1s var(--ease) .65s both; }
  html.js .pf-apparait, html.js .pf-serie { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  html.js .pf-apparait.vu, html.js .pf-serie.vu { opacity: 1; transform: none; }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pf-reserver, .pf-pilule, .pf-pilule.discret, .pf-carte, .pf-rond, .pf-apercu-nom, .pf-serie-pilule { background: rgba(20, 20, 20, .75); }
  }
}

/* écrans plus bas (13 pouces) : un peu moins de marge, le titre suit la hauteur */
@media (min-width: 901px) and (min-height: 521px) and (max-height: 760px) {
  .pf-heros { min-height: 560px; }
  .pf-pilule { height: 50px; }
  .pf-apercu:first-child { width: clamp(120px, 9.4vw, 160px); }
  .pf-apercu { width: clamp(100px, 8vw, 132px); }
  .pf-carte-mono { width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-ordi *, .pf-ordi *::before, .pf-ordi *::after { animation: none !important; transition: none !important; }
  html.js .pf-apparait, html.js .pf-serie { opacity: 1; transform: none; }
  .pf-piste { scroll-behavior: auto; }
}

