/* Antoine Raveleau — portfolio */
:root {
  --rouge: #ff2e31;
  --objets: #2caa6b;
  --mobilier: #fa9b29;
  --gonflable: #e11564;
  --instruments: #58a5cc;
  --graphisme: #8537e7;
  --transport: #090e95;
  --gris: #ededed;
  --noir: #0f0e0e;
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "DM Sans", system-ui, sans-serif;
  --gap: clamp(16px, 2.6vw, 36px);      /* espace entre les photos */
  --pad: clamp(16px, 5vw, 80px);        /* marges latérales */
  --row: clamp(40px, 6vw, 96px);        /* espace entre les rangées de projets */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: #000; background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 14px var(--pad);
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .02em;
}
.logo { color: var(--rouge); }
.nav { display: flex; gap: 24px; }
.nav-label { color: var(--rouge); }
.nav ul { list-style: none; display: grid; grid-template-columns: repeat(2, auto); column-gap: 24px; row-gap: 2px; }
.nav a { transition: opacity .2s; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.c-objets { color: var(--objets); } .c-mobilier { color: var(--mobilier); }
.c-gonflable { color: var(--gonflable); } .c-instruments { color: var(--instruments); }
.c-graphisme { color: var(--graphisme); } .c-transport { color: var(--transport); }

/* ---------- Héros ---------- */
.hero { padding: 40px var(--pad) clamp(56px, 8vw, 120px); text-align: center; }
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.portrait { width: min(100%, 900px); margin: 0 auto; transition: transform .25s ease-out; will-change: transform; }
.tagline {
  margin: 24px auto 0; max-width: 620px;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--rouge); line-height: 1.5;
}

/* ---------- Grille de projets ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 0 var(--pad); }
.tile { position: relative; overflow: hidden; border-radius: 4px; background: var(--gris); }
.tile.wide { grid-column: 1 / -1; }
.tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile.wide img { aspect-ratio: 16 / 9; }
.tile.land img { aspect-ratio: 4 / 3; }
.tile:hover img { transform: scale(1.03); }
/* Contour couleur de la catégorie au survol */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border: 3px solid var(--c, var(--rouge)); border-radius: inherit;
  opacity: 0; transition: opacity .25s ease;
}
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile:focus-visible { outline: none; }
.tile-label {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  background: #fff; padding: 4px 8px; border-radius: 3px;
}

/* ---------- À propos ---------- */
.about {
  margin: var(--row) var(--pad); padding: 0;
  color: var(--rouge);
}
.about p { max-width: 640px; font-size: 16px; line-height: 1.45; }
.about p + p { margin-top: 1em; }

