/* ═══════════════════════════════════════════════════════════════════════════
   GERFAUT — feuille de style
   Port du fichier design « Gerfaut - Site.dc.html ».
   Signature graphique : diagonale à -33°, accent ambre, contraste encre/papier.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ink:        #14181F;
  --paper:      #EDEFF1;
  --white:      #FBFCFD;
  --accent:     #E9A227;
  --muted:      #54606E;
  --muted-lt:   #A7B0BA;
  --line:       #DFE3E7;
  --line-dk:    #3A424D;
  --line-dk-2:  #262C36;
  --hatch-a:    #E3E6E9;
  --hatch-b:    #F6F7F8;

  --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --body:    'Instrument Sans', 'Segoe UI', sans-serif;
  --mono:    'Space Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.16, .84, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--body);
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3.75px;
}

.accent { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 15px 22.5px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes gf-rise      { from { opacity: 0; transform: translateY(47.5px); } to { opacity: 1; transform: none; } }
@keyframes gf-fade      { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
@keyframes gf-dive-mark { from { opacity: 0; transform: translate(-150px, 112.5px) scale(.72); } to { opacity: 1; transform: none; } }
@keyframes gf-trace     { to { stroke-dashoffset: 0; } }
@keyframes gf-wipe      { from { clip-path: polygon(0 100%, 0 100%, 0 100%); } to { clip-path: polygon(0 100%, 100% 0, 100% 100%); } }
@keyframes gf-bob       { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes gf-menu      { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: none; } }

/* ── Menu ────────────────────────────────────────────────────────────────── */

/* Le bouton est fixe : il survole le contenu au défilement. Son décalage est
   calé pour qu'il tienne dans la marge gauche des sections — clamp(25px,
   6.25vw, 75px) — et ne passe donc jamais par-dessus les titres. Le décalage
   haut suit, sinon le bouton paraîtrait décentré dans son coin. */
.menu-btn {
  position: fixed;
  top: clamp(14px, 2.2vw, 26px);
  left: clamp(6px, 0.9vw, 13px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 6.25px;
  width: 57.5px;
  height: 57.5px;
  padding: 15px 12.5px;
  align-items: flex-start;
  justify-content: center;
  background: var(--ink);
  border: none;
  border-radius: 12.5px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  height: 2.5px;
  background: var(--white);
  transition: width .3s var(--ease);
}
.menu-btn span:nth-child(1) { width: 30px; }
.menu-btn span:nth-child(2) { width: 21.25px; background: var(--accent); }
.menu-btn span:nth-child(3) { width: 12.5px; }
.menu-btn:hover span:nth-child(2) { width: 30px; }
.menu-btn:hover span:nth-child(3) { width: 21.25px; }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20, 24, 31, .55);
}

.menu-nav {
  position: relative;
  height: 100%;
  width: min(500px, 47.5vw);
  min-width: 350px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 36.4vh) 100%, 0 100%);
  padding: clamp(112.5px, 17.5vh, 187.5px) 0 75px clamp(30px, 5vw, 55px);
  display: flex;
  flex-direction: column;
  gap: 18.75px;
  animation: gf-menu .45s var(--ease) both;
}

.menu-link {
  margin-left: calc(var(--i, 0) * 25px);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22.5px, 2.5vw, 32.5px);
  line-height: 50px;
  letter-spacing: -.03em;
  color: var(--white);
  width: fit-content;
}
.menu-link:hover { color: var(--accent); }
.menu-link--accent { color: var(--accent); }
.menu-link--accent:hover { color: var(--white); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh;
  /* Plancher pour les toutes petites fenêtres, pas une cible : au-delà, le
     bas du héro passerait sous la ligne de flottaison. */
  min-height: 600px;
  overflow: hidden;
  background: var(--paper);
}

.hero-wipe {
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  animation: gf-wipe 1.1s var(--ease) .1s both;
}

.hero-trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-trace line {
  stroke: var(--accent);
  stroke-width: 3.75;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: gf-trace 1.1s var(--ease) .1s both;
}

/* Les décalages du héro ne suivent PAS la mise à l'échelle : ils sont calés
   sur la fenêtre, qui n'a pas grandi. Les agrandir pousserait le texte dans
   le triangle sombre, où il devient illisible. Seule la typographie grossit. */
