/* Plancher JP Évolution — noir, blanc, rouge. Motif : les lignes de jeu. */
/* Proposition C — immersif, en 3D temps réel.
   On part au ras des lattes d'érable, la caméra s'élève, les lignes de jeu se tracent : du salon au gymnase. */
:root { --nuit: #07090d; --blanc: #f4efe6; --rouge: #e03a30; --sortie: cubic-bezier(.23, 1, .32, 1); }
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--nuit); color: var(--blanc); font-family: Archivo, system-ui, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

.tete { position: fixed; z-index: 5; inset: 0 0 auto 0; display: flex; align-items: center; gap: 28px; padding: 16px clamp(16px, 3.4vw, 52px); padding-top: max(16px, env(safe-area-inset-top)); }
.logo img { display: block; height: 46px; width: auto; border-radius: 4px; }
.menu { display: flex; gap: clamp(14px, 2vw, 30px); margin-left: auto; font-weight: 600; font-size: 15px; white-space: nowrap; }
.btn { white-space: nowrap; }
.menu a { opacity: .82; transition: opacity .2s ease; }
@media (hover: hover) { .menu a:hover { opacity: 1; } }
.tel { font-weight: 700; font-stretch: 112%; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--rouge); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 20px; border-radius: 4px; transition: transform .16s ease-out, background .2s ease; }
.btn:active { transform: scale(.97); }
@media (hover: hover) { .btn:hover { background: #c22a21; } }
.btn svg { width: 16px; height: 16px; }

/* Le parcours : la section est haute, la scène reste collée à l'écran pendant qu'on descend */
.parcours { position: relative; height: 340vh; }
.ecran { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sans-3d .ecran { background: #1a1410 url('https://www.plancherjpevolution.ca/wp-content/uploads/2023/04/Gymnase-vu-de-haut-ND.jpg') center / cover; }
.voile { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(var(--fonce-rvb) / .86) 0%, rgb(var(--fonce-rvb) / .35) 38%, rgb(var(--fonce-rvb) / 0) 62%), linear-gradient(to bottom, rgb(var(--fonce-rvb) / .6), rgb(var(--fonce-rvb) / 0) 22%); }

.texte { position: absolute; left: clamp(16px, 3.4vw, 52px); right: clamp(16px, 3.4vw, 52px); bottom: clamp(22px, 4.4vh, 52px); padding-bottom: env(safe-area-inset-bottom); }
.surtitre { display: flex; align-items: center; gap: 12px; opacity: .8; }
.surtitre::before { content: ''; width: 34px; height: 3px; background: var(--rouge); }
h1 { font-stretch: 122%; font-weight: 850; font-size: clamp(42px, 7.6vw, 132px); line-height: .92; letter-spacing: -.035em; margin: 16px 0 0; text-shadow: 0 2px 40px rgba(0, 0, 0, .45); }
h1 span { display: block; overflow: hidden; padding-bottom: .1em; white-space: nowrap; }
h1 span i { display: block; font-style: normal; transform: translateY(108%); transition: transform .9s var(--sortie); }
h1 span:nth-child(2) i { color: var(--rouge); }
.pret h1 span:nth-child(1) i, .e2 h1 span:nth-child(2) i { transform: none; }
.suite { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--sortie); }
.suite > div { overflow: hidden; }
.e3 .suite { grid-template-rows: 1fr; }
.suite p { max-width: 50ch; font-size: clamp(15px, 1.2vw, 18px); opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .7s var(--sortie); padding-top: 14px; color: rgb(var(--clair-rvb) / .86); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-top: 20px; opacity: 0; transform: translateY(12px); transition: opacity .6s .08s ease, transform .7s .08s var(--sortie); }
.e3 .suite p, .e3 .actions { opacity: 1; transform: none; }
.lien { font-weight: 700; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

.defile { position: absolute; right: clamp(16px, 3.4vw, 52px); bottom: clamp(22px, 4.4vh, 52px); display: flex; align-items: center; gap: 12px; transition: opacity .4s ease; }
.defile::after { content: ''; width: 1px; height: 46px; background: linear-gradient(var(--blanc), transparent); animation: descendre 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes descendre { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.e2 .defile { opacity: 0; }

/* Compteur de mètres, en haut à droite de la scène : il suit le traçage */
.mesure { position: absolute; right: clamp(16px, 3.4vw, 52px); top: 96px; text-align: right; opacity: 0; transition: opacity .5s ease; }
.e2 .mesure { opacity: .9; }
.mesure b { display: block; font-family: Archivo, sans-serif; font-stretch: 118%; font-weight: 800; font-size: clamp(22px, 2.4vw, 36px); letter-spacing: -.02em; text-transform: none; font-variant-numeric: tabular-nums; }

/* Les gens au travail : deux vraies photos de chantier passent pendant le parcours */
.vue { position: absolute; margin: 0; right: clamp(16px, 3.4vw, 52px); top: 50%; width: clamp(240px, 31vw, 480px); opacity: 0; transform: translateY(-42%); clip-path: inset(100% 0 0 0); transition: clip-path .9s var(--sortie), transform .9s var(--sortie), opacity .45s ease; }
.vue img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.vue figcaption { display: flex; gap: 12px; margin-top: 12px; }
.vue figcaption b { color: var(--rouge); font-weight: 500; }
.va .vue--a, .vb .vue--b { opacity: 1; transform: translateY(-50%); clip-path: inset(0 0 -40px 0); }

@media (max-width: 1100px) { .menu { display: none; } .tel { margin-left: auto; } }
@media (max-width: 900px) {
  .tel { display: none; }
  .tete { justify-content: space-between; }
  .logo img { height: 40px; }
  .btn { padding: 12px 15px; font-size: 14px; }
  h1 { font-size: clamp(38px, 12.2vw, 76px); }
  .defile { display: none; }
  .vue { top: 150px; width: 64vw; transform: translateY(18px); }
  .va .vue--a, .vb .vue--b { transform: none; }
  .mesure { top: 84px; }
  .apres { grid-template-columns: 1fr; }
  .porte + .porte { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .parcours { height: 100vh; height: 100svh; }
  *, *::before, *::after { transition-duration: .01s !important; animation: none !important; }
}
