/* =========================================
   JULIEN GILLET — PORTFOLIO
   ========================================= */

:root {

  --background: #ffffff;

  --text: #3b2b27;

  --card-gap: 12px;

  --content-width: 740px;

}

* {

  box-sizing: border-box;

}

html {

  scroll-behavior: smooth;

}

body {

  margin: 0;

  background: var(--background);

  color: var(--text);

  font-family: "DM Sans", sans-serif;

  -webkit-font-smoothing: antialiased;

}

.site {

  width: min(var(--content-width), calc(100% - 40px));

  margin: 0 auto;

  padding-bottom: 80px;

}

/* =========================================
   TITRE + PHOTO
   ========================================= */

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.portrait {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}


/* =========================================
   TITRE PRINCIPAL
   ========================================= */

.hero {

  text-align: center;

  padding: 34px 0 78px;

}

.hero h1 {

  position: relative;

  display: inline-block;

  margin: 0;

  font-size: clamp(34px, 5vw, 54px);

  line-height: 1.1;

  font-weight: 700;

  letter-spacing: -1.5px;

  z-index: 1;

}


/* SURLIGNAGE DU H1 */

.hero h1::after {

  content: "";

  position: absolute;

  left: -5px;

  right: -5px;

  bottom: 7px;

  height: 30%;

  z-index: -1;

}


/* =========================================
   TITRES H2
   ========================================= */

.section h2 {

  position: relative;

  display: inline-block;

  margin: 0 0 10px;

  font-size: 38px;

  line-height: 1.15;

  font-weight: 700;

  letter-spacing: -0.8px;

  z-index: 1;

}


/* SURLIGNAGE H2 */

.section h2::after {

  content: "";

  position: absolute;

  left: -5px;

  right: -5px;

  bottom: 7px;

  height: 30%;

  background: rgba(166, 249, 232, 0.65);

  z-index: -1;

}


/* =========================================
   SURIGNAGE ROUGE
   ENQUÊTE D'UN TOIT
   ========================================= */

.surlignage-rouge::after {

  background: rgba(108, 21, 18, 0.65);

}


/* =========================================
   SECTIONS
   ========================================= */

.section {

  text-align: center;

  margin-bottom: 48px;

}



.intro {

  margin: 0 0 16px;

  font-size: 18px;

  line-height: 1.55;

  font-weight: 400;

}


/* =========================================
   VIDÉO
   ========================================= */

.video-section {

  margin-bottom: 48px;

}


.video-subtitle {

  margin: 0 0 16px;

  font-size: 18px;

  line-height: 1.55;

  font-weight: 400;

}


.video-player {

  width: 100%;

  overflow: hidden;

}


.video-player video {

  display: block;

  width: 100%;

  height: auto;

}


/* =========================================
   CARTES MAMMOUTH MEDIA
   ========================================= */

.cards-grid {

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: var(--card-gap);

  text-align: left;

}



.card {

  position: relative;

  display: block;

  aspect-ratio: 0.80;

  overflow: hidden;

  color: white;

  text-decoration: none;

  isolation: isolate;

}


/* IMAGE */

.card img {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

  transition: transform 0.45s ease;

}


/* =========================================
   CATÉGORIE
   ========================================= */

.card-category {

  position: absolute;

  top: 10px;

  right: 10px;

  z-index: 4;

  padding: 8px 12px;

  background: #1abc8c;

  color: white;

  font-size: 14px;

  font-weight: 600;

  line-height: 1;

  pointer-events: none;

}


/* =========================================
   OVERLAY
   ========================================= */

.card-overlay {

  position: absolute;

  inset: 0;

  z-index: 1;

  background: rgba(0, 0, 0, 0.43);

  transition: background 0.4s ease;

}


/* =========================================
   CONTENU DE LA CARTE
   ========================================= */

.card-content {

  position: absolute;

  inset: 0;

  z-index: 2;

  width: 100%;

  height: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 20px;

  text-align: center;

}


/* =========================================
   TITRE
   ========================================= */

.card-title {

  display: block;

  font-size: clamp(17px, 2vw, 22px);

  line-height: 1.45;

  font-weight: 700;

  opacity: 1;

  transition:

    opacity 0.3s ease,

    transform 0.4s ease;

}


/* =========================================
   CHAPEAU
   ========================================= */

.card-chapeau {

  position: absolute;

  left: 50%;

  top: 50%;

  width: 85%;

  transform: translate(-50%, -50%);

  opacity: 0;

  font-size: 14px;

  line-height: 1.45;

  font-weight: 400;

  transition: opacity 0.35s ease;

  pointer-events: none;

}


