/* ================================================================
   Natation PACA – Simplybook Blocks
   ================================================================ */

:root {
  --npsb-accent:       #a08c35;
  --npsb-accent-hover: #8a7829;
  --npsb-text:         #1a1a1a;
  --npsb-text-muted:   #555;
  --npsb-border:       #e5e5e5;
  --npsb-shadow:       0 2px 12px rgba(0, 0, 0, 0.08);
  --npsb-radius:       8px;
  --npsb-img-ratio:    56.25%; /* 16:9 */
}

/* ----------------------------------------------------------------
   Grille
   ---------------------------------------------------------------- */

.npsb-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(1, 1fr);
  margin: 24px 0;
}

.npsb-grid--2col { grid-template-columns: repeat(2, 1fr); }
.npsb-grid--3col { grid-template-columns: repeat(3, 1fr); }
.npsb-grid--4col { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .npsb-grid--4col { grid-template-columns: repeat(2, 1fr); }
  .npsb-grid--3col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .npsb-grid--2col,
  .npsb-grid--3col,
  .npsb-grid--4col {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------
   Carte
   ---------------------------------------------------------------- */

.npsb-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--npsb-border);
  border-radius: var(--npsb-radius);
  box-shadow: var(--npsb-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.npsb-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

/* --- Image --- */

.npsb-card__image {
  position: relative;
  width: 100%;
  padding-top: var(--npsb-img-ratio);
  overflow: hidden;
  background: #f0f0f0;
}

.npsb-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.npsb-card__image--placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ddd 25%, #eee 50%, #ddd 75%);
}

/* --- Corps --- */

.npsb-card__body {
  flex: 1;
  padding: 16px 18px 8px;
}

.npsb-card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--npsb-text);
}

.npsb-card__price {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--npsb-accent);
}

/* --- Description tronquée --- */

.npsb-card__description {
  font-size: 0.875rem;
  color: var(--npsb-text-muted);
  line-height: 1.5;
}

.npsb-card__description-inner {
  /* 3 lignes max par défaut */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.npsb-card__description-inner.is-expanded {
  display: block;
  overflow: visible;
}

.npsb-card__description-inner p {
  margin: 0 0 4px;
}

.npsb-toggle-desc {
  display: inline;
  margin: 4px 0 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--npsb-accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.npsb-toggle-desc:hover {
  color: var(--npsb-accent-hover);
  text-decoration: underline;
}

/* --- Pied de carte --- */

.npsb-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--npsb-border);
  margin-top: 8px;
}

.npsb-card__footer--center {
  justify-content: center;
}

/* --- Stepper --- */

.npsb-card__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.npsb-card__qty-icon {
  color: var(--npsb-text-muted);
  display: flex;
  align-items: center;
}

.npsb-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--npsb-border);
  border-radius: 4px;
  overflow: hidden;
}

.npsb-stepper__btn {
  width: 28px;
  height: 32px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--npsb-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.npsb-stepper__btn:hover {
  background: #e8e8e8;
  color: var(--npsb-text);
}

.npsb-stepper__input {
  width: 36px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--npsb-border);
  border-right: 1px solid var(--npsb-border);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--npsb-text);
  -moz-appearance: textfield;
  appearance: textfield;
}

.npsb-stepper__input::-webkit-outer-spin-button,
.npsb-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.npsb-stepper__input:focus {
  outline: none;
  background: #fafafa;
}

/* --- Bouton Sélectionner --- */

.npsb-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  background: var(--npsb-accent);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.npsb-card__btn:hover,
.npsb-card__btn:focus {
  background: var(--npsb-accent-hover);
  color: #fff !important;
}

/* ----------------------------------------------------------------
   Message vide
   ---------------------------------------------------------------- */

.npsb-empty {
  padding: 20px;
  background: #f9f9f9;
  border: 1px solid var(--npsb-border);
  border-radius: var(--npsb-radius);
  color: var(--npsb-text-muted);
  text-align: center;
}
