/* =========================================================
   contact-page.css — page /contact/ (contact/index.html)
   ---------------------------------------------------------
   Direction : « planche-contact ». La page contact se lit comme la
   planche d'un photographe : des images numérotées et, pour choisir,
   le cadre de visée « [ ] » de la navigation.
   - le titre reprend le geste de l'accueil (« Paul [photo] Richet ») :
     « Parlons [portrait] photo », la fenêtre fait défiler des portraits ;
   - le déroulé d'une séance en quatre images numérotées ; le cadre de
     visée les parcourt une à une (sur mobile, il suit la lecture) ;
   - la demande, sur le gris de la galerie, dans un tirage blanc.
   Pas d'odyn, de GSAP ni de Lenis ici : CSS + contact-page.js.
   Mouvement : transform / opacity uniquement, coupé sous
   prefers-reduced-motion.
   ========================================================= */

/* Échelle typographique du site (définie par odyn-bundle.css sur
   l'accueil, non chargé ici) : chrome.css et webflow.css en dépendent. */
:root {
  --size-unit: 16;
  --size-container-ideal: 1920;
  --size-container-min: 992px;
  --size-container-max: 2560px;
  --size-container: clamp(var(--size-container-min), 100vw, var(--size-container-max));
  --size-font: calc(var(--size-container) / (var(--size-container-ideal) / var(--size-unit)));
}
@media screen and (max-width: 991px) { :root { --size-container-ideal: 1400; --size-container-min: 768px; --size-container-max: 991px; } }
@media screen and (max-width: 767px) { :root { --size-container-ideal: 700; --size-container-min: 480px; --size-container-max: 767px; } }
@media screen and (max-width: 479px) { :root { --size-container-ideal: 390; --size-container-min: 320px; --size-container-max: 479px; } }
h1, h2, h3, h4, h5, h6, p, label, blockquote, dl, dd, figure { margin-top: 0; margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
::selection { background-color: #000; color: #fff; }

.cp {
  --cp-ink: #000;
  --cp-paper: #fff;
  --cp-gray: var(--color--gray, #c5c5c5);
  --cp-muted: #5f5a5a;          /* 6,6:1 sur blanc */
  --cp-muted-gray: #3d3a3a;     /* 6,4:1 sur le gris #c5c5c5 */
  --cp-line: rgba(0, 0, 0, .16);
  --cp-gutter: var(--chrome-gutter);
  --cp-radius: .375rem;
  --cp-ease: cubic-bezier(.625, .05, 0, 1);
  --cp-ease-out: cubic-bezier(.22, .61, .36, 1);
  --cp-space: clamp(4.5rem, 10vw, 11rem);        /* respiration entre sections */
  font-size: clamp(15px, calc(.55vw + 9px), 20px);
  line-height: 1.3;
  color: var(--cp-ink);
  background: var(--cp-paper);
  overflow-x: clip;
}
.cp-wrap { width: 100%; padding-left: var(--cp-gutter); padding-right: var(--cp-gutter); }

/* Étiquette de section : carré plein + petites capitales (comme la fin de page) */
.cp-eyebrow {
  display: flex;
  align-items: center;
  gap: .6em;
  margin: 0;
  font-size: max(13px, .875em);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cp-eyebrow .square { width: .7em; flex: none; background: currentColor; }

/* =========================================================
   1. Ouverture
   ========================================================= */
.cp-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2.5rem, 7vh, 6rem);
  padding-top: calc(var(--chrome-h) + clamp(1.5rem, 5vh, 4.5rem));
  padding-bottom: clamp(2.5rem, 7vh, 5.5rem);
}
/* grand écran seulement : sur tablette en portrait la hauteur viendrait du vide */
@media (min-height: 640px) and (min-width: 992px) {
  .cp-hero { min-height: min(88svh, 58rem); }
}

/* Titre : une seule ligne, calée sur la largeur utile.
   « Parlons [ ] photo » mesure 6,18 em en Diatype (fenêtre comprise). */
.cp-hero > .cp-wrap:first-child { container-type: inline-size; }
.cp-titre {
  --cp-titre-em: 6.24;
  margin: clamp(1rem, 3vh, 2rem) 0 0;
  font-size: calc((100vw - 2 * var(--cp-gutter)) / var(--cp-titre-em));
  font-size: calc(100cqi / var(--cp-titre-em));    /* largeur réelle (barre de défilement exclue) */
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.cp-titre__mot { display: inline-block; overflow: hidden; padding: .06em .02em .1em; margin: -.06em -.02em -.1em; vertical-align: bottom; }
.cp-titre__mot > span { display: inline-block; }

/* Fenêtre « portrait » dans le titre (l'accueil a une fenêtre paysage) */
.cp-titre__img {
  position: relative;
  display: inline-block;
  width: .56em;
  height: .72em;
  margin: 0 .1em 0 .09em;
  vertical-align: baseline;
  overflow: hidden;
  border-radius: .04em;
  background: #e7e7e7;
}
.cp-cycle__ph { position: absolute; inset: 0; opacity: 0; }
.cp-cycle__ph.is-on { opacity: 1; }
.cp-cycle__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cp-cycle__ph:first-child { opacity: 1; }                 /* sans JS : le premier portrait */
.cp-js .cp-cycle__ph:first-child:not(.is-on) { opacity: 0; }
.cp-js .cp-cycle__ph { transition: opacity .3s ease; }

/* Bas de l'ouverture : texte d'appel + repères */
.cp-hero__bas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5em var(--cp-gutter);
  align-items: end;
}
.cp-lead { max-width: 30em; font-size: clamp(1.0625rem, 1.25vw, 1.5rem); line-height: 1.25; letter-spacing: -.01em; }
.cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75em 1.75em; margin-top: 1.75em; }

/* Pastille d'action (même dessin que .chrome-cta, en plus grand) */
.cp-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-height: 52px;
  padding: 0 1.5em;
  overflow: hidden;
  color: var(--cp-paper);
  background: var(--cp-ink);
  border-radius: 2em;
  white-space: nowrap;
}
.cp-btn__arrow { display: inline-block; transition: transform .5s var(--cp-ease); }
@media (hover: hover) and (pointer: fine) {
  .cp-btn:hover .cp-btn__arrow { transform: translateY(.2em); }
}
.cp-lien {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
  text-decoration-color: transparent;
  transition: text-decoration-color .3s var(--cp-ease-out);
}
.cp-lien:hover { text-decoration-color: currentColor; }
.cp :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.cp .cp-btn:focus-visible { outline-color: var(--cp-ink); border-radius: 2em; }