/* =========================================
   DATE
   ========================================= */

.card-date {

  position: absolute;

  left: 50%;

  bottom: 16px;

  transform: translateX(-50%);

  width: 90%;

  text-align: center;

  font-size: 12px;

  font-weight: 500;

  opacity: 0;

  transition: opacity 0.35s ease;

  pointer-events: none;

}


/* =========================================
   HOVER CARTES
   ========================================= */

.card:hover img {

  transform: scale(1.045);

}



.card:hover .card-overlay {

  background: rgba(0, 0, 0, 0.70);

}


/* LE TITRE DISPARAÎT */

.card:hover .card-title {

  opacity: 0;

  transform: scale(0.95);

}


/* LE CHAPEAU APPARAÎT */

.card:hover .card-chapeau {

  opacity: 1;

}


/* LA DATE APPARAÎT EN BAS */

.card:hover .card-date {

  opacity: 1;

}


/* =========================================
   ENQUÊTE D'UN TOIT
   ========================================= */

.enquete {

  margin-top: 4px;

}



.project-grid {

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: var(--card-gap);

  justify-content: center;

}



.project-card {

  position: relative;

  display: block;

  aspect-ratio: 0.80;

  overflow: hidden;

  line-height: 0;

}



.project-card img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

  transition: transform 0.35s ease;

}



.project-card:hover img {

  transform: scale(1.025);

}


/* =========================================
   CONTACT
   ========================================= */

.contact {

  margin-top: 8px;

  margin-bottom: 0;

  display: flex;

  flex-direction: column;

  align-items: center;

}



.contact h2 {

  margin-bottom: 10px;

}


/* EMAIL */

.email {

  display: block;

  color: var(--text);

  font-size: 18px;

  text-decoration: none;

  margin-bottom: 5px;

}



.email:hover {

  text-decoration: underline;

}


/* =========================================
   RÉSEAUX SOCIAUX
   ========================================= */

.follow-title {

  margin-top: 45px !important;

}



.social-links {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 20px;

  margin-top: 10px;

}



.social-links a {

  display: flex;

  align-items: center;

  justify-content: center;

  width: 50px;

  height: 50px;

  background: transparent;

  text-decoration: none;

}



.social-links img {

  width: 40px;

  height: 40px;

  object-fit: contain;

  display: block;

  transition:

    transform 0.25s ease,

    opacity 0.25s ease;

}



.social-links a:hover img {

  transform: scale(1.1);

  opacity: 0.75;

}


/* =========================================
   TABLETTE
   ========================================= */

@media (max-width: 800px) {

  .site {

    width: min(100% - 32px, 620px);

  }



  .hero {

    padding-top: 28px;

    padding-bottom: 55px;

  }
  .hero-content {
  gap: 12px;
}

.portrait {
  width: 65px;
  height: 65px;
}



  .section h2 {

    font-size: 32px;

  }



  .intro {

    font-size: 17px;

  }



  .cards-grid {

    grid-template-columns: repeat(2, 1fr);

  }



  .project-grid {

    grid-template-columns: repeat(2, 1fr);

  }

}


/* =========================================
   TÉLÉPHONE
   ========================================= */

@media (max-width: 560px) {

  .site {

    width: calc(100% - 28px);

    padding-bottom: 50px;

  }



  .hero {

    padding: 24px 0 42px;

  }



  .hero h1 {

    font-size: 34px;

    letter-spacing: -1px;

  }



  .section {

    margin-bottom: 42px;

  }



  .section h2 {

    font-size: 29px;

  }



  .intro {

    font-size: 16px;

    line-height: 1.5;

  }



  /* CARTES */

  .cards-grid {

    grid-template-columns: 1fr;

    gap: 10px;

  }



  .card {

    aspect-ratio: 1 / 1.15;

  }



  .card-title {

    width: 85%;

    font-size: 21px;

  }



  /* CATÉGORIE PLUS PETITE SUR MOBILE */

  .card-category {

    top: 8px;

    right: 8px;

    padding: 7px 10px;

    font-size: 12px;

  }



  /* ENQUÊTE */

  .project-grid {

    grid-template-columns: 1fr;

  }



  .project-card {

    aspect-ratio: 0.80;

  }



  /* RÉSEAUX */

  .social-links img {

    width: 35px;

    height: 35px;

  }



  .social-links a {

    width: 45px;

    height: 45px;

  }

}