.hero-copy {
  position: absolute;
  left: clamp(20px, 8vw, 110px);
  top: clamp(96px, 16vh, 170px);
  right: 44%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: gf-rise 1s var(--ease) .45s both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12.5px clamp(25px, 6.25vw, 87.5px);
  margin-bottom: 27.5px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-meta-status { display: flex; align-items: center; gap: 12.5px; color: var(--ink); }
.hero-meta-status .dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.hero-meta-skills { color: var(--muted); }

.hero-title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--display);
  font-weight: 800;
  /* La borne haute tient compte de la hauteur autant que de la largeur :
     sur un écran bas, un titre calculé sur la seule largeur traverserait
     la diagonale. min() prend la contrainte la plus serrée des deux. */
  font-size: clamp(42.5px, min(5.75vw, 9.6vh), 97.5px);
  line-height: .92;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-sub {
  margin: 27.5px 0 0;
  max-width: 24ch;
  font-size: clamp(17px, min(1.5vw, 2.5vh), 22.5px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-mark {
  position: absolute;
  left: 58%;
  top: 44%;
  width: clamp(100px, min(13.75vw, 23vh), 200px);
  aspect-ratio: 1;
  transform-origin: center;
  animation: gf-dive-mark 1.3s cubic-bezier(.2, .7, .2, 1) .75s both;
}
.hero-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleX(-1) rotate(18deg);
}
.hero-mark path { fill: var(--accent); }

.hero-tagline {
  position: absolute;
  right: clamp(25px, 6.25vw, 75px);
  bottom: clamp(120px, 21.25vh, 237.5px);
  /* Assez large pour que chacune des deux propositions tienne sur sa ligne :
     la rupture de ligne coïncide alors exactement avec la rupture de couleur. */
  max-width: 46ch;
  text-align: right;
  animation: gf-fade .9s ease-out 1.2s both;
}
/* Une proposition par ligne, chacune dans sa couleur. */
.hero-tagline-text span { display: block; }
.hero-tagline-text {
  margin: 0 0 15px;
  font-size: clamp(17px, min(1.5vw, 2.7vh), 23.75px);
  line-height: 1.55;
  color: var(--white);
  text-wrap: pretty;
}
.hero-tagline-brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(17px, min(1.88vw, 3.4vh), 30px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 42.5px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
  mix-blend-mode: difference;
}
.hero-scroll:hover { color: var(--accent); }
.hero-scroll-arrow { display: block; animation: gf-bob 2.4s ease-in-out 2s infinite; }

/* ── Blocs de section ────────────────────────────────────────────────────── */

.wrap { max-width: 1550px; margin: 0 auto; }

.section { position: relative; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 65px;
}
.section-head-note {
  margin: 0;
  max-width: 34ch;
  font-size: 18.75px;
  line-height: 1.6;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 17.5px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow--accent { color: var(--accent); }

.h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 4.75vw, 72.5px);
  line-height: .98;
  letter-spacing: -.03em;
}
.h2--tight { max-width: 20ch; }
.h2--about { margin: 0 0 62.5px; max-width: 24ch; }
.h2--huge {
  font-size: clamp(50px, 8vw, 130px);
  line-height: .9;
  letter-spacing: -.04em;
}

.slash {
  display: block;
  width: 25px;
  height: 2.5px;
  background: currentColor;
  transform: rotate(-33deg);
  flex: none;
}

/* ── Réalisations ────────────────────────────────────────────────────────── */

.section--work {
  padding: clamp(100px, 13.75vh, 175px) clamp(25px, 6.25vw, 75px) clamp(87.5px, 11.25vh, 150px);
  background: var(--white);
}

/* ── Cadre d'appareil ──────────────────────────────────────────────────────
   L'aperçu est montré sur l'appareil que le visiteur n'a PAS sous les yeux :
   un téléphone sur grand écran, un ordinateur sur téléphone. Chacun découvre
   ainsi l'autre version du site.

   L'appareil N'EST PAS posé sur la carte : il EST la carte. Son cadre en
   dessine les bords, il n'y a plus de fond autour.

   Toute la géométrie découle de --k, le facteur de réduction, déclaré ici et
   hérité par les cartes. Le site distant est chargé à une largeur d'appareil
   réelle (--vw) puis réduit : rendu directement à la taille du cadre, il
   croirait avoir affaire à un écran de 300 pixels et afficherait une mise en
   page cassée. L'écran mesure donc --vw × --k, et la largeur de colonne s'en
   déduit — d'où des colonnes de largeur fixe et non en fractions : la
   transformation d'échelle a besoin d'un nombre, que le CSS ne sait pas tirer
   d'une largeur élastique. */
