/* ==========================================================================
   Koalign — feuille de style unique, pilotée par tokens.
   Les tokens suivent la charte graphique (../charte-graphique.md) :
   §3 palette, §4 typographie, §7 composition, §14 tokens web.
   Chaque sélecteur est déclaré une seule fois ; le responsive redéfinit
   les tokens (§11) plutôt que de redéclarer les règles.
   ========================================================================== */

:root {
  /* Couleurs — charte §14 (canoniques) */
  --ink: #171820;
  --muted: #54545e;
  --warm: #faf8f4;
  --indigo: #5956e9;
  --coral: #ff6b57;
  --lilac: #ecebff;
  --line: #17182026;

  /* Couleurs d'appui — charte §3 */
  --label-grey: #686873;
  --indigo-light: #9b99ff;
  --coral-pale: #fff0ed;

  /* Échelle typographique — charte §4 */
  --fs-hero: clamp(68px, 8.5vw, 122px);     /* Titre hero */
  --fs-section-title: clamp(42px, 4.6vw, 64px); /* Titre de section */
  --fs-cta: clamp(52px, 6vw, 80px);         /* Titre d'appel final */
  --fs-h3: 29px;                            /* Titre de bloc (20–29) */
  --fs-h3-sm: 22px;                         /* Titre de bloc, grilles denses */
  --fs-intro: 20px;                         /* Introduction (19–20) */
  --fs-body: 16px;                          /* Corps */
  --fs-body-sm: 15px;                       /* Corps resserré */
  --fs-label: 14px;                         /* Label de section numéroté (01–07) */
  --fs-micro: 11px;                         /* Eyebrow des bandeaux (références, technologies) */
  --fs-btn: 14px;                           /* Bouton */
  --fs-btn-sm: 11px;

  /* Espacement — charte §7 */
  --space-section: 128px;
  --gutter: 100px;

  /* Grille et familles — charte §7 / §14 */
  --shell: min(1220px, calc(100% - 64px));
  --display: "Instrument Sans", sans-serif;
  --body: "Inter", sans-serif;
}

