/* =====================================================================
   STYLE DU SITE — CAMILLE DELRIVE
   Pour tester d'autres typographies, changer seulement les deux
   variables --font-texte et --font-titre ci-dessous (et le lien
   Google Fonts dans le <head> des pages).
   ===================================================================== */
:root {
  --font-texte: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-titre: "Azeret Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-accueil: "Newsreader", Georgia, "Times New Roman", serif; /* nom + sous-titre de l'accueil */
  --fond: #f7f7f6;
  --fond-404: #efefed;
  --fond-media: #ececea;
  --texte: #1c1c1c;
  --texte-doux: #3a3a3a;
  --marge: 20px;
  --gouttiere: 12px;
  --colonne-projet: 1020px;
  --nav-h: 58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--font-texte);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; letter-spacing: inherit; }
.maj { text-transform: uppercase; }

/* ---------- Liens soulignés au survol ---------- */
.lien { position: relative; display: inline-block; text-transform: lowercase; }
.lien::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.lien:hover::after, .lien.actif::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; justify-content: center; align-items: flex-start; padding-top: 20px;
  background: var(--fond);
}
.nav-liens { display: flex; gap: 16px; font-size: 15px; }
.nav-liens .lien, .menu-mobile nav a, .menu-mobile .bas, .nav-menu-btn, .menu-mobile .haut button { text-transform: lowercase !important; }
.nav-menu-btn { display: none; }
.nav-droite { display: none; }
/* Sélecteur de langue EN / FR */
.langue { display: inline-flex; gap: 8px; text-transform: lowercase; }
.langue button { opacity: .4; transition: opacity .3s; padding: 0; }
.langue button:hover, .langue button.actif { opacity: 1; }
/* Ordinateur : en / fr tout en haut à droite, le menu reste centré */
.langue-bureau { position: absolute; right: var(--marge); top: 20px; }
.menu-mobile { display: none; }

