/* Giarica — feuille de style unique.
   Design : blocs juxtaposes, gouttiere de 10px, bordures franches de 2px.
   Palette : creme #F2F0EB, encre #0B0B0C, bleu #2B4BFF. */

:root {
  --cream: #F2F0EB;
  --ink: #0B0B0C;
  --blue: #2B4BFF;
  --text: #2C2A26;
  --muted: #55524C;
  --dim: #6B6862;
  --dark-muted: #8A867C;
  --dark-text: #B8B4AC;
  --rule: #D6D2C9;
  --hatch-a: #E4E1D9;
  --gap: 10px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: var(--cream); }

img { max-width: 100%; display: block; }

.shell { min-height: 100vh; background: var(--cream); padding: var(--gap); }

/* ---------- typographie utilitaire ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.eyebrow--blue { color: var(--blue); }
.eyebrow--dark { color: var(--dark-muted); }

.lede { font-size: clamp(16px, 1.3vw, 20px); line-height: 1.5; color: var(--text); margin: 0; max-width: 52ch; }
.lede--light { color: var(--dark-text); }

h1, h2, h3 { text-transform: uppercase; margin: 0; }

.h-hero { font-size: clamp(46px, 11.5vw, 190px); font-weight: 700; letter-spacing: -0.055em; line-height: 0.85; }
.h-page { font-size: clamp(42px, 9vw, 150px); font-weight: 700; letter-spacing: -0.055em; line-height: 0.86; }
.h-sect { font-size: clamp(30px, 4vw, 56px); font-weight: 700; letter-spacing: -0.045em; }
.h-tile { font-size: clamp(24px, 2.5vw, 34px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.accent { color: var(--blue); }

/* ---------- surfaces ---------- */

.block { background: var(--cream); border: 2px solid var(--ink); padding: clamp(26px, 4vw, 52px); }
.block--dark { background: var(--ink); border: 0; color: var(--cream); padding: clamp(26px, 4vw, 48px); }
.block--blue { background: var(--blue); border: 0; color: var(--cream); padding: clamp(26px, 4vw, 48px); }
.block--pad-lg { padding: clamp(28px, 5vw, 64px); }

.grid { display: grid; gap: var(--gap); margin-top: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* Vignettes de realisations : 3 colonnes au plus, sinon les captures deviennent
   illisibles sur grand ecran. */
.grid--work { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.stack { display: grid; gap: var(--gap); align-content: start; }

/* ---------- en-tete ---------- */

.header {
  position: sticky;
  top: var(--gap);
  z-index: 60;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
}

.wordmark { font-size: 22px; font-weight: 700; letter-spacing: -0.045em; }
.wordmark span { color: var(--blue); }

.nav { display: flex; flex-wrap: nowrap; gap: 22px; overflow-x: auto; max-width: 100%; scrollbar-width: none; padding-bottom: 2px; }
.nav::-webkit-scrollbar { display: none; }

.nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  color: var(--dark-muted);
  position: relative;
}
.nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--blue); }
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav a:hover::after { transform: scaleX(1); }

/* ---------- boutons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 24px;
  border: 0;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover { transform: translate(-2px, -2px); }
.btn--blue { background: var(--blue); color: var(--cream); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ghost { border: 2px solid var(--ink); padding: 14px 24px; }
.btn--sm { font-size: 11px; letter-spacing: 0.14em; padding: 9px 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--gap); }

/* ---------- bandeau defilant ---------- */

.ticker { margin-top: var(--gap); background: var(--blue); color: var(--cream); overflow: hidden; padding: 12px 0; }
.ticker__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.ticker span { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; padding: 0 26px; white-space: nowrap; }

/* ---------- tuiles services ---------- */

