/* ==========================================================================
   LAYOUT — BENTO GRID
   Système de grille modulaire Bento · Responsive · Dense auto-flow
   ========================================================================== */

/* ---- Grille principale ---- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--bento-col-min), 1fr));
  grid-auto-rows: minmax(var(--bento-row-min), auto);
  grid-auto-flow: dense;
  gap: var(--bento-gap);
}

/* ---- Grille desktop 4 colonnes ---- */
@media (min-width: 992px) {
  .bento-grid {
    grid-template-columns: repeat(var(--bento-columns, 4), 1fr);
  }
}

/* ---- Modificateurs de tuiles (span) ---- */
/* Colonnes */
.bento-item--col-2 { grid-column: span 2; }
.bento-item--col-3 { grid-column: span 3; }
.bento-item--col-4 { grid-column: span 4; }

/* Lignes */
.bento-item--row-2 { grid-row: span 2; }
.bento-item--row-3 { grid-row: span 3; }

/* Combinaisons prédéfinies */
.bento-item--hero     { grid-column: span 2; grid-row: span 2; }
.bento-item--wide     { grid-column: span 3; }
.bento-item--tall     { grid-row: span 2; }
.bento-item--featured { grid-column: span 2; grid-row: span 2; }

/* ---- Tuile Bento de base — Contour verre épuré et net ---- */
.bento-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--color-bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px -2px hsla(330, 41%, 25%, 0.04);
  overflow: hidden;
  transition: transform var(--transition-smooth),
              box-shadow var(--transition-smooth),
              border-color var(--transition-smooth);
}

[data-theme="dark"] .bento-item {
  background: var(--color-bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px -2px hsla(335, 30%, 5%, 0.4);
}

/* Hover card — soulèvement doux et éclaircissement subtil de la bordure unique */
.bento-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px hsla(17, 72%, 56%, 0.12),
              0 4px 10px -2px hsla(330, 41%, 25%, 0.04);
  border-color: hsla(17, 72%, 56%, 0.35);
}

[data-theme="dark"] .bento-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px hsla(335, 30%, 5%, 0.5),
              0 0 20px -2px hsla(17, 72%, 66%, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ---- Variantes esthétiques harmonisées ---- */

/* Hero Card — Praticienne */
.bento-item--hero {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(145deg, rgba(255, 247, 242, 0.95), rgba(253, 236, 227, 0.85));
  border: 1px solid hsla(17, 72%, 56%, 0.18);
}

[data-theme="dark"] .bento-item--hero {
  background: linear-gradient(145deg, hsl(335, 30%, 15%), hsl(335, 30%, 12%));
  border: 1px solid hsla(17, 72%, 66%, 0.22);
}

/* Section Profil Praticienne */
.bento-practitioner {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-3);
}

.bento-practitioner__avatar {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-bg-surface-elevated);
  box-shadow: 0 4px 14px hsla(17, 72%, 56%, 0.22);
  flex-shrink: 0;
}

/* Glassmorphism card */
.bento-item--glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--color-border);
}

/* CTA Card — Prise de RDV */
.bento-item--cta,
[data-theme="dark"] .bento-item--cta {
  background: var(--gradient-hero);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 30px -6px hsla(17, 72%, 56%, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.bento-item--cta:hover,
[data-theme="dark"] .bento-item--cta:hover {
  box-shadow: 0 16px 36px -4px hsla(17, 72%, 56%, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.bento-item--cta .bento-item__title {
  color: #ffffff;
}

.bento-item--cta .bento-item__kicker {
  color: hsla(0, 0%, 100%, 0.85);
}

.bento-item--cta .bento-item__text {
  color: hsla(0, 0%, 100%, 0.92);
}

/* ---- Contenu interne des tuiles ---- */
.bento-item__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: hsla(17, 72%, 56%, 0.1);
  display: grid;
  place-items: center;
  color: var(--color-accent-primary);
  flex-shrink: 0;
}

.bento-item__kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin-bottom: var(--space-1);
}

.bento-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.bento-item__text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  flex-grow: 1;
}

/* Bento title variants */
.bento-item__title--bottom {
  margin-top: auto;
}

.bento-item__title--tight {
  margin-bottom: 0.35rem;
}

.bento-item__text--spaced {
  margin-top: var(--space-2);
}

/* ---- Responsive fallback ---- */
@media (max-width: 768px) {
  .bento-item--col-2,
  .bento-item--col-3,
  .bento-item--col-4,
  .bento-item--hero,
  .bento-item--wide,
  .bento-item--featured {
    grid-column: span 1;
  }

  .bento-item--row-2,
  .bento-item--row-3,
  .bento-item--hero,
  .bento-item--tall,
  .bento-item--featured {
    grid-row: span 1;
  }
}

/* Tablet : max 2 colonnes */
@media (min-width: 769px) and (max-width: 991px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-item--col-3,
  .bento-item--col-4,
  .bento-item--wide {
    grid-column: span 2;
  }
}

/* ---- Note déontologique médicale ---- */
.bento-disclaimer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  max-width: 680px;
  margin-inline: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.bento-disclaimer svg {
  flex-shrink: 0;
  color: var(--color-accent-primary);
}

[data-theme="dark"] .bento-disclaimer {
  background: var(--color-bg-surface);
  border-color: rgba(255, 255, 255, 0.08);
}

.bento-disclaimer__link {
  color: var(--color-accent-primary);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 0.35rem;
  transition: color var(--transition-fast);
}

.bento-disclaimer__link:hover {
  color: var(--color-accent-primary-hover);
}

[data-theme="dark"] .bento-disclaimer__link {
  color: hsl(24, 85%, 76%);
}


