   /* BASE */

    :root {
      --margin: 25px;
      --gutter: 10px;
      --black: #111111;
      --white: #ffffff;
      --placeholder: #eeeeee;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      background: var(--white);
      color: var(--black);
      font-family: "IBM Plex Mono", monospace;
      font-weight: 400;
      font-size: 15px;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    /* INTRODUCTION */

    .hero {
      min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--margin);
  position: relative;
  display: flex;
  flex-direction: column;
    }

    .hero-content {
      padding-top: 5px;
    }

    .hero h1 {
      margin: 0;
  width: 100%;
  font-size: calc(11.8vw - 6px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.075em;
  white-space: nowrap;
    }

    .intro-line {
      font-size: clamp(18px, 2.43vw, 35px);
      line-height: 1.25;
      margin: 0;
      letter-spacing: -0.055em;
    }

    .intro-line:first-child {
      margin-top: 5px;
    }

   .intro-anchor {
  position: relative;
  display: inline-block;
}

.mascotte {
  position: absolute;
  left: calc(50% - 35px);
  top: 70%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: auto;
  margin: 0;
  font-size: 39px;
  animation: swing 2s ease-in-out infinite;
  transform-origin: 37% 4%;
}

  @keyframes swing {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

   
/* HEADER ACCUEIL */

.site-header {
  position: absolute;
  top: auto;
  bottom: auto;
  left: 0;
  width: 100%;
  z-index: 30;

  padding: 12px 25px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;

  box-sizing: border-box;
  background: #fff;

  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}


/* Zones cliquables limitées au texte */



.site-header a {
  color: inherit;
  text-decoration: none;
  width: fit-content;
  justify-self: start;
}

.site-header a:nth-child(2) {
  text-align: left;
}

.site-header a:nth-child(3) {
  text-align: right;
  justify-self: end;
}





/* Le header se bloque en haut pendant le scroll de l'intro */
.site-header.is-fixed {
  position: fixed;
  top: 0;
  bottom: auto;
}

.projects-stage {
  position: relative;
}

/* Prolonge le fond de la page pendant le mouvement,
   pour éviter de dévoiler l'intro ou un espace blanc. */
.projects-stage::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: inherit;
  pointer-events: none;
}
/* L'intro disparaît uniquement à l'arrivée dans les projets */


/* Le header fait partie de la page projets */



  
/* PROJETS */

.projects {
  padding: 48px var(--margin) 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.projects-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
}

.projects-column--left {
  grid-column: span 1;
}

.projects-column--right {
  grid-column: span 2;
}

.project {
   min-width: 0;
  width: 100%;
  align-self: stretch;
}

.project-image {
  width: 100%;
  display: block;
  background: var(--placeholder);
  overflow: hidden;
  position: relative;
}

/* Images carrées à gauche */
.projects-column--left .project-image {
  aspect-ratio: 1 / 1;
}

/* Proportions conservées à droite */
.projects-column--right .project-image {
  aspect-ratio: 1.65 / 1;
}

.project-image::after {
  content: "Image du projet";
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #888888;
  font-size: 12px;
}

.project-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  color: var(--black);
  font-size: 13px;
}

.project-info {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.2;
}

.project-info p {
  margin: 0;
}


    /* PIED DE PAGE */

    .site-footer {
      margin-top: 60px;
      padding: 0 var(--margin) 15px;
      display: flex;
      justify-content: space-between;
      gap: var(--gutter);
      font-size: 12px;
    }

    .site-footer a {
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    /* PETITS ÉCRANS */

    @media (max-width: 900px) {
      :root {
        --margin: 20px;
        --gutter: 8px;
      }

      .hero h1 {
        width: 100%;
  font-size: calc(11.8vw - 3.5px);
  line-height: 1.05;
  white-space: nowrap;
      }

      .intro-line {
        font-size: clamp(17px, 4vw, 24px);
      }

      .site-header {
        font-size: 13px;
      }

      .projects {
        row-gap: 20px;
      }

      .project-info {
        font-size: 11px;
      }

      

.site-footer {
  font-size: 16px;
  flex-direction: column;
  align-items: right;
  text-align: right;
  gap: 10px;
   padding-top: 76px;
}

.site-footer a {
  align-self: right;
}


    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }

      .mascotte {
        animation: none;
      }
    }
    

/* Masque l'introduction une fois dans les projets */

body.projects-active #accueil,
html.direct-projects #accueil {
  display: none !important;
}

/* Positionne immédiatement le header en haut
   lors d'une arrivée directe sur les projets */

html.direct-projects .site-header {
  position: fixed;
  top: 0 !important;
}

    

/* ZONES CLIQUABLES DU HEADER */

.site-header {
  pointer-events: none;
}

.site-header > a {
  pointer-events: auto;

  display: inline-block;
  width: max-content;
  height: max-content;

  justify-self: start;
  align-self: center;

  padding: 0;
  margin: 0;
}

.site-header > a:nth-child(3) {
  justify-self: end;
}

.project > a {
  display: block;
  cursor: pointer;
}

.project > a * {
  cursor: pointer;
}

.project-image::after {
  pointer-events: none;
} 



/* COUVERTURES DES PROJETS */

/* Respecte les proportions naturelles de l'image */
.projects-column--right .project-image.project-image--photo {
  aspect-ratio: auto;
}


