/* Cyrielle Boclet, architecte d'intérieur
   Mobile d'abord ; la mise en page ordinateur commence à 900 px. */

@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-300-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-ext-300-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --noir: #000000;
  --gris: #444444;
  --fond: #ffffff;
  --vide: #f1f1f1;
  --trait: rgba(0, 0, 0, 0.5);
  --marge: 12px;
  /* hauteur commune à toutes les photos (69 % de la largeur de l'écran sur téléphone) */
  --ph: min(460px, calc(100vw * 0.69));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--noir);
  font-family: "Jost", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 1px solid var(--noir); outline-offset: 2px; }
button { font: inherit; color: inherit; }

/* En-tête fixe */
.entete {
  position: sticky; top: 0; z-index: 5;
  background: var(--fond);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 18px var(--marge) 16px;
}
.logo { margin: 0; line-height: 0; }
.logo img { display: block; width: min(250px, calc(100vw - 110px)); height: auto; }
.pays {
  margin: 0 -0.24em 0 0;
  font-size: 9px; font-weight: 300; line-height: 1.45;
  letter-spacing: 0.24em; text-transform: uppercase; text-align: right;
}

main { padding-top: 40px; }

/* Projet avec photos */
.projet {
  display: grid;
  grid-template-columns: var(--marge) minmax(0, 1fr) var(--marge);
  grid-template-areas:
    ". titre ."
    ". texte ."
    "car car car"
    ". nav ."
    ". credit .";
  margin-bottom: 88px;
}
.titre { grid-area: titre; display: flex; align-items: center; gap: 12px; }
.titre h2 { margin: 0; font-size: 19px; line-height: 1; font-weight: 400; letter-spacing: 0.14em; white-space: nowrap; }
.trait { flex: 1 1 auto; height: 1px; background: var(--trait); transform: scaleY(0.5); }
.annee { margin: 0; font-size: 11px; line-height: 1; font-weight: 300; letter-spacing: 0.08em; white-space: nowrap; }

.texte { grid-area: texte; display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; }
.description { flex: 1 1 0; min-width: 0; margin: 0; font-size: 12px; line-height: 1.4; font-weight: 300; }
.fiche { flex: 1 1 0; min-width: 0; margin: 0; font-size: 10px; line-height: 1.45; font-weight: 300; color: var(--gris); }

.carrousel { grid-area: car; position: relative; margin-top: 28px; }
.piste {
  display: flex; gap: 5px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--marge);
  padding: 0 var(--marge);
  scrollbar-width: none;
}
.piste::-webkit-scrollbar { display: none; }
.piste:focus-visible { outline-offset: -1px; }
.piste picture { flex: 0 0 auto; display: block; scroll-snap-align: start; }
.piste img { display: block; height: var(--ph); width: auto; background: var(--vide); }

.fleche-mobile {
  position: absolute; right: 4px; bottom: 6px;
  width: 52px; height: 36px; padding: 0; border: 0; background: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: opacity 0.3s;
}
.fleche-mobile svg { overflow: visible; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.5)); }
.fleche-mobile path { fill: none; stroke: #ffffff; stroke-width: 1; }
.fleche-mobile[disabled] { opacity: 0; pointer-events: none; }

.nav { grid-area: nav; margin-top: 12px; display: flex; align-items: center; }
.rail { position: relative; flex: 1 1 auto; height: 1px; }
.rail::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.12); transform: scaleY(0.5); }
.curseur { position: absolute; left: 0; top: 0; width: 36px; height: 1px; background: var(--noir); }
.fleche { display: none; }

.credit { grid-area: credit; margin: 12px 0 0; font-size: 10px; line-height: 1.4; font-weight: 300; color: var(--gris); }
.credit em { font-style: italic; }

/* Projets en cours, sans photos */
.en-cours { margin: 0 var(--marge) 88px; display: flex; flex-direction: column; gap: 44px; }

/* Bas de page */
.pied {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px var(--marge) 36px;
  font-size: 12px; line-height: 1.6; letter-spacing: 0.04em; text-align: center;
}
.pied a { padding: 8px 0; }

/* Mentions légales et 404 */
.legal { margin: 0 var(--marge) 88px; max-width: 640px; }
.legal h1 { margin: 0 0 28px; font-size: 19px; line-height: 1.2; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.legal h2 { margin: 28px 0 8px; font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; }
.legal p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; font-weight: 300; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* Ordinateur */
@media (min-width: 900px) {
  :root {
    --marge: 48px;
    /* hauteur des photos calée sur l'écran : le haut du projet suivant reste visible en bas */
    --ph: clamp(300px, min(34vw, calc(100vh - 414px)), 680px);
  }
  main { padding-top: 24px; }
  .entete { padding: 22px var(--marge) 18px; }
  .logo img { width: 360px; }
  .pays { font-size: 10.5px; line-height: 1.5; }

  .projet {
    grid-template-columns: var(--marge) minmax(0, 1fr) 64px minmax(280px, 400px) var(--marge);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      ". car car car car"
      ". nav nav nav ."
      ". credit . titre ."
      ". credit . texte .";
    margin-bottom: 64px;
  }
  .carrousel { margin-top: 0; }
  .piste { gap: 8px; padding: 0 var(--marge) 0 0; scroll-padding-left: 0; }
  .fleche-mobile { display: none; }

  .nav { margin-top: 10px; height: 40px; gap: 16px; }
  .rail { margin-right: 8px; }
  .curseur { width: 56px; }
  .fleche {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .fleche path { fill: none; stroke: var(--noir); stroke-width: 1; }
  .fleche[disabled] { opacity: 0.22; cursor: default; }

  .credit { margin-top: 15px; font-size: 11px; line-height: 1.5; align-self: start; }
  .titre { margin-top: 14px; gap: 16px; }
  .titre h2 { font-size: 20px; }
  .annee { font-size: 12px; letter-spacing: 0.06em; }
  .texte { flex-direction: column; gap: 16px; margin-top: 16px; }
  .description, .fiche { flex: none; }
  .description { font-size: 13px; line-height: 1.45; }
  .fiche { font-size: 11px; line-height: 1.6; }

  .en-cours {
    margin: 24px 0 96px;
    display: grid;
    grid-template-columns: var(--marge) minmax(0, 1fr) 64px minmax(280px, 400px) var(--marge);
    gap: 56px 0;
  }
  .projet-texte:nth-child(odd) { grid-column: 2; max-width: 400px; }
  .projet-texte:nth-child(even) { grid-column: 4; }
  .projet-texte .titre { margin-top: 0; }

  .pied { padding-bottom: 44px; }
  .legal { margin: 0 var(--marge) 120px; }
  .legal h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .fleche-mobile { transition: none; }
}
