/* ==========================================================================
   Page d'accueil – styles spécifiques (chargé après css/style.css)
   ========================================================================== */

/* ---------- Décors de la page ---------- */
.deco--hero { top: var(--navbar-h); height: 1261px; }
main > .deco--hero { top: 0; height: var(--hero-deco-h, 1261px); }

.deco__ellipse--hero { left: -169.51px; top: -293.71px; width: 2095.022px; height: 1911.427px; }
.deco__ellipse--hero > div { width: 1726px; height: 1196px; transform: rotate(-30.82deg); }
.deco__ellipse--hero img { inset: -16.72% -11.59%; width: 123.18%; height: 133.44%; }

.deco__polygon--hero { left: 269px; top: -292px; width: 1635.02px; height: 1635.02px; }
.deco__polygon--hero > div { width: 1206px; height: 1206px; transform: rotate(28.47deg); opacity: .35; }
.deco__polygon--hero img { left: -5.74%; top: -12.44%; width: 111.48%; height: 111.48%; }

/* Desktop : le fond (décors + shader) démarre sous le header, qui est en verre */
@media (min-width: 768px) {
  body[data-page="home"] main { margin-top: calc(-1 * var(--navbar-h)); }
  body[data-page="home"] .hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(60px + var(--navbar-h));
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  /* Remplit l'écran moins la navbar sticky */
  min-height: calc(100vh - var(--navbar-h));
  min-height: calc(100svh - var(--navbar-h));
  padding: 60px var(--gutter);
  background-color: #f7f7f7;
  background-image: linear-gradient(166.6deg, rgba(255, 255, 255, .8) 14.856%, rgba(255, 255, 255, 0) 58.068%);
  backdrop-filter: blur(3.65px);
}
/* Fond WebGL (js/hero-bg.js) : sous le contenu, au-dessus du fond CSS de repli */
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.hero--gl { backdrop-filter: none; }
.hero__text { display: flex; flex-direction: column; gap: 32px; width: 100%; max-width: 900px; }
.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 64px;
  line-height: normal;
}
.hero__title em { font-weight: 900; }
.hero__desc { font-size: 22px; line-height: 1.6; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 24px; }
.hero__scroll {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-top: 80px;
  border-radius: 50%;
  color: inherit;
  transition: opacity .2s;
}
.hero__scroll img { transform: rotate(90deg); }
.hero__scroll:hover { opacity: .6; }
.hero__scroll:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Positionnement ---------- */
.pillars {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 100px var(--gutter);
}
.pillars__row { display: flex; gap: 32px; align-items: flex-start; }
.pillar {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  background: var(--surface);
  border-radius: 24px;
  backdrop-filter: blur(8.35px);
}
.pillar__title { font-family: var(--font-serif); font-weight: 700; font-size: 28px; line-height: normal; }

/* ---------- Processus ---------- */
.process {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 100px var(--gutter);
  background: var(--bg);
}
.deco--process { top: 0; height: 1141px; z-index: 0; background: rgba(213, 213, 255, 0); }
.deco__ellipse--process { left: 15px; top: 64px; width: 1726px; height: 1196px; display: block; }
.deco__ellipse--process img { inset: -16.72% -11.59%; width: 123.18%; height: 133.44%; left: -11.59%; top: -16.72%; }
.deco__polygon--process { left: 456.9px; top: -104.1px; width: 1259.212px; height: 1259.212px; }
.deco__polygon--process > div { width: 1206px; height: 1206px; transform: rotate(87.41deg); opacity: .35; }
.deco__polygon--process img { left: -5.74%; top: -12.44%; width: 111.48%; height: 111.48%; }

.process__head,
.process__row { position: relative; z-index: 1; }
.process__head { display: flex; flex-direction: column; gap: 16px; }
.process__sub { font-size: 18px; line-height: 1.5; }

.process__row { display: flex; gap: 24px; align-items: stretch; }
.step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 16px;
}
.step__head { display: flex; flex-direction: column; gap: 12px; line-height: normal; }
.step__num { font-family: var(--font-serif); font-weight: 900; font-style: italic; font-size: 48px; color: var(--surface-inverse); }
.step__name { font-size: 24px; }
.step p { font-size: 14px; line-height: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .process__row { flex-wrap: wrap; }
  .step { flex: 1 1 calc(33.333% - 24px); }
  .hero__title { font-size: 52px; }
}

@media (max-width: 960px) {
  .pillars__row { flex-direction: column; }
}

/* Mobile (frame Figma 393 px) – n'affecte pas le rendu ≥ 768px */
@media (max-width: 767px) {
  /* Hero */
  .hero {
    gap: 32px;
    padding: 32px var(--gutter);
    background-image: linear-gradient(142.84deg, rgba(255, 255, 255, .8) 14.856%, rgba(255, 255, 255, 0) 58.068%);
  }
  .hero__text { gap: 20px; }
  .hero__title { font-size: 36px; }
  .hero__desc { font-size: 16px; }
  .hero__buttons { flex-direction: column; gap: 20px; }
  .hero__buttons .btn { width: 100%; justify-content: center; }

  /* Positionnement */
  .pillars { gap: 32px; padding: 48px var(--gutter); }
  .pillars__row { flex-direction: column; align-items: stretch; gap: 20px; }
  .pillar { align-self: stretch; gap: 12px; padding: 24px; }

  /* Cadre de travail */
  .process { gap: 32px; padding: 48px var(--gutter); }
  .process__row { flex-direction: column; flex-wrap: nowrap; gap: 24px; }
  .step { flex: none; width: 100%; }

  /* Décors : hero + positionnement (le hero est opaque, le calque démarre sous lui) */
  main > .deco--hero { top: var(--hero-h, 0px); height: 967px; }
  .deco__ellipse--hero { left: -149.3px; top: -397.27px; width: 2076.175px; height: 2054.415px; }
  .deco__ellipse--hero > div { transform: rotate(-43.34deg); }
  .deco__polygon--hero { left: -435.62px; top: -299.92px; width: 1598.188px; height: 1598.188px; }
  .deco__polygon--hero > div { transform: rotate(-65.44deg); }
  .deco__polygon--hero img { height: 99.88%; }

  /* Décors : cadre de travail */
  .deco--process { height: 1802px; }
  .deco__ellipse--process { left: 0; top: 64px; width: 1741px; height: 1223px; }
  .deco__ellipse--process img.u-mobile { left: -11.49%; top: -16.35%; width: 122.98%; height: 132.7%; }
  .deco__polygon--process { left: -466.48px; top: 324.07px; width: 1664.894px; height: 2197.927px; }
  .deco__polygon--process > div { width: 1425.216px; height: 2038.23px; transform: rotate(-7.06deg); }
  .deco__polygon--process img.u-mobile { left: -3.83%; top: -7.36%; width: 107.66%; height: 89.72%; }
}
