/* après l'averse — pages projet : la même nuit qui tombe que sur l'accueil */

/* apostrophe droite : Sorts Mill Goudy la dessine courbe, on la prend dans une police système à empattements */
@font-face { font-family: "Apostrophe droite"; src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Times"); unicode-range: U+0027; }

:root {
  --ink: #f1eee9;
  --ink-soft: rgba(241, 238, 233, .66);
  --line: rgba(241, 238, 233, .16);
  --font-title: "Apostrophe droite", "Sorts Mill Goudy", Georgia, serif;   /* (essai ; avant : High Tower Text, sauvegardé) */
  --font: "Jost", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* pas de fond gris/bleu au toucher sur téléphone */
a, button { -webkit-tap-highlight-color: transparent; }

/* passage d'un projet à l'autre : fondu enchaîné (navigateurs récents ; ailleurs, changement de page normal) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .35s ease both pa-out; }
::view-transition-new(root) { animation: .45s ease both pa-in; }
@keyframes pa-out { to { opacity: 0; } }
@keyframes pa-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

html { background: #121214; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* essai : le goudron sec de l'accueil (versions « ciel du soir » et « blanc » sauvegardées) */
  background: #121214 url("../images/fond-goudron.jpg") center / cover fixed;
}

a { color: inherit; }

/* ---------- en-tête ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 64px);
}
.back, .brand { text-decoration: none; }
.back {
  font-size: .85rem;
  letter-spacing: .12em;
  color: var(--ink-soft);
  transition: color .3s;
}
.back:hover { color: var(--ink); }
.brand {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* ---------- présentation ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(24px, 6vh, 80px) 0 clamp(48px, 8vh, 110px);
}

.kicker {
  margin: 0 0 1.2em;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 1;
}

.intro {
  margin: 1.4em 0 0;
  max-width: 30em;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
}

/* le visuel, comme une feuille posée : papier, légère rotation, ombre */
.sheet {
  margin: 0;
  justify-self: center;
  width: min(100%, 460px);
  padding: 4.5%;
  background: #f3efe7;
  rotate: var(--r, -2deg);
  outline: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .25), 0 30px 60px -10px rgba(0, 0, 0, .55);
}
.sheet img { display: block; width: 100%; height: auto; }

/* ---------- fiche ---------- */

.details dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin: 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.details dt {
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .4em;
}
.details dd { margin: 0; font-size: .95rem; }

/* ---------- récit ---------- */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(48px, 8vh, 100px) 0;
}
.story h2 {
  margin: 0 0 .8em;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}
.story p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- projets voisins ---------- */

.next {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 64px) clamp(40px, 8vh, 80px);
  border-top: 1px solid var(--line);
}
.next a {
  text-decoration: none;
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}
.next a:last-child { text-align: right; }
.next span {
  display: block;
  font-family: var(--font);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.next a:hover { opacity: .6; }

/* ---------- téléphone ---------- */

@media (max-width: 760px) {
  .hero, .story { grid-template-columns: 1fr; }
  .sheet { width: min(86%, 380px); }
  .details dl { grid-template-columns: 1fr 1fr; }
  .details dl div:last-child { grid-column: 1 / -1; }
}

/* ---------- blocs riches (pages projet détaillées) ---------- */

.wide { margin: clamp(40px, 7vh, 90px) 0; }
.wide img {
  display: block; width: 100%; height: auto;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .25), 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.wide--plain img { box-shadow: none; }
.wide--narrow { max-width: 460px; margin-left: auto; margin-right: auto; }

.block { padding: clamp(32px, 6vh, 80px) 0; }
.block__title {
  margin: 0 0 .6em;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}
.block__text { margin: 0 0 1.6em; max-width: 40em; color: var(--ink-soft); font-size: 1.05rem; }
.block__text strong, .block__text em { color: var(--ink); font-weight: 400; }

.block--split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.sheet--photo { padding: 0; background: none; width: min(100%, 420px); }

/* logo sur pastilles rondes */
.pastilles { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px); margin: clamp(32px, 5vh, 56px) 0; }
.pastilles img { display: block; width: 100%; height: auto; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }   /* la pastille blanche reste visible sur fond blanc */

/* deux visuels côte à côte */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 40px); margin-top: 8px; }
.pair img { display: block; width: 100%; height: auto; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }

/* palette : pastilles de couleur nommées */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.swatches li {
  font-size: .95rem;
  padding-top: 64px;
  position: relative;
}
.swatches li::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 52px;
  background: var(--c);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}
.swatches span {
  display: block;
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* activités accompagnées */
.agenda ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agenda li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.agenda span {
  display: block;
  margin-bottom: .4em;
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--ink);
}


