/* ==========================================================
   Side Business — page d'accueil
   Couleurs relevées sur les Siders d'origine
   ========================================================== */
:root {
  --red: #de785f;      /* Side B */
  --red-dark: #c85d44;
  --purple: #81579a;   /* Side I */
  --blue: #68899b;     /* Side A */
  --yellow: #f3c97c;   /* Side L */
  --green: #a1c685;
  --ink: #171716;
  --ink-soft: #474f57;
  --paper: #fffaf4;
  --paper-2: #fbeee3;
  --white: #ffffff;

  --font-display: "Luckiest Guy", "Arial Black", sans-serif;
  --font-hand: "Caveat", cursive;
  --font-body: "Sen", system-ui, sans-serif;

  --radius: 22px;
  --shadow: 6px 6px 0 var(--ink);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- Typo ---------- */
.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: .5px;
}
.hand {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--ink-soft);
  margin: 0 0 .25rem;
  transform: rotate(-2deg);
  display: inline-block;
}
.hand--accent { color: var(--red); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.6rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease-bounce), box-shadow .2s, background .2s;
  font-family: inherit;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn--primary { background: var(--red); color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--ghost { background: var(--white); }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 14px 0;
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.is-scrolled {
  background: rgba(255, 250, 244, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 0 var(--ink);
  padding: 8px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__menu { display: flex; align-items: center; gap: 1.6rem; }
.nav__menu a:not(.btn) {
  text-decoration: none;
  font-weight: 700;
  position: relative;
}
.nav__menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 3px;
  background: var(--red);
  border-radius: 3px;
  transition: right .25s;
}
.nav__menu a:not(.btn):hover::after { right: 0; }

.logo {
  text-decoration: none;
  font-family: var(--font-display);
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  transform: rotate(-3deg);
  transition: transform .3s var(--ease-bounce);
}
.logo:hover { transform: rotate(0) scale(1.05); }
.logo__side { font-size: 1.8rem; color: var(--ink); }
.logo__biz { font-size: 1.15rem; color: var(--red); }
.logo--light .logo__side { color: var(--white); }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 26px; height: 3px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 3px;
  transition: transform .3s, opacity .3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  overflow: hidden;
}
.hero__orbits {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 8 10;
  opacity: .18;
  animation: dash 30s linear infinite;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: .98;
  margin: .3rem 0 1.4rem;
}
.rotator {
  display: inline-block;
  color: var(--red);
  position: relative;
  transition: opacity .3s, transform .3s;
}
.rotator::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .02em;
  height: .14em;
  background: currentColor;
  opacity: .25;
  border-radius: 4px;
}
.rotator.is-out { opacity: 0; transform: translateY(-.3em) rotate(-3deg); }
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }

.hero__stage {
  position: relative;
  height: 520px;
}

