/* =========================================
   1. VARIABLES
   ========================================= */
:root {
  --color-white: #ffffff;
  --color-dark: #0f172a;
  --color-brand: #f97316;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

strong {
  font-weight: 500;
}

::selection {
  background: var(--color-brand);
  color: var(--color-white);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

/* =========================================
   3. ÉLÉMENTS RÉUTILISABLES
   ========================================= */
.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.accent {
  color: var(--color-brand);
}

.section {
  padding-block: 8rem;
}

/* Petit texte orange au-dessus des titres */
.eyebrow {
  margin-bottom: 1rem;
  color: var(--color-brand);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Grands titres (accueil + pages projet) */
.display-title {
  color: var(--color-dark);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* Titres de section */
.section-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.lead {
  margin-bottom: 2rem;
  color: var(--color-gray-800);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.6;
}

.text {
  margin-bottom: 3rem;
  color: var(--color-gray-500);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Mise en page 2 colonnes : titre collant à gauche, contenu à droite */
.split {
  display: grid;
  gap: 3rem;
}

.split__title {
  position: sticky;
  top: 8rem;
}

.split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Grille de chiffres / infos sous un texte */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-gray-200);
}

.stat__number {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat__label {
  color: var(--color-gray-500);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.info__label {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info__value {
  color: var(--color-gray-500);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 4.5rem;
  }

  .lead {
    font-size: 1.875rem;
  }

  .split {
    grid-template-columns: 5fr 7fr;
  }
}

/* =========================================
   4. TRANSITIONS ENTRE LES VUES
   ========================================= */
.page-view {
  transition: opacity 500ms;
}

.page-view.is-faded {
  opacity: 0;
}

.page-view.is-hidden {
  display: none;
}

/* La vue qui arrive se superpose pendant le fondu */
.page-view.is-entering {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.project-view {
  position: relative;
  z-index: 40;
  min-height: 100vh;
  background: var(--color-white);
}

/* =========================================
   5. EN-TÊTE
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--color-gray-100);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.logo {
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 300ms;
}

.logo:hover {
  color: var(--color-brand);
}

/* Navigation : cachée sur mobile, ouverte via le bouton */
.main-nav {
  display: none;
}

.main-nav.is-open {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-gray-100);
  background: var(--color-white);
}

.main-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  transition: color 300ms;
}

.main-nav__link:hover {
  color: var(--color-brand);
}

.menu-toggle {
  color: var(--color-dark);
}

.menu-toggle__icon {
  width: 2rem;
  height: 2rem;
}

/* Lien retour (pages projet) */
.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-dark);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  transition: color 300ms;
}

.back-link__icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 500ms;
}

.back-link:hover {
  color: var(--color-brand);
}

.back-link:hover .back-link__icon {
  transform: translateX(-0.25rem);
}

.site-header__project {
  display: none;
  color: var(--color-gray-300);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .main-nav,
  .main-nav.is-open {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    padding: 0;
    border: 0;
    background: none;
  }

  .menu-toggle {
    display: none;
  }

  .site-header__project {
    display: block;
  }
}

/* =========================================
   6. ACCUEIL : HERO
   ========================================= */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 5rem;
}

.hero__eyebrow {
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.hero__title {
  font-size: 3.75rem;
}

.hero__intro {
  max-width: 36rem;
  margin-top: 4rem;
  padding-left: 0.5rem;
  color: var(--color-gray-500);
  font-size: 1.25rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 8rem;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 10rem;
  }
}

/* =========================================
   7. ACCUEIL : À PROPOS
   ========================================= */
.about {
  border-top: 1px solid var(--color-gray-200);
}

/* Les ancres ne passent plus sous l’en-tête fixe */
#about,
#skills,
#projects,
#contact {
  scroll-margin-top: 5rem;
}

/* =========================================
   8. ACCUEIL : BANDEAU COMPÉTENCES
   ========================================= */
.skills {
  position: relative;
  z-index: 10;
  display: flex;
  overflow: hidden;
  padding-block: 3rem;
  background: var(--color-brand);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
  transform: rotate(-2deg) scale(1.1);
}

.marquee {
  display: flex;
  width: 200%;
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: marquee 15s linear infinite;
}

.marquee__group {
  flex-shrink: 0;
  padding-inline: 1rem;
  white-space: nowrap;
}

.marquee__dot {
  margin-inline: 1rem;
  color: var(--color-dark);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (min-width: 768px) {
  .marquee {
    font-size: 4.5rem;
  }
}

/* =========================================
   9. ACCUEIL : LISTE DES PROJETS
   ========================================= */
.projects {
  position: relative;
  z-index: 20;
  padding-block: 10rem;
  background: var(--color-white);
}

.projects__title {
  margin-bottom: 5rem;
}

.project-list {
  border-top: 2px solid var(--color-dark);
}

.project-item {
  position: relative;
  border-bottom: 2px solid var(--color-dark);
}

.project-item__link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 2.5rem 1rem;
}

.project-item__title {
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  transition: color 300ms;
}

.project-item__category {
  margin-top: 0.5rem;
  color: var(--color-gray-500);
  font-weight: 500;
}

.project-item__year {
  flex-shrink: 0;
  color: var(--color-gray-400);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 300ms;
}

.project-item__link:hover .project-item__title {
  color: var(--color-brand);
}

.project-item__link:hover .project-item__year {
  color: var(--color-dark);
}