/* ---------- Pages catégorie ---------- */
.page-head { padding: clamp(48px, 8vw, 120px) var(--pad) clamp(32px, 5vw, 72px); }
.page-head h1 { font-family: var(--mono); font-weight: 400; font-size: clamp(32px, 7vw, 88px); text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--row) var(--gap); padding: 0 var(--pad); }
.project img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: var(--gris); }
.project figcaption { margin-top: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.project.wide { grid-column: 1 / -1; }
.project.wide img { aspect-ratio: 16 / 8; }
.soon { padding: 0 var(--pad); }
.soon img { width: 100%; max-height: 75vh; object-fit: cover; border-radius: 4px; }
.soon p { margin-top: 12px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: #888; }
.back { display: inline-block; margin: var(--row) var(--pad) 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--rouge); }
.back:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact {
  margin: clamp(80px, 10vw, 160px) var(--pad) var(--pad); padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 48px);
  background: var(--noir); color: #fff; border-radius: 4px;
}
.contact-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--rouge); }
.contact h2 { margin-top: 16px; font-weight: 500; font-size: clamp(28px, 5vw, 56px); line-height: 1.05; letter-spacing: -.02em; max-width: 14ch; }
.contact-links { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 32px; font-family: var(--mono); font-size: 14px; }
.contact-links a { color: rgba(255,255,255,.65); transition: color .2s; }
.contact-links a:hover { color: #fff; }
.contact-links .mail { color: #fff; }

/* Bouton flottant */
.float-contact {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  background: #fff; color: #000; font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: transform .2s;
}
.float-contact:hover { transform: translateY(-2px); }

footer { padding: 16px var(--pad) 72px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: #999; }

/* ---------- Curseur point noir ---------- */
html.has-dot, html.has-dot * { cursor: none !important; }
.dot-cursor {
  position: fixed; left: 0; top: 0; z-index: 2000;
  width: var(--dot, 8.4px); height: var(--dot, 8.4px);
  margin: calc(var(--dot, 8.4px) / -2) 0 0 calc(var(--dot, 8.4px) / -2);
  border-radius: 50%; background: #fff; mix-blend-mode: difference; /* noir sur fond clair, blanc sur fond noir */
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.dot-cursor.on { opacity: 1; }

/* ---------- Intro de l'accueil ---------- */
html.intro, html.intro body { overflow: hidden; }
.fly {
  position: fixed; left: 0; top: 0; z-index: 1000;
  max-width: none; height: auto; pointer-events: none; opacity: 0;
}
/* Pendant l'intro, la page est blanche */
html.intro .portrait { opacity: 0; }
html.intro main > *:not(.hero),
html.intro .contact, html.intro .float-contact, html.intro footer { opacity: 0; }
html.intro .tagline { opacity: 0; transform: translateY(12px); }
main > *, .contact, .float-contact, footer { transition: opacity .6s ease .25s; }
.tagline { transition: opacity .6s ease .15s, transform .6s cubic-bezier(.2,.8,.2,1) .15s; }
/* L'en-tête arrive du haut */
.header { transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .45s ease; }
html.intro-head .header { transform: translateY(-100%); opacity: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .header { flex-direction: column; gap: 8px; }
  .nav { gap: 16px; }
  .grid, .projects { grid-template-columns: 1fr; }
  .tile img, .tile.land img { aspect-ratio: 4 / 3; }
  .project.wide img { aspect-ratio: 3 / 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portrait, .tile img { transition: none; }
}

/* ---------- Thème couleur des pages catégorie / projet ---------- */
.themed .logo, .themed .nav-label { color: var(--theme); }
.themed .contact { background: var(--theme); }
.themed .contact-label { color: #fff; opacity: .75; }
.themed .contact-links a { color: rgba(255,255,255,.8); }
.themed .contact-links a:hover, .themed .contact-links .mail { color: #fff; }
.themed .back { color: var(--theme); }

/* Vignettes des pages catégorie : cliquables, zoom + contour comme l'accueil */
.project a { display: block; }
.project .thumb { position: relative; overflow: hidden; border-radius: 4px; background: var(--gris); }
.project .thumb img { border-radius: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project a:hover .thumb img { transform: scale(1.03); }
.project .thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border: 3px solid var(--theme, var(--rouge)); border-radius: inherit;
  opacity: 0; transition: opacity .25s ease;
}
.project a:hover .thumb::after, .project a:focus-visible .thumb::after { opacity: 1; }
.project a:focus-visible { outline: none; }
.project figcaption { color: var(--theme, inherit); }

/* ---------- Page projet ---------- */
.project-head { display: flex; flex-direction: column; gap: 10px; }
.crumb { font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.crumb:hover { text-decoration: underline; text-underline-offset: 3px; }
.gallery { display: flex; flex-direction: column; gap: var(--row); padding: 0 var(--pad); }
.gal-row { display: grid; gap: var(--gap); }
.gal-row.row-2 { grid-template-columns: 1fr 1fr; }
.gal-row img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; background: var(--gris); }
.gal-row.row-1 img { max-height: 92vh; }
.gal-row.row-2 img { aspect-ratio: 4 / 5; }
@media (max-width: 700px) {
  .gal-row.row-2 { grid-template-columns: 1fr; }
  .gal-row.row-2 img { aspect-ratio: auto; }
}

/* ---------- Page projet rédigée (récit) ---------- */
.story { display: flex; flex-direction: column; gap: var(--row); padding: 0 var(--pad); }
.st-fig { margin: 0; }
.st-fig img { width: 100%; height: auto; border-radius: 4px; background: var(--gris); }
.st-fig figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  color: var(--theme, #000);
}
/* Texte : colonne de lecture confortable, décalée comme une page de livre */
.st-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); }
.st-body { max-width: 640px; }
.st-body p { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.65; color: #1a1a1a; }
.st-body p + p { margin-top: 1.2em; }
.st-body .st-lead { font-size: clamp(21px, 2vw, 28px); line-height: 1.4; letter-spacing: -.01em; color: #000; }
.st-meta { display: flex; flex-direction: column; gap: 18px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.st-meta dt { color: var(--theme); margin-bottom: 4px; }
.st-meta dd { margin: 0; color: #444; }
/* Paires d'images */
.st-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: end; }
.st-compare { align-items: center; }
.st-compare .st-fig img { aspect-ratio: 4 / 3; object-fit: cover; }
/* Photo d'atelier : portrait, décalé à droite */
.st-workshop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.st-workshop .st-fig { grid-column: 2; max-width: 520px; }

/* Apparition au défilement */
html.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
html.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .st-text, .st-workshop { grid-template-columns: 1fr; }
  .st-side { display: none; }
  .st-workshop .st-fig { grid-column: 1; }
  .st-pair { grid-template-columns: 1fr; }
}
.st-portraits .st-fig img { aspect-ratio: 4 / 5; object-fit: cover; }
.st-portraits { align-items: start; }

/* Plan technique intégré */
.st-plan { margin: 0; }
.st-plan svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.st-plan figcaption { margin-top: 12px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--theme, #000); }
.st-facade img { background: #fff; border: 1px solid #ececec; }
.st-tall { display: flex; flex-direction: column; align-items: center; }
.st-tall img { width: auto; max-width: 100%; max-height: 92vh; }
.st-video-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: end; }
.st-video video { display: block; width: 100%; max-height: 88vh; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; background: #000; }
.st-video-text p { font-size: clamp(21px, 2vw, 28px); line-height: 1.4; letter-spacing: -.01em; }
@media (max-width: 800px) { .st-video-wrap { grid-template-columns: 1fr; } }
.st-medium { max-width: 1000px; }

/* Grande page Graphisme : chapitres et murs d'images */
.st-chapter { font-family: var(--mono); font-size: clamp(22px, 3vw, 40px); text-transform: uppercase; letter-spacing: -.01em; padding-top: calc(var(--row) * .5); border-top: 1px solid #e6e6e6; }
.st-chapter span { margin-right: .6em; }
.st-wall { columns: 4; column-gap: var(--gap); }
.st-wall-3 { columns: 3; }
.st-wall .st-fig { break-inside: avoid; margin: 0 0 var(--gap); }
@media (max-width: 1000px) { .st-wall { columns: 3; } }
@media (max-width: 700px)  { .st-wall, .st-wall-3 { columns: 2; } }
/* Panneaux de l'expo : lecture dans l'ordre, ligne par ligne */
.st-wall-3 { columns: auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.st-wall-3 .st-fig { margin: 0; }
@media (max-width: 700px) { .st-wall-3 { grid-template-columns: 1fr; } }
.st-wall-ts { columns: 3; } @media (max-width:700px){ .st-wall-ts { columns: 2; } }
.thumb-empty { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--gris); }
.thumb-empty span { font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--theme); }
.st-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.st-grid3 .st-fig img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 800px) { .st-grid3 { grid-template-columns: 1fr 1fr; } }
.st-sketch .st-fig img { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
/* Navigation bas de projet */
.proj-nav { display: flex; justify-content: space-between; align-items: baseline; margin: var(--row) var(--pad) 0; }
.proj-nav .back { margin: 0; }
.proj-nav .next { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--theme, var(--rouge)); }
.proj-nav .next:hover { text-decoration: underline; text-underline-offset: 3px; }
a.nav-label:hover { text-decoration: underline; text-underline-offset: 3px; }
#projets { scroll-margin-top: 90px; }
/* Crédit photo aligné à droite de la légende */
.st-fig figcaption.has-credit { display: flex; justify-content: space-between; gap: 16px; }
.st-fig figcaption .credit { color: #888; text-align: right; }
/* Bouton d'action (configurateur) */
.cta { display: inline-block; margin-top: 8px; padding: 14px 22px; border-radius: 6px; background: var(--theme, var(--rouge)); color: #fff; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; transition: transform .2s, opacity .2s; }
.cta:hover { transform: translateY(-2px); opacity: .92; }
/* Pied de page : copyright + changement de langue */
footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lang-switch { display: inline-block; padding: 8px 14px; border: 1px solid currentColor; border-radius: 6px; color: var(--theme, #000); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; transition: background .2s, color .2s; }
.lang-switch:hover { background: var(--theme, #000); color: #fff; border-color: var(--theme, #000); }

/* Accueil : bouton vers À propos */
.about .about-cta { margin-top: 1.6em; }
.c-rouge { color: var(--rouge); }

/* Page À propos */
.about-portrait { width: 100%; max-width: 260px; }
.cv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); border-top: 1px solid #e6e6e6; padding-top: calc(var(--row) * .5); }
.cv-title { font-family: var(--mono); font-weight: 400; font-size: 12px; text-transform: uppercase; color: var(--theme); }
.cv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.cv-list > li { display: grid; grid-template-columns: 130px 1fr; gap: 20px; }
.cv-date { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--theme); padding-top: 4px; }
.cv-list h3 { font-size: clamp(19px, 1.6vw, 22px); font-weight: 500; letter-spacing: -.01em; }
.cv-list p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: #333; }
.cv-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cv-tags li { padding: 8px 14px; border: 1px solid var(--theme); border-radius: 999px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--theme); }
@media (max-width: 800px) { .cv { grid-template-columns: 1fr; } .cv-list > li { grid-template-columns: 1fr; gap: 4px; } }
.about-sub { margin-top: 18px; font-size: clamp(18px, 1.8vw, 24px); font-weight: 500; letter-spacing: -.01em; max-width: 30ch; }
.cv-meta { font-family: var(--mono); font-size: 12px !important; text-transform: uppercase; color: #777 !important; margin-top: 4px !important; }
.cv-bullets { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: #333; }
.cv-bullets li::marker { color: var(--theme); }
.cv-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
.cv-group h3 { font-size: clamp(17px, 1.4vw, 19px); font-weight: 500; margin-bottom: 12px; }
@media (max-width: 800px) { .cv-groups { grid-template-columns: 1fr; } }
/* Bloc contact v2 */
.contact h2 { max-width: 22ch; }
.contact-text { margin-top: 18px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; max-width: 52ch; color: rgba(255,255,255,.92); }
.contact-text + .contact-text { margin-top: 6px; }
.contact-text .mail { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.contact-bar { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact-bar .contact-links { margin-top: 0; gap: 12px; }
.contact .btn-line, .contact .btn-solid { display: inline-block; padding: 12px 20px; border-radius: 999px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; transition: background .2s, color .2s, transform .2s; }
.contact .btn-line { border: 1px solid rgba(255,255,255,.8); color: #fff !important; }
.contact .btn-line:hover { background: #fff; color: var(--theme, var(--noir)) !important; }
.contact .btn-solid { background: #fff; color: var(--theme, var(--noir)); border: 1px solid #fff; }
.contact .btn-solid:hover { transform: translateY(-2px); }
.contact h2.contact-long { font-size: clamp(26px, 3.6vw, 44px); max-width: 28ch; line-height: 1.1; }