/* Repères : trois lignes au filet fin */
.cp-faits { margin: 0; border-top: 1px solid var(--cp-line); }
.cp-fait {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 1em;
  padding: .85em 0;
  border-bottom: 1px solid var(--cp-line);
}
.cp-fait dt {
  padding-top: .15em;
  font-size: max(12px, .8125em);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cp-muted);
}
.cp-fait dd { margin: 0; }

/* Entrée de l'ouverture : les mots montent de leur masque, la fenêtre
   s'ouvre comme un obturateur, puis le reste se pose. CSS seul : rien
   n'attend le JavaScript, rien ne saute. */
@media (prefers-reduced-motion: no-preference) {
  .cp-titre__mot > span { animation: cp-monte 1.1s var(--cp-ease) both; }
  .cp-titre__mot:last-child > span { animation-delay: .12s; }
  .cp-titre__img { animation: cp-obturateur .9s var(--cp-ease) .35s both; }
  .cp-hero__bas > * { animation: cp-pose .9s var(--cp-ease-out) both; }
  .cp-hero__bas > :nth-child(1) { animation-delay: .45s; }
  .cp-hero__bas > :nth-child(2) { animation-delay: .55s; }
}
@keyframes cp-monte { from { transform: translateY(105%); } }
@keyframes cp-obturateur { from { transform: scaleY(0); } }
@keyframes cp-pose { from { opacity: 0; transform: translateY(1rem); } }

/* =========================================================
   2. Le déroulé
   ========================================================= */
.cp-section { padding-top: var(--cp-space); padding-bottom: var(--cp-space); }
.cp-deroule { padding-top: clamp(3rem, 7vw, 7rem); }
.cp-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25em var(--cp-gutter);
  align-items: start;
}
.cp-intro { max-width: 26em; font-size: clamp(1.0625rem, 1.25vw, 1.5rem); line-height: 1.25; letter-spacing: -.01em; }

