@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@200;300;400&family=Courier+Prime&display=swap');

/* ============================================================
   VARIABLES
============================================================ */
:root {
  --bg: #0C0B09;
  --surface: #141210;
  --border: #252220;
  --text: #EDE8E1;
  --text-muted: #A8A29E; /* Éclairci pour une meilleure lisibilité (ancien: #6B6660) */
  --accent: #C4A882;
  --accent-light: #E8D5B8;
  --ff-display: 'Cormorant Garamond', serif;
  --ff-body: 'Jost', sans-serif;
  --ff-mono: 'Courier Prime', monospace;
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 400; /* Augmenté de 300 à 400 pour la lisibilité */
  cursor: none;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
.page-legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-legal .legal-main { flex: 1; }
.page-home {
  width: 100%;
}
@supports (overflow: clip) {
  body { overflow-x: clip; }
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ============================================================
   GRAIN
============================================================ */
.grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.4s steps(1) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 10%{transform:translate(-2%,-3%)} 20%{transform:translate(-5%,2%)}
  30%{transform:translate(3%,-4%)} 40%{transform:translate(-1%,5%)} 50%{transform:translate(-4%,1%)}
  60%{transform:translate(2%,-2%)} 70%{transform:translate(-3%,4%)} 80%{transform:translate(4%,-1%)} 90%{transform:translate(1%,3%)}
}

/* ============================================================
   CUSTOM CURSOR
============================================================ */
.cursor {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001; /* Doit être au-dessus de la nav pour être visible */
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(196,168,130,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001; /* Doit être au-dessus de la nav pour être visible */
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
}
.cursor-ring.expand {
  width: 54px; height: 54px;
  background: rgba(196,168,130,0.07);
  border-color: var(--accent);
}

/* ============================================================
   NAVIGATION PRINCIPALE
============================================================ */
body > nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.2rem 5rem;
  pointer-events: none;
  background: transparent;
}
body > nav.blend { mix-blend-mode: normal; }


.nav-logo, .nav-links, .nav-right {
  pointer-events: auto;
}

.nav-logo {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  position: absolute;
  top: 2.2rem;
  left: 5rem;
  z-index: 10001;
}
.nav-links {
  position: absolute;
  top: 2.2rem;
  right: 5rem;
  z-index: 10001;
  display: flex;
  gap: 3.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  opacity: 0.92;
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  transition: opacity 0.3s;
  position: relative;
  z-index: 10001;
}
.nav-links a:hover { opacity: 1; }

.nav-right {
  position: fixed;
  top: 2.2rem;
  right: 5rem;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.3s, gap 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 10001;
  background: rgba(12,11,9,0.88);
  border: 1px solid rgba(237,232,225,0.18);
  padding: 0.95rem 1.2rem;
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.nav-back:hover { opacity: 1; gap: 1rem; background: rgba(12,11,9,0.94); border-color: rgba(237,232,225,0.28); }
.nav-back-arrow { font-size: 0.9rem; transition: transform 0.3s; }
.nav-back:hover .nav-back-arrow { transform: translateX(-3px); }

.to-projects {
  position: fixed;
  top: 2.2rem;
  right: 5rem;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,11,9,0.88);
  border: 1px solid rgba(237,232,225,0.18);
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  text-decoration: none;
  opacity: 0.85;
  z-index: 10001;
  cursor: none;
  transition: opacity 0.3s, background 0.3s, border-color 0.3s, transform 0.3s;
  display: none;
}
.to-projects:hover {
  opacity: 1;
  background: rgba(12,11,9,0.94);
  border-color: rgba(237,232,225,0.28);
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER NAVIGATION (Reset pour éviter l'héritage)
============================================================ */
.footer-nav {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  padding: 0 !important;
  pointer-events: auto !important;
  mix-blend-mode: normal !important;
}


/* ============================================================
   SECTION HEADER
============================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 5rem;
  margin-bottom: 5rem;
}
.section-num {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--accent-light);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
}
.section-label {
  font-family: var(--ff-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(237,232,225,0.82);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
}
.section-rule { flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   FOOTER
============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 4rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.footer-copy {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(237,232,225,0.75);
}
.footer-nav { 
  display: flex; 
  gap: 3rem; 
  align-items: center;
}
.footer-nav a {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent); /* Changé en accent pour plus de visibilité */
  text-decoration: none;
  transition: color 0.3s, opacity 0.3s;
}
.footer-nav a:hover { color: var(--text); opacity: 0.8; }

/* ============================================================
   BUTTON
============================================================ */
.btn-outline {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 1.2rem 2.8rem;
  cursor: none;
  text-decoration: none;
  transition: color 0.4s;
}
.btn-outline::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.btn-outline:hover { color: var(--bg); }
.btn-outline:hover::before { transform: scaleX(1); }
.btn-outline span { position: relative; z-index: 1; }

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   ——— HOME PAGE ———
============================================================ */

/* HERO */
.hero {
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 5rem 7rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 25%, rgba(196,168,130,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 75%, rgba(196,168,130,0.04) 0%, transparent 60%);
}
.hero-diagonal {
  position: absolute;
  top: 0; right: 15%;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
  opacity: 0.5;
}

.hero-visual {
  position: absolute;
  top: 50%; right: 10%;
  transform: translateY(-50%);
  width: 30vw;
  height: 40vw;
  max-height: 70vh;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  animation: visualFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(30%) brightness(0.7);
  transition: filter 0.6s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-visual:hover img {
  filter: grayscale(0%) brightness(0.85);
  transform: scale(1.05);
}

@keyframes visualFadeIn {
  from { opacity: 0; transform: translateY(-45%) translateX(20px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(5.5rem, 13vw, 14rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
}
.hero-name span { display: block; overflow: hidden; }
.hero-name span em {
  display: block;
  font-style: italic;
  opacity: 0;
  transform: translateY(110%);
  animation: slideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-name span:nth-child(1) em { animation-delay: 0.4s; }
.hero-name span:nth-child(2) em { animation-delay: 0.58s; }
.hero-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 700px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.95s forwards;
}
.hero-desc {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 260px;
}
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.scroll-indicator span {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.78;
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  writing-mode: vertical-rl;
}
.scroll-bar {
  width: 2px; height: 70px;
  background: linear-gradient(to bottom, rgba(196,168,130,0.95), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{transform:scaleY(1);opacity:1} 50%{transform:scaleY(0.4);opacity:0.4} }
@keyframes fadeUp { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp { to{opacity:1;transform:translateY(0)} }

/* PROJECTS GRID */
#projets { padding: 9rem 5rem 10rem; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}
.project-card:nth-child(1) { grid-column: 1 / 8; }
.project-card:nth-child(2) { grid-column: 8 / 13; }
.project-card:nth-child(3) { grid-column: 1 / 5; }
.project-card:nth-child(4) { grid-column: 5 / 9; }
.project-card:nth-child(5) { grid-column: 9 / 13; }
.project-card:nth-child(1) .card-inner { aspect-ratio: 16/7; }
.project-card:nth-child(2) .card-inner { aspect-ratio: 16/11.5; } /* Ajusté pour correspondre à la hauteur de Quoridor */
.project-card:nth-child(3) .card-inner { aspect-ratio: 1/1; }
.project-card:nth-child(4) .card-inner { aspect-ratio: 1/1; }
.project-card:nth-child(5) .card-inner { aspect-ratio: 1/1; }

/* Supprimé align-self: start pour éviter le vide entre 1 et 3 */

.project-card .card-inner img,
.project-card .card-inner video {
  width: 100% !important; 
  height: 100% !important;
  object-fit: cover !important; 
  display: block;
  filter: grayscale(25%) brightness(0.65);
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1), filter 0.6s ease;
}

.project-card {
  cursor: none;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  display: block;
  position: relative;
}
.project-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.project-card:hover::after { transform: scaleX(1); }

.card-inner { position: relative; overflow: hidden; width: 100%; height: 100%; }

.project-card:hover .card-inner img, .project-card:hover .card-inner video {
  transform: scale(1.07);
  filter: grayscale(0%) brightness(0.78);
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(175deg, transparent 25%, rgba(8,7,5,0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  transition: background 0.5s ease;
}
.project-card:hover .card-overlay {
  background: linear-gradient(175deg, rgba(196,168,130,0.04) 0%, rgba(8,7,5,0.96) 100%);
}
.card-num {
  font-family: var(--ff-mono);
  font-size: 0.65rem; /* Augmenté de 0.58rem */
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card-cat {
  font-family: var(--ff-mono);
  font-size: 0.6rem; /* Augmenté de 0.52rem */
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text); /* Changé de --text-muted à --text pour plus de clarté */
  margin-bottom: 0.5rem;
  opacity: 0.9;
}
.card-title {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  font-weight: 400; /* Augmenté de 300 à 400 */
  line-height: 1.05;
  margin-bottom: 1.1rem;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--ff-mono);
  font-size: 0.62rem; /* Augmenté de 0.58rem */
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.card-cta::after {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.project-card:hover .card-cta { opacity: 1; transform: translateY(0); }
.project-card:hover .card-cta::after { width: 50px; }

/* ABOUT */
.about-section {
  padding: 10rem 5rem;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 9rem;
  align-items: center;
}
.about-visual { position: relative; }
.about-img-frame {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.about-img-frame::before {
  content: '';
  position: absolute;
  inset: -20px;
  border: 1px solid var(--border);
  z-index: -1;
}
.about-img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(30%) brightness(0.75);
  transition: filter 0.6s ease;
}
.about-img-frame:hover img { filter: grayscale(10%) brightness(0.85); }
.about-big-letter {
  position: absolute;
  bottom: -3rem; right: -2.5rem;
  font-family: var(--ff-display);
  font-size: 9rem;
  font-weight: 300;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  line-height: 1;
  z-index: -1;
  user-select: none;
}
.about-text-side { padding-left: 1rem; }
.about-tag {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-light);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  margin-bottom: 2rem;
}
.about-headline {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}
.about-headline em { font-style: italic; color: var(--accent); }
.about-body {
  font-size: 0.85rem;
  font-weight: 400; /* Augmenté pour la lisibilité */
  line-height: 1.95;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2.5rem;
}
.skill-chip {
  font-family: var(--ff-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(237,232,225,0.18);
  color: rgba(237,232,225,0.78);
  background: rgba(12,11,9,0.35);
  transition: all 0.3s;
  cursor: default;
}
.skill-chip:hover { border-color: rgba(196,168,130,0.85); color: var(--accent-light); background: rgba(12,11,9,0.55); }

/* CONTACT */
.contact-section {
  padding: 8rem 5rem 11rem;
  position: relative;
}
.contact-section::before {
  content: '';
  position: absolute;
  top: 0; left: 5rem; right: 5rem;
  height: 1px;
  background: var(--border);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 9rem;
  margin-top: 1rem;
}
.contact-big-title {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 5.5vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  margin-bottom: 5rem;
}
.contact-big-title em { font-style: italic; color: var(--accent); display: block; }
.contact-info-list { display: flex; flex-direction: column; gap: 2rem; }
.contact-info-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: baseline;
}
.contact-info-row dt {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237,232,225,0.72);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  padding-top: 0.3rem;
}
.contact-info-row dd {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 300;
}
.contact-info-row a {
  color: rgba(237,232,225,0.92);
  text-decoration: none;
  transition: color 0.3s;
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
}
.contact-info-row a:hover { color: var(--accent-light); }
.contact-form { display: flex; flex-direction: column; }
.field {
  position: relative;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
.field:focus-within { border-color: var(--accent); }
.field label {
  position: absolute;
  top: 1.4rem; left: 0;
  font-family: var(--ff-mono);
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}
.field input, .field textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 300;
  padding: 2.2rem 0 1rem;
  cursor: none;
  resize: none;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 0.35rem; font-size: 0.48rem; color: var(--accent);
}
.field input::placeholder, .field textarea::placeholder { color: transparent; }
.form-actions { margin-top: 3.5rem; }

/* ============================================================
   ——— PROJECT PAGES ———
============================================================ */

/* HERO */
.proj-hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 5rem 7rem;
}
.proj-hero-bg { position: absolute; inset: 0; }
.proj-hero-bg img, .proj-hero-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.4) saturate(0.75);
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: cover;
}
.proj-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,7,5,0.92) 0%, rgba(8,7,5,0.25) 55%, rgba(8,7,5,0.1) 100%);
}
.proj-hero-content { position: relative; z-index: 1; }
.proj-hero-num {
  font-family: var(--ff-mono);
  font-size: 0.65rem; /* Augmenté de 0.58rem */
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.proj-hero-cat {
  font-family: var(--ff-mono);
  font-size: 0.62rem; /* Augmenté de 0.58rem */
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text); /* Changé de --text-muted à --text */
  margin-bottom: 1.2rem;
  opacity: 0.9;
}
.proj-hero-title {
  font-family: var(--ff-display);
  font-size: clamp(4rem, 9vw, 11rem);
  font-weight: 400; /* Augmenté de 300 à 400 */
  font-style: italic;
  line-height: 0.9;
  margin-bottom: 3.5rem;
}
.proj-hero-meta {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}
.proj-hero-meta-item label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.55rem; /* Augmenté de 0.5rem */
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent); /* Changé de --text-muted à --accent pour plus de visibilité */
  margin-bottom: 0.4rem;
}
.proj-hero-meta-item span {
  font-family: var(--ff-body);
  font-size: 0.88rem; /* Augmenté de 0.82rem */
  font-weight: 400; /* Augmenté de 300 à 400 */
  color: var(--text);
  letter-spacing: 0.05em;
}

