/* ── Visionneuse Tchété ─────────────────────────────────────────────────────── */
html.vz-ouverte,html.vz-ouverte body{overflow:hidden;overscroll-behavior:none}
/* « --vz-opacite » : le fond s'éclaircit pendant qu'on fait glisser la photo
   vers le bas pour fermer. Ce nom lui est réservé — il s'appelait « --fond »,
   qui est déjà la couleur de fond du thème : le calcul ne voulait rien dire et
   la visionneuse restait transparente (on voyait la grille à travers). */
.vz{position:fixed;inset:0;z-index:9600;display:none;
  /* La visionneuse est TOUJOURS sur fond noir, même quand le studio a choisi le
     mode jour : une photo se regarde dans le noir. On y refixe donc les
     couleurs de texte. Sans ça, en mode jour, les boutons du haut devenaient
     sombres sur du noir — la flèche retour et la croix étaient invisibles. */
  --texte:#f4eee3; --texte-doux:#cfc6b6; --texte-faible:#a89f8e;
  --text:#f4eee3; --dim:#cfc6b6; --faint:#a89f8e; --faible:#a89f8e;
  --gold:var(--gold-clair);
  --voile-clair:rgba(255,255,255,.12);
  color:var(--texte);
  background:rgba(4,3,2,var(--vz-opacite,1));touch-action:none;user-select:none;-webkit-user-select:none}
.vz.on{display:block;animation:vzEntree .22s ease-out}
@keyframes vzEntree{from{opacity:0}to{opacity:1}}
.vz-scene{position:absolute;inset:0;overflow:hidden;cursor:grab}
.vz.zoomee .vz-scene{cursor:move}
.vz-img{position:absolute;left:50%;top:50%;max-width:none;transform-origin:center center;
  will-change:transform;-webkit-user-drag:none;filter:blur(8px);transition:filter .35s ease}
.vz-img.net{filter:none}
.vz-img.anime{transition:transform .28s cubic-bezier(.2,.7,.2,1),filter .35s ease}

/* barres du haut et du bas, qui s'effacent d'un tap */
.vz-haut,.vz-bas{position:absolute;left:0;right:0;z-index:2;transition:opacity .25s,transform .25s}
.vz-haut{top:0;display:flex;align-items:center;gap:10px;
  padding:calc(10px + env(safe-area-inset-top)) 12px 26px;
  background:linear-gradient(180deg,rgba(4,3,2,.82),rgba(4,3,2,0))}
