/*
 * Polykroma : une couleur par expertise, deux lumières.
 * Jour : papier crème, encre bleu nuit. Nuit : fond bleu profond, texte couleur os.
 * Les couleurs d'expertise s'éclaircissent la nuit pour garder leur contraste.
 */

:root,
[data-theme="day"] {
  color-scheme: light;
  --bg: #f5f0e6;
  --bg-2: #ece4d3;
  --bg-3: #e2d8c3;
  --fg: #1c2040;
  --fg-2: #464a6b;
  --fg-3: #6b6e8c;
  --line: rgba(28, 32, 64, 0.13);
  --line-strong: rgba(28, 32, 64, 0.28);

  --c-cloud: #3c4fb8;
  --c-data: #2c8566;
  --c-ia: #cf4f7b;
  --c-migration: #d8961f;
  --c-gouv: #7a5bc4;
  --t-cloud: #2f3f99;
  --t-data: #1f6a50;
  --t-ia: #ad3863;
  --t-migration: #8f5d08;
  --t-gouv: #5d43a0;
  --on-accent: #ffffff;

  --hero-em: #2f3f99;
  --veil-rgb: 245, 240, 230;
  --veil: linear-gradient(90deg, rgba(245, 240, 230, 0.95) 0%, rgba(245, 240, 230, 0.88) 38%, rgba(245, 240, 230, 0.45) 56%, rgba(245, 240, 230, 0) 74%),
    linear-gradient(0deg, rgba(245, 240, 230, 0.6) 0%, rgba(245, 240, 230, 0) 30%);
  --header-bg: rgba(245, 240, 230, 0.96);
  --field: rgba(255, 255, 255, 0.55);
  --field-focus: #ffffff;
  --tile: rgba(255, 255, 255, 0.5);
  --tile-line: rgba(28, 32, 64, 0.08);
  --primary-bg: #1c2040;
  --primary-fg: #f5f0e6;
  --primary-hover: #2c3366;
  --footer-bg: #1c2040;
  --footer-fg: #f5f0e6;
  --grain-opacity: 0.45;
  --grid: rgba(28, 32, 64, 0.075);
  --error: #b3261e;
}

[data-theme="night"] {
  color-scheme: dark;
  --bg: #0c1428;
  --bg-2: #121c36;
  --bg-3: #1a2645;
  --fg: #ece6d6;
  --fg-2: #bdb9ca;
  --fg-3: #8f91aa;
  --line: rgba(236, 230, 214, 0.12);
  --line-strong: rgba(236, 230, 214, 0.26);

  --c-cloud: #8094ff;
  --c-data: #5fc79d;
  --c-ia: #ff88ae;
  --c-migration: #f2b24a;
  --c-gouv: #b39cff;
  --t-cloud: #9aabff;
  --t-data: #74d3ab;
  --t-ia: #ff9dbd;
  --t-migration: #f5c26c;
  --t-gouv: #c2afff;
  --on-accent: #0c1428;

  --hero-em: #f3dcae;
  --veil-rgb: 9, 15, 32;
  --veil: linear-gradient(90deg, rgba(9, 15, 32, 0.92) 0%, rgba(9, 15, 32, 0.8) 38%, rgba(9, 15, 32, 0.4) 56%, rgba(9, 15, 32, 0) 74%),
    linear-gradient(0deg, rgba(9, 15, 32, 0.65) 0%, rgba(9, 15, 32, 0) 34%);
  --header-bg: rgba(12, 20, 40, 0.96);
  --field: rgba(236, 230, 214, 0.05);
  --field-focus: rgba(236, 230, 214, 0.09);
  --tile: rgba(236, 230, 214, 0.9);
  --tile-line: rgba(236, 230, 214, 0.12);
  --primary-bg: #ece6d6;
  --primary-fg: #0c1428;
  --primary-hover: #ffffff;
  --footer-bg: #070d1c;
  --footer-fg: #ece6d6;
  --grain-opacity: 0.22;
  --grid: rgba(236, 230, 214, 0.07);
  --error: #ff8a80;
}