/* PROJECT LAYOUT */
.proj-layout { padding: 8rem 5rem; }
.proj-layout-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 7rem;
  align-items: start;
}
.proj-concept {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--accent-light);
  margin-bottom: 4rem;
}
.proj-body-text {
  font-size: 0.88rem;
  font-weight: 400; /* Augmenté pour la lisibilité */
  line-height: 2;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.proj-body-text + .proj-body-text { margin-top: -1rem; }
.proj-sidebar {
  position: sticky;
  top: 8rem;
  border-left: 1px solid var(--border);
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.proj-sidebar-item label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.52rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.proj-sidebar-item span {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.4;
}
.proj-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tool-chip {
  font-family: var(--ff-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* IMAGE SECTIONS */
.proj-images { padding: 0 5rem 8rem; }
.proj-image-wide {
  width: 100%;
  aspect-ratio: 21/8;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.8);
  margin-bottom: 3px;
}
.proj-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.proj-image-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-grid.is-contain img {
  aspect-ratio: 4/3;
  object-fit: contain;
  object-position: 50% 50%;
  background: transparent;
  padding: 0;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-grid.thirds { grid-template-columns: 1fr 1fr 1fr; }
.proj-image-grid.thirds img { aspect-ratio: 3/4; }

/* SUB-PROJECT CARDS (IA page) */
.subprojects { padding: 0 5rem 8rem; }
.subprojects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.subproject-card {
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.subproject-card-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.7);
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.5s;
  display: block;
}
.subproject-card:hover .subproject-card-img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(0.8);
}
.subproject-card-body { padding: 2rem 2rem 2.5rem; }
.subproject-year {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--accent-light);
  text-shadow: 0 0 18px rgba(0,0,0,0.65);
  margin-bottom: 0.7rem;
}
.subproject-title {
  font-family: var(--ff-display);
  font-size: 1.8rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.subproject-desc {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.85;
  color: rgba(237,232,225,0.78);
}

/* NEXT PROJECT */
.next-proj {
  position: relative;
  height: 55vh;
  overflow: hidden;
  cursor: none;
  display: block;
  text-decoration: none;
}
.next-proj-bg { position: absolute; inset: 0; }
.next-proj-bg img, .next-proj-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1), filter 0.6s;
}
.next-proj:hover .next-proj-bg img, .next-proj:hover .next-proj-bg video { transform: scale(1.06); filter: brightness(0.45); }
.next-proj-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(8,7,5,0.75) 0%, transparent 55%);
}
.next-proj-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5rem;
}
.next-proj-label {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(237,232,225,0.78);
  margin-bottom: 1.2rem;
}
.next-proj-title {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 5.5vw, 7rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 0.95;
}
.next-proj-arrow {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap 0.3s;
}
.next-proj-arrow::after { content: '→'; font-size: 1.15rem; }
.next-proj:hover .next-proj-arrow { gap: 1.5rem; }

