/* Page longue /presentation (B-REL-11). Charte du site : beige, ardoise, ocre, Space Grotesk (fichiers locaux).
   Mobile d'abord (375 px), une idée par écran. Animations : transform et opacity seulement, déclenchées par la classe
   « visible » (presentation.js) ; sans script ou en mouvement réduit, tout est visible d'emblée. */
@font-face {
  font-family: "Space Grotesk";
  src: url(/fonts/SpaceGrotesk-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url(/fonts/SpaceGrotesk-Bold.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ardoise: #334155;
  --nuit: #1E293B;
  --ocre: #C86D39;
  --ocre-fonce: #A8552A;
  --ardoise-attenuee: #475569;
  --clair: #CBD5E1;
  --beige: #F5EDE3;
  --blanc: #FFFFFF;
  --trait: #E4D8C9;
  --fonte: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --duree: 700ms;
  --courbe: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ardoise);
  background: var(--blanc);
}
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: 27px; }
h2 { font-size: 27px; }
h3 { font-size: 20px; margin-bottom: 8px; }
p { margin: 0 0 16px; text-wrap: pretty; }
p, li { text-align: left; }
a { color: var(--ocre-fonce); }

:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; }
.fond-sombre :focus-visible { outline-color: var(--blanc); }

.lecteur-seul {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.evitement {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--blanc);
  background: var(--ardoise);
}
.evitement:focus { left: 8px; }

/* --- Les écrans --- */
/* B-REL-15d : plus de hauteur plein écran (elle laissait des écrans à moitié vides) ; seul l'écran d'ouverture la garde. */
.ecran {
  display: flex;
  align-items: center;
  padding: 56px 20px;
  overflow: hidden;
}
.ecran-ouverture { min-height: 100vh; min-height: 100svh; }
.ecran-dedans { width: 100%; max-width: 980px; margin: 0 auto; }
.fond-beige { background: var(--beige); }
.fond-sombre { background: var(--nuit); color: var(--blanc); }
.fond-sombre a { color: var(--blanc); }