.tile {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 26px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: background 0.28s ease, color 0.28s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Le bloc titre+texte+tags remplit la carte : titres alignés en haut (juste
   sous le numéro, décalage constant), tags poussés en bas. Sans ça, l'ancien
   justify-content:space-between collait tout en bas et les titres flottaient
   à des hauteurs différentes d'une carte à l'autre. */
.tile > div:not(.tile__top) { flex: 1; display: flex; flex-direction: column; }
.tile__tags { margin-top: auto; }
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; }
.tile__arrow { font-size: 18px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tile p { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 0 0 14px; }
.tile__tags { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.tile h2 { margin: 0 0 12px; }
.tile:hover { background: var(--blue); color: var(--cream); }
.tile:hover p, .tile:hover .tile__tags { color: rgba(242, 240, 235, 0.72); }
.tile:hover .tile__arrow { transform: translate(6px, -6px); }

/* ---------- compteurs ---------- */

.stat { display: flex; flex-direction: column; }
.stat__num { font-size: clamp(64px, 9vw, 130px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.9; margin-top: 14px; }

/* ---------- lignes outils IA ---------- */

.row {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.row--dark { background: var(--ink); border: 0; color: var(--cream); padding: 24px 26px; }
.row__name { font-size: 26px; font-weight: 600; letter-spacing: -0.035em; text-transform: uppercase; }
.row__by { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.row--dark .row__by { color: var(--dark-muted); }
.row__badge { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }

/* ---------- realisations ---------- */

.work { background: var(--cream); border: 2px solid var(--ink); padding: 12px; display: flex; flex-direction: column; }
.work__shot { border: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--hatch-a); position: relative; }
.work__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.work:hover .work__shot img { transform: scale(1.035); }
.work__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.work__meta em { font-style: normal; color: var(--blue); }
.work p { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 10px 0 12px; }
.work__link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  color: var(--dim);
}
.work__link .arrow { color: var(--blue); font-size: 15px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.work:hover .work__link { color: var(--ink); }
.work:hover .work__link .arrow { transform: translate(5px, -5px); }

/* ---------- listes ---------- */

.bullets { display: flex; flex-direction: column; gap: 12px; }
.bullets div { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15.5px; line-height: 1.45; color: #45423C; border-top: 1px solid var(--rule); padding-top: 12px; }
.bullets span:first-child { color: var(--blue); }

.steps { display: grid; grid-template-columns: 26px 1fr; gap: 10px; border-top: 1px solid var(--rule); padding: 15px 0; font-size: 16px; color: var(--text); }
.steps span:first-child { font-family: var(--mono); font-size: 11px; color: var(--blue); }

.card-dark { background: var(--ink); color: var(--cream); padding: 30px 26px; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.card-dark__num { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.card-dark__title { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 10px; }
.card-dark__desc { font-size: 14.5px; line-height: 1.45; color: var(--dark-text); }

/* ---------- placeholder hachure ---------- */

.hatch {
  border: 2px solid var(--ink);
  min-height: 300px;
  background-image: repeating-linear-gradient(45deg, var(--hatch-a) 0 10px, var(--cream) 10px 20px);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.hatch span { font-family: var(--mono); font-size: 10.5px; background: var(--ink); color: var(--cream); padding: 5px 9px; }

/* ---------- formulaire ---------- */

.form { display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.form label { display: flex; flex-direction: column; gap: 7px; }
.form label span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.form input, .form textarea {
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 14px;
  border: 2px solid var(--ink);
  background: #FFFFFF;
  color: var(--ink);
}
.form textarea { resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.form button { align-self: flex-start; }
.form__note { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--dim); margin: 0; max-width: 46ch; }
/* Piege a robots : invisible a l'ecran, mais present dans le DOM. */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { font-size: 15px; line-height: 1.5; margin: 0; padding: 14px 16px; max-width: 52ch; }
.form__msg--ok { background: var(--blue); color: var(--cream); }
.form__msg--err { background: var(--ink); color: var(--cream); }
.form__msg a { text-decoration: underline; }
.form button[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.contact-card { padding: 28px 26px; }
.contact-card__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.contact-card__value { font-size: 20px; margin-top: 10px; }
.contact-card__mail { font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.035em; display: block; margin-top: 10px; word-break: break-all; }

/* ---------- pied de page ---------- */

.footer { margin-top: var(--gap); background: var(--ink); color: var(--cream); padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-end; }
.footer__mark { font-size: clamp(40px, 8vw, 110px); font-weight: 700; letter-spacing: -0.055em; line-height: 0.85; }
.footer__mark span { color: var(--blue); }
.footer__legal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dark-muted); margin-top: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer nav a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dark-text); }
.footer nav a:hover { color: var(--cream); }

/* ---------- entetes de section ---------- */

.sect-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.sect-head a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.meta-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.hero-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin-top: clamp(28px, 4vw, 56px); align-items: end; }
.hero-foot .btn-row { justify-content: flex-end; }

/* ---------- animations ---------- */

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

[data-up] { opacity: 0; }
[data-up].in { animation: up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
[data-d="1"].in { animation-delay: 0.06s; }
[data-d="2"].in { animation-delay: 0.12s; }
[data-d="3"].in { animation-delay: 0.18s; }
[data-d="4"].in { animation-delay: 0.24s; }
/* L'etat initial est une opacite nulle, PAS un clip-path : un element
   entierement clippe est vu comme non visible par l'IntersectionObserver, donc
   il ne se revelait jamais. Le clip ne vit que dans l'animation. */
[data-wipe] { opacity: 0; }
[data-wipe].in { opacity: 1; animation: wipe 0.9s cubic-bezier(0.76, 0, 0.24, 1) both; }

/* Sans JavaScript, rien ne doit rester invisible. */
.no-js [data-up], .no-js [data-wipe] { opacity: 1 !important; clip-path: none; animation: none; }

@media (max-width: 640px) {
  .header .btn { display: none; }
  .hero-foot .btn-row { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  [data-up], [data-wipe] { opacity: 1 !important; clip-path: none !important; animation: none !important; }
  .ticker__track { animation: none !important; }
  .work__shot img, .tile, .btn, .work__link .arrow { transition: none !important; }
}
