/* ==========================================================================
   Studio Sidéral — feuille de style v2
   Direction artistique : les visuels d'identité (plaque d'acier brossé, logo disque-S,
   arête froide à gauche, arête chaude à droite, bords coupés en biais, capitales fines espacées).
   Charte : Calcaire, Ardoise, Basalte, Nuit. Froid #3C7CB8 / #74A6D6 / #2A5C8C. Chaud #E7A263 en accent.
   Archivo 300/400 capitales pour les titres, Instrument Sans pour le texte.
   Profondeur par crans de valeur. Aucun dégradé, aucune ombre floue, aucun halo.
   Mobile d'abord.
   ========================================================================== */

:root {
  --calcaire:   #F0F2F3;
  --calcaire-2: #E4E7E9;
  --calcaire-3: #D7DBDE;
  --ardoise:    #24292C;
  --basalte:    #686F73;
  --nuit:       #191C1E;
  --nuit-2:     #22262A;
  --nuit-3:     #2C3135;

  --bleu:       #3C7CB8;
  --bleu-clair: #74A6D6;
  --bleu-texte: #2A5C8C;
  --chaud:      #E7A263;

  --font-title: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-text:  "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1440px;
  --header-h: 64px;
  --cut: 22px;            /* taille des coins coupés en biais */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 760px)  { :root { --gutter: 32px; --cut: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 56px; } }

/* ---------- surfaces : .s-a et .s-b alternent, le mode inverse leur valeur ---------- */

.surface-light,
:root:not([data-theme="dark"]) .s-a,
:root[data-theme="dark"] .s-b {
  --bg:      var(--calcaire);
  --bg-2:    var(--calcaire-2);
  --bg-3:    var(--calcaire-3);
  --ink:     var(--ardoise);
  --ink-2:   var(--basalte);
  --ink-3:   var(--basalte);
  --line:    rgba(36, 41, 44, 0.16);
  --line-2:  rgba(36, 41, 44, 0.32);
  --link:    var(--bleu-texte);
  --cold:    var(--bleu);
  --texture: url("../img/texture-acier.svg");
  --texture-size: 1200px 800px;
  --logo: url("../img/logo-sideral-charte.svg");   /* fond clair : logo couleur charte */
  --motif-o: 0.18;   /* filigrane pâle sur fond clair : même contraste que l'ancien motif gris */
  --lbl: var(--ardoise);   /* libellés : Ardoise par défaut, affiné ci-dessous quand le navigateur sait mélanger */
  color-scheme: light;
}

.surface-dark,
:root:not([data-theme="dark"]) .s-b,
:root[data-theme="dark"] .s-a {
  --bg:      var(--nuit);
  --bg-2:    var(--nuit-2);
  --bg-3:    var(--nuit-3);
  --ink:     var(--calcaire);
  --ink-2:   rgba(240, 242, 243, 0.70);
  --ink-3:   rgba(240, 242, 243, 0.62);   /* 6:1 sur Nuit ; Basalte ne passait pas (3,3:1) */
  --line:    rgba(240, 242, 243, 0.14);
  --line-2:  rgba(240, 242, 243, 0.30);
  --link:    var(--bleu-clair);
  --cold:    var(--bleu-clair);
  --texture: url("../img/texture-pierre.svg");
  --texture-size: 600px 600px;
  --logo: url("../img/logo-sideral-fond-sombre.svg");   /* fond sombre : logo couleur pâle */
  --motif-o: 0.05;   /* pâle sur fond sombre : même contraste que l'ancien motif */
  --lbl: rgba(240, 242, 243, 0.80);   /* libellés : Calcaire à 80 % */
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--calcaire); }
html[data-theme="dark"] { background: var(--nuit); }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

.s-a, .s-b, .surface-light, .surface-dark {
  background-color: var(--bg);
  background-image: var(--texture);
  background-size: var(--texture-size);
  color: var(--ink);
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
p a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.kicker, .lbl {
  display: block;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Libellés (NOM, E-MAIL, MESSAGE, ZONE, RÉSEAUX) : au moins 4,5:1 sur toutes les surfaces, texture et motif compris.
   Surface claire : 40 % Ardoise + 60 % Basalte. Surface sombre : Calcaire à 80 %. */
.lbl { color: var(--lbl, var(--ink-3)); }
@supports (color: color-mix(in srgb, red, blue)) {
  .surface-light,
  :root:not([data-theme="dark"]) .s-a,
  :root[data-theme="dark"] .s-b { --lbl: color-mix(in srgb, var(--ardoise) 40%, var(--basalte)); }
}

/* ---------- le logo : fichier SVG choisi selon la surface (--logo) ----------
   Fond clair : couleur charte. Fond sombre : couleur pâle. Sur la photo d'ouverture : monochrome Calcaire.
   Le mode clair / sombre inverse les surfaces, le logo suit donc tout seul. */

.logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--logo, url("../img/logo-sideral-charte.svg")) center / contain no-repeat;
}