/* ============================================================
   PLANS TECHNIQUES
============================================================ */
.proj-plans { padding: 0 5rem 8rem; }
.proj-plans .section-num {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--accent-light);
}
.proj-plans .section-label {
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  color: rgba(237,232,225,0.82);
}
.proj-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 3px;
}
.proj-plan-grid.full { grid-template-columns: 1fr; }
.proj-plan-item { overflow: hidden; display: flex; flex-direction: column; }
.proj-plan-light {
  background: #F2EEE9;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  flex: 1;
}
.proj-plan-light img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}
.proj-plan-dark {
  background: var(--surface);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  flex: 1;
}
.proj-plan-dark img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}
.proj-plan-caption {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.1rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.proj-plan-caption .cap-num {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--accent);
}
.proj-plan-caption .cap-label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237,232,225,0.82);
  line-height: 1.35;
}

/* EXTRA IMAGE ROWS */
.proj-image-row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  margin-bottom: 3px;
}
.proj-image-row3 img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-row3.is-contain img {
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: 50% 50%;
  background: transparent;
  padding: 0;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-tall img {
  aspect-ratio: 2/3 !important;
}
.proj-image-feature {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3px;
  margin-bottom: 3px;
}
.proj-image-feature img {
  width: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-feature.is-contain {
  overflow: hidden;
  background: transparent;
  align-items: center;
}
.proj-image-feature.is-contain img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(320px, 38vw, 640px);
  justify-self: center;
  align-self: center;
  object-fit: contain;
  object-position: 50% 50%;
  aspect-ratio: auto !important;
  background: transparent;
  padding: 0;
  filter: brightness(0.82) saturate(0.8);
}
.proj-image-feature img:first-child { aspect-ratio: 4/3; }
.proj-image-feature img:last-child { aspect-ratio: 3/4; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .proj-layout-inner { grid-template-columns: 1fr 260px; gap: 5rem; }
}
@media (max-width: 900px) {
  body > nav, .section-header { padding-left: 3rem; padding-right: 3rem; }
  .hero { padding: 0 3rem 5rem; }
  .hero-visual { 
    position: relative;
    top: auto; right: auto;
    transform: none;
    width: 50vw;
    height: 60vw;
    margin: 3rem 0 0;
    display: block; /* Réactivé sur tablette */
  }
  #projets, .about-section, .contact-section { padding-left: 3rem; padding-right: 3rem; }
  .contact-section::before { left: 3rem; right: 3rem; }
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 3px; }
  .project-card:nth-child(1) { grid-column: 1 / 3; }
  .project-card:nth-child(2) { grid-column: 1; }
  .project-card:nth-child(3) { grid-column: 2; }
  .project-card:nth-child(4) { grid-column: 1 / 3; }
  .project-card:nth-child(5) { grid-column: 1 / 3; }
  .project-card:nth-child(1) .card-inner { aspect-ratio: 16/8; }
  .project-card:nth-child(2) .card-inner,
  .project-card:nth-child(3) .card-inner { aspect-ratio: 1/1; }
  .project-card:nth-child(4) .card-inner,
  .project-card:nth-child(5) .card-inner { aspect-ratio: 16/7; }
  .about-section { grid-template-columns: 1fr; gap: 5rem; }
  .about-text-side { padding-left: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 5rem; }
  .proj-hero { padding: 0 3rem 5rem; }
  .proj-layout { padding: 6rem 3rem; }
  .proj-images, .subprojects { padding-left: 3rem; padding-right: 3rem; padding-bottom: 6rem; }
  .proj-layout-inner { grid-template-columns: 1fr; gap: 4rem; }
  .proj-sidebar { position: static; border-left: none; border-top: 1px solid var(--border); padding: 2.5rem 0 0; flex-direction: row; flex-wrap: wrap; gap: 2rem; }
  .proj-sidebar-item { flex: 0 0 calc(50% - 1rem); }
  .next-proj-content { padding: 0 3rem; }
  .subprojects-grid { grid-template-columns: 1fr 1fr; }
  .proj-plan-grid, .proj-image-row3, .proj-image-feature { grid-template-columns: 1fr; gap: 2rem; }
  .proj-image-feature.is-contain { height: auto; }
  .proj-plan-light, .proj-plan-dark { padding: 2rem; }
  footer { flex-direction: column-reverse; gap: 2rem; padding: 4rem 3rem; text-align: center; }
  .footer-nav { flex-direction: column !important; gap: 1.5rem !important; }
}
@media (max-width: 640px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  body > nav { padding: 1.5rem 1.25rem; flex-direction: column; gap: 1rem; align-items: flex-start; }
  .nav-logo { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 2.1rem); left: 1.25rem; right: auto; }
  .nav-right { position: relative; top: auto; right: auto; left: auto; width: 100%; justify-content: flex-start; margin-top: 2.8rem; }
  .nav-links { display: none; }
  .nav-back {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    background: none;
    border: 0;
    padding: 0;
    box-shadow: none;
    text-shadow: none;
    opacity: 0.9;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    display: none;
  }
  .to-projects {
    top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
    right: 1.25rem;
    display: inline-flex;
  }
  .hero { 
    padding: 16rem 2rem 4rem; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    height: auto; 
    min-height: 100vh;
  }
  .hero-visual { 
    order: 1;
    width: 75%; 
    height: auto; 
    aspect-ratio: auto; 
    margin: 3rem 0 -3rem 0; /* Augmentation de la marge négative pour faire remonter le texte plus haut sur la photo */
    position: relative; 
    right: auto; 
    top: auto; 
    transform: none;
    display: block;
    z-index: 0;
    animation: visualFadeIn 1s ease forwards;
  }
  .hero-content { 
    order: 2; 
    width: 100%;
    position: relative;
    z-index: 1;
  }
  .hero-name { 
    font-size: clamp(4rem, 12vw, 7.5rem); 
    margin-bottom: 1.5rem; 
  }
  .hero-footer { 
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    gap: 3rem; 
    width: 100%;
  }
  .hero-desc { 
    font-size: 0.95rem; 
    max-width: 100%; 
    letter-spacing: 0.04em;
    line-height: 1.6;
  }
  .scroll-indicator { 
    position: absolute;
    bottom: 4rem; right: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0;
  }
  .scroll-indicator span { writing-mode: vertical-rl; font-size: 0.55rem; letter-spacing: 0.35em; color: var(--text-muted); opacity: 1; text-shadow: none; }
  .scroll-bar { 
    width: 1px; height: 50px; 
    background: linear-gradient(to bottom, var(--accent), transparent); 
    animation: scrollPulse 2.2s ease-in-out infinite; 
  }
  @keyframes scrollPulse { 0%,100%{transform:scaleY(1);opacity:1} 50%{transform:scaleY(0.4);opacity:0.4} }
  .hero-visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  #projets, .about-section, .contact-section { padding-left: 2rem; padding-right: 2rem; }
  .contact-section::before { left: 2rem; right: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:nth-child(n) { grid-column: 1; }
  .project-card:nth-child(n) .card-inner { aspect-ratio: 4/3; }
  .section-header { padding: 0 2rem; }
  .proj-hero { padding: 0 2rem 4rem; }
  .proj-layout { padding: 5rem 2rem; }
  .proj-images, .subprojects { padding-left: 0; padding-right: 0; }
  .proj-plans { padding-left: 0; padding-right: 0; }
  .proj-plan-light, .proj-plan-dark { padding: 0.5rem; min-height: auto; }
  .proj-plan-light img, .proj-plan-dark img { max-height: none; width: 100%; height: auto; object-fit: contain; }
  .proj-image-feature.is-contain { height: auto; }
  .proj-image-row3 img, .proj-image-feature img { aspect-ratio: auto !important; height: auto !important; }
  .proj-plan-grid, .proj-image-row3, .proj-image-feature { gap: 2rem; }
  .proj-image-grid, .subprojects-grid { grid-template-columns: 1fr; }
  .proj-image-grid.thirds { grid-template-columns: 1fr; }
  .next-proj-content { padding: 0 2rem; }
  .card-overlay { padding: 1.5rem; } /* Réduit le padding pour plus d'espace sur mobile */
  footer { padding: 2rem; }
}