/* ---------- Siders (personnages) ---------- */
.sider { position: absolute; transition: transform .25s ease-out; }
.sider img {
  position: relative;
  z-index: 1;
  animation: bob 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.sider .shadow {
  position: absolute;
  left: 15%; right: 15%; bottom: -14px;
  height: 22px;
  border-radius: 50%;
  background: rgba(23, 23, 22, .16);
  animation: shadow 3.2s ease-in-out infinite;
}
.sider--hero { width: min(330px, 70%); left: 18%; top: 80px; }
.sider--mini { width: 120px; }
.sider--mini img { animation-duration: 2.6s; }
.sider--purple { right: 0; top: 10px; }
.sider--purple img { animation-delay: -.8s; }
.sider--blue { left: 0; bottom: 30px; width: 135px; }
.sider--blue img { animation-delay: -1.6s; }
.sider--green { right: 2%; top: 215px; width: 105px; }
.sider--green img { animation-delay: -.4s; animation-duration: 2.9s; }
.sider--yellow { right: 14%; bottom: 0; width: 125px; }
.sider--yellow img { animation-delay: -2.1s; animation-duration: 3.4s; }

.orbit {
  position: absolute;
  z-index: 2;
  left: -8%;
  top: -9%;
  width: 116%;
  fill: none;
  stroke: #3a3a3a;
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
  animation: bob 3.2s ease-in-out infinite;
}
.orbit circle { fill: #3a3a3a; stroke: none; }

.bubble {
  position: absolute;
  z-index: 3;
  top: 30px;
  left: 0;
  padding: .7rem 1.1rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 20px;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  transform: rotate(-6deg);
  box-shadow: 4px 4px 0 var(--ink);
  animation: pop .6s var(--ease-bounce) .8s both;
}
.bubble::after {
  content: "";
  position: absolute;
  right: -14px; bottom: 14px;
  border: 10px solid transparent;
  border-left: 14px solid var(--ink);
}
.bubble--small { font-size: 1.3rem; top: -10px; left: auto; right: -30px; transform: rotate(6deg); }
.bubble--small::after { right: auto; left: 10px; bottom: -22px; border: 10px solid transparent; border-top: 14px solid var(--ink); }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  padding: 1rem 0;
  transform: rotate(-1.5deg);
  margin: 0 -20px;
  border-block: 3px solid var(--ink);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
  padding: 0 1.5rem;
  white-space: nowrap;
}
.marquee__track span::after { content: "✦"; margin-left: 3rem; color: var(--red); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark .hand { color: var(--yellow); }
.section__head { text-align: center; margin-bottom: 3.5rem; }

/* ---------- Cartes services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.card {
  --c: var(--red);
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 120px 1.8rem 2rem;
  margin-top: 70px;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease-bounce), box-shadow .3s;
}
.card--purple { --c: var(--purple); }
.card--blue { --c: var(--blue); }
.card:hover { transform: translate(-4px, -8px) rotate(-.5deg); box-shadow: 10px 14px 0 var(--c); }
.card__sider {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 170px;
  transform: translateX(-50%);
}
.card__sider img { transform-origin: 50% 100%; transition: transform .4s var(--ease-bounce); }
.card:hover .card__sider img { animation: wiggle .7s ease-in-out; transform: scale(1.06); }
.card__who { font-size: 1.4rem; color: var(--c); }
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.1rem;
  margin: .2rem 0 .3rem;
  overflow-wrap: anywhere;
}
.card__title span { color: var(--c); font-size: .72em; display: block; }
.card__tag { font-weight: 800; margin: 0 0 .6rem; }
.card__list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.card__list li { padding: .35rem 0 .35rem 1.8rem; position: relative; }
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .78rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--ink);
}

/* ---------- Calculateur ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.calc__sider { width: 150px; margin-top: 2rem; }
.calc__box {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--purple);
}
.field { display: block; margin: 0 0 1.4rem; border: 0; padding: 0; }
.field > span, .field legend { display: block; font-weight: 700; margin-bottom: .45rem; }
.field output {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--purple);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
  height: 6px;
  cursor: pointer;
}
.calc__result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.6rem 0;
}
.calc__result div {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}
.calc__result strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--red);
  line-height: 1.1;
}
.calc__result span { font-weight: 700; font-size: .95rem; }

/* ---------- Méthode ---------- */
.steps { position: relative; }
.steps__sider { position: absolute; width: 150px; right: 0; top: -150px; }
.steps__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}
.steps__list::before {
  content: "";
  position: absolute;
  top: 30px; left: 8%; right: 8%;
  border-top: 3px dashed var(--ink);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  transition: transform 1.4s ease;
}
.steps__list.is-visible { --progress: 1; }
.step { position: relative; text-align: center; padding: 0 .5rem; }
.step__num {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--ink);
  font-family: var(--font-display);
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
  transition: transform .3s var(--ease-bounce);
}
.step:hover .step__num { transform: scale(1.15) rotate(-8deg); background: var(--red); color: var(--white); }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- Les Siders ---------- */
.siders { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.siders__img {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  transform: rotate(-2deg);
  box-shadow: 10px 10px 0 var(--red);
  transition: transform .4s var(--ease-bounce);
}
.siders__img:hover { transform: rotate(0) scale(1.02); }
.siders__text p { color: #d8d8d8; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.5rem 0 0; }
.pills li {
  border: 2px solid var(--white);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-weight: 700;
  font-size: .92rem;
}
.pills li:nth-child(1) { border-color: var(--red); color: var(--red); }
.pills li:nth-child(2) { border-color: var(--yellow); color: var(--yellow); }
.pills li:nth-child(3) { border-color: var(--green); color: var(--green); }
.pills li:nth-child(4) { border-color: #a58bd0; color: #a58bd0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact__sider { position: relative; width: 170px; margin-top: 3rem; }
.form {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--green);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font: inherit;
  background: var(--paper);
  transition: box-shadow .2s, background .2s;
}
.form input:focus, .form textarea:focus {
  outline: none;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--red);
}
.form .is-invalid { border-color: var(--red-dark); background: #fff1ee; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block;
  padding: .45rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  transition: background .2s, color .2s, transform .2s var(--ease-bounce);
}
.choices input:checked + span { background: var(--ink); color: var(--white); transform: rotate(-3deg); }
.choices input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.form__error { min-height: 1.4em; color: var(--red-dark); font-weight: 700; margin: 0 0 .6rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #bdbdbd; padding: 2rem 0; border-top: 3px solid #2b2b2a; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { margin: 0; font-size: .92rem; }
.footer a:not(.logo) { font-size: .92rem; }

/* ---------- Animations ---------- */
.float { animation: bob 3.4s ease-in-out infinite; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s var(--ease-bounce); }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .steps__list .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3), .steps__list .reveal:nth-child(3) { transition-delay: .24s; }
.steps__list .reveal:nth-child(4) { transition-delay: .36s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(.78); opacity: .6; }
}
@keyframes wiggle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -7deg; }
  50% { rotate: 6deg; }
  75% { rotate: -3deg; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(.4) rotate(-20deg); }
}
@keyframes dash { to { stroke-dashoffset: -400; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .calc, .siders, .contact { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 110px; }
  .hero__stage { height: 420px; max-width: 460px; width: 100%; margin-inline: auto; }
  .cards { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; gap: 1rem; }
  .steps__list { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps__list::before { display: none; }
  .steps__sider { position: static; margin: -1rem auto 2rem; width: 120px; }
  .calc__sider { display: none; }
  .contact__sider { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .nav__burger { display: block; }
  .hero__title { font-size: clamp(2rem, 9.5vw, 3rem); }
  .hero__orbits { display: none; }
  .nav__menu {
    position: fixed;
    inset: 64px 16px auto 16px;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-20px) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease-bounce), opacity .2s;
  }
  .nav__menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .hero__stage { height: 360px; }
  .sider--mini { width: 90px; }
  .sider--blue { width: 100px; }
  .sider--green { width: 80px; top: 170px; right: 0; }
  .sider--yellow { width: 90px; right: 0; bottom: -20px; }
  .bubble { font-size: 1.3rem; }
  .steps__list { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .form, .calc__box { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