.vz-titre{flex:1;min-width:0;line-height:1.25}
.vz-titre b{display:block;font-weight:500;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vz-titre span{font-size:.74rem;color:#a89f8e;letter-spacing:.04em}
.vz-outils{display:flex;gap:4px}
.vz-bouton{width:42px;height:42px;border-radius:50%;border:0;background:transparent;color:var(--texte);
  display:grid;place-items:center;cursor:pointer;transition:background .2s}
.vz-bouton:hover{background:var(--voile-clair)}
.vz-bouton.on{color:var(--gold)}
.vz-bouton svg.ic{width:22px;height:22px}
.vz-retour svg.ic{width:26px;height:26px;stroke-width:2}
/* la croix de fermeture, en haut à droite : bien visible, un cercle discret
   derrière elle pour qu'on la trouve même sur une photo claire */
.vz-fermer{background:rgba(255,255,255,.10)}
.vz-fermer:hover{background:rgba(255,255,255,.22)}
.vz-fermer svg.ic{width:20px;height:20px;stroke-width:2.2}
.vz-bas{bottom:0;display:flex;justify-content:space-around;align-items:flex-end;gap:4px;
  padding:34px 8px calc(10px + env(safe-area-inset-bottom));
  background:linear-gradient(0deg,rgba(4,3,2,.88),rgba(4,3,2,0))}
.vz-action{flex:1;max-width:120px;display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:6px 2px;border:0;background:transparent;color:var(--texte);font:inherit;cursor:pointer;
  -webkit-tap-highlight-color:transparent}
.vz-ic{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;
  background:var(--voile-clair);border:1px solid rgba(255,255,255,.1);transition:.2s}
.vz-ic svg.ic{width:23px;height:23px}
.vz-action:hover .vz-ic{background:rgba(255,255,255,.13)}
.vz-label{font-size:.7rem;letter-spacing:.03em;color:#cfc6b4;white-space:nowrap}
.vz-action.primaire .vz-ic{background:rgba(var(--accent-rgb),.14);border-color:rgba(var(--accent-rgb),.45);color:var(--gold-clair)}
.vz-action.actif .vz-ic{background:linear-gradient(135deg,var(--or-1),var(--or-2) 45%,var(--gold-fonce));
  border-color:transparent;color:var(--sur-or);box-shadow:0 6px 20px rgba(var(--accent-rgb),.35)}
.vz-action.actif .vz-label{color:var(--gold-clair)}
.vz-action.danger .vz-ic{color:var(--rouge-clair);border-color:rgba(224,106,96,.35)}
.vz.sans-menus .vz-haut{opacity:0;transform:translateY(-12px);pointer-events:none}
.vz.sans-menus .vz-bas{opacity:0;transform:translateY(12px);pointer-events:none}
.vz.sans-menus .vz-nav{opacity:0;pointer-events:none}

/* flèches sur ordinateur */
.vz-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:52px;height:52px;
  border-radius:50%;border:1px solid rgba(var(--accent-rgb),.25);background:rgba(12,10,7,.55);
  backdrop-filter:blur(6px);color:var(--gold-clair);display:grid;place-items:center;cursor:pointer;
  transition:opacity .2s,background .2s}
.vz-nav:hover{background:rgba(30,25,17,.85)}
.vz-nav:disabled{opacity:0;pointer-events:none}
.vz-nav svg.ic{width:24px;height:24px}
.vz-prec{left:18px} .vz-suiv{right:18px}
.vz-zoom{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3;
  padding:8px 16px;border-radius:99px;background:rgba(12,10,7,.72);color:var(--gold-clair);
  font-size:.85rem;letter-spacing:.06em;opacity:0;transition:opacity .3s;pointer-events:none}
.vz-zoom.on{opacity:1}
/* petit indicateur pendant le chargement HD */
.vz-charge{position:absolute;left:50%;bottom:calc(120px + env(safe-area-inset-bottom));
  transform:translateX(-50%);opacity:0;transition:opacity .3s;pointer-events:none}
.vz.charge .vz-charge{opacity:1}
.vz-charge i{display:block;width:26px;height:26px;border-radius:50%;
  border:2px solid rgba(var(--accent-rgb),.25);border-top-color:var(--gold);animation:vzTourne .8s linear infinite}
@keyframes vzTourne{to{transform:rotate(360deg)}}

@media (hover:none),(max-width:700px){
  .vz-nav,.vz-pc{display:none}
}
@media (max-width:420px){
  .vz-ic{width:46px;height:46px}
  .vz-label{font-size:.66rem}
}

/* feuille qui monte du bas (remarque, plus d'options…) */
.feuille{position:fixed;inset:0;z-index:9700;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(4,3,2,.55);backdrop-filter:blur(3px);animation:vzEntree .2s ease-out}
.feuille-boite{width:100%;max-width:520px;background:linear-gradient(180deg,var(--surface-2),var(--surface-b));
  border:1px solid rgba(var(--accent-rgb),.25);border-bottom:0;border-radius:22px 22px 0 0;
  padding:10px 20px calc(20px + env(safe-area-inset-bottom));animation:feuilleMonte .28s cubic-bezier(.2,.7,.2,1)}
@keyframes feuilleMonte{from{transform:translateY(100%)}to{transform:none}}
.feuille-poignee{width:42px;height:4px;border-radius:9px;background:var(--trait-fort);margin:4px auto 14px}
.feuille h3{margin:0 0 12px}
.feuille-liste{display:flex;flex-direction:column}
.feuille-liste button{display:flex;align-items:center;gap:14px;padding:14px 4px;border:0;
  border-bottom:1px solid #231f17;background:transparent;color:var(--texte);font:inherit;font-size:.95rem;
  cursor:pointer;text-align:left}
.feuille-liste button:last-child{border-bottom:0}
.feuille-liste button svg.ic{width:22px;height:22px;color:var(--gold)}
.feuille-liste button.danger{color:var(--rouge-clair)} .feuille-liste button.danger svg.ic{color:var(--rouge-clair)}
.feuille-liste button>span{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.feuille-liste button>span em{font-style:normal;font-size:.78rem;color:var(--faible);line-height:1.3}
.feuille-liste button.actif{color:var(--gold-clair)}
.feuille-liste button.actif>svg.ic:last-child{width:18px;height:18px;margin-left:auto;flex:none}
@media (min-width:700px){.feuille{align-items:center}.feuille-boite{border-radius:22px;border-bottom:1px solid rgba(var(--accent-rgb),.25)}}
.partage-reseaux{display:grid;grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:10px;margin-bottom:16px}
.partage-reseaux a{display:flex;flex-direction:column;align-items:center;gap:7px;color:#e9e1d1;
  font-size:.74rem;text-decoration:none}
.partage-reseaux a span{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;
  background:color-mix(in srgb,var(--c) 16%,var(--surface));border:1px solid color-mix(in srgb,var(--c) 45%,transparent);
  color:var(--c);transition:transform .2s}
.partage-reseaux a:hover span{transform:translateY(-2px)}
.partage-reseaux a span b{font:700 1.1rem system-ui}
.partage-reseaux svg.ic{width:24px;height:24px}
.partage-lien{display:flex;gap:10px;align-items:center;padding:10px 10px 10px 14px;border:1px solid var(--surface-3);
  border-radius:14px;background:var(--fond-creux)}
.partage-lien span{flex:1;min-width:0;font-size:.8rem;color:var(--texte-doux);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vz-bas{justify-content:center;gap:clamp(2px,3.2vw,34px)}
.vz-action{flex:0 1 96px}

/* ── recherche par photo (commun studio / client) ─────────────────────────── */
.rech-page{display:flex;flex-direction:column;height:100vh;height:100dvh;width:100%;background:var(--bg,var(--fond))}
.rech-barre{display:flex;align-items:center;gap:10px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;
  border-bottom:1px solid var(--surface-3);background:rgba(9,8,6,.95)}
.rech-barre b{display:block;font-family:var(--serif,Georgia);font-size:1.25rem}
.rech-barre .small{display:block}
.rech-contenu{flex:1;overflow:auto;padding:18px 16px calc(30px + env(safe-area-inset-bottom));max-width:980px;
  width:100%;margin:0 auto}
.rech-accueil{text-align:center;max-width:440px;margin:6vh auto 0;display:flex;flex-direction:column;gap:12px}
.rech-accueil h2{margin:0;font-size:1.9rem}
.rech-accueil .muted{margin:0 0 8px}
.rech-bloc{margin-top:14px}
.rech-tete{display:flex;gap:14px;align-items:center;margin-bottom:12px}
.rech-tete b{display:block;font-family:var(--serif,Georgia);font-size:1.3rem;font-weight:600}
.rech-tete .small{display:block}
.rech-visage{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:none;
  box-shadow:0 0 0 2px var(--gold),0 6px 18px var(--ombre-c)}
.rech-cell{padding:0}
.rech-cell.peut-etre{opacity:.82}
.rech-attente{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:40px 16px}
.spinner{width:38px;height:38px;border-radius:50%;border:3px solid rgba(var(--accent-rgb),.2);border-top-color:var(--gold);
  animation:vzTourne .8s linear infinite;margin-bottom:8px}
.pastille-icone{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:none;
  background:rgba(var(--accent-rgb),.08);color:var(--gold);border:1px solid rgba(var(--accent-rgb),.22)}
.pastille-icone.grand{width:48px;height:48px;border-radius:14px}