:root {
  --night: #05070d;
  --beam: #f2b441;
  --bone: #ece6d6;
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

.k-cloud { --c: var(--c-cloud); --t: var(--t-cloud); }
.k-data { --c: var(--c-data); --t: var(--t-data); }
.k-ia { --c: var(--c-ia); --t: var(--t-ia); }
.k-migration { --c: var(--c-migration); --t: var(--t-migration); }
.k-gouvernance { --c: var(--c-gouv); --t: var(--t-gouv); }
.k-web { --c: var(--fg); --t: var(--fg); }
.k-autre { --c: var(--fg-3); --t: var(--fg-2); }

/* Base */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--c-cloud); outline-offset: 3px; border-radius: 4px; }

.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;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--primary-bg); color: var(--primary-fg);
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Le grain du papier, sur toute la page. */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: var(--grain-opacity); transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Typographie */

h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 em, h2 em, h3 em { font-style: italic; }
.h2 { font-size: clamp(2.1rem, 4.3vw, 3.7rem); line-height: 1.04; text-wrap: balance; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px;
  font-family: var(--f-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-2);
}
.eyebrow::before {
  content: ""; flex: none; width: 26px; height: 8px;
  border-radius: 8px 3px 7px 4px;
  background: linear-gradient(90deg, var(--c-cloud), var(--c-data), var(--c-ia), var(--c-migration), var(--c-gouv));
}

