/* =============================================
   IA - Compléments à digital.css (même DA, page claire)
   ============================================= */

/* Deuxième ligne du titre : même style que le mot qui tourne de la page Digitalisation */
.hero-title .hl {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--bord);
  white-space: nowrap;
}
.count { font-variant-numeric: tabular-nums; }

.fc-ico--b { font-size: 15px; }
.fc-live { display: inline-block; min-width: 150px; }

/* ── Agents : grille 3 x 2 ── */
.bento--6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 250px 250px;
}

/* ── Frise 6 étapes : titres seuls, détail au survol ── */
.frise--6 { grid-template-columns: repeat(6, 1fr); gap: 12px; }
.frise--6 li {
  cursor: default;
  outline: none;
  padding-bottom: 6px;
}
.frise--6 b { font-size: clamp(16px, 1.45vw, 21px); transition: color .3s; }
.frise--6 li:hover b,
.frise--6 li:focus-visible b,
.frise--6 li.is-open b { color: var(--bord); }
.frise--6 li:hover .fr-dot,
.frise--6 li:focus-visible .fr-dot,
.frise--6 li.is-open .fr-dot { transform: scale(1.1); }
.frise--6 .fr-dot { transition: background .4s, color .4s, border-color .4s, transform .4s cubic-bezier(.34, 1.45, .5, 1); }

.fr-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: 260px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -18px rgba(26, 26, 46, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transform-origin: top left;
  transition: opacity .25s var(--ease), transform .4s cubic-bezier(.34, 1.45, .5, 1), visibility 0s .25s;
  pointer-events: none;
}
.frise--6 li:nth-child(n+5) .fr-pop { left: auto; right: 0; transform-origin: top right; }
.frise--6 li:hover .fr-pop,
.frise--6 li:focus-visible .fr-pop,
.frise--6 li.is-open .fr-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s var(--ease), transform .4s cubic-bezier(.34, 1.45, .5, 1), visibility 0s;
}
.fr-time {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.fr-pop p { font-size: 15px; line-height: 1.45; color: var(--ink); }
.fr-out {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bord);
  background: rgba(139, 21, 56, .08);
}
.fr-out::before { content: 'Livrable · '; font-weight: 600; opacity: .7; }

/* Espace pour que la bulle ne recouvre pas la carte contact */
.method .frise-wrap { margin-bottom: 70px; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .bento--6 { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 220px; }
  .frise--6 { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .frise--6 li:nth-child(n+5) .fr-pop { left: 0; right: auto; transform-origin: top left; }
  .frise--6 li:nth-child(3n) .fr-pop { left: auto; right: 0; transform-origin: top right; }
  .method .frise-wrap .frise-line { display: none; }
}

@media (max-width: 640px) {
  .hero-title .hl { white-space: normal; }
  .bento--6 { grid-template-columns: 1fr; grid-auto-rows: 190px; }
  .frise--6 { grid-template-columns: 1fr; row-gap: 14px; }
  .method .frise-wrap { margin-bottom: 36px; }
  .method .frise-wrap .frise-line { display: block; }
  .frise--6 li { cursor: pointer; }
  /* Sur mobile : le détail s'ouvre en accordéon au tap */
  .fr-pop,
  .frise--6 li:nth-child(n) .fr-pop {
    position: static;
    width: calc(100% - 62px);
    margin: 0 0 0 62px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: max-height .4s var(--ease), opacity .3s, visibility 0s .3s;
  }
  .frise--6 li.is-open .fr-pop {
    max-height: 220px;
    margin-top: 4px;
    transition: max-height .4s var(--ease), opacity .3s, visibility 0s;
  }
  .frise--6 li:hover:not(.is-open) .fr-pop { opacity: 0; visibility: hidden; max-height: 0; }
}
