/* ============================================================
   nos-solutions.css : Page Nos solutions : « la galerie »
   Chaque famille est une vitrine : un vrai aperçu de sa démo (la même
   mini-interface que sur la home : styles dans home-showcase.css), son numéro,
   sa phrase signature, ses repères de budget et de durée, et un accès direct
   à la démo complète. Mosaïque asymétrique sur grand écran (lignes 4+2, 2+4,
   2+2+2), simplifiée en tablette et en mobile.
   Sublime Gestion Site Vitrine
   ============================================================ */

/* === HERO (fond noir) === */

.solutions-hero {
  background: var(--noir);
  padding: 160px 0 88px;
  text-align: center;
}

.solutions-hero__eyebrow {
  display: block;
  margin-bottom: 24px;
}

.solutions-hero__h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 auto 24px;
  max-width: 760px;
}

.solutions-hero__h1 em {
  font-family: 'Instrument Sans', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--orange);
  letter-spacing: -0.025em;
}

.solutions-hero__subtitle {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.70);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Sommaire des 7 familles (ancres vers la galerie) */
.fam-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 920px;
  margin: var(--space-10) auto 0;
}

.fam-index a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease-spring);
}

.fam-index a span {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}

.fam-index a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--orange-rgb), 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

.fam-index a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* === REPÈRES COMMUNS À TOUS LES PROJETS === */

.solutions-reassure {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.solutions-reassure__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: var(--space-8) 0;
}

.solutions-reassure__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.solutions-reassure__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--orange-rgb), 0.10);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.solutions-reassure__icon svg {
  width: 17px;
  height: 17px;
}

.solutions-reassure__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.solutions-reassure__text strong {
  color: var(--ink);
  font-weight: 600;
}

.solutions-reassure__text a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 860px) {
  .solutions-reassure__list {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* === LA GALERIE === */

/* Fond un cran plus soutenu que la page (mélange de --border et --bg) : les cartes blanches
   s'en détachent nettement, chacune avec son filet et son ombre posée */
.fam-section {
  background: var(--bg);
  background: color-mix(in srgb, var(--border) 45%, var(--bg));
  padding: var(--space-20) 0 var(--space-16);
}

.fam-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "saas saas saas saas site site"
    "mob  mob  tool tool tool tool"
    "ia   ia   shop shop brand brand";
  gap: clamp(20px, 2.6vw, 34px);
}

.fam-card--saas  { grid-area: saas; }
.fam-card--site  { grid-area: site; }
.fam-card--mob   { grid-area: mob; }
.fam-card--tool  { grid-area: tool; }
.fam-card--ia    { grid-area: ia; }
.fam-card--shop  { grid-area: shop; }
.fam-card--brand { grid-area: brand; }

/* Carte : panneau d'aperçu + texte ; toute la carte mène à la démo */
.fam-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(var(--noir-rgb), 0.12);
  border-radius: 26px;
  box-shadow: 0 1px 2px rgba(var(--noir-rgb), 0.06), 0 18px 40px -26px rgba(var(--noir-rgb), 0.32);
  scroll-margin-top: 110px;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s ease, border-color 0.3s ease;
}

.fam-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--orange-rgb), 0.35);
  box-shadow: 0 34px 70px -34px rgba(var(--noir-rgb), 0.38);
}

.fam-card:focus-within { border-color: rgba(var(--orange-rgb), 0.5); }

/* Panneau d'aperçu : fond propre à chaque famille (crème, sable, orange ou nuit) */
.fam-preview {
  position: relative;
  flex-shrink: 0;
  height: 300px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(var(--noir-rgb), 0.06);
  isolation: isolate;
}

.fam-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(var(--noir-rgb), 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 0%, transparent 80%);
}