/* Boutons */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.55em; border-radius: 999px;
  font: 600 0.95rem/1.1 var(--f-text);
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-small { padding: 0.65em 1.15em; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* En-tête */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 80;
  color: var(--fg);
  transition: transform 0.45s var(--ease), background-color 0.35s, box-shadow 0.35s;
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h); max-width: var(--max); margin: auto; padding-inline: var(--gutter);
}
.site-header.is-scrolled {
  background: var(--header-bg);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  font-family: var(--f-display); font-size: 1.5rem; letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav { display: flex; gap: 30px; font-size: 0.95rem; }
.nav a { position: relative; padding: 6px 0; text-decoration: none; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  border-radius: 3px 1px 3px 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.theme-toggle {
  position: relative; width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--fg); cursor: pointer;
  transition: border-color 0.3s;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 20px; height: 20px; overflow: visible; }
.theme-toggle .tt-sun, .theme-toggle .tt-moon {
  transform-box: fill-box; transform-origin: center;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
[data-theme="day"] .theme-toggle .tt-moon { opacity: 0; transform: rotate(-60deg) scale(0.5); }
[data-theme="night"] .theme-toggle .tt-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }

@media (max-width: 820px) {
  .nav { display: none; }
  .header-inner { gap: 12px; }
}

/* Transition de lumière : cercle qui s'ouvre depuis le bouton (View Transitions),
   sinon un fondu des couleurs. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color 0.6s, color 0.6s, border-color 0.6s, fill 0.6s, stroke 0.6s !important;
}

/* Intro : contenu masqué le temps que GSAP le révèle ; filet de sécurité si le script ne vient pas. */
html.anim [data-intro] { visibility: hidden; animation: intro-fallback 0s linear 3.5s forwards; }
@keyframes intro-fallback { to { visibility: visible; } }

/* Héros */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  background: var(--bg);
}
.pond { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; will-change: transform; }
.veil { position: absolute; inset: 0; z-index: -1; background: var(--veil); pointer-events: none; }
.hero-inner { padding-top: calc(var(--header-h) + 48px); padding-bottom: clamp(80px, 14vh, 150px); }
.hero-title {
  font-size: clamp(2.7rem, 6.6vw, 6.2rem); line-height: 0.99;
  max-width: 13.5ch; text-wrap: balance;
}
.hero-title em { color: var(--hero-em); }
.hero-lede { max-width: 46ch; margin: 30px 0 38px; font-size: clamp(1.03rem, 1.25vw, 1.2rem); color: var(--fg); }
.hero-title, .hero-lede, .hero .eyebrow, .contact-art .eyebrow, .contact-direct {
  text-shadow: 0 0 18px rgba(var(--veil-rgb), 0.9), 0 0 2px rgba(var(--veil-rgb), 0.6);
}
/* Sur un écran étroit, le texte occupe toute la largeur : le voile couvre tout le bas. */
@media (max-width: 900px) {
  .veil {
    background: linear-gradient(0deg, rgba(var(--veil-rgb), 0.94) 0%, rgba(var(--veil-rgb), 0.86) 55%, rgba(var(--veil-rgb), 0.35) 85%, rgba(var(--veil-rgb), 0.15) 100%);
  }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-hint {
  position: absolute; right: var(--gutter); bottom: 34px; margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; letter-spacing: 0.06em; color: var(--fg-2);
}
.hero-hint::before { content: ""; width: 26px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 24px; width: 2px; height: 46px;
  background: var(--line-strong); overflow: hidden; border-radius: 2px;
}
.scroll-cue span {
  position: absolute; inset: 0; background: var(--fg);
  transform: translateY(-100%); animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (pointer: coarse) { .hero-hint { display: none; } }
@media (max-height: 640px) { .scroll-cue { display: none; } }

/* Sections */

.section { padding-block: clamp(96px, 14vh, 170px); }
.section-head { max-width: 800px; margin-bottom: clamp(48px, 7vh, 80px); }
.section-lede { max-width: 60ch; margin-top: 24px; font-size: 1.1rem; color: var(--fg-2); }

/* La palette */

.palette-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.palette-text > p { max-width: 56ch; font-size: 1.08rem; color: var(--fg-2); }
.palette-text .h2 { margin-bottom: 28px; }
.legend { list-style: none; margin: 38px 0 0; padding: 0; }
.legend-item {
  display: grid; grid-template-columns: 30px max-content 1fr; align-items: center; gap: 14px;
  padding: 13px 6px; border-top: 1px solid var(--line);
  text-decoration: none;
  transition: opacity 0.35s, transform 0.45s var(--ease);
}
.legend li:last-child .legend-item { border-bottom: 1px solid var(--line); }
.dab {
  width: 24px; height: 13px; border-radius: 12px 4px 10px 6px;
  background: var(--c); transform: rotate(-8deg);
}
.legend-name { font-family: var(--f-display); font-size: 1.3rem; }
.legend-desc { font-size: 0.93rem; color: var(--fg-3); text-align: right; }
.palette[data-active] .legend-item:not(.is-active) { opacity: 0.35; }
.legend-item.is-active { transform: translateX(8px); }

.flower-wrap { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; justify-self: center; }
.flower { width: 100%; height: 100%; overflow: visible; }
.flower { position: relative; }
.flower-pad { position: absolute; inset: 4% 0 0; width: 100%; --c: var(--c-data); opacity: 0.24; transform: scaleY(0.82); }
.flower .petal { transition: opacity 0.4s; cursor: pointer; }
.flower .petal-fill { fill: var(--c); opacity: 0.86; }
[data-theme="day"] .flower .petal-fill { mix-blend-mode: multiply; }
[data-theme="night"] .flower .petal-fill { mix-blend-mode: screen; opacity: 0.8; }
.flower .petal-vein { fill: none; stroke: #fff; stroke-opacity: 0.38; stroke-width: 3; stroke-linecap: round; }
.palette[data-active] .petal:not(.is-active) { opacity: 0.18; }
.flower .stamen { fill: #f2c63d; }

@media (max-width: 900px) {
  .palette-grid { grid-template-columns: 1fr; }
  .flower-wrap { max-width: 360px; }
}
@media (max-width: 560px) {
  .legend-item { grid-template-columns: 30px 1fr; row-gap: 2px; }
  .legend-desc { grid-column: 2; text-align: left; }
}

/* La conviction */

.statement { padding-block: clamp(80px, 16vh, 200px); }
.statement-text {
  margin: 0; max-width: 24ch;
  font-family: var(--f-display); font-size: clamp(1.9rem, 4.5vw, 4.1rem);
  line-height: 1.12; letter-spacing: -0.015em;
}
.statement-text .hl { color: var(--t); font-style: italic; }

/* Expertises : empilées par défaut, en défilement horizontal épinglé quand le script le permet. */

.xp {
  position: relative; overflow: hidden;
  background-color: color-mix(in srgb, var(--tint, var(--bg)) 7%, var(--bg));
  transition: background-color 0.9s ease;
}
.xp[data-active="cloud"] { --tint: var(--c-cloud); }
.xp[data-active="data"] { --tint: var(--c-data); }
.xp[data-active="ia"] { --tint: var(--c-ia); }
.xp[data-active="migration"] { --tint: var(--c-migration); }
.xp[data-active="gouvernance"] { --tint: var(--c-gouv); }

.xp-track { padding-block: clamp(96px, 13vh, 150px); }
.xp-intro { max-width: var(--max); margin: 0 auto 40px; padding-inline: var(--gutter); }
.xp-intro p:not(.eyebrow) { max-width: 46ch; margin-top: 24px; font-size: 1.08rem; color: var(--fg-2); }

.xp-panel {
  position: relative; isolation: isolate;
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: clamp(48px, 7vh, 80px) var(--gutter);
  border-top: 1px solid var(--line);
}
/* Un lavis d'aquarelle : un masque précalculé, coloré par la couleur de l'expertise. */
.wash {
  display: block; aspect-ratio: 1; background: var(--c);
  -webkit-mask: url(/assets/img/wash.png) center / contain no-repeat;
  mask: url(/assets/img/wash.png) center / contain no-repeat;
}
.xp-wash {
  position: absolute; z-index: -1; left: -4%; top: 50%;
  width: min(560px, 80vw); transform: translateY(-50%);
  opacity: 0.3; pointer-events: none; will-change: transform;
}
[data-theme="night"] .xp-wash { opacity: 0.22; }
.xp-num {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--t);
}
.xp-num::before { content: ""; width: 26px; height: 12px; border-radius: 12px 4px 10px 6px; background: var(--c); }
.xp-title { margin: 18px 0 22px; font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1.04; }
.xp-text { max-width: 44ch; font-size: 1.08rem; color: var(--fg-2); }
.xp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.xp-list li { position: relative; padding: 13px 0 13px 32px; border-bottom: 1px solid var(--line); }
.xp-list li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 17px; height: 6px;
  border-radius: 6px 2px 5px 3px; background: var(--c); transform: translateY(-50%) rotate(-6deg);
}
.xp-stack { margin: 22px 0 0; font-size: 0.93rem; color: var(--fg-3); }
.xp-stack span {
  display: block; margin-bottom: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fg-2);
}
.xp-progress { display: none; }

.xp--pinned .xp-track {
  display: flex; align-items: stretch; width: max-content; height: 100vh;
  padding: 0 0 0 var(--gutter);
}
.xp--pinned .xp-intro {
  flex: 0 0 min(36vw, 500px); margin: 0; padding: 0 5vw 0 0;
  display: flex; flex-direction: column; justify-content: center;
}
.xp--pinned .xp-panel {
  flex: 0 0 min(80vw, 1100px); max-width: none; margin: 0 3vw 0 0;
  padding: clamp(40px, 6vh, 80px) clamp(32px, 4vw, 64px);
  border-top: 0; align-content: center;
}
.xp--pinned .xp-panel:last-child { margin-right: var(--gutter); }
.xp--pinned .xp-wash { width: min(70vh, 640px); }
.xp--pinned .xp-progress {
  display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 36px;
  height: 3px; border-radius: 3px; background: var(--line); overflow: hidden;
}
.xp-progress-fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--c-cloud), var(--c-data), var(--c-ia), var(--c-migration), var(--c-gouv));
}