.sur-titre {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocre-fonce);
  margin-bottom: 12px;
}
.fond-sombre .sur-titre { color: #E7A47C; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 26px;
  margin-top: 12px;
  border: 2px solid var(--ocre);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: var(--blanc);
  background: var(--ocre);
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { background: var(--ocre-fonce); border-color: var(--ocre-fonce); }
.fond-sombre .bouton, .fond-sombre a.bouton { color: var(--blanc); }

/* Écran 1 */
.ecran-ouverture { background: var(--beige); text-align: left; }
.ouverture-logo { width: 220px; margin-bottom: 32px; }
.ecran-ouverture h1 { color: var(--nuit); }
.accroche {
  font-size: 21px;
  font-weight: 700;
  color: var(--ocre-fonce);
  border-left: 4px solid var(--ocre);
  padding-left: 14px;
}

/* Cartes */
.cartes { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.carte {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: 16px;
  padding: 22px 20px;
}
.carte p:last-child { margin-bottom: 0; }

/* Emplacements d'images (STUDIO) : vides, ils ne prennent aucune place. */
.vignette { border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.vignette:empty { display: none; }
.vignette img, .vignette video { width: 100%; height: auto; display: block; }
/* B-REL-15 / 15b : même cadre 16:9 partout, recadrage centré ; plusieurs images empilées = fondu enchaîné ≈ 5 s par image.
   B-REL-16 : l'ordre dépend du pays (presentation.js) et le nombre d'images aussi (defile-2 à defile-6) : chaque image i
   (rang 0, 1, 2…) entre à rang × 5 s, moins le décalage de sa carte (1 s / 2,5 s / 4 s) ; la 1re de l'ordre est visible d'emblée. */
.vignette.cadre { position: relative; aspect-ratio: 16 / 9; }
.vignette.cadre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; }
.vignette.cadre img:first-child { opacity: 1; }
[data-vignette="terrain"] { --decalage: 1s; }
[data-vignette="bureau"] { --decalage: 2.5s; }
[data-vignette="formation-loisirs"] { --decalage: 4s; }
@media (prefers-reduced-motion: no-preference) {
  .defile-2 img { animation: vignette-fondu-2 10s linear infinite; }
  .defile-3 img { animation: vignette-fondu-3 15s linear infinite; }
  .defile-4 img { animation: vignette-fondu-4 20s linear infinite; }
  .defile-5 img { animation: vignette-fondu-5 25s linear infinite; }
  .defile-6 img { animation: vignette-fondu-6 30s linear infinite; }
  .vignette.cadre img:nth-child(2) { --rang: 1; }
  .vignette.cadre img:nth-child(3) { --rang: 2; }
  .vignette.cadre img:nth-child(4) { --rang: 3; }
  .vignette.cadre img:nth-child(5) { --rang: 4; }
  .vignette.cadre img:nth-child(6) { --rang: 5; }
  [class*="defile-"] img { animation-delay: calc(var(--rang, 0) * 5s - var(--decalage, 1s)); }
}
@keyframes vignette-fondu-2 { 0% { opacity: 0; } 10% { opacity: 1; } 50% { opacity: 1; } 60% { opacity: 0; } 100% { opacity: 0; } }
@keyframes vignette-fondu-3 { 0% { opacity: 0; } 6.667% { opacity: 1; } 33.333% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
@keyframes vignette-fondu-4 { 0% { opacity: 0; } 5% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
@keyframes vignette-fondu-5 { 0% { opacity: 0; } 4% { opacity: 1; } 20% { opacity: 1; } 24% { opacity: 0; } 100% { opacity: 0; } }
@keyframes vignette-fondu-6 { 0% { opacity: 0; } 3.333% { opacity: 1; } 16.667% { opacity: 1; } 20% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .vignette.cadre img:not(:first-child) { display: none; }
}

/* Écran 3 : les deux piliers glissent l'un vers l'autre */
.paire { display: grid; gap: 14px; margin-top: 8px; }
.pilier { border-top: 4px solid var(--ocre); }
.lien-paire {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
  color: var(--ocre-fonce);
}
.lien-paire p { margin: 0; text-align: center; }
/* B-REL-15c §7bis : l'avatar ia_28 remplace le lien vers /#notre-offre (88 px, 112 px dès 768 px). */
.lien-paire .a-pose-paire { width: 88px; height: 88px; margin-top: 8px; }
@media (min-width: 768px) { .lien-paire .a-pose-paire { width: 112px; height: 112px; } }

/* Écrans 4 et 7 : frises */
.frise { list-style: none; margin: 24px 0; padding: 0; counter-reset: temps; display: grid; gap: 14px; }
.frise li {
  counter-increment: temps;
  position: relative;
  padding: 4px 0 4px 54px;
  min-height: 40px;
}
.frise li::before {
  content: counter(temps);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--blanc);
  background: var(--ocre);
}
.frise li::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: -14px;
  width: 2px;
  background: var(--trait);
}
.frise li:last-child::after { display: none; }
.ligne-forte { font-size: 21px; font-weight: 700; color: var(--nuit); }

/* Écran 5 : scènes */
.scenes { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.scene { border-left: 4px solid var(--ocre); padding: 6px 0 6px 16px; }
.scene p { margin: 0; }

/* Écran 6 : réalisations et démos */
.liste-simple { margin: 0 0 24px; padding-left: 22px; }
.liste-simple li { margin-bottom: 6px; }
.demos { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.demos:empty { display: none; }
html.demos-presentes .demos-repli { display: none; }
.demo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.demo h3 { font-size: 16px; margin: 12px 0 4px; }
.demo-tel {
  position: relative;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 9 / 16; /* B-REL-15d : le ratio des films (720 × 1280), plus rien de rogné */
  border-radius: 26px;
  border: 6px solid var(--nuit);
  overflow: hidden;
  background: var(--nuit);
}
.demo-tel video { width: 100%; height: 100%; object-fit: contain; background: var(--nuit); display: block; cursor: pointer; }
.demo-jouer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 0;
  border-radius: 50%;
  font-size: 20px;
  color: var(--blanc);
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
}
.demo.joue .demo-jouer { opacity: 0; }
.demo.joue .demo-jouer:focus-visible { opacity: 1; }
.demo-lien { font-size: 15px; font-weight: 700; }
/* B-REL-20 : les films REL-AI dans la page (Le bureau après l'accroche, La restauratrice à l'écran 2). */
.film-place { margin: 28px auto 0; display: flex; justify-content: center; }
.film-place:empty { display: none; }
.film { width: 100%; }
.film .demo-tel { max-width: 240px; }
.film.film-large .demo-tel { max-width: 640px; aspect-ratio: 16 / 9; border-radius: 18px; }
.film-titre { font-size: 16px; font-weight: 700; margin: 12px 0 0; }

/* Écran 8 et 9 : emplacements avatar et photo */
.avatar, .photo { max-width: 160px; border-radius: 50%; }
/* B-REL-15c : l'avatar « A » n'est pas rogné (pas de cercle), 128 px, fond transparent */
.vignette.avatar { max-width: none; border-radius: 0; overflow: visible; }
.a-pose { display: inline-block; width: 128px; height: 128px; line-height: 0; }
.a-pose img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* B-REL-15d : jamais de A ton sur ton — disque beige plein derrière l'avatar, un peu plus grand que lui ; le A n'est pas rogné */
.a-pose-disque { position: relative; isolation: isolate; }
.a-pose-disque::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: calc(100% + 24px); height: calc(100% + 24px); border-radius: 50%; background: var(--beige); transform: translate(-50%, -50%); }
.vignette.avatar { padding: 12px; }
.a-pose-fin { width: 88px; height: 88px; margin: 12px; }
@media (min-width: 768px) { .a-pose-fin { width: 112px; height: 112px; } }

/* Écran 11 */
.ecran-fin { text-align: left; }
.ecran-fin h2 { font-size: 30px; }
/* B-REL-15d : fin invitante — phrase, avatar sur disque, gros bouton, puis le pied en petit */
.fin-invitation { margin: 8px 0 24px; font-size: 26px; font-weight: 700; line-height: 1.25; color: var(--blanc); }
.fin-action { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 360px; margin: 0 auto; }
.ecran-fin .bouton-fin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--blanc);
  background: var(--ocre-fonce);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.ecran-fin .bouton-fin:hover, .ecran-fin .bouton-fin:active { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38); background: var(--ocre-fonce); }