/* ---------- séparateurs de points colorés dans une ligne de mots ---------- */

.dots .d {
  display: inline-block;
  width: 5px; height: 5px;
  margin: 0 0.9em;
  vertical-align: middle;
  background: var(--cold);
}
.dots .d--warm { background: var(--chaud); }

/* ---------- coins coupés en biais, comme la plaque et le logo ---------- */

.cut-br { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.cut-tl-br { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }

/* ---------- lien d'évitement : visible au clavier seulement ---------- */

.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ardoise);
  color: var(--calcaire);
  font-family: var(--font-title);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateY(-200%);
}
.skip:focus { transform: none; outline: 2px solid var(--bleu-clair); }

/* ---------- boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  line-height: inherit;   /* un <button> n'hérite pas de la hauteur de ligne : même hauteur que les liens-boutons */
  padding: 0.95em 1.6em;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); outline: none; }

.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--link); border-color: var(--link); color: var(--calcaire); }

/* ---------- en-tête ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  --bg: transparent;
  --ink: var(--calcaire);
  --line: transparent;
  --logo: url("../img/logo-sideral-mono-calcaire.svg");   /* par-dessus la photo d'ouverture */
  color: var(--ink);
  background: var(--bg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

:root:not([data-theme="dark"]) .site-header.is-solid {
  --bg: var(--calcaire); --ink: var(--ardoise); --line: rgba(36, 41, 44, 0.16); --line-2: rgba(36, 41, 44, 0.32);
  --link: var(--bleu-texte); --texture: url("../img/texture-acier.svg"); --texture-size: 1200px 800px; --logo: url("../img/logo-sideral-charte.svg");
}
:root[data-theme="dark"] .site-header.is-solid {
  --bg: var(--nuit); --ink: var(--calcaire); --line: rgba(240, 242, 243, 0.14); --line-2: rgba(240, 242, 243, 0.30);
  --link: var(--bleu-clair); --texture: url("../img/texture-pierre.svg"); --texture-size: 600px 600px; --logo: url("../img/logo-sideral-fond-sombre.svg");
}
.site-header.is-solid { background-color: var(--bg); background-image: var(--texture); background-size: var(--texture-size); }

/* sans JavaScript, l'en-tête reste opaque (aucun script ne le rend plat au défilement) */
:root:not(.js) .site-header {
  --bg: var(--calcaire); --ink: var(--ardoise); --line: rgba(36, 41, 44, 0.16); --line-2: rgba(36, 41, 44, 0.32); --logo: url("../img/logo-sideral-charte.svg");
  background-color: var(--bg); background-image: url("../img/texture-acier.svg"); background-size: 1200px 800px;
}

.header-right { justify-self: end; display: flex; align-items: center; gap: 10px; }

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand .logo { width: 28px; height: 28px; }

@media (max-width: 759px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 8px; }
  .menu-toggle .menu-word { display: none; }
}
@media (min-width: 760px) { .brand { font-size: 0.95rem; letter-spacing: 0.26em; } .brand .logo { width: 32px; height: 32px; } }

.menu-toggle, .theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  background: none;
  border: 0;
  color: inherit;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle { padding: 0 12px; min-height: 40px; border: 1px solid var(--line-2, currentColor); white-space: nowrap; }
.site-header:not(.is-solid) .theme-toggle { border-color: rgba(240, 242, 243, 0.35); }
.theme-toggle:hover { color: var(--link); }
.theme-toggle .mode-word { display: none; }
@media (min-width: 760px) { .theme-toggle .mode-word { display: inline; } }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline; }

.menu-toggle { min-width: 44px; }
.menu-toggle .burger { position: relative; width: 26px; height: 14px; }
.menu-toggle .burger::before,
.menu-toggle .burger::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle .burger::before { top: 0; }
.menu-toggle .burger::after  { top: 12px; }
body.menu-open .menu-toggle .burger::before { top: 6px; transform: rotate(45deg); }
body.menu-open .menu-toggle .burger::after  { top: 6px; transform: rotate(-45deg); }

