/* LES PHOTOS (chantier photos, 01/10 ; FUSION-PHOTOS.md ; DECISIONS D-P1 à D-P12). Mounir : « que ça soit claire belle qui
   puisse l'agrandir… un peu comme Instagram » ; « pas très très jeu, entre le jeu et un peu Instagram… que ça plaise à tout
   le monde, même les filles, classe ». Donc : sobre, élégant, une apparition douce, des traits fins, le moins de mots.
   L'anneau lui-même : nova.css (§ l'anneau). Ici : la photo dans l'anneau, la tête de la fiche et de Moi, le PLEIN ÉCRAN
   (fond sombre, pincer, double-toucher, glisser vers le bas) et le CADRE ROND (placer son visage). Les deux surcouches vivent
   hors de .app--nova (dans <body>) : « moins de mouvement » y est traité ici et par le script (transform/opacity seulement). */

/* ---------- la photo dans l'anneau : elle remplit le cercle, entre en douceur, sans rien pousser ---------- */
.nv-anneau-img {
  position: absolute; left: var(--air); top: var(--air); width: calc(100% - 2 * var(--air)); height: calc(100% - 2 * var(--air));
  border-radius: 50%; object-fit: cover; opacity: 0; transform: scale(1.06); pointer-events: none; -webkit-user-drag: none;
  transition: opacity .38s ease-out, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.nv-anneau--photo-ok .nv-anneau-img { opacity: 1; transform: none; }
.nv-anneau--sans-fondu .nv-anneau-img { transition: none; }
.nv-anneau--photo .nv-anneau-pts, .nv-anneau--photo .nv-anneau-med { z-index: 1; }
/* une photo attendue : pas d'initiales qui clignotent, un fond doux qui respire ; si elle ne vient pas : les initiales */
.nv-anneau--photo:not(.nv-anneau--sans-photo) .nv-anneau-ini { opacity: 0; }
.nv-anneau--photo:not(.nv-anneau--photo-ok):not(.nv-anneau--sans-photo)::before {
  content: ""; position: absolute; inset: var(--air); border-radius: 50%; background: #FFFFFF; opacity: 0;
  animation: ph-respire 1.3s ease-in-out .2s infinite alternate;
}
@keyframes ph-respire { from { opacity: 0; } to { opacity: .22; } }
/* des anneaux qui se chevauchent (les gagnants, l'équipe) : un liseré de la surface les détache, comme une pile de photos */
.app--nova .nv-sp-gagnants .nv-anneau, .app--nova .nv-eq-anneaux .nv-anneau { box-shadow: 0 0 0 2px var(--anneau-fond, var(--surface)); }
.celebration .nv-anneau { --anneau-fond: #1D7440; }
.app--nova .entete .nv-anneau { --anneau-fond: var(--surface); }
.app--nova .nv-rond { border-width: 1.5px; font-family: var(--f-texte); font-weight: 600; }

/* l'écran de promotion : le même anneau, en grand (sa photo dans l'anneau qui change de couleur) */
.app--nova .nv-promo-anneau { --air: 6px; border-width: 5px; padding: var(--air); background-color: transparent; background-clip: content-box; box-shadow: none;
  background-image: linear-gradient(155deg, hsl(var(--teinte) 20% 60%), hsl(var(--teinte) 24% 41%)); font-family: var(--f-texte); font-weight: 600; font-size: 40px; letter-spacing: .06em; }
.app--nova .nv-promo-pts { box-shadow: 0 0 0 3px #0B1116; }
.app--nova .nv-promo-anneau .nv-anneau-img { z-index: 0; }
.app--nova .nv-promo-anneau .nv-promo-pts, .app--nova .nv-promo-anneau .nv-promo-etoiles { z-index: 1; }

/* une grande photo (96 et plus) se touche pour l'agrandir */
.nv-anneau-zoom { flex: none; display: inline-grid; place-items: center; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 50%; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.nv-anneau-zoom .nv-anneau { transition: transform .15s ease-out; }
.nv-anneau-zoom:active .nv-anneau { transform: scale(.97); }
.nv-anneau-zoom:focus-visible { outline-offset: 4px; border-radius: 50%; }

/* ---------- la fiche d'une personne : sa photo EN GRAND en haut, son nom dessous ---------- */
.app--nova .ph-fiche-tete { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 4px; text-align: center; }
.app--nova .ph-fiche-nom { font-family: var(--f-texte); font-weight: 600; font-size: 21px; letter-spacing: .005em; line-height: 1.2; margin-top: 4px; }
.app--nova .ph-fiche-sous { font-size: 14px; color: var(--gris); }
.app--nova .ph-enlever { align-self: center; min-height: 48px; padding: 0 16px; border: 0; background: transparent; color: var(--gris); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; border-radius: 12px; }
.app--nova .ph-enlever:active { background: var(--surface-2); }
/* photos-par-le-gerant (14/10) : « 📷 Mettre sa photo » (le Gérant, sa fiche sans photo) — le même bouton que « Mes photos », sous le rond */
.app--nova .ph-mettre { position: relative; align-self: center; justify-self: center; min-height: 52px; padding: 6px 22px; border: 1px solid var(--ligne); border-radius: 14px; background: var(--surface); color: var(--encre); font-family: var(--f-texte); font-weight: 600; font-size: 16.5px; letter-spacing: 0; }
.app--nova .ph-mettre input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* ---------- Moi : sa photo et « Ajoute ta photo » / « Changer » ---------- */
.app--nova .ph-moi { display: flex; align-items: center; gap: 16px; }
.app--nova .ph-moi-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app--nova .ph-lien { align-self: flex-start; min-height: 48px; margin: -2px 0 -10px -10px; padding: 0 10px; border: 0; background: transparent; color: var(--accent-texte); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.app--nova .ph-lien:active { background: var(--surface-2); }
.app--nova .ph-ajoute { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface-2); }
.app--nova .ph-ajoute-t { font-family: var(--f-texte); font-weight: 600; font-size: 17px; }
.app--nova .ph-choix { display: flex; gap: 10px; }
.app--nova .ph-choix[hidden] { display: none; }
.app--nova .ph-choix > .nb { flex: 1 1 0; position: relative; font-family: var(--f-texte); font-weight: 600; font-size: 16.5px; letter-spacing: 0; border-radius: 14px; min-height: 52px; }
.app--nova .ph-choix > .nb svg { width: 20px; height: 20px; }
.app--nova .ph-choix > .nb--neutre { background: var(--surface); border-color: var(--ligne); border-width: 1px; }
.app--nova .ph-choix input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.app--nova .ph-changer { display: flex; flex-direction: column; gap: 6px; }
.app--nova .ph-changer[hidden] { display: none; }

/* ---------- LE PLEIN ÉCRAN : fond sombre, la photo carrée aussi grande que l'écran, le prénom et le poste dessous ---------- */
.ph-plein { position: fixed; inset: 0; z-index: 1000; overflow: hidden; color: #FFFFFF; font-family: var(--f-texte); -webkit-tap-highlight-color: transparent; }
.ph-plein-fond { position: absolute; inset: 0; background: #07090B; opacity: 0; will-change: opacity; }
.ph-plein-scene { position: absolute; inset: 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ph-plein-scene.ph-tient { cursor: grabbing; }
.ph-plein-cadre { position: absolute; transform-origin: 50% 50%; will-change: transform; }
.ph-plein-zoom { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.ph-plein-zoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.ph-plein-rond { border-radius: 50%; }
.ph-plein-carre { border-radius: var(--r, 0); opacity: 0; }
.ph-plein-legende { position: absolute; left: 16px; right: 16px; text-align: center; opacity: 0; pointer-events: none; }
.ph-plein-nom { margin: 0; font-weight: 500; font-size: 17px; letter-spacing: .01em; }
.ph-plein-poste { margin: 6px 0 0; display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.ph-plein-poste i { width: 7px; height: 7px; border-radius: 50%; background: var(--rg); }
.ph-plein-fermer { position: absolute; top: calc(env(safe-area-inset-top) + 6px); right: 6px; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(7, 9, 11, .32); color: #FFFFFF; cursor: pointer; opacity: 0; }
.ph-plein-fermer svg { width: 24px; height: 24px; }
.ph-plein-fermer:active { background: rgba(255, 255, 255, .16); }
/* zoomée : la photo seule (le prénom et le poste s'effacent) */
.ph-plein-legende { transition: opacity .2s ease-out; }
.ph-plein.ph-zoome .ph-plein-legende { opacity: 0 !important; }
.ph-plein-fermer:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -4px; }

/* ---------- LE CADRE ROND : on glisse et on pince la photo pour placer son visage ---------- */
.ph-cadre { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #07090B; color: #FFFFFF; font-family: var(--f-texte); opacity: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); -webkit-tap-highlight-color: transparent; }
.ph-cadre-aide { flex: none; margin: 0; padding: 20px 16px 8px; text-align: center; font-weight: 500; font-size: 15px; letter-spacing: .02em; color: rgba(255, 255, 255, .78); }
.ph-cadre-scene { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ph-cadre-scene.ph-tient { cursor: grabbing; }
.ph-cadre-image { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.ph-cadre-masque { position: absolute; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(7, 9, 11, .62); outline: 1.5px solid rgba(255, 255, 255, .85); outline-offset: 0; }
.ph-cadre-boutons { flex: none; display: flex; gap: 12px; padding: 16px; justify-content: center; }
.ph-cadre-boutons button { flex: 1 1 0; max-width: 220px; min-height: 52px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16.5px; letter-spacing: .01em; cursor: pointer; }
.ph-cadre-reprendre { border: 1.5px solid rgba(255, 255, 255, .5); background: transparent; color: #FFFFFF; }
.ph-cadre-ok { border: 0; background: #FFFFFF; color: #0B0F12; }
.ph-cadre-ok[disabled] { opacity: .55; cursor: progress; }
.ph-cadre-boutons button:active { transform: scale(.98); }
.ph-cadre-boutons button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

/* « moins de mouvement » : les surcouches s'ouvrent et se ferment sans glisser (le script le sait aussi) */
@media (prefers-reduced-motion: reduce) {
  .ph-plein-legende { transition: none; }
  .nv-anneau-img, .nv-anneau-zoom .nv-anneau { transition: none !important; transform: none !important; }
  .nv-anneau--photo::before { animation: none !important; }
}