/* B-REL-16d : sous le seul bouton esquisse, un lien secondaire à contour fin vers l'accueil (« Que faisons-nous ? ») */
.lien-decouvrir {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--clair);
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--blanc);
  text-decoration: none;
}
.lien-decouvrir:hover, .lien-decouvrir:focus-visible { border-color: var(--blanc); background: rgba(255, 255, 255, 0.08); }
.fin-pied { margin: 40px 0 0; font-size: 14px; text-align: center; color: var(--clair); }
.fin-pied a { color: var(--clair); }
@media (min-width: 768px) {
  .fin-invitation { font-size: 32px; }
  .ecran-fin .bouton-fin { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ecran-fin .bouton-fin { transition: none; }
  .ecran-fin .bouton-fin:hover, .ecran-fin .bouton-fin:active { transform: none; }
}

/* --- Plus large --- */
@media (min-width: 768px) {
  body { font-size: 19px; }
  h1 { font-size: 40px; }
  h2 { font-size: 36px; }
  .ecran { padding: 96px 40px; }
  .ouverture-logo { width: 320px; }
  .cartes.trois { grid-template-columns: repeat(3, 1fr); }
  .paire { grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 24px; }
  .lien-paire { max-width: 140px; align-self: center; }
  .scenes { grid-template-columns: repeat(3, 1fr); }
  .demos { grid-template-columns: repeat(auto-fit, minmax(180px, 220px)); justify-content: center; }
  .etapes { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .etapes li { padding: 54px 0 0; }
  .etapes li::after { left: 46px; right: -18px; top: 18px; bottom: auto; width: auto; height: 2px; }
}

/* --- Animations au défilement (seulement avec le script, et sans mouvement réduit) --- */
@media (prefers-reduced-motion: no-preference) {
  .js .anime {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--duree) var(--courbe), transform var(--duree) var(--courbe);
  }
  .js .anime.visible { opacity: 1; transform: none; }

  /* Écran 1 : le logo, puis les phrases */
  .js .ouverture-logo.anime { transform: scale(0.92); }
  .js .anime-2 { transition-delay: 250ms; }
  .js .anime-3 { transition-delay: 500ms; }
  .js .anime-4 { transition-delay: 750ms; }

  /* Écran 3 : les deux cartes viennent l'une vers l'autre */
  .js .pilier-gauche.anime { transform: translateX(-48px); }
  .js .pilier-droit.anime { transform: translateX(48px); }
  .js .lien-paire.anime { transform: scale(0.8); transition-delay: 300ms; }
  .js .pilier.anime.visible, .js .lien-paire.anime.visible { transform: none; }

  /* Frises, cartes et scènes : un par un */
  .js .frise li:nth-child(2), .js .cartes li:nth-child(2), .js .scenes li:nth-child(2) { transition-delay: 120ms; }
  .js .frise li:nth-child(3), .js .cartes li:nth-child(3), .js .scenes li:nth-child(3) { transition-delay: 240ms; }
  .js .frise li:nth-child(4) { transition-delay: 360ms; }
  .js .frise li:nth-child(5) { transition-delay: 480ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anime { opacity: 1; transform: none; transition: none; }
}
