@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Red+Hat+Mono:wght@400;500&display=swap');

:root {
  --red: #ff0000;
  --red-dim: rgba(255,0,0,0.28);
  --ink: #111111;
  --paper: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════════════
   NAV — shared across all pages
══════════════════════════════════════ */
.site-nav {
  position: relative;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 1.5vw 2.2vw;
  background: transparent;
  gap: 1vw;
}
.site-nav.on-white {
  background: var(--paper);
}

/* When dropdown is open: dim all other nav items */
.site-nav.dropdown-open .nav-logo,
.site-nav.dropdown-open .nav-cv,
.site-nav.dropdown-open .nav-contact {
  color: var(--red-dim);
  transition: color 0.2s;
}
.site-nav.dropdown-open .nav-projets-btn {
  color: var(--red);
}

/* When dropdown is open: dim all bio text on homepage */
.hero-stage.dropdown-open .bio {
  color: var(--red-dim);
  transition: color 0.2s;
}

.nav-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.1vw, 18px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav-logo:hover { opacity: 0.7; }

.nav-projets-wrap {
  position: relative;
  flex-shrink: 0;
}

.nav-projets-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.1vw, 18px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  transition: color 0.2s;
}

.projets-dropdown {
  position: absolute;
  top: calc(100% + 0.4em);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 300;
}
.nav-projets-wrap.open .projets-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.projets-dropdown a,
.projets-dropdown .soon {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.05vw, 17px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.55;
}
.projets-dropdown a:hover { opacity: 0.6; }
.projets-dropdown .soon {
  color: var(--red);
  opacity: 0.32;
  cursor: default;
}

/* Each category line + its hidden sub-list of project titles */
.projets-item {
  position: relative;
}

/* Invisible bridge across the visual gap so the cursor never
   "loses" hover while moving from the category to the project list */
.projets-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 1.4em;
  height: 100%;
}

.projets-sub {
  position: absolute;
  top: 0;
  left: calc(100% + 1.4em);
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.projets-item:hover .projets-sub,
.projets-sub:hover {
  opacity: 1;
  pointer-events: all;
}

.projets-sub a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.05vw, 17px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.55;
}
.projets-sub a:hover { opacity: 0.6; }

.nav-cv,
.nav-contact {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.1vw, 18px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav-cv:hover, .nav-contact:hover { opacity: 0.7; }

/* ══════════════════════════════════════
   HOME — full-bleed hero stage
══════════════════════════════════════ */
.hero-stage {
  position: relative;
  width: 100%;
  /* Keep a tall viewport: nav ~8% + photo ~83% + bio space */
  min-height: 100svh;
  overflow: hidden;
  background: var(--paper);
}

/* Le carrousel (carousel.css) remplit exactement le hero-stage :
   c'est .hero-stage qui définit la hauteur de la page d'accueil
   (min-height: 100svh juste au-dessus), pas le carrousel lui-même. */
.hero-stage .carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-stage .site-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 200;
}

/* La photo de fond (carrousel) est gérée par carousel.css / carousel.js,
   chargés en plus de ce fichier — voir plus bas le bloc qui positionne
   .carousel pour qu'il remplisse exactement .hero-stage. */

/* Bio text overlay — absolutely positioned on the stage */
.bio {
  position: absolute;
  z-index: 100;
  color: var(--red);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-size: clamp(12px, 1.22vw, 22px);
  transition: color 0.2s;
  pointer-events: none;
}

/* Positions (% of .hero-stage height/width) */
.bio-1   { top: 36%;  left: 2.1%; }
.bio-2   { top: 39.5%; left: 10%;  }
.bio-dip { top: 50%;  left: 2.1%; }
.bio-ecole { top: 53.5%; left: 2.1%; }
.bio-dsaa  { top: 50%;  left: 52%;  text-align: right; width: 27%; }
.bio-dsaa span { display: block; }
.bio-dnmade{ top: 60%;  left: 52%;  text-align: right; width: 27%; }
.bio-m2    { top: 71%;  left: 2.1%; }


/* ══════════════════════════════════════
   STUB PAGES (CV / Contact)
══════════════════════════════════════ */
.stub-page { min-height: 100vh; }

.stub-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  text-align: center;
  padding: 8vw 6vw;
}
.stub-body h1 {
  color: var(--red);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(22px, 3.2vw, 48px);
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}
.stub-body p {
  font-family: 'Red Hat Mono', monospace;
  font-size: clamp(12px, 1vw, 16px);
  color: var(--ink);
  line-height: 1.7;
}
.stub-body a.mail {
  color: var(--red);
  font-weight: 600;
}

.contact-page {
  min-height: 100vh;
  background-image: url("images/CV.svg");
  background-size: cover;      /* l'image remplit tout l'écran */
  background-position: center; /* centrage */
  background-repeat: no-repeat;
  background-attachment: fixed; /* optionnel : effet fixe */
}

/* ── Page Contact : bloc (Contact) + lignes Mail / Instagram / LinkedIn ── */
.contact-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 0 2.2vw;
  margin-top: 26vh;
}
.contact-block {
  width: 44%;
}
.contact-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--red);
  font-size: clamp(16px, 1.7vw, 28px);
  margin: 0 0 3vw;
}
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5vw;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2vw;
}
.contact-label,
.contact-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--red);
  font-size: clamp(13px, 1.25vw, 20px);
  line-height: 1.1;
  white-space: nowrap;
}
.contact-value { text-align: right; transition: opacity 0.2s; }
.contact-value:hover { opacity: 0.6; }

