/* ==========================================================================
   1. POLICES & CONFIGURATION GLOBALE
   ========================================================================== */

@font-face {
  font-family: 'LoRes';
  src: url('fonts/Clarendon-Bold-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'LoRes';
  src: url('fonts/BancoStd.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
}

@font-face {
    font-family: 'Lores2';
    src: url('fonts/ITCCheltenham-BoldCond.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Lores2';
    src: url('fonts/UniversLTStd55-BoldItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
}

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

/* NETTOYAGE : On repasse sur un scroll standard, indispensable pour le Sticky */
html, body {
  margin: 0;
  padding: 0;
  background-color: dodgerblue;
  color: lightcyan;
}

/* EFFECT STICKY : Le conteneur suit le flux puis se bloque à 0px du haut */
.intro-container {
  position: -webkit-sticky; /* Pour la compatibilité Safari */
  position: sticky;
  top: 0;
  left: 5%;
  width: 90%;
  padding-top: 40px;
  padding-bottom: 20px;
  z-index: 1; /* Reste en dessous des images */
}

/* ==========================================================================
   2. TYPOGRAPHIE & ÉLÉMENTS DE TEXTE
   ========================================================================== */

p {
  margin: 0.1em;
}

.intro {
  margin: 0.5em;
  font-size: 1em;
  font-family: 'LoRes';
}

ul {
  font-size: 0.1em;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

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

/* ==========================================================================
   3. CONTENEURS DE PROJETS (MOBILE FIRST)
   ========================================================================== */

.refs {
  position: relative; /* Repasse en relatif pour suivre le scroll naturellement */
  left: 5%;
  width: 90%;
  /* Marge négative pour permettre aux images de remonter par-dessus le texte */
  margin-top: -40px; 
  padding-bottom: 300px; /* Donne de la course pour faire défiler toutes les images */
  z-index: 10; /* Passe devant le texte bloqué */
  pointer-events: none; 
}

.refs1, .refs2 {
  position: relative; 
  width: 100%;
}

.image-container {
  background-color: white;
  display: block;
  position: relative;
  width: 100%;
  margin-bottom: 40px; 
  pointer-events: auto; 
}

.image-container a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.image-container img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease-in-out;
}

.image-container .img-default {
  opacity: 1;
  position: relative;
  z-index: 1;
}

.image-container .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 2;
}

/* ==========================================================================
   EFFETS AU SURVOL (HOVER)
   ========================================================================== */

.image-container:hover .img-default {
  opacity: 0;
}

.image-container:hover .img-hover {
  opacity: 1;
}

/* ==========================================================================
   4. RESPONSIVE DESIGN (TABLETTES & ÉCRANS > 800PX)
   ========================================================================== */

@media screen and (min-width: 800px) {
  .intro {
    font-size: 1.5em;
  }

  .refs {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 90%;
    left: 5%;
    /* Accentue le croisement sur grand écran */
    margin-top: -60px; 
    padding-bottom: 500px;
  }

  .refs1, .refs2 {
    width: 48%;
  }

  .image-container {
    width: 100%;
    margin-bottom: 80px; 
  }
}

/* ==========================================================================
   5. RESPONSIVE DESIGN (ORDINATEURS)
   ========================================================================== */

@media screen and (min-width: 1024px) {
  body {
    font-size: 1.5em;
  }

  .refs1, .refs2 {
    width: 48%;
  }

  .image-container {
    width: 100%;
  }
}