/* ============================================================
   LIGHTBOX
============================================================ */
.lb-trigger {
  cursor: zoom-in !important;
  transition: opacity 0.3s;
}
.lb-trigger:hover {
  opacity: 0.9;
}

.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 5, 0.98);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
  cursor: auto !important; /* Réactive la souris par défaut */
}
.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: auto;
}

.lb-overlay * {
  cursor: auto !important; /* Applique à tous les éléments internes (boutons, flèches) */
}

.lb-close, .lb-arrow {
  cursor: pointer !important; /* Sauf pour les boutons qui gardent la main */
}

.lb-stage {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-frame {
  max-width: 90%;
  max-height: 100%;
  transition: opacity 0.2s, transform 0.2s;
}
.lb-frame.lb-fade {
  opacity: 0;
  transform: scale(0.98);
}

.lb-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.lb-close {
  position: absolute;
  top: 2rem; right: 2rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 20001;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.lb-close:hover { opacity: 1; }

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  padding: 2rem;
  z-index: 20001;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
}
.lb-arrow:hover { opacity: 1; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover { transform: translateY(-50%) translateX(-5px); }
.lb-next:hover { transform: translateY(-50%) translateX(5px); }

.lb-caption {
  margin-top: 2rem;
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent-light);
  text-align: center;
  max-width: 600px;
}

.lb-counter {
  position: absolute;
  top: 2rem; left: 2rem;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .lb-arrow { display: none; }
  .lb-overlay { padding: 1rem; }
  .lb-image { max-height: 70vh; }
}