/* ---------- Animations d'apparition ---------- */
.flou-in { animation: flouIn .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes flouIn { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }
.apparait { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.apparait.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .flou-in { animation: none; }
  .apparait { opacity: 1; transform: none; transition: none; }
}

/* ---------- Accueil : hero + effet souris ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 480px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; cursor: default;
  isolation: isolate; background: var(--fond);
}
/* Nom + sous-titre : la couleur s'inverse automatiquement au passage des photos
   (noir sur fond clair, blanc sur photo sombre) */
.hero h1, .hero p { color: #dcdcdb; mix-blend-mode: difference; } /* = gris très foncé sur le fond clair */
/* Typo de l'accueil (nom + sous-titre) : changer --font-accueil en haut du fichier */
.hero h1 {
  font-family: var(--font-accueil); font-weight: 500; font-size: 34px; line-height: 1;
  letter-spacing: -0.025em; font-optical-sizing: auto; text-transform: lowercase; position: relative; z-index: 3;
  pointer-events: none;
}
.hero p {
  font-family: var(--font-accueil); margin-top: 10px; font-size: 15px; font-weight: 400; letter-spacing: 0;
  text-transform: lowercase; position: relative; z-index: 3; pointer-events: none;
}
.trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.trail img {
  position: absolute; left: 0; top: 0; width: 200px; height: 250px; object-fit: cover;
  will-change: transform, opacity; backface-visibility: hidden;
}

/* ---------- Sections génériques ---------- */
.section { padding: 0 var(--marge); }
.section-works { padding-top: 60px; }
.titre-section {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
  margin-bottom: 24px;
}
/* Gros titres : même typo que le nom de l'accueil, en minuscules */
.titre-mono {
  font-family: var(--font-accueil); font-weight: 500; font-size: 56px; line-height: 1;
  letter-spacing: -0.025em; text-transform: lowercase;
}
.titre-page { font-size: 50px; }
.page { padding-top: 160px; }

/* ---------- Cartes projet ---------- */
.grille { display: grid; gap: var(--gouttiere); }
.grille-2 { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
.grille-3 { grid-template-columns: repeat(3, 1fr); }
.media-4-5 { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--fond-media); }
.media-4-5 > img, .media-4-5 > video { width: 100%; height: 100%; object-fit: cover; }
.carte .media-4-5 > img, .carte .media-4-5 > video { transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.carte:hover .media-4-5 > img, .carte:hover .media-4-5 > video { transform: scale(1.03); }
.carte-legende { margin-top: 10px; }
/* Légendes des projets : même typo que le nom de l'accueil, en minuscules */
.carte-legende h3 {
  font-family: var(--font-accueil); font-weight: 500; font-size: 16px; line-height: 1.15;
  letter-spacing: -0.015em; text-transform: lowercase;
}
.carte-legende p {
  font-family: var(--font-accueil); font-weight: 400; font-size: 14px; letter-spacing: 0;
  text-transform: lowercase; color: #4a4a4a; margin-top: 2px; min-height: 1em;
}

/* Carte à légende au survol (page Works + autres projets) */
.carte-survol { position: relative; display: block; }
.carte-survol .surcouche {
  position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px; color: #fff; gap: 10px; font-family: var(--font-accueil); text-transform: lowercase;
  background: linear-gradient(to top, rgba(0,0,0,.28), rgba(0,0,0,0) 45%);
  opacity: 0; transition: opacity .45s ease;
}
.carte-survol:hover .surcouche { opacity: 1; }
.carte-survol .surcouche span:first-child { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }
.carte-survol .surcouche span:last-child { font-size: 12.5px; font-weight: 400; opacity: .85; }
.carte-survol:hover .media-4-5 > img, .carte-survol:hover .media-4-5 > video { filter: saturate(.85) brightness(.96); }

/* ---------- Page Works : filtres ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 20px 0 46px; }
.filtres button { text-transform: lowercase; opacity: .55; transition: opacity .3s; }
.filtres button:hover, .filtres button.actif { opacity: 1; }
.grille-works .carte { transition: opacity .4s ease, transform .4s ease; }
.grille-works .carte.cache { display: none; }

/* ---------- Page projet ---------- */
.projet { width: min(var(--colonne-projet), calc(100% - 2 * var(--marge))); margin: 0 auto; padding-top: 160px; }
.projet-entete h1 { font-family: var(--font-accueil); font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -0.025em; text-transform: lowercase; }
/* Bloc texte des projets : tout en minuscules, même gris, même taille */
.projet-infos { max-width: 680px; margin-top: 28px; color: #4a4a4a; text-transform: lowercase; }
.projet-infos > p { font-size: 15px; line-height: 1.45; letter-spacing: -0.01em; white-space: pre-line; }
.projet-infos > p, .projet-infos > div + p { margin-top: 20px; }
.projet-infos > :first-child { margin-top: 0; }
.projet-texte p { font-size: 15px; line-height: 1.45; letter-spacing: -0.01em; white-space: pre-line; }
.projet-texte p + p { margin-top: 8px; }
.projet-infos.large { max-width: none; }
.projet-contenu { margin-top: 40px; display: flex; flex-direction: column; gap: var(--gouttiere); }
.bloc-duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gouttiere); }
.bloc-duo .media-4-5 { background: transparent; }
.bloc-large img, .bloc-large video { width: 100%; height: auto; }
.duo-fig { margin: 0; }
.petite-legende { margin-top: 10px; text-align: center; font-style: italic; font-size: 11px; line-height: 1.4; color: #4a4a4a; text-transform: lowercase; white-space: pre-line; }
.bloc-legende { font-size: 15px; font-weight: 400; margin-top: 28px; text-transform: lowercase; color: #4a4a4a; white-space: pre-line; }
/* Mini-galeries (ex. editorial projects) */
.galerie { margin-top: 110px; }
.galerie:first-child { margin-top: 36px; }
.galerie-entete { max-width: 680px; margin-bottom: 18px; color: #4a4a4a; text-transform: lowercase; }
.galerie-entete h3 { font-family: var(--font-accueil); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; color: var(--texte); }
.galerie-entete p { font-size: 15px; line-height: 1.45; margin-top: 8px; white-space: pre-line; }
.galerie-grille { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: var(--gouttiere); }
.bloc-reel { width: min(380px, 100%); aspect-ratio: 9 / 16; margin: 28px auto; overflow: hidden; background: var(--fond-media); }
.bloc-reel video { width: 100%; height: 100%; object-fit: cover; }
.diaporama { position: relative; aspect-ratio: 1006 / 570; overflow: hidden; }
.diaporama img { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.diaporama img.actif { opacity: 1; }

.autres { margin-top: 120px; }
.autres h2, .contacter h2 { font-family: var(--font-accueil); font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -0.025em; text-transform: lowercase; }

/* ---------- Archives ---------- */
.grille-4 { grid-template-columns: repeat(4, 1fr); row-gap: 30px; }
.archive { cursor: zoom-in; }
.grille-4 { align-items: start; }
.archive-media img { width: 100%; height: auto; } /* image entière, non recadrée */
.archive .numero { margin-top: 8px; }
.visionneuse {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(30, 28, 30, .55); opacity: 0; pointer-events: none; transition: opacity .4s ease;
  cursor: zoom-out;
}
.visionneuse.ouverte { opacity: 1; pointer-events: auto; }
.visionneuse img { width: auto; max-width: min(88vw, 900px); max-height: 86vh; transform: scale(.96); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.visionneuse.ouverte img { transform: none; }
.visionneuse .fleche { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 13px; padding: 20px; text-transform: lowercase; cursor: pointer; }
.visionneuse .prec { left: 10px; } .visionneuse .suiv { right: 10px; }
.visionneuse .compteur { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; }

/* ---------- Contact ---------- */
body[data-page="contact"] main { padding-bottom: 80px; }
.contact-grille { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 40px; margin-top: 30px; align-items: start; }
.contact-col p { font-size: 13px; line-height: 1.25; letter-spacing: -0.02em; }
.contact-col p + p { margin-top: 14px; }
.contact-col { text-transform: lowercase; }
.contact-col h4 { font-size: 13px; font-weight: 500; text-transform: lowercase; }
.contact-col .groupe + .groupe { margin-top: 24px; }
.contact-col .cv { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 13px; }
.contact-portrait { justify-self: end; width: 100%; max-width: 465px; }
@media (min-width: 1101px) {
  /* La photo prend exactement la hauteur du texte à gauche */
  .contact-grille { align-items: stretch; }
  .contact-portrait { position: relative; align-self: stretch; max-width: none; }
  .contact-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}

/* ---------- Pied de page ---------- */
.contacter { padding: 120px var(--marge) 24px; }
.contacter-bas { display: flex; justify-content: space-between; margin-top: 14px; line-height: 1.2; }
.contacter-bas .liens { display: flex; gap: 24px; }

/* ---------- 404 ---------- */
body.page-404 { background: var(--fond-404); }
.page-404 main { padding: 160px var(--marge); min-height: 100vh; }
.page-404 h1 { font-family: var(--font-accueil); font-weight: 500; font-size: 50px; letter-spacing: -0.025em; text-transform: lowercase; }
.page-404 a { margin-top: 20px; }

/* =====================================================================
   TABLETTE
   ===================================================================== */
@media (max-width: 1100px) {
  .grille-4 { grid-template-columns: repeat(3, 1fr); }
  .contact-grille { grid-template-columns: 1fr 1fr; }
  .contact-portrait { grid-column: 1 / -1; justify-self: start; max-width: 420px; }
}

/* =====================================================================
   TÉLÉPHONE — version retravaillée
   ===================================================================== */
@media (max-width: 760px) {
  :root { --marge: 16px; --gouttiere: 8px; --nav-h: 52px; }
  body { font-size: 14px; }

  /* Menu plein écran */
  .nav { justify-content: space-between; align-items: center; padding: 0 var(--marge); padding-top: env(safe-area-inset-top); height: calc(var(--nav-h) + env(safe-area-inset-top)); }
  .nav-liens { display: none; }
  .langue-bureau { display: none; }
  .nav-droite { display: flex; align-items: center; gap: 20px; }
  .nav-droite .langue button { padding: 10px 2px; }
  .nav-logo { font-family: var(--font-accueil); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; text-transform: lowercase; }
  .nav-menu-btn { display: block; text-transform: lowercase; padding: 10px 0; }
  .menu-mobile {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; inset: 0; z-index: 60; background: var(--fond);
    padding: 16px var(--marge) 28px; transform: translateY(-100%);
    transition: transform .55s cubic-bezier(.7,0,.2,1);
  }
  .menu-mobile.ouvert { transform: none; }
  .menu-mobile { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .menu-mobile .haut { display: flex; justify-content: space-between; align-items: center; height: 20px; }
  .menu-mobile .haut .droite { display: flex; align-items: center; gap: 20px; text-transform: lowercase; }
  .menu-mobile nav { display: flex; flex-direction: column; gap: 4px; margin-top: auto; margin-bottom: 30px; }
  .menu-mobile nav a { font-family: var(--font-accueil); font-size: 46px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; text-transform: lowercase; }
  .menu-mobile .bas { display: flex; gap: 20px; text-transform: lowercase; font-size: 13px; }

  .page, .projet { padding-top: 110px; }

  /* Accueil téléphone : nom + pile d'images */
  .hero-telephone { height: auto; min-height: 0; justify-content: flex-start; padding: calc(var(--nav-h) + env(safe-area-inset-top) + 9vh) var(--marge) 0; overflow: visible; }
  .hero-telephone h1, .hero-telephone p { mix-blend-mode: normal; color: var(--texte); }
  .pile { position: relative; width: min(58vw, 260px); aspect-ratio: 4 / 5; margin: 9vh auto 0; }
  .pile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform, opacity; }
  .section-works { padding-top: 16vh !important; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 12px; margin-top: 7px; }
  .trail img { width: 140px; height: 175px; }

  .titre-mono { font-size: 40px; }
  .titre-page { font-size: 38px; }
  .titre-section { margin-bottom: 18px; }
  .grille-2 { grid-template-columns: 1fr; row-gap: 28px; }
  .grille-3, .grille-works { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .grille-4 { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }

  /* Sur téléphone pas de survol : la légende passe sous l'image */
  .carte-survol .surcouche { position: static; opacity: 1; background: none; color: var(--texte); padding: 8px 0 0; flex-direction: column; align-items: flex-start; gap: 2px; }
  .carte-survol .surcouche span:first-child { font-size: 14px; }
  .carte-survol .surcouche span:last-child { font-size: 12px; color: #4a4a4a; opacity: 1; }
  .carte-legende h3 { font-size: 15px; }

  .filtres { flex-wrap: nowrap; overflow-x: auto; margin: 16px calc(-1 * var(--marge)) 28px; padding: 0 var(--marge) 6px; scrollbar-width: none; }
  .filtres::-webkit-scrollbar { display: none; }
  .filtres button { white-space: nowrap; font-size: 13px; }

  .projet-entete h1 { font-size: 30px; }
  .projet-infos { margin-top: 20px; }
  .projet-infos > p, .projet-texte p { font-size: 14px; line-height: 1.5; }
  .projet-contenu { margin-top: 28px; }
  .bloc-duo { grid-template-columns: 1fr; }
  .galerie-grille { grid-template-columns: repeat(2, 1fr); }
  .autres { margin-top: 80px; }
  .autres .grille-3 { grid-template-columns: repeat(2, 1fr); }
  .autres .grille-3 > :nth-child(3) { display: none; }
  .autres h2, .contacter h2 { font-size: 30px; }

  .contact-grille { grid-template-columns: 1fr; gap: 28px; }
  .contact-portrait { order: -1; max-width: none; }
  .contact-col p { font-size: 14px; }

  .contacter { padding-top: 80px; }
  .contacter-bas { flex-direction: column; gap: 6px; margin-top: 10px; }
  .contacter-bas .liens { gap: 18px; }

  .visionneuse img { max-width: 94vw; }
  .page-404 h1 { font-size: 36px; }
}