@media (min-width: 768px) {
  .project-item__link {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 4rem 0;
  }

  .project-item__title {
    font-size: 4.5rem;
    line-height: 1;
  }
}

/* =========================================
   10. ACCUEIL : CONTACT (FOOTER)
   ========================================= */
.contact {
  padding: 8rem 0 3rem;
  background: var(--color-dark);
  color: var(--color-white);
}

.contact__top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--color-gray-700);
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  font-size: 1.5rem;
  overflow-wrap: anywhere;
  transition: border-color 300ms;
}

.contact__email:hover {
  border-color: var(--color-brand);
}

.contact__email-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-brand);
}

.contact__socials {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 3rem;
  row-gap: 1.5rem;
}

.contact__social-link {
  color: var(--color-gray-400);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 300ms;
}

.contact__social-link:hover {
  color: var(--color-white);
}

.contact__bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .contact__top {
    flex-direction: row;
    align-items: flex-end;
  }

  .contact__bottom {
    flex-direction: row;
  }
}

/* =========================================
   11. PAGES PROJET
   ========================================= */
.project-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 10rem;
  padding-bottom: 7rem;
}

/* clamp() : la taille s’adapte pour que les longs mots ne débordent pas sur mobile */
.project-intro__title {
  font-size: clamp(2.5rem, 10vw, 8rem);
}

.project-intro__year {
  flex-shrink: 0;
  padding-bottom: 1rem;
  text-align: right;
}

.project-intro__label {
  margin-bottom: 0.5rem;
  color: var(--color-gray-400);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-intro__value {
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .project-intro {
    flex-direction: row;
    align-items: flex-end;
  }
}

/* Grande image de couverture avec effet parallaxe */
.project-cover {
  width: 100%;
  height: 60vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.project-cover--cinema {
  background-image: url("img/Capture d’écran 2026-10-12 à 22.33.43.png");
}

.project-cover--restaurant {
  background-image: url("img/Capture d’écran 2026-10-11 à 21.59.54.png");
}

/* Sans parallaxe : l’image contient du texte qui ne doit pas être coupé */
.project-cover--rockenseine {
  background-image: url("img/Capture d’écran 2026-10-18 à 15.59.07.png");
  background-attachment: scroll;
}

@media (min-width: 768px) {
  .project-cover {
    height: 80vh;
  }
}

/* La parallaxe (background fixed) ne marche pas sur mobile/tablette tactile */
@media (hover: none) {
  .project-cover {
    background-attachment: scroll;
  }
}

/* =========================================
   12. GALERIE DE CAPTURES
   ========================================= */
.gallery {
  padding-block: 3rem;
  background: var(--color-gray-50);
}

.gallery__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gallery__grid {
  display: grid;
  align-items: start;
  gap: 2rem;
}

/* Cadre autour des captures d’écran */
.screen-frame {
  padding: 0.75rem;
  border: 1px solid rgb(229 231 235 / 60%);
  border-radius: 1rem;
  background: rgb(15 23 42 / 5%);
  box-shadow:
    0 1px 2px 0 rgb(0 0 0 / 5%),
    0 1px 3px 0 rgb(0 0 0 / 10%);
}

.screen-frame__inner {
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--color-dark);
}

.screen-frame__img {
  width: 100%;
  object-fit: contain;
  transition: transform 500ms;
}

.screen-frame__img:hover {
  transform: scale(1.02);
}

@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-frame {
    padding: 1rem;
  }
}

/* =========================================
   13. PROJET SUIVANT + FOOTER PROJET
   ========================================= */
.next-project {
  padding-block: 10rem;
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-white);
  text-align: center;
}

.next-project__label {
  margin-bottom: 1.5rem;
  color: var(--color-gray-400);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.next-project__link {
  display: inline-block;
}

.next-project__title {
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  transition: color 300ms;
}

.next-project__line {
  display: block;
  width: 0;
  height: 0.25rem;
  margin: 1rem auto 0;
  background: var(--color-brand);
  transition: width 500ms;
}

.next-project__link:hover .next-project__title {
  color: var(--color-brand);
}

.next-project__link:hover .next-project__line {
  width: 100%;
}

.project-footer {
  padding-block: 3rem;
  background: var(--color-dark);
  color: var(--color-white);
}

.project-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-gray-700);
  color: var(--color-gray-500);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================
   14. CURSEUR PERSONNALISÉ & IMAGE AU SURVOL
   (uniquement sur ordinateur avec souris)
   ========================================= */
.custom-cursor,
.project-hover-image {
  display: none;
}

@media (hover: hover) and (min-width: 768px) {
  body,
  a,
  button {
    cursor: none;
  }

  /* Déplacé avec "translate" en JavaScript : suit la souris sans délai */
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-brand);
    pointer-events: none;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    will-change: translate;
    transition:
      scale 0.3s,
      background-color 0.3s;
  }

  .custom-cursor.is-hovering {
    border: 1px solid var(--color-brand);
    background: transparent;
    scale: 2;
  }

  /* Le cadre prend la forme de chaque image (réglée en JavaScript) : rien n’est coupé */
  .project-hover-image {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    display: block;
    width: 450px;
    height: auto;
    aspect-ratio: 3 / 4;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition:
      opacity 0.4s ease,
      transform 0.4s ease;
  }

  .project-hover-image.is-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* =========================================
   15. ACCESSIBILITÉ : MOINS D’ANIMATIONS
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}