.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-flex; padding: 0 1.1em; min-height: 40px; font-size: 0.68rem; border-color: currentColor; } }

/* ---------- menu plein écran numéroté ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5%);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s;
}

.menu-inner { margin: auto 0; width: 100%; }   /* centré s'il y a la place, défilable sinon */
.menu ol { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); width: 100%; }
.menu li + li { margin-top: 4px; }

.menu a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  transition: color 0.2s, padding-left 0.3s var(--ease);
}
.menu a:hover, .menu a:focus-visible { color: var(--link); padding-left: 10px; outline: none; }

.menu .num {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.1rem, 4vw, 1.8rem);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  min-width: 1.8em;
}

.menu .label {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(1.7rem, 7vw, 4.4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.menu .sub {
  display: block;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-top: 8px;
}

.menu-foot {
  max-width: var(--max);
  width: 100%;
  margin: 32px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.menu-foot a { display: inline-block; padding: 12px 0; }
.menu-foot a:hover { color: var(--link); }

/* ---------- ouverture plein écran (toujours sombre : c'est une photo) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background-color: var(--nuit);
}

.hero picture, .hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
}

/* texte posé sur la photo, en haut à gauche : voile léger ajusté au texte, arête froide à gauche */
.hero-panel {
  align-self: flex-start;
  width: fit-content;
  max-width: 640px;
  padding: 22px 22px 24px;
  background: rgba(25, 28, 30, 0.42);
  border-left: 1px solid var(--cold);
}
@media (min-width: 760px) { .hero-panel { padding: 30px 34px 32px; } }

.hero h1 {
  font-size: clamp(1.7rem, 5.4vw, 4.2rem);
  letter-spacing: 0.12em;
  line-height: 1.12;
}

.hero-line {
  margin-top: 22px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}


.hero-tagline {
  margin-top: 22px;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero-actions { margin-top: 30px; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 36px;
  background: var(--chaud);
  animation: hint 2s var(--ease) infinite;
}
@keyframes hint {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* écran bas en paysage : ouverture compactée, tout tient au-dessus du pli */
@media (max-height: 520px) and (orientation: landscape) {
  .hero .wrap { padding-top: calc(var(--header-h) + 10px); padding-bottom: 16px; }
  .hero-panel { padding: 14px 18px 16px; max-width: 520px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-line { margin-top: 10px; font-size: 0.66rem; }
  .hero .rule { margin: 10px 0; }
  .hero-tagline { font-size: 0.7rem; }
  .hero-actions { margin-top: 12px; }
  .hero-actions .btn { padding: 0.7em 1.2em; }
  .scroll-hint::after { display: none; }
}

/* ---------- sections ---------- */

.section { padding: 72px 0; scroll-margin-top: var(--header-h); position: relative; }
@media (min-width: 760px) { .section { padding: 112px 0; } }

/* bord inférieur coupé en biais sur la section de services, comme la plaque */
.section--slant { padding-bottom: calc(72px + 4vw); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%); }
@media (min-width: 760px) { .section--slant { padding-bottom: calc(112px + 4vw); } }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 24px;
}
.section-head h2 { font-size: clamp(1.9rem, 5.5vw, 4rem); }
.section-head p { max-width: 40ch; color: var(--ink-2); font-size: 1rem; }


/* ---------- portfolio : onglets ---------- */

.tabs { display: inline-flex; gap: 28px; }

.tab {
  padding: 1em 0;
  min-height: 44px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab[aria-selected="true"] { color: var(--ink); }
#tab-photo[aria-selected="true"] { border-bottom-color: var(--chaud); }   /* lumière chaude */
#tab-video[aria-selected="true"] { border-bottom-color: var(--cold); }    /* lumière froide de la charte */
.tab:hover:not([aria-selected="true"]) { color: var(--ink); }
.tab:focus-visible { outline: 1px solid var(--link); outline-offset: 4px; }

.panel[hidden] { display: none; }

/* ---------- portfolio : deux carrousels photo ----------
   Hauteur fixe par ligne, largeur selon la photo (aucun recadrage), espace régulier.
   Défilement continu en boucle : la ligne du haut va vers la gauche, celle du bas vers la droite.
   Sans JavaScript, ou avec « réduire les animations », les lignes ne bougent pas et se parcourent
   à la main par glissement horizontal. */

.carousels { --row-h: 200px; --c-gap: 12px; display: grid; gap: var(--c-gap); }
@media (min-width: 760px) { .carousels { --row-h: 320px; --c-gap: 16px; } }

.carousel {
  overflow-x: auto;          /* par défaut : parcours à la main */
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--basalte) transparent;
}
.carousel.is-marquee { overflow: hidden; }

.track { display: flex; width: max-content; }

.slide {
  flex: none;
  display: block;
  height: var(--row-h);
  margin-right: var(--c-gap);   /* l'espace suit chaque photo : les deux moitiés de la boucle sont identiques */
  background: var(--bg-2);
  cursor: zoom-in;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.slide picture { display: block; height: 100%; }
.slide img {
  display: block;
  max-width: none;
  height: var(--row-h);
  width: calc(var(--row-h) * var(--r));   /* ratio exact de la photo : ni recadrée ni déformée */
  -webkit-user-drag: none;
}
a.slide:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

/* défilement */
.carousel.is-marquee .track { animation: marquee-left var(--dur, 300s) linear infinite; }
.carousel.is-marquee[data-dir="right"] .track { animation-name: marquee-right; }
.carousel.is-paused .track { animation-play-state: paused; }

@keyframes marquee-left  { to   { transform: translate3d(-50%, 0, 0); } }
@keyframes marquee-right { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }

@media (prefers-reduced-motion: reduce) {
  .carousel.is-marquee .track { animation: none; }
}

/* ---------- visionneuse plein écran ---------- */

body.viewer-open { overflow: hidden; }

.viewer {
  margin: 0; padding: 0; border: 0;
  inset: 0;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  background-color: var(--nuit);
  background-image: none;
  color: var(--calcaire);
}
.viewer[open] { display: block; }
.viewer::backdrop { background: var(--nuit); }

.viewer-stage {
  position: absolute;
  inset: 64px 12px 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y pinch-zoom;
}
@media (min-width: 760px) { .viewer-stage { inset: 72px 104px 24px; } }

.viewer-stage picture { display: contents; }
.viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.viewer-btn {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  padding: 0;
  background: transparent;
  color: var(--calcaire);
  border: 1px solid rgba(240, 242, 243, 0.30);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.viewer-btn:hover, .viewer-btn:focus-visible { background: var(--calcaire); color: var(--nuit); outline: none; }

.viewer-close { top: 12px; right: 12px; }
.viewer-prev  { bottom: 14px; left: 12px; }
.viewer-next  { bottom: 14px; right: 12px; }
@media (min-width: 760px) {
  .viewer-close { top: 16px; right: 16px; }
  .viewer-prev, .viewer-next { bottom: auto; top: 50%; margin-top: -24px; }
  .viewer-prev { left: 24px; }
  .viewer-next { right: 24px; }
}

/* croix et chevrons dessinés en diagonale */
.viewer-close span { position: relative; width: 22px; height: 22px; }
.viewer-close span::before, .viewer-close span::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: currentColor;
}
.viewer-close span::before { transform: rotate(45deg); }
.viewer-close span::after  { transform: rotate(-45deg); }

.viewer-prev span, .viewer-next span {
  width: 12px; height: 12px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.viewer-prev span { transform: rotate(45deg);   margin-left: 5px; }
.viewer-next span { transform: rotate(-135deg); margin-right: 5px; }

/* ---------- portfolio : vidéos verticales ---------- */

.videos { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 900px; }
@media (min-width: 600px) { .videos { grid-template-columns: 1fr 1fr; gap: 24px; } }

.video { position: relative; aspect-ratio: 9 / 16; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  color: var(--ink-3);
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.video-placeholder strong { font-weight: 300; font-size: 1.4rem; letter-spacing: 0.12em; color: var(--ink-2); }
.video-placeholder .play { width: 56px; height: 56px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; }
.video-placeholder .play::after { content: ""; border-left: 12px solid var(--ink-2); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }

/* ---------- ce que je fais ---------- */


/* Les titres tiennent sur une seule ligne. « Stratégie de contenu » mesure 14,9 fois la taille de police :
   la police est donc bornée par la largeur utile de la colonne la plus étroite (15,2 = 14,9 + marge).
   Trois colonnes à partir de 1000 px ; en dessous, une colonne. */
.services { display: grid; grid-template-columns: 1fr; container-type: inline-size; }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(3, 1fr); } }

.service { padding: 24px 0; }
@media (min-width: 1000px) {
  .service { padding: 40px 32px 48px 0; border-bottom: 0; }
  .service + .service { border-left: 1px solid var(--line); padding-left: 32px; }
}

.service h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
  white-space: nowrap;
}
@media (min-width: 1000px) {
  /* colonnes du milieu et de droite : 1/3 de la largeur moins 2 x 32 px de marges */
  .service h3 { font-size: min(clamp(1.15rem, 2.2vw, 1.5rem), calc((33.333cqi - 64px) / 15.2)); }
}
.service p { color: var(--ink-2); max-width: 38ch; }

/* ---------- à propos ---------- */

.about { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: 5fr 7fr; gap: 64px; } }

.about-photo { margin: 0; aspect-ratio: 3 / 4; background: var(--bg-2); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.about-text h2 { font-size: clamp(1.8rem, 4.5vw, 3.2rem); margin-bottom: 28px; }
.about-text p { color: var(--ink-2); font-size: 1.05rem; max-width: 56ch; }
.about-text p + p { margin-top: 1em; }
.about-text .big { color: var(--ink); font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; }
.about-actions { margin-top: 32px; }

/* ---------- contact ---------- */

.contact { overflow: hidden; }

/* le S du logo en réserve, très pâle, comme motif discret */
.contact .motif {
  background-image: url("../img/logo-sideral-filigrane.svg");   /* filigrane pâle : décor, jamais seul */
  position: absolute;
  right: -8vw;
  top: 50%;
  width: clamp(320px, 42vw, 640px);
  height: clamp(320px, 42vw, 640px);
  transform: translateY(-50%);
  opacity: var(--motif-o, 0.05);
  pointer-events: none;
}

.contact .wrap { position: relative; }
.contact h2 { font-size: clamp(2rem, 7vw, 5.4rem); margin-bottom: 44px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  border-right: 1px solid var(--chaud);   /* arête chaude à droite, comme le logo */
  padding-right: 24px;
}
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }

.contact-item { padding-top: 8px; }
.contact-item .lbl { margin-bottom: 12px; font-size: clamp(0.9rem, 1.5vw, 1.05rem); }
.contact-item a, .contact-item .val {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  letter-spacing: 0.04em;
  word-break: break-word;
}
.contact-item a { color: var(--link); display: inline-block; padding: 8px 0; margin: -8px 0; }
.contact-item a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.contact-item .note { margin-top: 8px; font-size: 0.9rem; color: var(--ink-2); }

/* ---------- formulaire de contact : bords nets, aucune ombre, aucun dégradé ---------- */

.contact-form-wrap { margin-top: 56px; max-width: 760px; }
@media (min-width: 760px) { .contact-form-wrap { margin-top: 72px; } }

.contact-form { display: grid; gap: 20px; }
.contact-form[hidden], .form-msg[hidden] { display: none; }

.contact-form .row { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .contact-form .row { grid-template-columns: 1fr 1fr; gap: 24px; } }

.field { display: grid; gap: 10px; }
.field .lbl { font-size: clamp(0.9rem, 1.5vw, 1.05rem); }

.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 176px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-color: var(--link); }

/* champ anti-spam : hors écran, invisible, hors parcours clavier */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; margin: 0; }

.form-actions { margin-top: 4px; }
.form-actions .btn:disabled { opacity: 0.6; cursor: progress; }
.form-privacy { max-width: 56ch; font-size: 0.82rem; line-height: 1.5; color: var(--ink-2); }

.form-msg {
  max-width: 56ch;
  padding: 16px 20px;
  background: var(--bg-2);
  color: var(--ink);
  border-left: 1px solid var(--cold);
}
.form-msg--ok { font-size: 1.15rem; line-height: 1.45; }
.form-msg--fail { border-left-color: var(--chaud); }   /* lumière chaude : accent, jamais en texte */
.form-msg a { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
.form-msg:focus { outline: none; }


/* ---------- pied de page ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.site-footer .foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.site-footer .logo { width: 22px; height: 22px; flex: none; }   /* ne se comprime plus quand le texte passe à la ligne */
.site-footer a { display: inline-block; padding: 14px 0; }
.site-footer a:hover { color: var(--link); }

/* ---------- apparition douce (légère) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}