@media (max-width: 760px) {
  .xp-panel { grid-template-columns: 1fr; }
}

/* Méthode */

.method-steps { position: relative; }
.method-path {
  position: absolute; left: 0; right: 0; top: -27px; width: 100%; height: 80px;
  overflow: visible; pointer-events: none;
}
.method-path path { fill: none; stroke: url(#g-method); stroke-width: 10; stroke-linecap: round; opacity: 0.85; }
.steps {
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px);
}
.step { position: relative; padding-top: 52px; }
.step-dot {
  position: absolute; top: 0; left: 0; width: 26px; height: 26px;
  border-radius: 50% 44% 56% 47%; background: var(--c);
  box-shadow: 0 0 0 6px var(--bg);
}
.step-num { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.15em; color: var(--fg-3); }
.step h3 { margin: 8px 0 10px; font-size: 1.75rem; }
.step p { margin: 0; color: var(--fg-2); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .method-path { display: none; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Références */

.logos {
  position: relative; overflow: hidden; padding-block: 8px;
  margin-bottom: clamp(64px, 10vh, 120px);
}
.logos.is-moving {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track { display: flex; width: 100%; }
.logos.is-moving .logo-track { width: max-content; will-change: transform; }
.logo-set {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.logos.is-moving .logo-set { flex-wrap: nowrap; padding: 0 14px 0 0; }
.logo-tile {
  display: grid; place-items: center;
  height: 84px; min-width: 176px; padding: 0 30px;
  border-radius: 18px; background: var(--tile); border: 1px solid var(--tile-line);
}
.logo-tile img {
  height: var(--h, 28px); width: auto; max-width: 150px;
  filter: grayscale(1) contrast(1.05); opacity: 0.68;
  transition: filter 0.4s, opacity 0.4s;
}
.logo-tile:hover img { filter: none; opacity: 1; }
.logo-word {
  font-family: var(--f-display); font-size: 1.02rem; line-height: 1.15; text-align: center;
  color: #3a3d55; opacity: 0.8;
}
.logo-word small {
  display: block; font-family: var(--f-text); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 2px;
}

.refs-note { margin: -72px auto clamp(64px, 10vh, 110px); text-align: center; font-size: 0.85rem; color: var(--fg-3); }

/* seentia : toujours de nuit, comme sa propre vitrine. */

.seentia {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  padding: clamp(36px, 5vw, 76px);
  border-radius: 28px; background: var(--night); color: var(--bone);
  border: 1px solid rgba(236, 230, 214, 0.08);
}
.seentia::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(236, 230, 214, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.seentia-beam {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 72%) var(--my, 30%), rgba(242, 180, 65, 0.16), transparent 60%);
}
.seentia-eyebrow {
  margin: 0; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--beam);
}
.seentia-logo { margin: 16px 0 14px; }
.seentia-logo svg { height: 54px; width: auto; }
.seentia-lede { margin: 0 0 20px; font-family: var(--f-display); font-style: italic; font-size: 1.55rem; }
.seentia-copy p:not(.seentia-eyebrow):not(.seentia-lede) { max-width: 52ch; color: rgba(236, 230, 214, 0.78); }
.seentia-tags { list-style: none; margin: 26px 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seentia-tags li {
  padding: 6px 14px; border-radius: 999px; font-size: 0.84rem;
  border: 1px solid rgba(236, 230, 214, 0.2); color: rgba(236, 230, 214, 0.85);
}
.btn-beam { background: var(--beam); color: var(--night); }
.btn-beam:hover { background: #f6c566; }

.seentia-visual { position: relative; min-height: 360px; display: grid; place-items: center; }
.seentia-visual::before {
  content: ""; position: absolute; left: 50%; top: -12%; width: 130%; height: 95%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 180, 65, 0.2), transparent 68%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
}
.s-emblem { position: relative; width: min(250px, 62%); height: auto; overflow: visible; }
.s-signal {
  position: absolute; z-index: 1;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(10, 14, 28, 0.88); border: 1px solid rgba(242, 180, 65, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem; line-height: 1.35;
}
.s-signal strong { display: block; font-weight: 600; color: var(--bone); }
.s-signal span { color: var(--beam); }
.s-1 { top: 6%; left: 0; }
.s-2 { top: 50%; right: 0; }
.s-3 { bottom: 4%; left: 10%; }

@media (max-width: 900px) {
  .seentia { grid-template-columns: 1fr; }
  .seentia-visual { min-height: 320px; }
}

/* Appel final */

.cta { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(110px, 18vh, 210px); text-align: center; }
.cta-paint { position: absolute; inset: -12% 0; z-index: -1; will-change: transform; }
.cta-blob { position: absolute; min-width: 180px; opacity: 0.42; }
[data-theme="night"] .cta-blob { opacity: 0.28; }
.cta-title { font-size: clamp(2.7rem, 6.2vw, 5.6rem); line-height: 1; }
.cta p { max-width: 46ch; margin: 24px auto 38px; font-size: 1.12rem; color: var(--fg-2); }

/* Pied de page */

.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 60px 0 44px; font-size: 0.93rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 32px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 1.45rem; }
.footer-tag { margin: 12px 0 0; opacity: 0.6; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { text-decoration: none; opacity: 0.85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-copy { margin: 0; opacity: 0.5; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* Page de contact */

.contact { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); min-height: 100vh; }
.contact-art {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 460px;
  background: var(--bg);
}
.contact-tint { position: absolute; inset: 0; z-index: -1; opacity: 0; mix-blend-mode: color; pointer-events: none; }
.contact-art-inner { padding: calc(var(--header-h) + 40px) clamp(24px, 4.5vw, 72px) clamp(36px, 6vh, 72px); }
.contact-title { font-size: clamp(2.6rem, 5vw, 4.8rem); max-width: 11ch; }
.contact-art .hero-lede { margin: 24px 0 0; max-width: 40ch; }
.contact-direct { display: grid; gap: 2px; margin-top: 32px; font-size: 0.93rem; color: var(--fg-2); }
.contact-direct a { color: var(--fg); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.contact-side { display: flex; align-items: center; padding: calc(var(--header-h) + 40px) var(--gutter) 72px; }
.contact-form, .form-success { width: 100%; max-width: 620px; margin: auto; }
.contact-form { --accent: var(--fg); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin: 0 0 20px; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field label, .field legend { padding: 0; font-size: 0.92rem; font-weight: 600; }
.field legend { margin-bottom: 10px; }
.opt { font-weight: 400; color: var(--fg-3); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px;
  font: inherit; color: var(--fg);
  background: var(--field); border: 1.5px solid var(--line-strong); border-radius: 12px;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field input:focus, .field textarea:focus {
  outline: none; background: var(--field-focus); border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.field-error { margin: 0; font-size: 0.85rem; color: var(--error); }
.field-error:empty { display: none; }
.has-error input, .has-error textarea { border-color: var(--error); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--field);
  font-size: 0.9rem; transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.chip span::before { content: ""; width: 13px; height: 8px; border-radius: 6px 2px 5px 3px; background: var(--c); }
.chip input:hover + span { border-color: var(--c); }
.chip input:checked + span { background: var(--t); border-color: var(--t); color: var(--on-accent); }
.chip input:checked + span::before { background: var(--on-accent); }
.chip input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; margin: 4px 0 18px; }
.form-note { margin: 0 0 24px; font-size: 0.85rem; color: var(--fg-3); }
.form-note a { color: var(--fg-2); }
.form-status { margin: 16px 0 0; min-height: 1.5em; font-size: 0.93rem; color: var(--error); }

.form-success { padding-block: 40px; }
.form-success:focus { outline: none; }
.success-mark { width: 72px; height: 72px; margin-bottom: 28px; }
.form-success .h2 { margin-bottom: 20px; }
.form-success p { color: var(--fg-2); margin-bottom: 30px; max-width: 44ch; }

@media (max-width: 900px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-art { min-height: 62vh; align-items: flex-end; }
  .contact-side { padding-top: 56px; }
}
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; gap: 0; } }

/* Pages de texte (mentions légales, page introuvable) */

.prose-page { padding: calc(var(--header-h) + 72px) 0 110px; }
.prose-page .container { max-width: 840px; }
.prose-page h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); line-height: 1.02; margin-bottom: 14px; }
.prose-page .updated { color: var(--fg-3); font-size: 0.9rem; margin-bottom: 48px; }
.prose-page h2 { font-size: 1.65rem; margin: 52px 0 14px; }
.prose-page p, .prose-page li { color: var(--fg-2); }
.prose-page ul { padding-left: 1.2em; }
.prose-page dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 0; }
.prose-page dt { font-weight: 600; }
.prose-page dd { margin: 0; color: var(--fg-2); }
@media (max-width: 560px) { .prose-page dl { grid-template-columns: 1fr; gap: 2px; } .prose-page dd { margin-bottom: 10px; } }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Le côté technique : un plan d'architecte posé sur l'aquarelle. */

.xp-num, .step-num, .xp-stack span, .seentia-eyebrow, .hero-hint, .logo-word small, .s-signal span, .footer-tag, .footer-copy {
  font-family: var(--f-mono);
}
.xp-num, .step-num, .seentia-eyebrow { letter-spacing: 0.1em; font-weight: 500; }
.xp-stack { font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.01em; }
.hero-hint { font-size: 0.72rem; letter-spacing: 0.04em; gap: 14px; }
.hero-hint::before { display: none; }

.grid-overlay {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 62% 45%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 62% 45%, #000 35%, transparent 100%);
}

.corners { position: absolute; inset: calc(var(--header-h) + 12px) var(--gutter) 22px; z-index: -1; pointer-events: none; }
.corners span { position: absolute; width: 16px; height: 16px; border: 0 solid var(--line-strong); }
.corners .c-tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corners .c-tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corners .c-bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.corners .c-br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.blueprint { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 72px 72px; }

@media (max-width: 760px) { .corners { display: none; } }

/* Exemples de missions */

.cases-wrap { margin-bottom: clamp(64px, 10vh, 110px); }
.cases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case {
  position: relative; padding: 26px 26px 24px;
  border: 1px solid var(--line); border-radius: 18px;
  background: color-mix(in srgb, var(--c) 6%, transparent);
  transition: border-color 0.35s, transform 0.45s var(--ease);
}
.case:hover { border-color: var(--c); transform: translateY(-4px); }
.case::before {
  content: ""; display: block; width: 30px; height: 12px; margin-bottom: 18px;
  border-radius: 12px 4px 10px 6px; background: var(--c);
}
.case-tag {
  margin: 0 0 8px; font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--t);
}
.case h3 { margin: 0 0 10px; font-size: 1.4rem; line-height: 1.15; }
.case p:last-child { margin: 0; color: var(--fg-2); font-size: 0.97rem; }
@media (max-width: 1100px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cases { grid-template-columns: 1fr; } }

/* Sélecteur de langue */

.lang-switch {
  display: grid; place-items: center; height: 42px; min-width: 42px; padding: 0 10px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  font-family: var(--f-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em;
  text-decoration: none; color: var(--fg); transition: border-color 0.3s;
}
.lang-switch:hover { border-color: var(--fg); }

/* Le logotype seentia dans une phrase */

.brand-word { display: inline-block; height: 0.8em; width: auto; vertical-align: -0.03em; color: var(--bone); }

/* Agentic engineering */

.agents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.agents .section-lede { margin-bottom: 40px; }
.agent-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.agent-points li { padding-top: 16px; border-top: 2px solid var(--c); }
.ap-k { margin: 0 0 6px; font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t); }
.agent-points h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.15; }
.agent-points p:last-child { margin: 0; color: var(--fg-2); font-size: 0.97rem; }

/* La trace d'un agent : toujours un terminal de nuit, avec les couleurs de nuit. */
.trace {
  --c-cloud: #8094ff; --c-data: #5fc79d; --c-ia: #ff88ae; --c-migration: #f2b24a; --c-gouv: #b39cff;
  --t-cloud: #9aabff; --t-data: #74d3ab; --t-ia: #ff9dbd; --t-migration: #f5c26c; --t-gouv: #c2afff;
  margin: 0; overflow: hidden;
  border-radius: 18px; background: #0b1124; color: #d9d4c6;
  border: 1px solid rgba(236, 230, 214, 0.12);
  box-shadow: 0 30px 60px -20px rgba(8, 12, 30, 0.45);
  font-family: var(--f-mono); font-size: 0.86rem; line-height: 1.5;
}
.trace-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(236, 230, 214, 0.1); }
.trace-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(236, 230, 214, 0.18); }
.trace-bar p { margin: 0 0 0 10px; font-size: 0.74rem; color: rgba(236, 230, 214, 0.5); }
.trace-lines { list-style: none; margin: 0; padding: 18px 20px 22px; display: grid; gap: 9px; }
.trace-lines li { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.tl-k { flex: none; width: 4.2em; color: var(--t); }
.tl-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-lines em { margin-left: auto; padding-left: 12px; font-style: normal; white-space: nowrap; color: rgba(236, 230, 214, 0.55); }
.caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 4px; background: var(--c-ia); vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 1000px) { .agents-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .agent-points { grid-template-columns: 1fr; }
  .trace { font-size: 0.76rem; }
  .trace-lines em { display: none; }
}

