/* Showroom « Nos réalisations » (B-REL-03q) : rangée de téléphones 9:16, surcouche, plein écran. Voir vitrine.js. */

/* Sans aucune réalisation livrée (ou sans script) : ni section, ni bulle, ni boutons. */
html:not(.vitrine-presente) .vitrine-lie { display: none !important; }
/* B-REL-03x : des films sans démo : le bloc 5 se montre quand même (sa rangée des démos reste vide). */
html.vitrine-films-presents .vitrine-bloc { display: block !important; }
.vitrine-films[hidden], html:not(.vitrine-films-presents) .vitrine-films { display: none !important; }
.vitrine-films { margin-top: 24px; }
.vitrine-films-titre { max-width: 1100px; margin: 0 auto 4px; padding: 0 20px; font-size: 20px; color: #1E293B; }
.vitrine-surcouche[hidden], .vitrine-plein[hidden], .vitrine-fleche[hidden] { display: none !important; }
html.vitrine-ouverte, html.vitrine-ouverte body { overflow: hidden; }

/* La rangée : sur téléphone, elle défile à l'horizontale, la carte suivante dépasse pour inviter à glisser. */
.vitrine-rangee {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 8px 20px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.vitrine-carte { flex: 0 0 auto; width: min(58vw, 230px); margin: 0; scroll-snap-align: center; }
.vitrine-tel {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 6px;
  border: 3px solid #334155;
  border-radius: 28px;
  background: #0F172A;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}
.vitrine-tel:focus-visible { outline: 3px solid #C86D39; outline-offset: 3px; }
.vitrine-tel video { display: block; width: 100%; height: 100%; border-radius: 22px; object-fit: contain; background: #0F172A; } /* B-REL-15d : film entier, rien de rogné */
/* Mouvement réduit ou économie de données : pas de lecture automatique, un signe « lecture » sur l'affiche. */
.vitrine-lecture {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  transform: translate(-50%, -50%);
}
.vitrine-lecture::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #FFFFFF;
  transform: translate(-50%, -50%);
}
/* B-REL-18b : avec lecture automatique, une pastille orange discrète (comme la vignette Cordée) sur les cartes en pause. */
.vitrine-lecture--discret { top: auto; bottom: 12px; left: auto; right: 12px; width: 34px; height: 34px; transform: none; background: rgba(200, 109, 57, 0.92); }
.vitrine-lecture--discret::after { border-width: 7px 0 7px 11px; }
.vitrine-tel--joue .vitrine-lecture { display: none; }
.vitrine-titre { margin: 10px 0 0; font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center; text-wrap: balance; }

/* Dans le fil d'ouverture : la rangée sous la bulle, dans la colonne des bulles. */
.fil-annexe { list-style: none; margin: 4px 0 12px var(--fil-marge-avatar); min-width: 0; align-self: stretch; }
.fil-annexe .vitrine-rangee { padding-left: 0; padding-right: 0; scroll-padding: 0; }
.fil-annexe .vitrine-titre { color: #FFFFFF; }
.fil--cadence .fil-annexe:not(.fil-montree) { display: none; }

/* Bloc 5 de / : sur fond beige. */
#bloc-5 .vitrine-titre { color: #1E293B; }

/* La surcouche « Réalisations » : au-dessus de la page, rien dessous ne bouge. */
.vitrine-surcouche {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  color: #FFFFFF;
  background: #0F172A;
}
.vitrine-surcouche:focus { outline: none; }
.vitrine-boite { max-width: 1100px; margin: 0 auto; padding: 16px 0 32px; }
.vitrine-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 8px; }
.vitrine-entete h2 { margin: 0; font-size: 24px; color: #FFFFFF; }
.vitrine-fermer, .vitrine-son {
  flex: none;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid #FFFFFF;
  border-radius: 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background: transparent;
  cursor: pointer;
}
.vitrine-fermer:focus-visible, .vitrine-son:focus-visible, .vitrine-fleche:focus-visible { outline: 3px solid #C86D39; outline-offset: 2px; }
.vitrine-son[aria-pressed="true"] { color: #1E293B; background: #FFFFFF; }

/* Plein écran d'une réalisation (B-REL-03x) : la vidéo verticale remplit la hauteur de l'écran ; Fermer, le son et les
   flèches flottent par-dessus ; titre et briques en texte dessous, en faisant défiler. */
.vitrine-plein {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 0 32px;
  overflow-y: auto;
  color: #FFFFFF;
  background: #000000;
}
.vitrine-plein:focus { outline: none; }
.vitrine-plein-haut {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 12px;
}
.vitrine-plein .vitrine-fermer, .vitrine-plein .vitrine-son { background: rgba(15, 23, 42, 0.6); }
.vitrine-plein .vitrine-son[aria-pressed="true"] { background: #FFFFFF; }
.vitrine-plein-corps { position: relative; flex: none; display: flex; justify-content: center; width: 100%; height: 100vh; height: 100dvh; }
.vitrine-plein-tel { height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000000; overflow: hidden; }
.vitrine-plein-tel video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000000; }
.vitrine-plein:fullscreen { width: 100%; height: 100%; }
/* B-REL-18 : un film en 16:9 (écran en paysage) : l'image prend toute la largeur, centrée dans la hauteur. */
.vitrine-plein--large .vitrine-plein-corps { align-items: center; }
.vitrine-plein--large .vitrine-plein-tel { width: 100%; height: auto; max-height: 100%; aspect-ratio: 16 / 9; }
.vitrine-plein--large .vitrine-plein-haut { max-width: none; padding: 0 20px; }
.vitrine-fleche {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.6);
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  color: #FFFFFF;
  cursor: pointer;
}
.vitrine-prec { left: 8px; }
.vitrine-suiv { right: 8px; }
.vitrine-briques[hidden], .vitrine-briques-titre[hidden] { display: none; }
.vitrine-plein h2 { max-width: 560px; margin: 8px 0 0; font-size: 22px; text-align: center; color: #FFFFFF; text-wrap: balance; }
.vitrine-briques-titre { margin: 0; font-size: 15px; color: #CBD5E1; }
.vitrine-plein h2, .vitrine-briques-titre { padding: 0 16px; }
.vitrine-briques { display: grid; gap: 8px; width: 100%; max-width: 560px; margin: 0; padding: 0; list-style: none; counter-reset: brique; }
.vitrine-briques li {
  counter-increment: brique;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #1E293B;
  background: #F5EFE6;
  text-align: left;
  text-wrap: pretty;
}
.vitrine-briques li::before { content: counter(brique) ". "; color: #C86D39; }

@media (min-width: 900px) {
  .vitrine-rangee { justify-content: center; overflow-x: visible; scroll-snap-type: none; }
  .vitrine-carte { width: 220px; }
  .fil-annexe .vitrine-rangee { justify-content: flex-start; overflow-x: auto; }
  .fil-annexe .vitrine-carte { width: 180px; }
  /* B-REL-18c : démos et films tiennent ensemble dans la hauteur de la surcouche (sinon elle défile, comme sur téléphone). */
  .vitrine-surcouche .vitrine-carte { width: clamp(124px, calc((100dvh - 300px) * 9 / 32), 220px); }
  .vitrine-surcouche .vitrine-titre { font-size: 14px; }
}
.vitrine-surcouche .vitrine-films-titre { margin-top: 8px; color: #FFFFFF; }
/* Fin d'esquisse (B-REL-03x) : nos démos, en petit, sous les boutons de la confirmation. */
.confirmation-vitrine { width: 100%; max-width: 760px; }
.confirmation-vitrine[hidden] { display: none; }
.splash-envoi .confirmation-vitrine-titre { margin: 8px 0 0; font-size: 17px; }
.confirmation-vitrine .vitrine-rangee { justify-content: flex-start; padding-left: 4px; padding-right: 4px; }
.confirmation-vitrine .vitrine-carte { width: min(40vw, 150px); }
.confirmation-vitrine .vitrine-titre { font-size: 14px; color: #FFFFFF; }

@media (max-width: 479px) {
  .vitrine-briques { width: calc(100% - 32px); }
  .fil-annexe .vitrine-carte { width: min(52vw, 200px); }
}
@media (prefers-reduced-motion: reduce) {
  .vitrine-rangee { scroll-behavior: auto; }
}

/* B-REL-18 : la Cordée dans « Que faisons-nous ? » (cordee.js) : une vignette modeste, centrée, qui ouvre le film en grand. */
.cordee[hidden], .cordee-plein[hidden] { display: none !important; }
.cordee { display: flex; justify-content: center; margin: 8px 0 28px; }
.cordee-vignette {
  position: relative;
  display: block;
  width: 132px;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  background: #F5F8FB;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}
.cordee-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cordee-vignette:focus-visible { outline: 3px solid #C86D39; outline-offset: 3px; }
.cordee-vignette .vitrine-lecture { top: auto; bottom: 10px; left: auto; right: 10px; width: 40px; height: 40px; transform: none; background: rgba(200, 109, 57, 0.92); }
.cordee-vignette .vitrine-lecture::after { border-width: 8px 0 8px 13px; }
.cordee-plein {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}
.cordee-plein:focus { outline: none; }
/* La vidéo garde son format 9:16 : le fond noir autour se touche pour fermer. */
.cordee-plein video { display: block; width: min(100%, calc(100vh * 9 / 16)); width: min(100%, calc(100dvh * 9 / 16)); height: auto; aspect-ratio: 9 / 16; object-fit: contain; background: #000000; }
.cordee-plein .vitrine-fermer { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(15, 23, 42, 0.6); }
.cordee-plein:fullscreen { width: 100%; height: 100%; }
@media (min-width: 900px) {
  .cordee-vignette { width: 150px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cordee-vignette { transition: transform 0.2s ease; }
  .cordee-vignette:hover { transform: scale(1.03); }
  .cordee-plein:not([hidden]) video { animation: cordee-grandir 0.25s ease-out; }
  @keyframes cordee-grandir { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
}
