/* Police Inter Tight (licence SIL Open Font License), hébergée sur le site : fichiers variables,
   toutes les graisses dans un seul fichier par jeu de caractères. */
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #8c8c8c;
  --line: #e8e8e8;
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Langue (i18n.js) : n'affiche que les blocs de la langue choisie ; masque la page le temps de la traduction */
html[lang="en"] [data-lang="fr"], html:not([lang="en"]) [data-lang="en"] { display: none !important; }
html.i18n-pending body { visibility: hidden; }
.lang-switch { font: inherit; font-weight: 800; font-size: .9rem; letter-spacing: -.01em; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; opacity: .55; }
.lang-switch:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* text-size-adjust : empêche iOS et les navigateurs intégrés (Instagram…) de grossir le texte */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--fg); color: var(--bg); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 20px var(--gutter);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}
/* Logotype : "matreding" en minuscules, très gras et resserré */
.brand { display: block; color: var(--fg); text-decoration: none; font-weight: 800; font-size: 1.6rem; line-height: 1; letter-spacing: -.055em; }
.brand:hover { opacity: .6; }
.site-header { align-items: center; }
.site-header nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.site-header nav a { text-decoration: none; font-weight: 800; font-size: .9rem; letter-spacing: -.01em; white-space: nowrap; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* Hero : purement typographique */
.hero { padding: clamp(48px, 12vh, 140px) var(--gutter) clamp(40px, 8vh, 96px); }
.hero h1 { font-weight: 900; font-size: clamp(3.2rem, 13vw, 11rem); line-height: .88; letter-spacing: -.05em; text-transform: uppercase; }
.hero p { margin-top: 20px; font-weight: 800; font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: -.02em; color: var(--muted); }

/* Gallery */
.gallery-section { padding: 0 var(--gutter) 40px; }

.gallery { columns: 3 320px; column-gap: 10px; }
.tile { break-inside: avoid; margin-bottom: 10px; cursor: zoom-in; position: relative; overflow: hidden; background: #f3f3f3 !important; }
.tile img { width: 100%; height: auto; transition: opacity .5s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { opacity: .88; }

.status { color: var(--muted); font-weight: 500; margin: 24px 0; }
.status.error { color: #d33; }
.more { background: var(--fg); color: var(--bg); border: 0; padding: 14px 28px; font: 800 .95rem var(--font); cursor: pointer; }
.more:hover { opacity: .8; }

/* About & contact */
.about, .contact { padding: clamp(64px, 12vh, 120px) var(--gutter); border-top: 2px solid var(--fg); margin: 0 var(--gutter); padding-left: 0; padding-right: 0; }
.about { display: grid; grid-template-columns: minmax(200px, 380px) 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #f3f3f3; }
h2 { font-weight: 900; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .95; letter-spacing: -.04em; text-transform: uppercase; margin-bottom: 24px; }
.about p { font-size: 1.15rem; max-width: 58ch; }
.about p + p { margin-top: 14px; }
.about .about-lead { font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.25; letter-spacing: -.02em; }
.about .meta a { color: inherit; }
.meta { margin-top: 16px; color: var(--muted); font-weight: 500; font-size: .95rem !important; }
.contact p { font-size: 1.15rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 40px; }

/* Formulaire de contact */
.contact-form { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .95rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 500 1.05rem var(--font); color: var(--fg); background: var(--bg);
  border: 2px solid var(--fg); border-radius: 0; padding: 12px 14px; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid var(--fg); outline-offset: 2px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact .cf-consent { font-size: .85rem; color: var(--muted); }
.cf-consent a { color: inherit; }
.cf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cf-actions .more:disabled { opacity: .4; cursor: default; }
.contact .cf-status { font-size: .95rem; font-weight: 500; }
.cf-ok { color: #1a7f37; font-weight: 800 !important; }
.cf-error { color: #d33; font-weight: 800 !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-links a { font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.8rem); letter-spacing: -.02em; text-decoration: none; border-bottom: 2px solid var(--fg); }
.contact-links a:hover { opacity: .6; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 24px var(--gutter); color: var(--muted); font-size: .85rem; font-weight: 500; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 88vw; max-height: 82vh; object-fit: contain; }
.lightbox figcaption { margin-top: 14px; font-size: .9rem; font-weight: 500; color: var(--muted); text-align: center; max-width: 70ch; }
.lightbox figcaption a { color: var(--fg); font-weight: 800; }
.lb-close, .lb-nav { position: absolute; background: none; border: 0; color: var(--fg); cursor: pointer; font: 900 2.4rem/1 var(--font); padding: 16px; }
.lb-close:hover, .lb-nav:hover { opacity: .5; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }

/* Footer */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
/* Pictogrammes Instagram et LinkedIn */
.footer-social { display: flex; gap: 14px; align-items: center; }
.footer-social a { display: inline-flex; color: var(--muted); }
.footer-social a:hover { color: var(--fg); }
.footer-social svg { display: block; }

/* Pages de texte (CGU, confidentialité) */
.legal { max-width: 760px; padding: clamp(40px, 8vh, 96px) var(--gutter) 80px; }
.legal h1 { font-weight: 900; font-size: clamp(2.4rem, 8vw, 5rem); line-height: .92; letter-spacing: -.045em; text-transform: uppercase; margin-bottom: 16px; }
.legal .updated { color: var(--muted); font-weight: 500; margin-bottom: 48px; }
.legal h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.02em; text-transform: none; margin: 44px 0 12px; line-height: 1.15; }
.legal p, .legal li { font-size: 1.02rem; max-width: 68ch; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0 20px; }
.legal li + li { margin-top: 6px; }
.legal a { font-weight: 500; text-underline-offset: 3px; }

/* Page 404 */
.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding: 40px var(--gutter); }
.notfound h1 { font-weight: 900; font-size: clamp(6rem, 30vw, 22rem); line-height: .8; letter-spacing: -.06em; }
.notfound p { margin-top: 24px; font-weight: 800; font-size: clamp(1.1rem, 2.5vw, 1.6rem); letter-spacing: -.02em; }
.notfound a.more { display: inline-block; margin-top: 28px; text-decoration: none; align-self: flex-start; }

/* Accueil : écran plein (photo Soap + grand logotype) */
.site-header--splash { position: absolute; left: 0; right: 0; top: 0; background: transparent; backdrop-filter: none; color: #fff; }
.site-header--splash .brand { visibility: hidden; }
.site-header--splash nav a { color: #fff; }
.splash { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: #8FAED0; overflow: hidden; color: #fff; }
.splash-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Léger dégradé bleu foncé en haut (menu) et en bas (logotype) pour garder le blanc lisible sur une photo claire */
.splash::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(38,66,104,.30), rgba(38,66,104,0) 22%, rgba(38,66,104,0) 60%, rgba(38,66,104,.28)); }
.splash-word, .splash-down { z-index: 1; }
.splash-word {
  position: absolute; left: var(--gutter); bottom: clamp(32px, 7vh, 72px); margin: 0;
  font-weight: 800; font-size: clamp(4.2rem, 18.5vw, 19rem); line-height: .78; letter-spacing: -.065em;
}
.splash-down { position: absolute; right: var(--gutter); top: 50%; color: #fff; text-decoration: none; font: 800 2rem/1 var(--font); animation: nudge 2s ease-in-out infinite; }
.splash-down:hover { opacity: .6; }
@keyframes nudge { 50% { transform: translateY(8px); } }

/* Accueil : nom sous l'écran plein, plus petit */
#intro h1 { font-size: clamp(2.6rem, 8vw, 6.5rem); }

/* Accueil : série de photos */
.series { margin-bottom: clamp(56px, 10vh, 112px); }
.series-head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 6px 32px; margin-bottom: 28px; }
.series-kicker { grid-column: 1 / -1; font-weight: 800; color: var(--muted); }
.series-head h2 { margin: 0; }
.series-head p:last-child { max-width: 46ch; font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.series-grid { columns: 3 260px; column-gap: 10px; }
.series-grid a { display: block; break-inside: avoid; margin-bottom: 10px; background: #0a0a0a; cursor: zoom-in; }
.series-grid img { width: 100%; height: auto; transition: opacity .3s; }
.series-grid a:hover img { opacity: .85; }
/* Grille justifiée (site.js → justifyGrid) : rangées pleine largeur, même hauteur dans une rangée */
.jgrid { columns: auto; display: flex; flex-direction: column; gap: 10px; }
.jrow { display: flex; gap: inherit; }
.jrow > * { flex: var(--r) 1 0%; min-width: 0; aspect-ratio: var(--r); margin: 0 !important; }
.jrow > * img { width: 100%; height: 100%; object-fit: cover; }

/* Accueil : "Sur le terrain" (liste typographique, sans logos) */
.terrain { margin: 0 var(--gutter); padding: clamp(64px, 12vh, 120px) 0; border-top: 2px solid var(--fg); }
.terrain-list { list-style: none; display: flex; flex-wrap: wrap; gap: .1em 0; max-width: 1200px; }
.terrain-list li {
  font-weight: 800; font-size: clamp(1.5rem, 3.6vw, 3rem); line-height: 1.15; letter-spacing: -.035em;
}
.terrain-list li:not(:last-child)::after { content: "/"; margin: 0 .35em; color: var(--muted); font-weight: 400; }

.terrain-list a { color: inherit; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .12em; }
.terrain-list a:hover { opacity: .6; }

/* Textes de description justifiés (reportages, séries comme Soap) ; la césure évite les grands blancs */
.reportage-intro, .series-head p:last-child { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* Protection des images (pages publiques, voir site.js) */
.protect-images img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Reportages */
.reportage { padding: clamp(32px, 7vh, 80px) var(--gutter) 80px; }
.reportage h1 { font-weight: 900; font-size: clamp(2.4rem, 7vw, 6rem); line-height: .92; letter-spacing: -.05em; text-transform: uppercase; max-width: 16ch; }
.crumbs { color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.crumbs a { color: var(--fg); font-weight: 800; text-decoration: none; }
.reportage-meta { margin: 18px 0 0; font-weight: 800; color: var(--muted); }
.reportage-intro { margin: 22px 0 40px; font-size: 1.15rem; max-width: 62ch; }
.reportage-grid { margin-top: 8px; }
.rep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 40px 24px; margin-top: 40px; }
.rep-card { display: flex; flex-direction: column; color: var(--fg); text-decoration: none; }
.rep-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #0a0a0a; margin-bottom: 14px; transition: opacity .3s; }
.rep-card:hover img { opacity: .85; }
.rep-date { font-weight: 800; color: var(--muted); font-size: .95rem; }
.rep-title { font-weight: 900; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.05; letter-spacing: -.03em; margin: 4px 0 6px; }
.rep-sub { color: var(--muted); font-weight: 500; }
/* Portraits : aperçus verticaux, sans date */
.portraits-agence { margin: 18px 0 0; font-weight: 800; color: var(--muted); }
.portraits-agence a { color: var(--fg); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.por-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.por-card img { aspect-ratio: 4 / 5; }
.por-card .rep-title { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.por-empty { margin-top: 32px; color: var(--muted); font-weight: 500; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* Accueil : photo principale */


/* Galeries clients */
.client-gallery { padding: 0 var(--gutter) 64px; }
.cg-head { padding: clamp(32px, 8vh, 88px) 0 32px; }
.cg-kicker { font-weight: 800; color: var(--muted); letter-spacing: -.01em; }
.client-gallery h1 { overflow-wrap: break-word; font-weight: 900; font-size: clamp(2.4rem, 7.5vw, 5.5rem); line-height: .9; letter-spacing: -.05em; text-transform: uppercase; margin: 8px 0 16px; }
.cg-meta { color: var(--muted); font-weight: 500; }
.cg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.cg-actions .more:disabled { opacity: .4; cursor: default; }
.cg-progress { color: var(--muted); font-weight: 500; font-size: .95rem; }
.client-gallery .tile img { cursor: zoom-in; }
.cg-dl {
  position: absolute; right: 8px; bottom: 8px;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font-weight: 800; font-size: .8rem; padding: 6px 10px;
  opacity: 0; transition: opacity .2s;
}
.tile:hover .cg-dl, .cg-dl:focus { opacity: 1; }
@media (hover: none) { .cg-dl { opacity: 1; } }

/* Responsive */
@media (max-width: 640px) {
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  /* 5 liens : le menu passe sous le logo */
  .site-header { flex-wrap: wrap; row-gap: 10px; }
  .site-header nav { gap: 6px 12px; flex-wrap: wrap; }
  /* Accueil : le logo est caché, le menu prend toute la largeur */
  .site-header--splash .brand { display: none; }
  .site-header nav a, .lang-switch { font-size: .78rem; }
  .brand { font-size: 1.3rem; }
  .hero { padding-top: 40px; }
  .series-head { grid-template-columns: 1fr; }
  .series-grid { columns: 2 140px; column-gap: 6px; }
  .series-grid a { margin-bottom: 6px; }
  .jgrid { gap: 6px; }
  .splash-down { top: auto; bottom: calc(clamp(32px, 7vh, 72px) + 18.5vw + 12px); }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-portrait { max-width: 320px; }
  .cf-row { grid-template-columns: 1fr; }
  .gallery { columns: 2 140px; column-gap: 6px; }
  .tile { margin-bottom: 6px; }
  .contact-links { flex-direction: column; gap: 14px; }
  .contact-links a { align-self: flex-start; word-break: break-all; }
  .site-footer { flex-direction: column; }
  .lb-nav { font-size: 1.8rem; padding: 8px; top: auto; bottom: 12px; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lightbox img { max-width: 96vw; max-height: 74vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Page Services */
.svc-lead { margin: 18px 0 8px; font-size: 1.15rem; max-width: 62ch; color: var(--muted); font-weight: 600; }
.svc { border-top: 2px solid var(--fg); padding: 22px 0 6px; margin-top: 30px; max-width: 760px; }
.svc h2 { margin: 0 0 10px; }
.svc p { font-size: 1.05rem; max-width: 62ch; margin: 0 0 12px; }
.svc-refs { color: var(--muted); font-weight: 600; font-size: .95rem !important; }
.svc-refs a { color: var(--fg); text-underline-offset: 3px; }
.svc-fin .more { display: inline-block; margin-top: 6px; }