/* Pages légales : l'en-tête reste à gauche pendant la lecture, comme sur seentia. */

.legal-page { padding: calc(var(--header-h) + 64px) 0 110px; }
.legal { display: grid; gap: 32px; color: var(--fg-2); line-height: 1.7; }
.legal .h2 { margin-top: 14px; font-size: clamp(2.1rem, 3vw, 3.3rem); hyphens: auto; }
.legal-date { margin: 14px 0 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--fg-3); }
.legal-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.legal-nav a { color: var(--fg); text-decoration: none; }
.legal-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal-body { max-width: 860px; }
.legal-body > :first-child { margin-top: 0; }
.legal h2 {
  margin: 44px 0 12px; font-family: var(--f-mono); font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg);
}
.legal p, .legal ul, .legal table { margin: 12px 0 0; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--fg); font-weight: 600; }
.legal a { color: var(--t-cloud); text-underline-offset: 3px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.93rem; line-height: 1.5; }
.legal th, .legal td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { font-family: var(--f-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); }
.legal-notice {
  padding: 12px 16px; border-left: 3px solid var(--c-cloud);
  background: color-mix(in srgb, var(--c-cloud) 8%, transparent); color: var(--fg); font-size: 0.93rem;
}
@media (min-width: 1024px) {
  .legal { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 72px; align-items: start; }
  .legal-head { position: sticky; top: calc(var(--header-h) + 34px); }
}
@media (max-width: 620px) { .legal table { font-size: 0.85rem; } }

