/* UraWare : art deco en noir et blanc, lettres pochoir, zoom au defilement */

@font-face { font-family: "Pochoir"; src: url("fonts/BigShouldersStencil-var.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Pochoir Serif"; src: url("fonts/StardosStencil-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pochoir Serif"; src: url("fonts/StardosStencil-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url("fonts/Marcellus-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Josefin"; src: url("fonts/JosefinSans-var.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }

:root {
  --noir: #0a0a0a;
  --noir-2: #141414;
  --ivoire: #f1ede4;
  --gris: #8e8a82;
  --trait: rgba(241, 237, 228, 0.28);
  --trait-fort: rgba(241, 237, 228, 0.7);
  --large: min(1120px, calc(100vw - 32px));
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--noir);
  color: var(--ivoire);
  font-family: "Josefin", "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 1.08rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ivoire); color: var(--noir); }

main, header, footer { position: relative; }

/* Typographie */
h1, h2, h3, .pochoir {
  font-family: "Pochoir", Impact, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: .95;
  margin: 0;
}
h1 { font-size: clamp(3rem, 11vw, 9rem); }
h2 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: .08em; }
.surtitre {
  font-family: "Marcellus", serif;
  text-transform: uppercase;
  letter-spacing: .38em;
  font-size: .78rem;
  color: var(--gris);
  margin: 0 0 1.2rem;
}
.devise {
  font-family: "Pochoir Serif", Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.35;
  margin: 1.4rem auto 0;
  max-width: 34ch;
}
p { margin: 0 0 1rem; }
.petit { font-size: .88rem; color: var(--gris); }

/* Barre du haut */
.barre {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  background: linear-gradient(var(--noir) 60%, transparent);
}
.marque {
  font-family: "Pochoir", sans-serif; font-weight: 800;
  letter-spacing: .28em; text-decoration: none; font-size: 1.15rem;
  display: inline-flex; align-items: center; gap: .6rem;
}
.marque svg { width: 22px; height: 22px; }
.barre nav { display: flex; gap: clamp(.8rem, 3vw, 2.2rem); }
.barre nav a {
  font-family: "Marcellus", serif; text-transform: uppercase; letter-spacing: .22em;
  font-size: .72rem; text-decoration: none; color: var(--gris);
  transition: color .3s;
}
.barre nav a:hover, .barre nav a[aria-current] { color: var(--ivoire); }
@media (max-width: 480px) {
  .marque { letter-spacing: .16em; font-size: 1rem; }
  .barre nav a { letter-spacing: .1em; font-size: .66rem; }
}

/* Ouverture */
.ouverture {
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 120px 16px 80px;
  position: relative;
  overflow: hidden;
}
.soleil {
  position: absolute; left: 50%; top: 52%;
  width: min(150vw, 1500px); aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  opacity: .55; pointer-events: none;
}
.ouverture .contenu { position: relative; }
.mot-geant { display: inline-block; transform-origin: center; will-change: transform, letter-spacing; }
.mot-geant span {
  display: inline-block;
  transform: translateY(var(--dy, 0)) scale(var(--s, 1));
  transition: transform .9s var(--ease);
}
.filets {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin: 1.6rem auto 0; color: var(--gris);
}
.filets::before, .filets::after { content: ""; height: 1px; width: min(18vw, 160px); background: var(--trait-fort); box-shadow: 0 4px 0 var(--trait); }
.filets i { width: 10px; height: 10px; border: 1px solid var(--trait-fort); transform: rotate(45deg); }
.indice-defile {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: "Marcellus", serif; font-size: .7rem; letter-spacing: .4em; color: var(--gris);
  text-transform: uppercase;
}
.indice-defile::after {
  content: ""; display: block; width: 1px; height: 38px; margin: 10px auto 0;
  background: linear-gradient(var(--trait-fort), transparent);
  animation: goutte 2.2s var(--ease) infinite;
}
@keyframes goutte { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Sections */
section { padding: clamp(56px, 8vw, 110px) 0; }
.cadre { width: var(--large); margin: 0 auto; }
.centre { text-align: center; }

/* Zoom au defilement : la variable --z est posee par deco.js */
[data-zoom] {
  transform: scale(var(--z, 1));
  opacity: var(--o, 1);
  will-change: transform, opacity;
}

/* Cadre art deco a coins en escalier */
.deco {
  position: relative;
  border: 1px solid var(--trait-fort);
  padding: clamp(28px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(241,237,228,.035), transparent 60%);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, calc(100% - 18px) 6px, calc(100% - 6px) 6px, calc(100% - 6px) 18px, 100% 18px,
    100% calc(100% - 18px), calc(100% - 6px) calc(100% - 18px), calc(100% - 6px) calc(100% - 6px), calc(100% - 18px) calc(100% - 6px), calc(100% - 18px) 100%,
    18px 100%, 18px calc(100% - 6px), 6px calc(100% - 6px), 6px calc(100% - 18px), 0 calc(100% - 18px),
    0 18px, 6px 18px, 6px 6px, 18px 6px);
}
.deco::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid var(--trait);
  pointer-events: none;
}

/* Produits sur l'accueil */
.produits { display: grid; gap: clamp(28px, 4vw, 48px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.produit { text-decoration: none; display: flex; flex-direction: column; gap: 1rem; transition: background .5s var(--ease); }
.produit:hover { background: linear-gradient(180deg, rgba(241,237,228,.08), transparent 70%); }
.produit .visuel { overflow: hidden; border: 1px solid var(--trait); aspect-ratio: 16 / 10; background: var(--noir-2); }
.produit .visuel img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease), filter 1.2s var(--ease); }
.produit:hover .visuel img { transform: scale(1.1); }
.produit .prix { font-family: "Pochoir Serif", serif; font-size: 1.2rem; }
.fleche { font-family: "Marcellus", serif; letter-spacing: .3em; text-transform: uppercase; font-size: .75rem; }
.fleche::after { content: " \2192"; display: inline-block; transition: transform .4s var(--ease); }
.produit:hover .fleche::after { transform: translateX(8px); }

/* Visuel UseUrGPU dessine en SVG */
.visuel.gpu { display: grid; place-items: center; }
.visuel.gpu svg { width: 70%; height: 80%; }

/* Principes */
.principes { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.principe { padding: 40px 28px; text-align: center; }
.principe + .principe { border-left: 1px solid var(--trait); }
@media (max-width: 640px) { .principe + .principe { border-left: 0; border-top: 1px solid var(--trait); } }
.principe .num { font-family: "Pochoir", sans-serif; font-size: 3.4rem; font-weight: 300; color: transparent; -webkit-text-stroke: 1px var(--ivoire); line-height: 1; }

/* Galerie de captures */
.galerie { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.galerie.portraits { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.capture { margin: 0; }
.capture .img { position: relative; overflow: hidden; border: 1px solid var(--trait-fort); }
.capture img { width: 100%; height: auto; transition: opacity .9s var(--ease); }
.capture img.couleur { position: absolute; inset: 0; opacity: 0; }
.capture:hover img.couleur { opacity: 1; }
.capture figcaption { font-family: "Marcellus", serif; letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; color: var(--gris); padding-top: .7rem; }

/* Listes en deux colonnes */
.deux { display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--trait); position: relative; }
.liste li::before { content: ""; position: absolute; left: 4px; top: 24px; width: 9px; height: 9px; border: 1px solid var(--ivoire); transform: rotate(45deg); }
.liste.non li::before { border-radius: 50%; transform: none; background: transparent; }
.liste strong { font-family: "Pochoir Serif", serif; font-weight: 700; display: block; margin-bottom: 2px; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-family: "Marcellus", serif; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--gris); font-weight: 400; }
td.montant { font-family: "Pochoir Serif", serif; font-size: 1.25rem; white-space: nowrap; }

/* Boutons */
.boutons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 2rem; }
.bouton {
  display: inline-block; text-decoration: none;
  font-family: "Pochoir", sans-serif; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  padding: 16px 30px; border: 1px solid var(--ivoire);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease);
}
.bouton::before { content: ""; position: absolute; inset: 0; background: var(--ivoire); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); z-index: -1; }
.bouton:hover, .bouton:focus-visible { color: var(--noir); }
.bouton:hover::before, .bouton:focus-visible::before { transform: scaleX(1); }
.bouton.plein { background: var(--ivoire); color: var(--noir); }
.bouton.plein::before { background: var(--noir); }
.bouton.plein:hover { color: var(--ivoire); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: "Pochoir Serif", serif; font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 1px solid var(--ivoire); border-bottom: 1px solid var(--ivoire); transform: translateY(-70%) rotate(45deg); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .reponse { padding: 0 0 24px; color: #d9d4c9; max-width: 70ch; }

/* Citation */
.citation { font-family: "Pochoir Serif", serif; font-size: clamp(1.3rem, 3vw, 2.1rem); line-height: 1.35; max-width: 30ch; margin: 0 auto; }
.citation::before, .citation::after { font-family: "Pochoir", sans-serif; color: var(--gris); }
.citation::before { content: "\00AB\00A0"; }
.citation::after { content: "\00A0\00BB"; }

/* Pied */
footer { border-top: 1px solid var(--trait); padding: 48px 0 40px; margin-top: 40px; }
footer .cadre { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
footer a { color: var(--gris); text-decoration: none; font-size: .9rem; }
footer a:hover { color: var(--ivoire); }

/* Apparition au defilement */
.apparait { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.apparait.vu { opacity: 1; transform: none; }

/* Plaque de pochoir : lettres decoupees, on passe a travers au defilement */
.plaque { position: relative; height: 300vh; padding: 0; }
.plaque-colle { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--noir); }
.plaque-colle canvas { position: absolute; inset: 0; }
.plaque-colle canvas.tunnel { position: absolute; inset: 0; }
.plaque-legende {
  position: absolute; left: 0; right: 0; bottom: 28px; margin: 0; text-align: center;
  font-family: "Marcellus", serif; text-transform: uppercase; letter-spacing: .4em; font-size: .7rem;
  color: var(--noir); opacity: calc(1 - var(--plaque, 0) * 6);
}

/* Les deux carres du logo : comme deux pieces qu'on fait tourner sur une table.
   Chacun tourne autour d'un axe vertical qui passe par son sommet le plus bas,
   en sens opposes ; a plat (emboites comme le logo) a leur place. */
.carres { position: relative; width: clamp(150px, 22vw, 240px); aspect-ratio: 1; margin: 0 auto 28px; perspective: 800px; }
.carres .pivot { position: absolute; inset: 0; transform-style: preserve-3d; }
/* sommet le plus bas : carre noir incline de -15 degres -> (-48,1 ; 83,3) dans le dessin, soit 29,96 % / 84,7 % */
.carres .pivot-noir { transform-origin: 29.96% 84.7%; transform: rotateY(var(--an, 0deg)); }
.carres .pivot-blanc { transform-origin: 70.04% 84.7%; transform: rotateY(calc(var(--an, 0deg) * -1)); }
.carres svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; backface-visibility: visible; }
.carres .pivot-noir svg { transform: rotate(-15deg); }
.carres .pivot-blanc svg { transform: rotate(15deg); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-zoom] { transform: none !important; opacity: 1 !important; }
  .apparait { opacity: 1; transform: none; }
  .indice-defile::after { animation: none; }
  .soleil { transform: translate(-50%, -50%) !important; }
}

/* La fumee du briquet : blanche, fusionnee en difference, donc noire sur l'ivoire et blanche sur le noir */
.fumee { position: fixed; inset: 0; z-index: 30; pointer-events: none; mix-blend-mode: difference; }
.fumee canvas { position: absolute; inset: 0; width: 100vw; height: 100vh; display: block; }

/* Intro : noir total, le briquet frotte, puis le noir s'ouvre en cercle depuis l'etincelle */
.rideau {
  position: fixed; inset: 0; z-index: 45; background: #000;
  -webkit-mask: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), transparent var(--trou, -140px), #000 calc(var(--trou, -140px) + 120px));
          mask: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), transparent var(--trou, -140px), #000 calc(var(--trou, -140px) + 120px));

}
.rideau.ouvert { opacity: 0; }

/* Les captures passent au-dessus de la fumee : sur elles, la fumee ne s'inverse pas, elle revele la couleur */
.capture { position: relative; z-index: 31; }
.capture .img canvas.couleur { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Pendant l'intro, la fumee et l'allumette passent devant le rideau et la barre du haut */
html.intro .fumee { z-index: 50; }

/* La suite arrive pendant que le portail du tunnel se referme : plus d'ecran noir vide entre les deux */
/* entre dans l'ecran a 80vh de course (plaque deja effacee), puis monte au-dessus du tunnel qui continue */
.plaque + section { margin-top: -120vh; position: relative; z-index: 2; }
