/* Tchiip, site v3 : théâtre d'ombres, nuit, pluie, lumières chaudes. */

:root {
  --nuit: #0d0b16;
  --nuit-profonde: #07060d;
  --chambre: #100d1b;
  --mur: #1b1320;
  --pierre: #33434d;
  --pierre-sombre: #1b2730;
  --papier: #f2e8d8;
  --papier-doux: #c4bacb;
  --ambre: #ffc27a;
  --ambre-vif: #ffad5c;
  --aubergine: #1a0e1f;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --gouttiere: clamp(16px, 5vw, 72px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--papier);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ambre); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #ffd9a8; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 3px; }

.evitement {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--papier); color: var(--nuit); padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.evitement:focus { top: 12px; color: var(--nuit); }

/* ---------- l'en-tête, posé sur la rue ---------- */
.bandeau {
  position: absolute; z-index: 10; top: 0; left: 0; right: 0;
  padding: calc(14px + env(safe-area-inset-top)) var(--gouttiere) 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.marque {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--papier); text-decoration: none;
  font: 600 1.6rem/1 var(--serif); letter-spacing: 0.01em;
}
.marque img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); }
.marque:hover { color: #fff; }

/* ---------- la rue (héros) ---------- */
.scene-rue {
  --avance: 0;
  position: relative;
  height: 160vh;
  height: 160svh;
  background: var(--nuit-profonde);
}
.rue-cadre {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--nuit-profonde) url("/images/rue-fixe-portrait.webp") center bottom / cover no-repeat;
}
@media (min-aspect-ratio: 21/20) {
  .rue-cadre { background-image: url("/images/rue-fixe-paysage.webp"); background-position: center; }
}
#rue {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.6s ease;
}
#rue.pret { opacity: 1; }
/* grain de papier et vignette, par-dessus le canvas */
.rue-cadre::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 50% 48%, transparent 45%, rgba(3, 2, 8, 0.66) 100%),
    linear-gradient(to bottom, rgba(5, 4, 11, 0.55), transparent 26%, transparent 70%, rgba(4, 3, 9, 0.8));
}
.rue-cadre::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
}
.rue-texte, .rue-sortie {
  position: absolute; z-index: 2;
  left: var(--gouttiere); right: var(--gouttiere);
  opacity: max(0, calc(1 - var(--avance) * 3.2));
  transform: translateY(calc(var(--avance) * -60px));
}
.rue-texte {
  top: calc(84px + env(safe-area-inset-top));
  max-width: 13em;
  text-shadow: 0 2px 22px rgba(3, 2, 8, 0.85), 0 0 2px rgba(3, 2, 8, 0.6);
}
.rue-texte h1 {
  font-size: clamp(2.45rem, 10.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
}
.sous-titre {
  font: italic 500 clamp(1.3rem, 4.9vw, 1.85rem)/1.22 var(--serif);
  color: var(--papier);
}
.rue-texte .sous-titre { margin-top: 0.7em; max-width: 19em; }
.rue-sortie {
  bottom: calc(22px + env(safe-area-inset-bottom));
  font-size: 0.98rem; line-height: 1.45;
  color: var(--papier);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}
.rue-sortie strong { display: block; font-weight: 700; }
.rue-sortie span { color: var(--papier-doux); }

@media (min-aspect-ratio: 21/20) {
  .rue-cadre::before {
    background:
      linear-gradient(to right, rgba(5, 4, 11, 0.72), rgba(5, 4, 11, 0.35) 34%, transparent 52%),
      radial-gradient(ellipse 85% 75% at 60% 48%, transparent 45%, rgba(3, 2, 8, 0.6) 100%),
      linear-gradient(to bottom, rgba(5, 4, 11, 0.5), transparent 22%, transparent 72%, rgba(4, 3, 9, 0.8));
  }
  .rue-sortie { font-size: 1.05rem; }
  .rue-texte {
    top: 50%; transform: translateY(calc(-50% + var(--avance) * -60px));
    max-width: min(34rem, 44vw);
  }
  .rue-sortie { max-width: 34rem; }
}

/* mouvement réduit : la rue reste une image fixe, sans travelling */
.rue-calme .scene-rue { height: auto; }
.rue-calme .rue-texte, .rue-calme .rue-sortie { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .scene-rue { height: auto; }
  .rue-texte, .rue-sortie { opacity: 1; }
}

/* ---------- le téléphone confié ---------- */
/* la chambre monte par-dessus la fin du travelling : pas d'écran vide entre les deux */
.confie {
  position: relative; z-index: 3;
  margin-top: -45vh; margin-top: -45svh;
  background: linear-gradient(transparent, var(--chambre) 22vh);
}
.rue-calme .confie { margin-top: 0; background: var(--chambre); }
@media (prefers-reduced-motion: reduce) {
  .confie { margin-top: 0; background: var(--chambre); }
}
.confie-image {
  -webkit-mask-image: linear-gradient(transparent, #000 24%);
  mask-image: linear-gradient(transparent, #000 24%);
}
.confie-image img { width: 100%; height: auto; }
.confie-image { position: relative; display: block; }
.confie-image::before, .confie-image::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.confie-image::before { top: 0; height: 22%; background: linear-gradient(var(--chambre), rgba(16, 13, 27, 0)); }
.confie-image::after { bottom: 0; height: 38%; background: linear-gradient(to bottom, rgba(16, 13, 27, 0), var(--chambre)); }
.confie-texte {
  position: relative;
  padding: 0 var(--gouttiere) 72px;
  margin-top: -56px;
  max-width: 40rem;
}
.confie h2 {
  font-style: italic;
  font-size: clamp(2.2rem, 8.6vw, 4.2rem);
  line-height: 1;
}
.chapeau { margin-top: 1.1rem; font-size: 1.12rem; color: var(--papier); max-width: 36em; }
.soiree { list-style: none; margin: 2.2rem 0 0; padding: 0; }
.soiree li {
  display: grid; grid-template-columns: 4.9rem 1fr; gap: 0 0.9rem;
  padding: 1rem 0;
}
.soiree li + li { border-top: 1px solid rgba(242, 232, 216, 0.12); }
.soiree time {
  font: italic 500 1.35rem/1.25 var(--serif);
  color: var(--ambre);
  white-space: nowrap;
}
.soiree p { color: var(--papier); }
.note { margin-top: 1.4rem; color: var(--papier-doux); max-width: 34em; }

@media (min-width: 900px) {
  .confie { min-height: 52vw; display: flex; align-items: center; overflow: hidden; }
  .confie-image { position: absolute; top: 0; bottom: 0; left: 22%; right: 0; }
  .confie-image img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }
  .confie-image::before { height: 18%; }
  .confie-image::after {
    top: 0; height: auto;
    background:
      linear-gradient(to right, var(--chambre) 0%, rgba(16, 13, 27, 0.55) 22%, rgba(16, 13, 27, 0) 40%),
      linear-gradient(to bottom, rgba(16, 13, 27, 0) 82%, var(--chambre) 100%);
  }
  .confie-texte { margin: 0; padding: 96px var(--gouttiere); max-width: min(40rem, 44vw); }
}

/* ---------- l'immeuble : les enquêtes derrière les fenêtres ---------- */
.immeuble {
  position: relative;
  margin-top: 150px;
  padding: 0 0 88px;
  background-color: var(--mur);
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 17px, rgba(0, 0, 0, 0.16) 17px 18px),
    linear-gradient(to bottom, rgba(255, 150, 120, 0.035), rgba(0, 0, 0, 0.25));
}
.toit {
  position: absolute; left: 0; top: -149px;
  display: block; width: 100%; height: 150px;
}
.immeuble-tete { padding: 40px var(--gouttiere) 0; max-width: 46rem; }
.immeuble h2 { font-size: clamp(2.1rem, 8vw, 3.8rem); }
.facade {
  list-style: none; margin: 56px auto 0; padding: 0 var(--gouttiere);
  max-width: 1240px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 22px;
}
.fenetre { display: flex; flex-direction: column; align-items: center; text-align: center; }
.vitre {
  position: relative;
  width: min(100%, 150px);
  aspect-ratio: 3 / 5;
  border-radius: 50% 50% 3px 3px / 22% 22% 3px 3px;
  background: linear-gradient(#0a1424, #10233a);
  box-shadow: 0 0 0 7px var(--pierre), 0 0 0 9px var(--pierre-sombre), inset 0 0 24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: box-shadow 1.2s ease;
}
/* montants de la croisée */
.vitre::before, .vitre::after {
  content: ""; position: absolute; z-index: 2; background: var(--pierre-sombre);
}
.vitre::before { left: calc(50% - 2px); top: 0; bottom: 0; width: 4px; }
.vitre::after { left: 0; right: 0; top: 34%; height: 4px; }
.lumiere {
  position: absolute; inset: 0; opacity: 0;
  background:
    repeating-linear-gradient(90deg, rgba(150, 70, 20, 0.2) 0 7px, rgba(150, 70, 20, 0.04) 7px 15px),
    radial-gradient(ellipse 70% 60% at 50% 40%, #ffe0ad, #f5a755 70%, #d9822f);
}
.lumiere img {
  position: absolute; left: 50%; bottom: -16%;
  height: 102%; width: auto; max-width: none;
  transform: translateX(-50%);
  opacity: 0.8;
  filter: blur(0.6px);
}
.balcon {
  position: absolute; z-index: 3; left: -4%; right: -4%; bottom: 0; height: 30%;
  background: url("/images/rue/balcon.webp") center bottom / 100% 100% no-repeat;
}
.fenetre.allumee .lumiere { opacity: 1; animation: allume 1.1s steps(1, end) both; }
.fenetre.allumee .vitre {
  box-shadow: 0 0 0 7px var(--pierre), 0 0 0 9px var(--pierre-sombre), 0 0 80px 22px rgba(255, 170, 80, 0.2);
}
@keyframes allume {
  0% { opacity: 0; } 14% { opacity: 0.85; } 22% { opacity: 0.15; } 34% { opacity: 1; }
  48% { opacity: 0.55; } 58% { opacity: 1; } 100% { opacity: 1; }
}
.fenetre.eteinte { align-self: start; }
.accroche {
  margin-top: 26px;
  font: italic 500 1.24rem/1.28 var(--serif);
  max-width: 15em;
}
.signature { margin-top: 10px; font-size: 0.9rem; line-height: 1.35; }
.signature .titre { display: block; color: var(--ambre); font-weight: 700; }
.signature .ville { display: block; color: var(--papier-doux); }
.encore {
  margin: 72px auto 0; padding: 0 var(--gouttiere);
  max-width: 40rem;
  font: italic 500 1.3rem/1.35 var(--serif);
  color: var(--papier-doux); text-align: center;
}

@media (min-width: 820px) {
  .facade { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 88px 40px; }
  .accroche { font-size: 1.38rem; }
  .signature { font-size: 0.95rem; }
  .vitre { width: min(100%, 168px); }
  .immeuble-tete { padding-top: 56px; }
}
@media (max-width: 380px) {
  .facade { gap: 56px 14px; }
  .accroche { font-size: 1.14rem; }
}

/* ---------- le rythme ---------- */
.rythme {
  position: relative; overflow: hidden;
  padding: 120px var(--gouttiere) 120px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px;
  background:
    radial-gradient(circle at calc(100% - var(--gouttiere) - 40px) 30%, rgba(255, 199, 125, 0.22), transparent 300px),
    var(--nuit);
}
.rythme h2 { font-size: clamp(2.2rem, 8.4vw, 4.4rem); max-width: 12em; }
.rythme .sous-titre { margin-top: 0.6em; color: var(--papier-doux); }
.rythme-lampe { width: auto; height: clamp(260px, 52vw, 520px); margin-bottom: -120px; }

/* ---------- la sortie ---------- */
.sortie {
  padding: 96px var(--gouttiere) 104px;
  background: linear-gradient(to bottom, #000, var(--nuit) 40%);
  border-top: 1px solid rgba(242, 232, 216, 0.08);
}
.sortie > * { max-width: 40rem; }
.sortie-icone { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 60px rgba(251, 146, 60, 0.28); }
.sortie h2 { margin-top: 32px; font-size: clamp(2.1rem, 8vw, 3.8rem); }
.sortie-date { margin-top: 0.4em; font: italic 500 clamp(1.4rem, 5vw, 2rem)/1.2 var(--serif); color: var(--ambre); }
.sortie p:last-child { margin-top: 1.6rem; color: var(--papier-doux); }

@media (min-width: 900px) {
  .sortie { display: grid; grid-template-columns: auto 1fr; column-gap: 48px; align-items: start; }
  .sortie-icone { grid-row: 1 / span 3; width: 128px; height: 128px; border-radius: 29px; }
  .sortie h2 { margin-top: 0; }
}

/* ---------- pied de page ---------- */
.pied { background: var(--aubergine); color: var(--papier-doux); font-size: 0.95rem; }
.pied-dedans { padding: 48px var(--gouttiere) calc(48px + env(safe-area-inset-bottom)); max-width: 1240px; }
.pied-marque { font: 600 1.7rem/1 var(--serif); color: var(--papier); }
.pied ul { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.pied li a { display: inline-block; padding: 8px 0; color: var(--papier); }
.pied li a:hover { color: var(--ambre); }
.pied-note { margin-top: 18px; }

/* ---------- pages de texte : confidentialité, assistance, mentions ---------- */
.doc-tete {
  position: relative;
  padding: calc(18px + env(safe-area-inset-top)) var(--gouttiere) 0;
  background: linear-gradient(to bottom, #090814, #191329 78%, #15111c);
  overflow: hidden;
}
.doc-barre { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.doc-barre .retour { color: var(--papier); padding: 8px 0; }
.doc-titre { position: relative; z-index: 1; max-width: 44rem; margin: 56px auto 0; padding-bottom: 104px; }
.doc-titre h1 { font-size: clamp(2.3rem, 8vw, 3.6rem); }
.doc-titre p { margin-top: 1rem; color: var(--papier-doux); }
.doc-ville {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: url("/images/rue/ville.webp") center bottom / auto 260px repeat-x;
  opacity: 0.55;
}
.page-doc { background: #15111c; }
.doc {
  max-width: calc(44rem + 2 * var(--gouttiere)); margin: 0 auto;
  padding: 24px var(--gouttiere) 88px;
  color: #ece3d6;
  font-size: 1.06rem; line-height: 1.7;
}
.doc h2 {
  font-size: 1.85rem; line-height: 1.15;
  margin: 2.6rem 0 0.7rem; color: var(--papier);
}
.doc p, .doc ul { margin: 0 0 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc strong { color: var(--papier); }
.table-defile { overflow-x: auto; margin: 0 0 1rem; border: 1px solid rgba(242, 232, 216, 0.14); border-radius: 6px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.96rem; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid rgba(242, 232, 216, 0.1); }
.doc th { font-weight: 700; color: var(--papier); background: rgba(255, 255, 255, 0.04); }
.doc tr:last-child td { border-bottom: 0; }
.doc details { border-top: 1px solid rgba(242, 232, 216, 0.14); }
.doc details:last-of-type { border-bottom: 1px solid rgba(242, 232, 216, 0.14); }
.doc summary {
  cursor: pointer; list-style: none;
  padding: 18px 2rem 18px 0; position: relative;
  font: 600 1.3rem/1.3 var(--serif); color: var(--papier);
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ambre); border-bottom: 2px solid var(--ambre);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.doc details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.doc details p { padding-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