.notfound { max-width: 760px; }
.notfound .h2 { margin-bottom: 20px; }
.notfound p:not(.eyebrow) { color: var(--fg-2); }
.notfound .hero-actions { margin-top: 32px; }

/* Le panneau IA porte l'agentic engineering : liste sous le texte, trace d'agent à droite. */
.xp-panel--ia .xp-head .xp-list { margin-top: 24px; }
.xp-panel--ia { grid-template-columns: 1fr 1fr; }
.xp-panel--ia .xp-list li { padding-block: 9px; font-size: 0.95rem; }
.xp-panel--ia .trace { font-size: 0.8rem; }
.xp--pinned .xp-panel--ia { flex-basis: min(90vw, 1220px); }
/* Les panneaux épinglés laissent la place de l'en-tête. */
.xp--pinned .xp-panel { padding-top: calc(var(--header-h) + 20px); padding-bottom: 64px; }
@media (max-width: 760px) { .xp-panel--ia { grid-template-columns: 1fr; } }

/* Téléphone : l'en-tête se resserre pour que tout tienne sur une ligne. */
@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .brand { font-size: 1.2rem; gap: 7px; }
  .brand-mark { width: 24px; height: 24px; }
  .theme-toggle, .lang-switch { width: 36px; min-width: 36px; height: 36px; padding: 0; }
  .theme-toggle svg { width: 17px; height: 17px; }
  .site-header .btn-small { padding: 0.6em 0.95em; font-size: 0.84rem; }
}

/* Très petits écrans : le widget anti-robot (300 px fixes) est légèrement réduit. */
@media (max-width: 340px) {
  .cf-turnstile { transform: scale(0.9); transform-origin: 0 0; margin-bottom: 8px; }
}