.cp-etapes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 1.6vw, 2rem);
  margin: clamp(2.5rem, 6vw, 6rem) 0 0;
  padding: 0;
  list-style: none;
}
.cp-etape { min-width: 0; }
.cp-etape__ph {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--cp-radius);
  background: #e7e7e7;
}
.cp-etape__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--cp-ease); }
.cp-etape__txt { padding-top: 1.1em; }
.cp-etape__nr { display: block; font-size: .875em; color: var(--cp-muted); font-variant-numeric: tabular-nums; }
.cp-etape__titre {
  margin: .5em 0 0;
  font-size: clamp(1.5rem, 2.3vw, 2.75rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.035em;
}
.cp-etape__p { margin-top: .75em; max-width: 24em; color: var(--cp-ink); }

/* Le cadre de visée : un seul cadre parcourt les quatre images
   (position en transform, posée par contact-page.js) */
.cp-viseur {
  --c: clamp(.35rem, .6vw, .6rem);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s var(--cp-ease-out), transform .8s var(--cp-ease);
  will-change: transform;
}
.cp-viseur.is-on { opacity: 1; }
.cp-viseur.is-instant { transition: opacity .4s var(--cp-ease-out); }
.cp-viseur__edge {
  position: absolute;
  top: calc(-1 * var(--c));
  bottom: calc(-1 * var(--c));
  width: clamp(.6rem, 1vw, .9rem);
  border: 1.5px solid var(--cp-ink);
}
.cp-viseur__edge--l { left: calc(-1 * var(--c)); border-right: 0; }
.cp-viseur__edge--r { right: calc(-1 * var(--c)); border-left: 0; }
.cp-etape.is-vise .cp-etape__img { transform: scale(1.045); }

/* =========================================================
   3. La demande
   ========================================================= */
.cp-demande { background: var(--cp-gray); }
.cp-demande__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.cp-demande__aside {
  position: sticky;
  top: calc(var(--chrome-h) + 1.5rem);
}
.cp-h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 7rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.05em;
}
.cp-texte { margin-top: 1.1em; max-width: 26em; color: var(--cp-muted-gray); }
.cp-demande__bas { display: flex; align-items: flex-end; gap: clamp(1rem, 2vw, 2rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
.cp-demande__ph {
  flex: none;
  width: clamp(7rem, 13vw, 14rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--cp-radius);
  background: rgba(0, 0, 0, .08);
}
.cp-demande__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-direct { display: flex; flex-direction: column; align-items: flex-start; gap: .1em; min-width: 0; }
.cp-direct__label {
  margin-bottom: .4em;
  font-size: max(12px, .8125em);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cp-muted-gray);
}
.cp-direct .cp-lien { min-height: 36px; overflow-wrap: anywhere; }

/* Le formulaire : un tirage blanc posé sur le gris */
.cp .contact-panel {
  position: relative;
  padding: clamp(1.5rem, 3.2vw, 3.25rem);
  background: var(--cp-paper);
  border-radius: clamp(.75rem, 1vw, 1.25rem);
}
.cp .contact-form { --contact-ink: #000; }
.cp .contact-label { font-size: max(12px, .8125em); }
.cp .contact-note, .cp .contact-hint, .cp .contact-error, .cp .contact-legal, .cp .contact-mail { font-size: max(13px, .875em); }
.cp .contact-submit { font-size: 1.0625em; }
.cp .contact-done__title { font-size: clamp(2.25rem, 4.5vw, 4.5rem); letter-spacing: -.045em; line-height: .95; }

/* =========================================================
   Apparitions au défilement (uniquement si contact-page.js tourne)
   ========================================================= */
.cp-js [data-cp-reveal] {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity .8s var(--cp-ease-out), transform 1s var(--cp-ease);
}
.cp-js [data-cp-reveal].is-in { opacity: 1; transform: none; }
.cp-js .cp-etape[data-cp-reveal]:nth-child(2) { transition-delay: .08s; }
.cp-js .cp-etape[data-cp-reveal]:nth-child(3) { transition-delay: .16s; }
.cp-js .cp-etape[data-cp-reveal]:nth-child(4) { transition-delay: .24s; }

/* =========================================================
   Points de rupture
   ========================================================= */
.cp-direct--bas { display: none; margin-top: 2.25rem; }

/* Tablette : déroulé en 2 × 2, demande sur une colonne */
@media (max-width: 991px) {
  .cp-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-etape__ph { aspect-ratio: 4 / 3; }
  .cp-demande__grid { grid-template-columns: minmax(0, 1fr); }
  .cp-demande__aside { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--cp-gutter); align-items: end; }
  .cp-demande__aside > .cp-h2, .cp-demande__aside > .cp-texte { grid-column: 1; }
  .cp-demande__bas { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; flex-direction: column; align-items: flex-start; }
  .cp-demande__ph { display: none; }
  .cp-h2 { font-size: clamp(2.5rem, 7.4vw, 5rem); }
}
/* Mobile : tout sur une colonne ; chaque étape = vignette + texte */
@media (max-width: 767px) {
  .cp-hero__bas, .cp-head { grid-template-columns: minmax(0, 1fr); }
  .cp-hero { gap: 2.5rem; }
  .cp-fait { grid-template-columns: 6.25em minmax(0, 1fr); }
  .cp-etapes { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .cp-etape { display: grid; grid-template-columns: 36.5% minmax(0, 1fr); gap: 1.1rem; align-items: start; }
  .cp-etape__ph { aspect-ratio: 4 / 5; }
  .cp-etape__txt { padding-top: 0; }
  .cp-etape__titre { font-size: clamp(1.375rem, 6.2vw, 2rem); }
  .cp-etape__p { margin-top: .55em; font-size: .9375em; line-height: 1.3; }
  .cp-demande__aside { display: block; }
  .cp-demande__bas { display: none; }
  .cp-direct--bas { display: flex; }
  .cp .contact-panel { margin-left: calc(-.5 * var(--cp-gutter)); margin-right: calc(-.5 * var(--cp-gutter)); }
}
@media (max-width: 379px) {
  .cp-etape { grid-template-columns: 34% minmax(0, 1fr); gap: .9rem; }
}
/* Téléphone en paysage : peu de hauteur */
@media (max-height: 520px) and (orientation: landscape) {
  .cp-hero { padding-top: calc(var(--chrome-h) + 1rem); }
  .cp-demande__aside { position: static; }
}

/* =========================================================
   Mouvement réduit
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .cp *, .cp-viseur { transition: none !important; animation: none !important; }
  .cp-js [data-cp-reveal] { opacity: 1; transform: none; }
  .cp-etape.is-vise .cp-etape__img { transform: none; }
}