.projects-column--left .project-image.project-image--photo {
  aspect-ratio: auto;
}


.project-image--photo img {
  display: block;
  width: 100%;
  height: auto;
}

.project-image--photo::after {
  display: none;
}



/* VERSION MOBILE — ACCUEIL ET HEADER */

@media (max-width: 900px) {

  /* Introduction mobile : visible avant la galerie. */

  /* Header sous l'introduction, puis sticky dans la galerie. */

.site-header {
  position: absolute;
  left: 0;

  width: 100%;
  height: auto;
  padding: 12px 20px;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;

  font-size: clamp(22px, 6.9vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.065em;
}

/* NOM SUR DEUX LIGNES */

.site-header a:first-child span {
  display: block;
}


  /* Masque Projets dans le header */

  .site-header a:nth-child(2) {
    display: none;
  }

  /* Infos à droite */

  .site-header a:nth-child(3) {
    grid-column: 2;
    justify-self: end;
  }

  /* Les projets commencent sous le header */

  .projects {
    padding-top: 76px;
  }



/* ALIGNEMENT DES LIENS EN BAS DU HEADER */

.site-header > a:first-child,
.site-header > a:nth-child(3) {
  align-self: flex-end;
}


/* PROJETS — UNE SEULE COLONNE */

.projects {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Permet de réorganiser les projets
   sans modifier leur HTML */

.projects-column {
  display: contents;
}

/* Chaque projet occupe toute la largeur */

.project {
  width: 100%;
}

/* Conserve les proportions des images */

.projects-column--left .project-image {
  aspect-ratio: 1 / 1;
}

.projects-column--right .project-image {
  aspect-ratio: 1.65 / 1;
}

/* Légendes */

.project-info {
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.3;
}


/* ORDRE MOBILE DÉFINI DANS WORDPRESS */

.projects-column .project {
  order: var(--mobile-order, 99);
}




}

/* MOBILE : aucun défilement animé lors d’un accès direct à la galerie. */
@media (max-width: 900px) {
  html {
    scroll-behavior: auto;
  }
}


/* TYPOGRAPHIE FLUIDE — GRANDS ÉCRANS UNIQUEMENT.
   Base de référence : 1440 px (inchangée).
   Augmentation progressive jusqu'à 2560 px, puis plafonnement.
   Le nom géant, la structure de grille, les animations et le mobile restent inchangés. */
@media (min-width: 1441px) {
  /* Gouttière de la grille des projets : 10px → 18px. */
  :root {
    --gutter: clamp(10px, calc(0.7143vw - 0.286px), 18px);
  }

  .site-header {
    gap: var(--gutter);
  }

  .intro-line {
    font-size: clamp(35px, calc(1.5179vw + 13.1429px), 52px);
  }

  .site-header {
    font-size: clamp(20px, calc(0.7143vw + 9.714px), 28px);
  }

  .project-number {
    font-size: clamp(13px, calc(0.2679vw + 9.143px), 16px);
  }

  .project-info {
    font-size: clamp(15px, calc(0.3571vw + 9.857px), 19px);
  }

  .site-footer {
    font-size: clamp(12px, calc(0.2679vw + 8.143px), 15px);
  }
}


/* REBOND MOBILE NATIF — Galerie défilée indépendamment de l'introduction.
   Le navigateur (iOS Safari / Chrome Android) gère la résistance en fin de scroll ;
   aucun déplacement artificiel de la galerie ou du header.
   Le conteneur reste dans le flux sur ordinateur et pendant l'introduction. */
@media (max-width: 900px) {
  html.solene-native-projects,
  html.solene-native-projects body {
    overflow: hidden !important;
    height: 100%;
  }
  body.projects-native-scroll {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  body.projects-native-scroll .projects-scroll-region {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh; /* repli pour les navigateurs plus anciens */
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
    touch-action: pan-y;
    background: #fff;
    z-index: 1;
  }
  body.projects-native-scroll #site-header.is-fixed {
    position: fixed;
    top: 0 !important;
    z-index: 30;
  }
}


/* Mobile : UNE SEULE surface de scroll pendant l'intro et la galerie.
   Le verrouillage supprime l'introduction sans transférer le geste natif
   à un autre élément. Safari conserve le rebond de cette même surface. */
@media (max-width: 900px) {
  html.solene-one-scroller,
  html.solene-one-scroller body {
    height: 100%;
    overflow: hidden !important;
  }
  html.solene-one-scroller .projects-scroll-region {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    overflow-anchor: none;
    touch-action: pan-y;
    scroll-behavior: auto;
  }
  html.solene-one-scroller .projects-scroll-region.solene-avoid-smooth {
    scroll-behavior: auto !important;
  }
  /* Le header reste dans le scroller et devient sticky naturellement :
     plus de changement fixed/absolute pendant l'inertie iOS. */
  html.solene-one-scroller #site-header,
  html.solene-one-scroller #accueil ~ #site-header,
  html.solene-one-scroller #site-header.is-fixed,
  html.solene-one-scroller #accueil ~ #site-header.is-fixed {
    position: sticky !important;
    top: 0 !important;
    bottom: auto !important;
    margin-top: calc(-1 * var(--solene-header-height, 48px));
    z-index: 30;
  }
  html.solene-one-scroller body.projects-active #site-header {
    margin-top: calc(-1 * var(--solene-header-height, 48px));
  }
}
