/* home — porté depuis Astro */
/* Hero */
  .hero {
    position: relative;
    margin-top: calc(var(--header-h) * -1);
    padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4.5rem));
    padding-bottom: clamp(2rem, 4vw, 3rem);
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    width: 820px;
    height: 820px;
    right: -240px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 155, 227, 0.18), transparent 62%);
    pointer-events: none;
  }

  .backdrop {
    position: absolute;
    inset: 0;
  }

  .hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
  }

  .hero-copy {
    display: grid;
    gap: 1.5rem;
    justify-items: start;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 1.6rem + 5.4vw, 6.2rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
  }

  .lead {
    max-width: 44ch;
    font-size: var(--step-1);
    line-height: 1.5;
    color: var(--ink-2);
  }

  .ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.25rem, 4vw, 2.75rem);
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
  }

  .stats div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
  }

  .stats dt {
    font-size: 0.85rem;
    color: var(--muted);
  }

  .stats dd {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .hero-visual {
    position: relative;
    width: min(100%, 460px);
    justify-self: center;
    padding: 1.5rem;
  }

  .chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .chip svg {
    color: var(--sky);
  }

  .chip-a {
    top: 8%;
    left: -12%;
  }

  .chip-b {
    top: 48%;
    right: -4%;
  }

  .chip-c {
    bottom: 6%;
    left: 2%;
  }

  /* Services */
  .services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .services > li {
    display: flex;
  }

  .service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition:
      transform 0.4s var(--ease),
      box-shadow 0.4s var(--ease),
      border-color 0.3s ease;
  }

  @media (hover: hover) {
    .service:hover {
      transform: translateY(-6px);
      box-shadow:
        0 0 0 4px rgba(88, 166, 255, 0.07),
        var(--shadow-lg);
      border-color: rgba(88, 166, 255, 0.5);
    }
  }

  .service:active {
    border-color: rgba(88, 166, 255, 0.5);
    background: var(--surface-2);
  }

  .service-num {
    position: absolute;
    top: 1.6rem;
    right: 1.8rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--line-strong);
  }

  .service h3 {
    margin-top: 0.75rem;
    font-size: var(--step-2);
  }

  .service > p {
    color: var(--ink-2);
  }

  .service .check-list {
    flex: 1;
    align-content: start;
    margin-top: 0.25rem;
  }

  .service-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
  }

  .from {
    font-weight: 650;
  }

  .go {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--paper);
    transition:
      background-color 0.3s ease,
      color 0.3s ease,
      transform 0.4s var(--ease);
  }

  .service:hover .go {
    background: var(--accent-solid);
    color: #fff;
    transform: rotate(45deg);
  }

  /* Engagements */
  .promises-wrap {
    padding-block: clamp(3rem, 6vw, 4.5rem);
  }

  .promises {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }

  .promises li {
    display: grid;
    gap: 0.6rem;
    align-content: start;
  }

  .promises h3 {
    margin-top: 0.4rem;
    font-size: var(--step-1);
  }

  .promises p {
    color: var(--ink-2);
    font-size: 0.95rem;
  }

  /* À propos */
  .about {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(2.5rem, 7vw, 6rem);
    align-items: center;
  }

  .about-copy {
    display: grid;
    gap: 1.25rem;
    justify-items: start;
  }

  .about-copy h2 {
    font-size: var(--step-3);
    margin-bottom: 0.5rem;
  }

  .about-copy p {
    color: var(--ink-2);
    font-size: 1.06rem;
    max-width: 58ch;
  }

  .showcase {
    display: grid;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
      transform 0.4s var(--ease),
      box-shadow 0.4s var(--ease);
  }

  @media (hover: hover) {
    .showcase:hover {
      transform: translateY(-6px) rotate(-0.5deg);
      box-shadow: var(--shadow-lg);
    }
  }

  .showcase-media {
    display: grid;
    place-items: center;
    padding: 1.5rem 2rem 0;
    background:
      radial-gradient(circle at 50% 60%, rgba(31, 111, 235, 0.3), transparent 60%),
      var(--surface-2);
  }

  /* Hauteur fixe : la mise en page ne bouge pas quand l'image finit de charger */
  .showcase-media img {
    width: 190px;
    height: 300px;
    object-fit: cover;
    object-position: 50% 88%;
    transition: transform 0.6s var(--ease);
  }

  .showcase:hover .showcase-media img {
    transform: scale(1.04);
  }

  .showcase-caption {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
    padding: 1.5rem;
    border-top: 1px solid var(--line);
  }

  .showcase-caption strong {
    text-wrap: balance;
    font-family: var(--font-display);
    font-size: 1.2rem;
  }

  @media (max-width: 1080px) {
    .chip-a {
      left: -4%;
    }

  }

  @media (max-width: 960px) {
    .hero-inner,
    .about {
      grid-template-columns: 1fr;
    }

    .hero-visual {
      width: min(80%, 380px);
      order: -1;
    }

    .services {
      grid-template-columns: 1fr;
      max-width: 620px;
    }

    .promises {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase {
      max-width: 460px;
    }
  }

  @media (max-width: 560px) {
    /* Texte d'abord, puis le ventilateur avec les bulles alignées dessous */
    .hero-visual {
      order: 0;
      width: 100%;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem;
    }

    .hero-visual > .fan {
      width: 68%;
      margin-bottom: 1rem;
    }

    .chip {
      position: static;
      font-size: 0.8125rem;
      padding: 0.45rem 0.8rem;
    }

    .ctas {
      display: grid;
      width: 100%;
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.75rem;
      width: 100%;
    }

    .stats dd {
      font-size: 1.35rem;
    }

    .stats dt {
      font-size: 0.8125rem;
      line-height: 1.3;
    }

    .service {
      padding: 1.5rem;
    }

    .promises {
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }

    .promises li {
      grid-template-columns: auto 1fr;
      column-gap: 1rem;
      row-gap: 0.15rem;
    }

    .promises .icon-tile {
      grid-row: span 2;
    }

    .promises h3 {
      margin-top: 0;
    }
  }

  /* Téléphone (≤ 600 px) : le ventilateur passe en fond derrière le titre, les puces rejoignent le texte
     sous les boutons (1 à 2 lignes fixes) et les trois prix restent dans le premier écran.
     .hero-copy et .hero-visual s'effacent (display: contents) : leurs enfants partagent une seule colonne. */
  @media (max-width: 600px) {
    .hero-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      column-gap: 0.4rem;
      row-gap: 0;
      isolation: isolate;
    }

    .hero-copy,
    .hero-visual {
      display: contents;
    }

    .hero-copy > * {
      flex: 0 0 100%;
      margin-top: 1.25rem;
    }

    .hero-copy > .pill {
      flex: none;
      margin-top: 0;
    }

    .hero-copy > .lead { order: 3; }
    .hero-copy > .ctas { order: 4; }
    .hero-copy > .stats { order: 6; }

    .hero-visual > .fan {
      position: absolute;
      z-index: -1;
      top: 1.5rem;
      right: -88px;
      width: 290px;
      margin: 0;
      opacity: 0.26;
      pointer-events: none;
      transition: opacity 0.9s var(--ease-out);
    }

    /* Anneau fixe en fond (pas de rotation permanente) ; il s'allume en dernier */
    .hero-visual > .fan .ring {
      animation: none;
      transition-delay: 0.7s;
    }

    .hero-visual > .fan::before {
      transition-delay: 0.7s;
    }

    .chip {
      order: 5;
      position: static;
      margin-top: 0.45rem;
      gap: 0.35rem;
      padding: 0.38rem 0.7rem;
      font-size: 0.75rem;
      box-shadow: none;
    }

    .chip-a {
      margin-top: 1.1rem;
    }

    .chip-b {
      margin-top: 1.1rem;
    }

    .chip svg {
      width: 15px;
      height: 15px;
    }

    .stats {
      margin-top: 1.1rem;
      padding-top: 1.1rem;
    }
  }

  @media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
    .js .hero-visual > .fan:not(.is-shown) {
      opacity: 0;
    }
  }

  /* Écrans de bureau peu hauts (1280×720, 1366×768) : le hero tient dans l'écran */
  @media (min-width: 961px) and (max-height: 860px) {
    .hero {
      padding-top: calc(var(--header-h) + clamp(1rem, 4vh, 2.5rem));
    }

    .hero h1 {
      font-size: clamp(2.9rem, 0.6rem + 9.5vh, 5.4rem);
    }

    .hero-copy {
      gap: 1.15rem;
    }

    .stats {
      margin-top: 0.25rem;
      padding-top: 1.1rem;
    }
  }