/* --- Base --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--warm);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
.shell { width: var(--shell); margin: auto; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* --- En-tête / navigation --- */
header {
  position: sticky; top: 0; z-index: 20;
  background: #faf8f4e8;
  border-bottom: 1px solid #17182010;
  backdrop-filter: blur(15px);
}
.nav { height: 82px; display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 30px; }
.nav > a img { width: 145px; }
.nav nav { display: flex; justify-content: center; gap: 32px; }
.nav nav a { text-decoration: none; font-size: 15px; font-weight: 500; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 23px;
  background: var(--indigo); border: 1px solid var(--indigo); border-radius: 3px;
  color: #fff; text-decoration: none;
  font-size: var(--fs-btn); font-weight: 600; transition: .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px #5956e933; }
.btn.small { min-height: 44px; padding: 0 17px; font-size: var(--fs-btn-sm); }
.btn.light { background: #fff; border-color: #fff; color: var(--indigo); }
.menu { display: none; }

/* --- Hero --- */
.hero { min-height: calc(100vh - 82px); position: relative; display: grid; place-items: center; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; max-width: 950px; text-align: center; }
.hero h1, h2 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.06em; line-height: .92; }
.hero h1 { font-size: var(--fs-hero); }
h1 em, h2 em { color: var(--indigo); font-style: italic; font-weight: 480; }
.hero-copy > p { max-width: 700px; margin: 35px auto 0; color: var(--muted); font-size: 19px; line-height: 1.65; }
.actions { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 38px; }
.link { padding: 12px 0; border-bottom: 1px solid; text-decoration: none; font-size: 15px; font-weight: 600; }

/* Signature hero — charte §9 */
.traces { position: absolute; width: 130%; height: 440px; opacity: .3; }
.traces path {
  fill: none; stroke: var(--indigo); stroke-width: 1.25;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 2.35s cubic-bezier(.45, .05, .22, 1) forwards;
}
.traces g:first-child { animation: left 1.95s cubic-bezier(.2, .7, .2, 1) both; }
.traces g:nth-child(2) { animation: right 1.95s cubic-bezier(.2, .7, .2, 1) both; }
.traces circle { fill: var(--coral); opacity: 0; animation: dot .3s 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes left { from { transform: translate(-80px, -30px); } }
@keyframes right { from { transform: translate(80px, 35px); } }
@keyframes dot { to { opacity: 1; } }

/* --- Sections génériques --- */
.section { padding: var(--space-section) 0; }
.white { background: var(--warm); }
.intro, .split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.label {
  margin: 0 0 28px; color: var(--label-grey);
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: .17em;
}
.label b {
  display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 9px;
  border-radius: 50%; background: var(--coral); color: #fff; letter-spacing: 0;
}
h2 { font-size: var(--fs-section-title); }

/* --- 01 Solution : intro / rangées --- */
.copy > p:not(.label), .path-head > p:not(.label) { color: var(--muted); font-size: var(--fs-body); line-height: 1.75; }
.copy > p:first-child { color: var(--ink); font-family: var(--display); font-size: var(--fs-intro); line-height: 1.5; }
.copy aside {
  position: relative; overflow: hidden; margin-top: 25px;
  padding: 20px 0 20px 24px; background: transparent;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12px; line-height: 1.65; color: var(--ink);
}
.copy aside:before { content: ""; position: absolute; left: 0; top: 27px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.copy aside strong { color: var(--indigo); }
.rows { margin-top: 85px; border-top: 1px solid var(--line); }
.rows article { display: grid; grid-template-columns: 65px .85fr 1fr; gap: 30px; padding: 35px 0; border-bottom: 1px solid var(--line); }
.rows b, .beliefs > article > b, .steps article > b, .cards > article > b { color: var(--coral); font-size: 11px; }
.rows h3, .beliefs h3, .steps h3, .cards h3 { margin: 0; font-family: var(--display); font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -.035em; }
.rows p, .beliefs p, .steps p, .cards p { margin: 0; color: var(--muted); font-size: var(--fs-body-sm); line-height: 1.7; }

/* --- Références clients (bandeau) — charte §9 --- */
.references { padding: 28px 0 30px; overflow: hidden; background: var(--ink); color: #fff; border-top: 1px solid #ffffff1f; }
.references-head { display: flex; align-items: baseline; justify-content: flex-start; gap: 30px; margin-bottom: 21px; }
.references-head p { margin: 0; color: var(--coral); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.marquee { position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 27s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; gap: 34px; padding-right: 34px; }
.marquee-group span { white-space: nowrap; font-family: var(--display); font-size: clamp(20px, 2.1vw, 31px); font-weight: 560; letter-spacing: -.025em; color: #fff; }
.marquee-group i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--coral); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Technologies (bandeau) — charte §9 --- */
.tech-stack { padding: 31px 0 34px; overflow: hidden; background: var(--warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-head { display: flex; align-items: baseline; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.tech-head p { margin: 0; color: var(--indigo); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.tech-head span { color: var(--muted); font-size: 12px; }
.tech-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.tech-track { display: flex; width: max-content; animation: tech-marquee 42s linear infinite reverse; will-change: transform; }
.tech-marquee:hover .tech-track { animation-play-state: paused; }
.tech-group { display: flex; align-items: center; flex-shrink: 0; gap: 10px; padding-right: 10px; }
.tech-item { height: 62px; min-width: 154px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 18px; background: var(--warm); border: 1px solid var(--line); }
.tech-item img { width: 27px; height: 27px; object-fit: contain; filter: grayscale(1); opacity: .68; transition: .2s; }
.tech-item b { white-space: nowrap; color: var(--ink); font: 600 12px/1 var(--display); }
.tech-item:hover img { filter: none; opacity: 1; transform: scale(1.06); }
@keyframes tech-marquee { to { transform: translateX(-50%); } }

/* --- 02 Vision / convictions --- */
.vision { background: var(--warm); }
.sticky { position: sticky; top: 130px; align-self: start; }
.beliefs { border-top: 1px solid var(--line); }
.beliefs article { display: grid; grid-template-columns: 50px 1fr; gap: 22px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.beliefs h3 { margin-bottom: 12px; font-size: var(--fs-h3-sm); }
.beliefs blockquote { margin: 35px 0 0 72px; padding-left: 22px; border-left: 3px solid var(--indigo); font-family: var(--display); font-size: 19px; line-height: 1.5; }
.beliefs blockquote strong { color: var(--indigo); }

/* --- 03 Parcours (onglets) --- */
.path-head { max-width: 890px; }
.path-head > p:not(.label) { max-width: 650px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 65px; border: 1px solid var(--line); }
.tabs button { min-height: 80px; padding: 20px 25px; border: 0; background: var(--warm); text-align: left; font-family: var(--display); font-size: 17px; font-weight: 600; cursor: pointer; }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button b { margin-right: 15px; color: var(--coral); font-size: 12px; }
.tabs button[aria-selected=true] { background: var(--indigo); color: #fff; }
.panel { display: grid; grid-template-columns: .75fr 1.25fr; background: var(--warm); }
.panel[hidden] { display: none !important; }
.panel:not(.active) { display: none !important; }
.pose { position: relative; min-height: 700px; overflow: hidden; padding: 40px; display: flex; align-items: flex-end; }
.pose i, .contact-pose i { position: absolute; width: 360px; height: 360px; top: 95px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: var(--lilac); }
.pose i:after, .contact-pose i:after { content: ""; position: absolute; width: 80px; height: 80px; right: -15px; top: 20px; border-radius: 50%; background: var(--coral); }
.pose img { position: absolute; z-index: 1; width: 460px; top: 45px; left: 50%; transform: translateX(-50%); }
.pose p { position: relative; z-index: 2; margin: 0; max-width: 330px; font: var(--fs-intro)/1.35 var(--display); }
.pose p b { display: block; margin-bottom: 8px; color: var(--coral); font: 600 11px/1 var(--body); letter-spacing: .15em; }
#usage .pose img { width: 365px; top: 92px; }
.steps { padding: 48px 55px; background: var(--warm); border: 1px solid var(--line); border-top: 0; }
.steps aside { margin-top: 25px; padding: 20px; background: var(--warm); font-size: 12px; line-height: 1.65; border: 1px solid rgba(89, 86, 233, .14); border-radius: 10px; border-left: 3px solid var(--indigo); box-shadow: 0 10px 25px rgba(23, 24, 32, .04); }
.steps article { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.steps h3 { margin-bottom: 8px; font-size: var(--fs-h3-sm); }
.mumu { display: grid !important; grid-template-columns: 120px 1fr; gap: 18px; background: var(--coral-pale) !important; border-color: var(--coral) !important; }
.mumu > strong { color: var(--coral); font: 600 28px/1 var(--display); }
.mumu small { display: block; margin-top: 5px; color: var(--ink); font: 11px/1.2 var(--body); text-transform: uppercase; }

/* --- 04 Engagements (sombre) --- */
.dark { background: var(--ink); color: #fff; }
.dark-head { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; }
.dark .label { color: #ffffff88; }
.dark h2 em { color: var(--indigo-light); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 75px; border-block: 1px solid #ffffff30; }
.cards article { min-height: 290px; padding: 25px; }
.cards article + article { border-left: 1px solid #ffffff30; }
.cards h3 { margin: 65px 0 15px; font-size: var(--fs-h3-sm); }
.cards p { color: #ffffffa8; }

/* --- 05 Équipe --- */
.team { overflow: hidden; background: var(--warm); }
.team-head { display: block; max-width: 1050px; }
.team-head .label { margin-bottom: 28px; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 72px; }
.team-card { min-width: 0; background: var(--warm); border: 1px solid #17182018; }
.team-id { position: relative; height: 205px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--indigo); color: #fff; }
.team-id:before, .team-id:after { content: ""; position: absolute; border-radius: 50%; background: #ffffff15; }
.team-id:before { width: 270px; height: 270px; right: -90px; top: -155px; }
.team-id:after { width: 170px; height: 170px; left: -45px; bottom: -115px; background: var(--coral); }
.team-id.team-photo:before, .team-id.team-photo:after { display: none; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.team-photo:after { content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0 !important; background: linear-gradient(180deg, #1718200a 50%, #17182066) !important; }
.team-body { padding: 32px 34px 36px; }
.team-role { margin: 0 0 13px !important; color: var(--indigo) !important; font-size: 12px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.team-body h3 { margin: 0 0 22px; font: 600 35px/1 var(--display); letter-spacing: -.045em; }
.team-body > p { margin: 0; color: var(--muted); font-size: var(--fs-body-sm); line-height: 1.72; }
.team-body .team-proof { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink); font-size: 11px; line-height: 1.6; }
.book-proof { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; margin-top: 22px; padding: 16px; background: var(--warm); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: .2s; }
.book-proof:hover { transform: translateY(-2px); border-color: var(--indigo); box-shadow: 0 10px 25px #17182012; }
.book-proof > img { width: 72px; height: 96px; object-fit: cover; }
.book-proof span { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.book-proof small { margin-bottom: 7px; color: var(--coral); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.book-proof strong { font: 600 18px/1.15 var(--display); }
.book-proof em { margin-top: 10px; color: var(--indigo); font: normal 600 11px/1 var(--body); }
.credential-logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 18px; }
.credential-logos span { height: 58px; display: flex; align-items: center; justify-content: center; padding: 8px; background: var(--warm); border: 1px solid var(--line); }
.credential-logos img { width: 100%; max-width: 92px; max-height: 39px; object-fit: contain; }
.credential-logos img[alt='Kili Technology'] { max-height: 46px; }
.maxime-logos { grid-template-columns: repeat(4, 1fr); }
.maxime-logos span { height: 80px; }
.maxime-logos img { max-height: 54px; }

/* --- 06 FAQ --- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 27px 0; list-style: none; cursor: pointer; font: 600 var(--fs-intro)/1.3 var(--display); }
.faq summary b { color: var(--indigo); font-size: 24px; }
.faq details[open] summary b { transform: rotate(45deg); }
.faq details p { margin: -5px 35px 25px 0; color: var(--muted); font-size: var(--fs-body-sm); line-height: 1.7; }

/* --- 07 Contact --- */
.contact { overflow: hidden; background: var(--indigo); color: #fff; }
.contact .label { color: #fff; }
.contact-grid { min-height: 620px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.contact-pose { position: relative; height: 100%; }
.contact-pose i { top: 105px; background: #ffffff18; }
.contact-pose img { position: absolute; z-index: 1; width: 470px; left: 50%; bottom: -5px; transform: translateX(-55%); }
.contact h2 { font-size: var(--fs-cta); }
.contact > div > div:last-child > p:not(.label) { max-width: 650px; color: #ffffffc0; font-size: 16px; line-height: 1.7; }

/* --- Pied de page --- */
footer { padding: 32px 0; }
footer > div { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; }
footer img { width: 125px; }
footer p, footer span { color: #73737c; font-size: 11px; }
footer p { text-align: center; }

/* --- Révélation au scroll — charte §9 --- */
.reveal { opacity: 0; transform: translateY(20px); transition: .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive — charte §11. Les tailles et espacements se règlent en
   redéfinissant les tokens ; seules les règles de disposition sont listées.
   ========================================================================== */
@media (max-width: 900px) {
  :root { --shell: min(100% - 40px, 760px); }
  .nav { grid-template-columns: 1fr auto; position: relative; }
  .nav nav, .nav > .btn { display: none; }
  .nav.open nav { display: flex; position: fixed; inset: 70px 0 auto; padding: 25px 20px; flex-direction: column; gap: 0; background: var(--warm); border-bottom: 1px solid var(--line); }
  .nav.open nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font: 600 20px/1.2 var(--display); }
  .menu { display: block; border: 0; background: none; }
  .hero { min-height: 760px; }
  .intro, .split { grid-template-columns: 1fr; gap: 55px; }
  .sticky { position: static; }
  .rows article { grid-template-columns: 45px 1fr; }
  .rows p { grid-column: 2; }
  .panel { grid-template-columns: 1fr; }
  .pose { min-height: 580px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .dark-head { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: .7fr 1.3fr; }
  .team-head { max-width: 760px; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { display: grid; grid-template-columns: .72fr 1.28fr; }
  .team-id { height: auto; min-height: 330px; }
  .team-body { padding: 36px; }
}

@media (max-width: 600px) {
  :root {
    --shell: calc(100% - 30px);
    --fs-hero: 56px;
    --fs-section-title: 38px;
    --fs-cta: 50px;
    --space-section: 88px;
  }
  .nav { height: 70px; }
  .nav > a img { width: 125px; }
  .hero { min-height: calc(100svh - 70px); }
  .hero-copy > p { font-size: 15px; }
  .actions { flex-direction: column; gap: 8px; }
  .rows { margin-top: 55px; }
  .tabs { grid-template-columns: 1fr; }
  .tabs button + button { border-left: 0; border-top: 1px solid var(--line); }
  .pose { min-height: 490px; }
  .pose i { width: 280px; height: 280px; }
  .pose img { width: 350px; }
  #usage .pose img { width: 290px; top: 82px; }
  .steps { padding: 32px 20px; }
  .mumu { grid-template-columns: 1fr !important; }
  .cards { grid-template-columns: 1fr; }
  .cards article { min-height: 220px; }
  .cards article + article { border-left: 0; border-top: 1px solid #ffffff30; }
  .contact-grid { display: flex; min-height: 760px; flex-direction: column-reverse; gap: 0; }
  .contact-grid > div:last-child { padding: 80px 0 0; }
  .contact-pose { width: 100%; min-height: 350px; }
  .contact-pose img { width: 340px; }
  .references { padding: 24px 0; }
  .references-head { display: block; margin-bottom: 20px; }
  .marquee-group { gap: 25px; padding-right: 25px; }
  .marquee-group span { font-size: 21px; }
  .team-grid { margin-top: 50px; }
  .team-card { display: block; }
  .team-id { height: 180px; min-height: 0; }
  .team-id.team-photo { height: 220px; min-height: 0; }
  .team-body { padding: 28px 24px; }
  .team-body h3 { font-size: 31px; }
  .credential-logos { grid-template-columns: repeat(2, 1fr); }
  .maxime-logos { grid-template-columns: repeat(2, 1fr); }
  .maxime-logos span { height: 62px; }
  .book-proof { grid-template-columns: 62px 1fr; }
  .book-proof > img { width: 62px; height: 84px; }
  .tech-stack { padding: 25px 0 28px; }
  .tech-head { margin-bottom: 19px; }
  .tech-head span { display: none; }
  .tech-item { height: 54px; min-width: 135px; padding: 9px 14px; }
  .tech-item img { width: 24px; height: 24px; }
  .tech-item b { font-size: 11px; }
  footer > div { grid-template-columns: 1fr auto; }
  footer p { display: none; }
}

/* Accessibilité du mouvement — charte §9 / §11 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track, .tech-track { animation-play-state: paused; }
}