.work-grid {
  --vw: 390px;      /* largeur du navigateur simulé */
  --vh: 835px;      /* sa hauteur */
  --k: .82;         /* facteur de réduction */
  --bezel: 10px;
  /* Épaisseur du bord bas. Égale aux autres sur un téléphone ; sur un écran
     d'ordinateur, elle s'épaissit en menton, ce qui suffit à changer la
     lecture de l'objet. */
  --menton: var(--bezel);
  --radius: 36px;

  display: grid;
  grid-template-columns: repeat(auto-fit, calc(var(--vw) * var(--k) + 2 * var(--bezel)));
  justify-content: center;
  /* Les colonnes ayant une largeur fixe, c'est l'écart qui respire : large sur
     un grand écran, resserré quand la place manque. L'écart vertical reste
     constant, les cartes s'empilant toujours de la même façon. */
  /* 3,4vw et pas davantage : au-delà, l'écart mange une colonne à 1280 px de
     large, où trois cartes tiennent tout juste. */
  column-gap: clamp(30px, 3.4vw, 72px);
  row-gap: 52px;
}

.work-card { display: block; }
.work-card:hover { color: var(--ink); }

/* Le cadre lui-même. Débordement visible : le pied de l'écran d'ordinateur
   dépasse sous le cadre. Le trait ambré se rogne tout seul, par son propre
   arrondi, il n'a pas besoin que le parent le découpe. */
.work-thumb {
  position: relative;
  padding: var(--bezel) var(--bezel) var(--menton);
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 18px 34px rgba(20, 24, 31, .22);
}

.device-screen {
  position: relative;
  width: calc(var(--vw) * var(--k));
  height: calc(var(--vh) * var(--k));
  overflow: hidden;
  border-radius: calc(var(--radius) - var(--bezel));
  /* Les hachures sont passées à l'intérieur de l'écran : sans elles, un projet
     sans aperçu n'offrirait qu'un grand rectangle blanc. */
  background-color: var(--white);
  background-image: repeating-linear-gradient(147deg, var(--paper) 0 11.25px, var(--hatch-b) 11.25px 22.5px);
  display: grid;
  place-items: center;
}

/* La capture occupe l'écran ; cadrée en haut, on voit l'en-tête du site
   plutôt que son milieu. */
.device-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* L'iframe garde sa taille de navigateur réelle et c'est la transformation
   qui la met à l'échelle : le site se croit sur un vrai appareil. */
.device-screen iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--vw);
  height: var(--vh);
  border: 0;
  /* Fond transparent volontairement : beaucoup de sites refusent d'être
     affichés dans un cadre. Le libellé du placeholder reste alors visible
     derrière, au lieu d'un rectangle blanc muet. */
  background: transparent;
  transform: scale(var(--k));
  transform-origin: top left;
}

/* Encoche du téléphone, posée sur la tranche haute du cadre. */
.work-thumb::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  height: 18px;
  background: var(--ink);
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

/* Sur téléphone, c'est un écran d'ordinateur qui apparaît. Trois détails
   suffisent à le faire reconnaître, là où un simple rectangle arrondi restait
   ambigu : un menton épais sous la dalle, une diode témoin dessus, et un pied
   qui dépasse sous le cadre. */
@media (max-width: 700px) {
  .work-grid {
    --vw: 1280px;
    --vh: 800px;
    --k: .3;
    --bezel: 8px;
    --menton: 26px;
    --radius: 14px;
    --pied: 28px;
  }

  /* Le pied dépasse : on lui réserve sa hauteur, sinon il chevaucherait le
     titre du projet. */
  .work-thumb { margin-bottom: var(--pied); }

  /* Diode témoin, sur le menton. */
  .work-thumb::before {
    top: auto;
    bottom: calc(var(--menton) / 2 - 2.5px);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .85;
  }

  /* Pied en T : une colonne étroite qui s'évase en socle. Un seul élément,
     découpé en polygone — deux formes empilées seraient plus lourdes pour
     un résultat identique. */
  .work-thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(-1 * var(--pied));
    transform: translateX(-50%);
    width: 44%;
    height: var(--pied);
    background: var(--ink);
    clip-path: polygon(37% 0, 63% 0, 63% 60%, 100% 60%, 100% 100%, 0 100%, 0 60%, 37% 60%);
  }
}

