/* Coco Intelligence — styles du site vitrine */

:root {
  --bg: #f4f1ea;
  --card: #fbf9f5;
  --line: #ddd7cc;
  --line-soft: #e2dcd1;
  --ink: #141311;
  --ink-2: #4a463f;
  --ink-3: #5e5950;
  --accent: #d9622b;
  --accent-halo: rgba(217, 98, 43, 0.18);

  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 20px;
  --gap: 16px;
  --section: 96px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
    --gap: 24px;
    --section: 128px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 64px;
    --section: 160px;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.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;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Typographie */

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.label--dark {
  color: var(--ink);
  font-weight: 500;
}

h2 {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h3 {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font: 500 16px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn--solid {
  background: var(--ink);
  color: var(--bg);
}

.btn--solid:hover {
  background: #2a2824;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn:active {
  transform: scale(0.98);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

/* En-tête */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.logo__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav ul {
    display: flex;
    gap: clamp(20px, 3vw, 44px);
  }

  .nav__contact {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .header-cta {
    display: none;
  }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .js .nav {
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    padding: 8px 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition:
      opacity 0.2s var(--ease),
      transform 0.2s var(--ease),
      visibility 0s linear 0.2s;
  }

  .js .nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition:
      opacity 0.2s var(--ease),
      transform 0.2s var(--ease);
  }

  .nav li + li {
    border-top: 1px solid var(--line-soft);
  }

  .nav a {
    display: block;
    padding: 14px 0;
  }

  /* Sans JS : menu affiché en liste sous le logo */
  html:not(.js) .site-header {
    flex-wrap: wrap;
    padding-block: 16px;
  }

  html:not(.js) .nav ul {
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
  }

  html:not(.js) .nav li + li {
    border: 0;
  }

  html:not(.js) .nav a {
    padding: 6px 0;
  }
}

/* Hero */

.hero {
  padding-top: clamp(40px, 7vw, 96px);
}

.hero__grid {
  display: grid;
  gap: 56px;
}

.hero__title {
  margin-top: 24px;
  font-size: clamp(2.75rem, 1.6rem + 3.6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.rotator {
  display: grid;
  overflow: hidden;
  color: var(--accent);
}

.rotator__word {
  grid-area: 1 / 1;
  /* marge pour les jambages (p, q) masqués par le recadrage */
  padding-bottom: 0.14em;
}

.js .rotator__word {
  opacity: 0;
  transform: translateY(0.45em);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

/* Le mot entrant attend que le sortant soit presque effacé : jamais deux mots lisibles à la fois */
.js .rotator__word.is-active {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}

.js .rotator__word.is-leaving {
  opacity: 0;
  transform: translateY(-0.45em);
  transition-duration: 0.4s;
}

.hero__lead {
  max-width: 34em;
  margin: 28px 0 36px;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.hero__visual {
  display: grid;
  gap: 28px;
  align-content: start;
  justify-items: center;
}

/* Grille COCO */

.coco-grid {
  position: relative;
  width: 100%;
  max-width: 446px;
  aspect-ratio: 446 / 266;
  touch-action: pan-y;
}

.coco-grid__pt,
.coco-grid__coco,
.coco-grid__ghost {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  will-change: transform, opacity;
}

.coco-grid__pt {
  width: 6px;
  height: 6px;
  opacity: 0;
}

.coco-grid__ghost {
  width: 9px;
  height: 9px;
  opacity: 0;
}

.coco-grid__coco {
  z-index: 2;
  width: 13px;
  height: 13px;
  box-shadow: 0 0 0 5px var(--accent-halo);
  opacity: 0;
}

.coco-grid.is-ready .coco-grid__coco {
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

/* Carte de conversation */

.chat {
  width: 100%;
  max-width: 446px;
  padding: 20px 22px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.chat__head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.chat__line {
  font-size: 15px;
  line-height: 1.45;
}

.chat__line + .chat__line {
  margin-top: 12px;
}

.chat__who {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.chat__line--client {
  color: var(--ink-2);
}

.chat__status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cursor {
  width: 7px;
  height: 14px;
  margin-left: -4px;
  background: var(--ink);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.js .chat__line {
  animation: chat-line 9s var(--ease) infinite backwards;
}

.js .chat__line:nth-of-type(2) {
  animation-delay: 1.2s;
}

.js .chat__line:nth-of-type(3) {
  animation-delay: 2.4s;
}

/* Les trois lignes disparaissent ensemble, à 8 s de chaque cycle de 9 s */
.js .chat__line:nth-of-type(1) {
  animation-name: chat-line-1;
}

.js .chat__line:nth-of-type(2) {
  animation-name: chat-line-2;
}

.js .chat__line:nth-of-type(3) {
  animation-name: chat-line-3;
}

@keyframes chat-line-1 {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  6%,
  86% {
    opacity: 1;
    transform: none;
  }
  94%,
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes chat-line-2 {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  6%,
  73% {
    opacity: 1;
    transform: none;
  }
  80%,
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes chat-line-3 {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  6%,
  59% {
    opacity: 1;
    transform: none;
  }
  67%,
  100% {
    opacity: 0;
    transform: none;
  }
}

/* Rangée de bas de hero */

.hero__row {
  display: grid;
  gap: 32px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.hero__row-title {
  margin: 12px 0 8px;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero__row li > p:last-child {
  color: var(--ink-2);
  max-width: 26em;
}

@media (min-width: 768px) {
  .hero__row {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
  }
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: start;
  }

  .hero__text {
    grid-column: 1 / span 7;
  }

  .hero__visual {
    grid-column: 8 / span 5;
    justify-items: end;
    padding-top: 40px;
  }

  .hero__row {
    margin-top: 96px;
  }
}

/* Sections */

.section {
  padding-top: var(--section);
}

.section__head {
  max-width: 880px;
}

.section__head h2 {
  margin-top: 20px;
}

.section__intro {
  max-width: 40em;
  margin-top: 28px;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.note {
  margin-top: 28px;
  color: var(--ink-3);
}

/* Produits */

.product {
  display: grid;
  gap: 32px;
  margin-top: 56px;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.product__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.product__name {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  letter-spacing: -0.04em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product__hook {
  margin: 20px 0 14px;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.product__main > p:last-child {
  max-width: 36em;
  color: var(--ink-2);
}

.product__side {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.product__side .btn {
  margin-top: 18px;
}

@media (min-width: 900px) {
  .product {
    grid-template-columns: 7fr 4fr;
    gap: 48px;
    padding: 48px;
  }

  .product__side {
    padding: 0 0 0 40px;
    border-top: 0;
    border-left: 1px solid var(--line-soft);
  }
}

/* Services */

.cards {
  display: grid;
  gap: var(--gap);
  margin-top: 56px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* Orange assombri : l'accent pur n'atteint pas le contraste AA en 12 px */
.card .label {
  color: #a9461a;
}

.card p:last-child {
  color: var(--ink-2);
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(6, 1fr);
  }

  .card {
    grid-column: span 2;
    min-height: 240px;
  }

  .card:nth-child(4),
  .card:nth-child(5) {
    grid-column: span 3;
    min-height: 0;
  }
}

.services__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
}

.services__foot .note {
  margin: 0;
}

/* Approche */

.principles {
  display: grid;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.principles li {
  display: grid;
  gap: 8px 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.principles__num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: #a9461a;
}

.principles p {
  max-width: 38em;
  color: var(--ink-2);
}

@media (min-width: 768px) {
  .principles li {
    grid-template-columns: 1fr 4fr 6fr;
    align-items: baseline;
    padding: 36px 0;
  }

  .principles h3 {
    font-size: 1.625rem;
  }
}

/* À propos */

.about {
  display: grid;
  gap: 56px;
}

.about__text h2 {
  margin: 20px 0 28px;
}

.about__text p:not(.label) {
  max-width: 36em;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.about__text p + p {
  margin-top: 16px;
}

.founder {
  display: grid;
  gap: 24px;
  align-content: start;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.founder__photo {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border-radius: 20px;
  background: var(--line-soft);
  color: var(--ink-2);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  object-fit: cover;
}

.founder__name {
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.founder__name span {
  color: var(--ink-3);
  font-weight: 400;
}

.founder p:not(.founder__name) {
  color: var(--ink-2);
}

@media (min-width: 1024px) {
  .about {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
  }

  .about__text {
    grid-column: 1 / span 6;
  }

  .founder {
    grid-column: 8 / span 5;
    margin-top: 44px;
    padding: 36px;
  }

  .founder__photo {
    width: 140px;
    height: 140px;
  }
}

/* Contact */

.section--contact {
  padding-bottom: var(--section);
}

.contact {
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.contact h2 {
  max-width: 14em;
  font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem);
  line-height: 1.02;
}

.contact p {
  max-width: 34em;
  margin: 24px 0 36px;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.contact .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Pied de page */

.site-footer {
  display: grid;
  gap: 20px;
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}

.logo--small {
  flex-wrap: wrap;
  font-size: 16px;
  color: var(--ink);
  white-space: normal;
}

.site-footer__tag {
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-footer__links a {
  display: inline-block;
  padding: 6px 0;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__copy {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

@media (min-width: 1024px) {
  .site-footer {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
  }

  .site-footer__links {
    justify-content: center;
  }
}

/* Pages légales */

.legal {
  max-width: 760px;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: var(--section);
}

.legal h1 {
  margin: 20px 0 40px;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.legal p,
.legal li {
  color: var(--ink-2);
}

.legal p + p {
  margin-top: 12px;
}

.legal .todo {
  padding: 0 4px;
  background: var(--line-soft);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.9em;
}

/* Apparition au défilement */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Mouvement réduit : tout s'affiche directement */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal,
  .js .chat__line {
    opacity: 1;
    transform: none;
  }

  .js .rotator__word {
    opacity: 0;
    transform: none;
  }

  .js .rotator__word.is-active {
    opacity: 1;
  }
}