/* Bottom nav bar */
.proj-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2vw 2.2vw;
  border-top: 1px solid rgba(0,0,0,0.12);
}
.proj-bottom-nav a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(10px, 0.9vw, 14px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.proj-bottom-nav a:hover { opacity: 0.6; }

/* ══════════════════════════════════════
   STUB PAGES (CV / Contact)
══════════════════════════════════════ */
.stub-page { min-height: 100vh; }

.stub-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  text-align: center;
  padding: 8vw 6vw;
}
.stub-body h1 {
  color: var(--red);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(22px, 3.2vw, 48px);
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}
.stub-body p {
  font-family: 'Red Hat Mono', monospace;
  font-size: clamp(12px, 1vw, 16px);
  color: var(--ink);
  line-height: 1.7;
}
.stub-body a.mail {
  color: var(--red);
  font-weight: 600;
}

.contact-page {
  min-height: 100vh;
  background-image: url("images/bgcontact.jpg");
  background-size: cover;      /* l'image remplit tout l'écran */
  background-position: center; /* centrage */
  background-repeat: no-repeat;
  background-attachment: fixed; /* optionnel : effet fixe */
}

/* ── Page Contact : bloc (Contact) + lignes Mail / Instagram / LinkedIn ── */
.contact-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 0 2.2vw;
  margin-top: 26vh;
}
.contact-block {
  width: 44%;
}
.contact-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--red);
  font-size: clamp(16px, 1.7vw, 28px);
  margin: 0 0 3vw;
}
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5vw;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2vw;
}
.contact-label,
.contact-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--red);
  font-size: clamp(13px, 1.25vw, 20px);
  line-height: 1.1;
  white-space: nowrap;
}
.contact-value { text-align: right; transition: opacity 0.2s; }
.contact-value:hover { opacity: 0.6; }

/* ══════════════════════════════════════
   RESPONSIVE — mobile
══════════════════════════════════════ */
@media (max-width: 768px) {
  .site-nav {
    padding: 4vw 4vw;
    flex-wrap: wrap;
    gap: 2.5vw;
  }
  .nav-logo, .nav-projets-btn, .nav-cv, .nav-contact {
    font-size: 11px;
  }
  .nav-projets-wrap,
  .nav-projets-btn {
    align-self: flex-start;
    line-height: normal;
    margin: 0;
    vertical-align: top;
  }
  .projets-dropdown a,
  .projets-dropdown .soon,
  .projets-sub a {
    font-size: 11px;
  }

  /* Sous-liste de projets : sur mobile pas de place à droite,
     elle s'affiche donc juste en dessous de la catégorie */
  .projets-item::after { display: none; }
  .projets-sub {
    position: static;
    padding-left: 1em;
    transition: none;
  }
  .projets-item:hover .projets-sub,
  .projets-item:active .projets-sub,
  .projets-sub:hover {
    opacity: 1;
    pointer-events: all;
  }

  /* Bio text */
  .bio { font-size: 9px; }
  .bio-1   { top: 32%; }
  .bio-2   { top: 35%; left: 8%; }
  .bio-dip { top: 44%; }
  .bio-ecole { top: 47%; }
  .bio-dsaa  { left: 48%; width: 48%; font-size: 8.5px; }
  .bio-dnmade{ left: 48%; width: 48%; font-size: 8.5px; }
  .bio-m2    { top: 64%; font-size: 8px; }

  /* Project hero: garder le texte de présentation SUR la photo,
     pas en dessous, même en mobile */
  .proj-hero {
    height: auto;
  }
  .proj-hero-img {
    aspect-ratio: 4/5;
    height: auto;
  }
  .proj-text {
    position: absolute;
    top: auto;
    bottom: 5vw;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0 6vw;
  }
  /* Forcer un texte blanc lisible par-dessus la photo, quel que soit
     le thème (texte noir ou blanc) utilisé ailleurs sur le site */
  .proj-text h1 {
    color: var(--red);
    text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  }
  .proj-desc,
  .proj-meta-col span {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  }
  .proj-meta-col b {
    text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  }
  .proj-text h1 { font-size: 20px; }
  .proj-desc { font-size: 12px; }
  .proj-meta { gap: 6vw; flex-wrap: wrap; }
  .proj-meta-col b { font-size: 9px; }
  .proj-meta-col span { font-size: 10px; }

  /* Gallery */
  .proj-gallery { padding: 8vw 6vw 0; gap: 8vw; }
  .g-row { flex-direction: column; gap: 6vw; }
  .g-row img { width: 100%; }
  .g-text-img { flex-direction: column; gap: 4vw; }
  .g-text-block { flex: none; width: 100%; }
  .g-text-img img { flex: none; width: 100%; }
  .g-text-block p { font-size: 12px; }
  .g-text-only { width: 100%; }
  .g-text-only p { font-size: 12px; }
  .g-grid3 { grid-template-columns: 1fr 1fr; gap: 4vw; }

  .proj-bottom-nav { flex-wrap: wrap; gap: 10px; padding: 4vw 4vw; }
  .proj-bottom-nav a { font-size: 11px; }

  .stub-body { padding: 12vw 6vw; }

  .contact-wrap { margin-top: 18vh; padding: 0 4vw; justify-content: flex-start; }
  .contact-block { width: 100%; }
  .contact-title { font-size: 20px; margin-bottom: 6vw; }
  .contact-row { gap: 4vw; }
  .contact-label, .contact-value { font-size: 13px; white-space: normal; }
}