/* En dessous, la carte ne tiendrait plus dans la largeur disponible. Seul --k
   bouge : la colonne et l'écran suivent. */
@media (max-width: 560px) { .work-grid { --k: .25; } }
@media (max-width: 380px) { .work-grid { --k: .225; } }
@media (max-width: 360px) { .work-grid { --k: .19; } }

.device-screen .thumb-placeholder {
  letter-spacing: .08em;
  padding: 0 16px;
}

/* Le trait joint exactement le coin bas gauche au coin haut droit de l'écran.
   Un élément incliné d'un angle fixe ne pouvait pas y parvenir : l'angle juste
   dépend du rapport hauteur/largeur, qui change entre le téléphone et l'écran
   d'ordinateur. Un dégradé le trouve tout seul — avec « to bottom right », la
   bande médiane passe par définition par les deux coins visés, quel que soit
   le format. Reste à la rendre étroite en resserrant les arrêts autour de 50 %.

   Le calque épouse l'écran, pas le cadre : inset vaut l'épaisseur de la
   bordure, et les angles reprennent son arrondi. */
.work-slash {
  z-index: 3;
  position: absolute;
  inset: var(--bezel) var(--bezel) var(--menton);
  border-radius: calc(var(--radius) - var(--bezel));
  /* Sans cela le calque intercepterait la molette : l'aperçu redeviendrait
     impossible à faire défiler. */
  pointer-events: none;
  background-image: linear-gradient(
    to bottom right,
    transparent calc(50% - 2px),
    var(--accent) calc(50% - 2px),
    var(--accent) calc(50% + 2px),
    transparent calc(50% + 2px)
  );
}

.thumb-placeholder {
  font-family: var(--mono);
  font-size: 13.75px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 22.5px;
  line-height: 1.7;
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 20px;
  padding-top: 22.5px;
}
.work-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 26.25px;
  letter-spacing: -.02em;
}
.work-card:hover .work-title { color: var(--accent); }
.work-tag {
  font-family: var(--mono);
  font-size: 13.75px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.work-text {
  margin: 10px 0 0;
  font-size: 18.13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Bande image ─────────────────────────────────────────────────────────── */

.band {
  position: relative;
  height: clamp(325px, 52.5vw, 650px);
  background-image: repeating-linear-gradient(147deg, var(--hatch-a) 0 15px, var(--paper) 15px 30px);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band-placeholder {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 25px;
}

/* ── Services ────────────────────────────────────────────────────────────── */

.section--services {
  padding: clamp(75px, 10vh, 137.5px) clamp(25px, 6.25vw, 75px) clamp(112.5px, 15vh, 187.5px);
  background: var(--accent);
  color: var(--ink);
}

.svc-mark { display: block; width: clamp(67.5px, 7.5vw, 115px); aspect-ratio: 1; }
.svc-mark svg { width: 100%; height: 100%; display: block; transform: scaleX(-1) rotate(18deg); }
.svc-mark path { fill: var(--ink); }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 2.5px;
}
.svc-card {
  background: var(--ink);
  color: var(--white);
  padding: 40px 32.5px 47.5px;
}
.svc-num {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--accent);
}
.svc-title {
  margin: 20px 0 15px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 27.5px;
  letter-spacing: -.02em;
}
.svc-text {
  margin: 0;
  font-size: 18.13px;
  line-height: 1.65;
  color: var(--muted-lt);
}

/* ── À propos ────────────────────────────────────────────────────────────── */

.section--about {
  padding: clamp(100px, 13.75vh, 187.5px) clamp(25px, 6.25vw, 75px);
  background: var(--paper);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(375px, 100%), 1fr));
  gap: 32.5px;
  align-items: stretch;
}