@media (max-width: 760px) {
  .block--split, .swatches, .agenda ul { grid-template-columns: 1fr 1fr; }
  .block--split { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
}

/* lien d'appel (réseau, site externe) */
.cta {
  display: inline-block;
  margin-top: 1.8em;
  padding: .8em 1.3em;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: background .3s, border-color .3s;
}
.cta:hover { background: rgba(241, 238, 233, .07); border-color: var(--ink-soft); }
.details dd a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* logo sur sa carte blanche */
.wide--logo { max-width: 720px; margin-left: auto; margin-right: auto; }
.wide--logo img { border-radius: 3px; }

/* étapes numérotées */
.steps ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li { padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.steps span { display: block; margin-bottom: .4em; font-family: var(--font-title); font-size: 1.6rem; color: var(--ink); }
.block--cta { text-align: center; }
.block--cta .block__text { margin-left: auto; margin-right: auto; }


@media (max-width: 760px) {
  .steps ol { grid-template-columns: 1fr 1fr; }
}

/* planches de charte sur fond blanc : présentées comme des feuilles */
.wide--white img { background: #fff; padding: clamp(12px, 2.5vw, 32px); border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

.wide--narrow-l { max-width: 820px; }

/* ---------- arrivée depuis le ciel (arrivee.js) ---------- */
/* le ciel du soir recouvre d'abord la page, puis s'efface pendant que la feuille se pose */
.arrive body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(to bottom, #12142e 0%, #3a2c4e 45%, #8b5464 75%, #e8835a 100%);
}
.arrive-go body::before { animation: arrive-sky .9s .1s ease both; }
@keyframes arrive-sky { to { opacity: 0; } }
.arrive .hero .sheet { position: relative; z-index: 60; }
.arrive .top, .arrive .hero__text, .arrive .details, .arrive main > :not(.hero), .arrive .next { opacity: 0; }
.arrive-go .top, .arrive-go .hero__text, .arrive-go .details, .arrive-go main > :not(.hero), .arrive-go .next { animation: arrive-in .6s .5s ease both; }
@keyframes arrive-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* décomposition : visuels sur blanc, légende dessous */
.pair--white figure { margin: 0; }
.pair--white img { background: #fff; padding: clamp(12px, 2.5vw, 28px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); object-fit: contain; aspect-ratio: 16 / 10; }
.pair--white figcaption { margin-top: 1em; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.pair--white figcaption strong, .pair--white figcaption em { color: var(--ink); font-weight: 400; }
.block__note { margin-top: 1.4em; font-size: .9rem; }

/* téléphone : espacements resserrés */
@media (max-width: 760px) {
  .hero { padding: 16px 0 40px; gap: 32px; }
  .block { padding: 20px 0; }
  .story { padding: 32px 0; gap: 28px; }
  .wide { margin: 28px 0; }
  .details dl { padding: 20px 0; gap: 18px; }
  .pastilles { margin: 20px 0; gap: 12px; }
  .agenda ul, .steps ol { gap: 18px; }
  .next { padding: 24px 20px 36px; }
}
.story:has(> article:only-child) { grid-template-columns: 1fr; }
.story:has(> article:only-child) p { max-width: 42em; }

/* textes longs justifiés */
/* (sans césure : les mots ne sont jamais coupés ; les colonnes sont assez larges pour une justification régulière) */
.intro, .story p, .block__text, .pair--white figcaption {
  text-align: justify;
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: normal;
  text-wrap: pretty;
}
.block__text { max-width: 46em; }
.story:has(> article:only-child) p { max-width: 46em; }
/* téléphone : colonne trop étroite pour justifier sans trous */
@media (max-width: 760px) {
  .story p, .block__text, .pair--white figcaption { text-align: left; }
}
.block--cta .block__text { text-align: center; }
@media (max-width: 760px) { .intro { text-align: left; } }   /* gros caractères sur colonne étroite : la justification creuserait des trous */

/* récits sur une seule colonne, plus large : la justification reste régulière sans couper les mots */
.story { grid-template-columns: 1fr; gap: clamp(28px, 4vh, 48px); }
.story p { max-width: 46em; }

/* les textes seuls sur leur ligne occupent toute la largeur de la page (alignés sur les images) */
.story p, .block__text, .story:has(> article:only-child) p { max-width: none; }
.block--split .block__text { max-width: 40em; }

/* deux sections courtes : côte à côte sur la largeur (une seule colonne sur téléphone) */
.story:has(> article + article) { grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); }
@media (max-width: 760px) { .story:has(> article + article) { grid-template-columns: 1fr; } }
