/* =============================================================
   Solmateria — LA GAMME
   The palette is now clearly warm. Four families revealed in a
   stagger cascade. Hover lifts the card + lights an orange edge +
   animates the icon. Touch gets a clean :active state instead.
   ============================================================= */

.gamme {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-pad) 0;
  background:
    /* warm glow pulled inside so it fades before the bottom edge (no seam band) */
    radial-gradient(100% 70% at 86% 60%, rgba(246, 140, 56, 0.13) 0%, transparent 50%),
    linear-gradient(180deg, #324a62 0%, #3a3f54 52%, #43404e 100%);
}

.gamme__head { max-width: 46rem; margin-bottom: var(--space-16); }
.gamme__title { font-size: var(--text-3xl); margin-top: var(--space-4); }
.gamme__subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* ---- Grid -------------------------------------------------- */
.gamme-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr; /* mobile: single column */
  list-style: none;
  padding: 0;
  margin: 0;
}
.gamme-item { height: 100%; } /* carries the reveal; card carries the hover */

.gamme-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* clips the image to the card's rounded corners + contains scale */
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  transition: transform 0.35s var(--ease-out),
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              background 0.35s ease;
}

/* ---- Image-card media (top) -------------------------------- */
/* aspect-ratio reserves the box before load (no CLS); object-fit fills it. */
.gamme-card__media {
  position: relative;
  aspect-ratio: 5 / 3; /* flatter than the source 4:3 -> media height = 60% of width */
  overflow: hidden;
  background: var(--color-surface); /* deep slate while the JPG decodes */
}
.gamme-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-out);
}
/* Façades: the flatter 5/3 frame crops ~10% top/bottom at center, which would
   clip the building's roofline (~7% down). Bias the crop upward so the top of
   the façade survives; the sacrificed strip is dispensable foreground plaza. */
.gamme-card__img--top { object-position: center 20%; }
/* Charte veil: transparent -> slate, bottom-weighted. Fuses the photo into the
   card body and keeps the cold brand temperature over warmer imagery. */
.gamme-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(31, 46, 62, 0) 0%,     /* --brand-slate, transparent at top   */
    rgba(31, 46, 62, 0.14) 52%,
    rgba(31, 46, 62, 0.68) 100% /* deep slate at bottom -> melts into body */
  );
}

/* ---- Body (text below) ------------------------------------- */
.gamme-card__body {
  display: flex;
  flex-direction: column;
  flex: 1; /* fills remaining height so bodies align across the row */
  padding: var(--space-8) var(--space-6) var(--space-6);
}

.gamme-card__icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  border-radius: var(--radius);
  background: rgba(125, 160, 196, 0.12);
  color: #C4D6E8;
  transition: background 0.35s ease, color 0.35s ease;
}
.gamme-card__icon svg { width: 28px; height: 28px; }
.gamme-card__title { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.gamme-card__desc { margin: 0; color: var(--color-text-muted); font-size: var(--text-base); }

/* animatable icon sub-parts */
.gi-accent {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.45s var(--ease-out);
}
.gi-accent--beam { transform-origin: top; }
.gi-accent--sprout { transform-origin: bottom; }

/* ---- Hover (fine pointer only) ----------------------------- */
@media (hover: hover) and (pointer: fine) {
  .gamme-card:hover {
    transform: translateY(-6px);
    border-color: rgba(246, 140, 56, 0.6);
    box-shadow: 0 26px 60px -28px rgba(246, 140, 56, 0.45),
                inset 0 0 0 1px rgba(246, 140, 56, 0.22);
    background: linear-gradient(180deg, rgba(246, 140, 56, 0.07), rgba(255, 255, 255, 0.015));
  }
  .gamme-card:hover .gamme-card__icon {
    background: var(--gradient-warm);
    color: #fff;
  }
  .gamme-card:hover .gamme-card__img { transform: scale(1.06); }
  .gamme-card:hover .gi-accent--rays   { transform: scale(1.2) rotate(10deg); }
  .gamme-card:hover .gi-accent--cells  { transform: scale(1.1); }
  .gamme-card:hover .gi-accent--beam   { transform: scaleY(1.28); }
  .gamme-card:hover .gi-accent--sprout { transform: scale(1.22) rotate(-7deg); }
}

/* ---- Touch: clean tactile active state --------------------- */
@media (hover: none) {
  .gamme-card { border-color: rgba(246, 140, 56, 0.16); } /* gentle persistent intent */
  .gamme-card:active {
    transform: scale(0.985);
    border-color: rgba(246, 140, 56, 0.6);
    background: linear-gradient(180deg, rgba(246, 140, 56, 0.09), rgba(255, 255, 255, 0.015));
  }
  .gamme-card:active .gamme-card__icon { background: var(--gradient-warm); color: #fff; }
  .gamme-card:active .gamme-card__img { transform: scale(1.04); }
  .gamme-card:active .gi-accent--rays   { transform: scale(1.2) rotate(10deg); }
  .gamme-card:active .gi-accent--cells  { transform: scale(1.1); }
  .gamme-card:active .gi-accent--beam   { transform: scaleY(1.28); }
  .gamme-card:active .gi-accent--sprout { transform: scale(1.22) rotate(-7deg); }
}

/* ---- Reduced motion: freeze the image zoom (hover + touch) - */
@media (prefers-reduced-motion: reduce) {
  .gamme-card__img { transition: none; }
  .gamme-card:hover .gamme-card__img,
  .gamme-card:active .gamme-card__img { transform: none; }
}

/* ---- Desktop grid ------------------------------------------ */
@media (min-width: 620px) {
  .gamme-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