.about-photo {
  position: relative;
  min-height: 400px;
  background-image: repeating-linear-gradient(147deg, var(--hatch-a) 0 12.5px, var(--paper) 12.5px 25px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* La photo est en paysage, le cadre en portrait : « cover » rogne donc sur les
   côtés. Le sujet étant assis à gauche du plan, on décale le cadrage vers la
   gauche plutôt que de le laisser centré, sinon le clavier sort du cadre. */
.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
}

/* <picture> n'est qu'un conteneur de choix : il ne doit pas créer de boîte. */
.about-photo picture {
  display: contents;
}

/* ── Harmonisation chromatique du portrait (désactivée) ────────────────────
   Décommentez pour rapprocher la photo de la palette du site : légère
   désaturation, contraste un rien relevé, et un voile encre/ambre posé par
   fusion. À doser — au-delà, la photo prend un aspect filtré qui jure avec la
   sobriété du reste.

.about-photo img {
  filter: saturate(.92) contrast(1.03);
}

.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(150deg, var(--ink), var(--accent));
  mix-blend-mode: soft-light;
  opacity: .18;
}
   ──────────────────────────────────────────────────────────────────────── */

.about-card {
  background: var(--white);
  padding: 42.5px 37.5px 47.5px;
  border-top: 5px solid var(--accent);
}
.about-card--dark { background: var(--ink); color: var(--white); }

.about-kicker {
  margin: 0 0 22.5px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-kicker--accent { color: var(--accent); }

.about-text {
  margin: 0 0 27.5px;
  font-size: 20px;
  line-height: 1.65;
  text-wrap: pretty;
}

.about-list { display: grid; gap: 12.5px; font-size: 18.13px; color: var(--muted); }
.about-item { display: flex; gap: 15px; align-items: center; }
.tick {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--accent);
  transform: rotate(-33deg);
  flex: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14.38px;
  letter-spacing: .04em;
}
.tags span { padding: 8.75px 13.75px; border: 1px solid var(--line-dk); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12.5px;
  margin-top: 32.5px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow:hover { color: var(--white); }
.link-arrow .slash { width: 22.5px; }

/* ── Contact ─────────────────────────────────────────────────────────────── */

.section--contact {
  padding: clamp(112.5px, 16.25vh, 212.5px) clamp(25px, 6.25vw, 75px) clamp(87.5px, 11.25vh, 137.5px);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.contact-diag {
  position: absolute;
  left: -10%;
  bottom: 26%;
  width: 130%;
  height: 3.75px;
  background: var(--accent);
  opacity: .35;
  transform: rotate(-33deg);
}
.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(375px, 100%), 1fr));
  gap: clamp(40px, 6.25vw, 100px);
  align-items: end;
}
.contact-note {
  margin: 0 0 35px;
  max-width: 34ch;
  font-size: 20px;
  line-height: 1.65;
  color: var(--muted-lt);
  text-wrap: pretty;
}

.socials {
  display: flex;
  gap: 27.5px;
  flex-wrap: wrap;
  margin-top: 32.5px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-lt);
}
.socials a:hover { color: var(--accent); }

/* Le sprite ne s'affiche pas lui-même : il ne sert que de réserve de tracés.
   Sorti du flux plutôt que display:none, qui empêche <use> de le lire sur
   certains navigateurs anciens. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Taille calée sur le texte du lien : le pictogramme grossit avec lui.
   Le trait hérite de la couleur du lien, donc il vire à l'ambre au survol. */
.social-ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 17.5px;
  border: none;
  border-radius: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16.25px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn--accent { padding: 22.5px 32.5px; background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--white); color: var(--ink); }
.btn--dark { padding: 21.25px 32.5px; background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--accent); color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ── Modale formulaire ───────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4.4vw, 53px);
  background: rgba(20, 24, 31, .72);
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  width: min(836px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(31px, 4.4vw, 53px);
  background: var(--white);
  color: var(--ink);
  border-radius: 15px;
  animation: gf-fade .3s ease-out both;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 17.5px;
  cursor: pointer;
}
.modal-close:hover { background: var(--accent); }

.modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 33px;
  padding-right: 62px;
}
.modal-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 2.65vw, 37px);
  letter-spacing: -.03em;
}
.modal-delay {
  font-family: var(--mono);
  font-size: 14.38px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(264px, 100%), 1fr));
  gap: 20px;
}