.fam-preview--sand { background: #EFE6D8; }
.fam-preview--orange { background: linear-gradient(150deg, #F08448 0%, var(--orange) 52%, var(--orange-hover) 100%); }
.fam-preview--dark { background: radial-gradient(circle at 28% 18%, #34303A 0%, var(--bg-dark) 62%); }
.fam-preview--orange::before,
.fam-preview--dark::before { background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px); }

/* L'aperçu est la vraie mini-interface, rendue à sa taille de conception puis réduite
   (--k calculé par nos-solutions.js). Figée dans un état parlant, non interactive (inert). */
.fam-preview__scale {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--pw);
  height: var(--ph);
  container: stage / inline-size;
  transform: translate(-50%, -50%) scale(var(--k, 0.55));
  transition: transform 0.6s var(--ease-spring);
}

.fam-card:hover .fam-preview__scale { transform: translate(-50%, -50%) scale(calc(var(--k, 0.55) * 1.035)); }

.fam-preview .sc {
  opacity: 1;
  visibility: visible;
  transform: none;
  background: var(--shell);
  border: 1px solid rgba(var(--noir-rgb), 0.08);
  box-shadow: 0 30px 60px -26px rgba(var(--noir-rgb), 0.45), 0 10px 24px -12px rgba(var(--noir-rgb), 0.2);
  transition: background-color 0.5s ease;
}

.fam-preview--dark .sc,
.fam-preview--orange .sc { border-color: rgba(255, 255, 255, 0.1); }

/* Texte de la carte */
.fam-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 16px 14px;
}

.fam-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }

.fam-card__num {
  margin-right: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}

.fam-card__num::after { content: ' / 07'; font-weight: 600; color: var(--muted-light); }

.fam-card__chip {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.fam-card__chip--accent { border-color: var(--orange); background: var(--orange); color: #FFFFFF; }

.fam-card__title {
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* Lien étiré : le titre porte le lien, toute la carte est cliquable */
.fam-card__link { color: inherit; text-decoration: none; }
.fam-card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 26px; }
.fam-card__link:focus-visible { outline: none; }
.fam-card__link:focus-visible::after { outline: 2px solid var(--orange); outline-offset: 3px; }

.fam-card__line {
  font-family: 'Instrument Sans', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--orange-hover);
}

.fam-card__desc { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* Ce qu'on manipule dans la démo, avec le nombre d'options (même pastille « Interactif »
   que la vitrine de la home et les 7 pages solutions) */
.fam-card__try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-2);
}

.fam-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.fam-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.2s ease, gap 0.3s var(--ease-spring);
}

.fam-card:hover .fam-card__cta { color: var(--orange); gap: 12px; }

.fam-card__talk {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fam-card__talk:hover { color: var(--orange); }

.fam-note {
  max-width: 720px;
  margin: var(--space-10) auto 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.fam-note a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }

/* === LES APERÇUS SE RÉVEILLENT AU SURVOL (des détails pour qui s'attarde) === */

@keyframes famDraw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.fam-card:hover .mini-chart__plot { animation: famDraw 1s cubic-bezier(0.65, 0, 0.35, 1); }

.fam-preview .mini-site__visual i { transition: transform 1.2s ease; }
.fam-card:hover .mini-site__visual i { transform: translate(-14%, 12%); }

.fam-card:hover .mini-push {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: transform 0.55s var(--ease-spring) 0.15s, opacity 0.3s ease 0.15s, visibility 0s linear 0s;
}

.fam-card:hover .mini-tool .mini-plan__slot:not([data-m="karim"]) { opacity: 0.16; filter: grayscale(1); }
.fam-card:hover .mini-chat__chips button:nth-child(3) { border-color: var(--orange); color: var(--orange); }
.fam-card:hover .mini-shop__cart i { animation: miniBump 0.45s var(--ease-bounce); }
.fam-card:hover .sc--brand { --brand: #1F2A44 !important; }

/* === RESPONSIVE === */

/* Grand écran : les deux cartes larges passent en format paysage (aperçu d'un côté, texte de l'autre) */
@media (min-width: 1100px) {
  .fam-card--saas,
  .fam-card--tool { flex-direction: row; align-items: stretch; }
  .fam-card--saas { flex-direction: row-reverse; }
  .fam-card--saas .fam-preview,
  .fam-card--tool .fam-preview { flex: 1.55; height: auto; min-height: 400px; }
  .fam-card--saas .fam-card__body,
  .fam-card--tool .fam-card__body { flex: 1; justify-content: center; padding: 26px 24px 20px; }
  /* texte centré verticalement : les actions suivent le texte au lieu d'être repoussées en bas */
  .fam-card--saas .fam-card__actions,
  .fam-card--tool .fam-card__actions { margin-top: 14px; }
  .fam-card--mob .fam-preview,
  .fam-card--site .fam-preview { height: 320px; }
}

@media (max-width: 1099px) {
  .fam-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "saas saas"
      "site mob"
      "tool tool"
      "ia shop"
      "brand brand";
  }
  .fam-card--saas .fam-preview,
  .fam-card--tool .fam-preview { height: 340px; }
}

@media (max-width: 680px) {
  .fam-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "saas" "site" "mob" "tool" "ia" "shop" "brand";
    gap: var(--space-5);
  }
  .fam-preview,
  .fam-card--saas .fam-preview,
  .fam-card--tool .fam-preview { height: 260px; }
  .fam-index a { padding: 7px 12px 7px 10px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .fam-card,
  .fam-preview__scale { transition: none; }
  .fam-card:hover { transform: none; }
  .fam-card:hover .mini-chart__plot,
  .fam-card:hover .mini-shop__cart i { animation: none; }
}

/* === CTA FINALE (fond noir) === */

.solutions-final-cta {
  background: var(--noir);
  padding: var(--space-20) 0;
  text-align: center;
}

.solutions-final-cta__title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 auto 16px;
  max-width: 640px;
}

.solutions-final-cta__sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.60);
  max-width: 480px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}