.field {
  display: grid;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field--full { grid-column: 1 / -1; }

/* Sans cela, un <select> impose la largeur de sa plus longue option
   (« Partenariat / sous-traitance ») comme largeur minimale, ce qui élargit
   la colonne de grille et fait déborder le formulaire hors de la modale. */
.field { min-width: 0; }

.field input,
.field select,
.field textarea {
  min-width: 0;
  width: 100%;
  padding: 15px 17.5px;
  font-family: var(--body);
  font-size: 16.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  letter-spacing: normal;
  text-transform: none;
}
.field textarea { line-height: 1.6; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }
/* :user-invalid et non :invalid — un champ requis est invalide dès l'ouverture,
   et « Nom » comme « E-mail » s'affichaient en rouge avant la moindre frappe.
   :user-invalid n'agit qu'après une saisie ou une tentative d'envoi. */
.field input:user-invalid { border-color: #C9553D; }
.field.is-error input,
.field.is-error select,
.field.is-error textarea { border-color: #C9553D; }

.field-row { display: flex; gap: 9px; }
.field-row select { width: 130px; padding: 15px 11px; flex: none; }
.field-row input { flex: 1; min-width: 0; }

.extras {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  padding: 24px 0 4px;
  border-top: 1px solid var(--paper);
}
.extras-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17.5px;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.extras-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18.5px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.extras-hint {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.extras-sign {
  display: grid;
  place-items: center;
  width: 28.5px;
  height: 28.5px;
  background: var(--paper);
  border-radius: 7.5px;
  color: var(--ink);
}
.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}
.extras-grid[hidden] { display: none; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.form-status {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.form-status--error { color: #C9553D; }

/* Le bouton d'envoi revient lui aussi à sa taille d'origine. La règle est
   limitée au formulaire : le bouton « Envoyer un mail » de la section contact
   garde l'échelle du reste de la page. */
.form .btn {
  gap: 15.5px;
  border-radius: 9px;
  font-size: 14px;
}
.form .btn--accent { padding: 20px 28.5px; }
.form .btn--dark { padding: 19px 28.5px; }

/* ── Pied de page ────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
  padding: 30px clamp(25px, 6.25vw, 75px) 40px;
  background: var(--ink);
  color: var(--muted);
  border-top: 1px solid var(--line-dk-2);
  font-family: var(--mono);
  font-size: 14.38px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Adaptations petits écrans ───────────────────────────────────────────── */

@media (max-width: 1125px) {
  .hero-copy { right: 28%; }
  .hero-mark { left: auto; right: clamp(25px, 7.5vw, 75px); top: 40%; }
}

@media (max-width: 875px) {
  /* Le héro passe en colonne : l'accroche claire reste poussée tout en bas,
     là où la diagonale a déjà cédé la place au fond sombre — sans quoi le
     texte blanc se retrouverait à cheval sur le fond papier. */
  .hero {
    height: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-bottom: 88px;
  }
  .hero-copy {
    position: relative;
    right: auto;
    left: auto;
    top: auto;
    padding: clamp(92px, 13vh, 132px) clamp(22px, 6.5vw, 46px) 0;
  }
  /* En colonne étroite, la diagonale ne laisse qu'un triangle clair réduit :
     la typographie du héro se cale sur la largeur disponible, pas sur le
     facteur global. Le reste de la page garde bien son agrandissement. */
  .hero-meta { font-size: clamp(10.5px, 2.8vw, 13px); gap: 9px 18px; margin-bottom: 24px; }
  .hero-title { max-width: 12ch; font-size: clamp(33px, 9.6vw, 54px); }
  .hero-sub { margin-top: 20px; max-width: 21ch; font-size: clamp(15px, 3.8vw, 18.5px); }
  .hero-mark {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: clamp(88px, 24vw, 134px);
    margin: 36px 0 0 clamp(22px, 6.5vw, 46px);
  }
  .hero-tagline {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: 38ch;
    text-align: right;
    margin: auto 0 0 auto;
    padding: 56px clamp(22px, 6.5vw, 46px) 0;
  }
  .hero-tagline-text { font-size: clamp(16px, 4.2vw, 20px); }
  .hero-tagline-brand { font-size: clamp(18px, 4.8vw, 26px); }
  .hero-scroll { bottom: 32.5px; }
  .menu-nav { width: min(320px, 84vw); min-width: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 18vh) 100%, 0 100%); }
  .menu-link { margin-left: calc(var(--i, 0) * 15px); }
  .work-meta { flex-direction: column; gap: 7.5px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-wipe { clip-path: polygon(0 100%, 100% 0, 100% 100%); }
  .hero-trace line { stroke-dashoffset: 0; }
}
