/* ============================================================
   07 — COMPONENTS (V13)
   Composants réutilisables : boutons, cards, tags, formulaires
   ============================================================ */

/* === BOUTONS === */
.ms-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--r-card);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base) var(--ease-out);
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
}

.ms-btn--primary {
  background: var(--tomato);
  color: var(--parchment);
}
.ms-btn--primary:hover,
.ms-btn--primary:focus-visible {
  background: var(--tomato-deep);
  color: var(--parchment);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ms-btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.ms-btn--secondary {
  background: var(--parchment);
  color: var(--ink);
}

.ms-btn--soft {
  background: var(--parchment);
  color: var(--ink);
  border-color: var(--sage);
}
.ms-btn--soft:hover,
.ms-btn--soft:focus-visible {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ms-btn--secondary:hover,
.ms-btn--secondary:focus-visible {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ms-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.ms-btn--ghost:hover,
.ms-btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--parchment);
}

.ms-btn--moss {
  background: var(--sage);
  color: var(--parchment);
}
.ms-btn--moss:hover,
.ms-btn--moss:focus-visible {
  color: var(--parchment);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ms-btn--sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.ms-btn--lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

.ms-btn--instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
  color: var(--parchment);
  border: 1.5px solid var(--ink);
}
.ms-btn--instagram:hover,
.ms-btn--instagram:focus-visible {
  color: var(--parchment);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ms-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* === SECTION TAG (V13 — épuré) === */
.ms-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--tomato);
  margin-bottom: 0.75rem;
}
.ms-section-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: var(--tomato);
  border-radius: 1px;
}

/* === TITRE DE SECTION === */
.ms-section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 800px;
}
.ms-section-title em { font-style: italic; color: var(--sage); font-weight: 800; }
.ms-section-title--center { margin-left: auto; margin-right: auto; text-align: center; }

.ms-section-sub {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 2.5rem;
}
.ms-section-sub--center { margin-left: auto; margin-right: auto; text-align: center; }

/* === CARDS === */
.ms-card {
  background: var(--parchment-soft);
  border: 1px solid var(--parchment-edge);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  position: relative;
  transition: all var(--t-med) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.ms-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ms-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.ms-card-link:hover { color: inherit; }
.ms-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-card) var(--r-card) 0 0;
  margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)) var(--sp-4) calc(-1 * var(--sp-5));
  background: var(--parchment-edge);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--parchment);
  border: 1px solid var(--parchment-edge);
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  z-index: 2;
}
.ms-card-body { padding: 0; }
.ms-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.ms-card-excerpt {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

/* === STICKER BADGE === */
.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  background: var(--tomato);
  color: var(--parchment);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--ink);
}
.ms-badge--honey { background: var(--lemon); color: var(--ink); }
.ms-badge--moss { background: var(--basil); color: var(--parchment); }
.ms-badge--paper { background: var(--parchment); color: var(--ink); border-color: var(--parchment-edge); }

/* === DASHED DIVIDER === */
.ms-divider {
  border: none;
  height: 1px;
  background: var(--parchment-edge);
  margin: var(--sp-7) 0;
}

/* === PILL / CHIP === */
.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  background: var(--parchment-soft);
  border: 1px solid var(--parchment-edge);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all var(--t-base) var(--ease-out);
  cursor: pointer;
}
.ms-chip:hover,
.ms-chip.is-active,
.ms-chip--active {
  background: var(--tomato);
  color: var(--parchment);
}

/* === NEWSLETTER PILL === */
.ms-newsletter,
.ms-newsletter-form {
  display: flex;
  gap: 0.4rem;
  background: var(--parchment);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.35rem 0.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  align-items: center;
  max-width: 480px;
}
.ms-newsletter input,
.ms-newsletter-form input,
.ms-newsletter-form input[type="email"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  padding: 0.6rem 0;
  min-width: 0;
  box-shadow: none;
}
.ms-newsletter button,
.ms-newsletter-form button {
  background: var(--tomato);
  color: var(--parchment);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 0.65rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  flex-shrink: 0;
  white-space: nowrap;
}
.ms-newsletter button:hover,
.ms-newsletter-form button:hover {
  background: var(--tomato-deep);
  transform: translateX(2px);
}
/* Variante large (panel CTA) */
.ms-newsletter-form--large {
  max-width: 560px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 0.5rem 1.8rem;
}
.ms-newsletter-form--large input { font-size: 1.05rem; padding: 0.8rem 0; }
.ms-newsletter-form--large button { padding: 0.8rem 1.5rem; font-size: 0.95rem; }
@media (max-width: 520px) {
  .ms-newsletter,
  .ms-newsletter-form {
    flex-direction: column;
    border-radius: 24px;
    padding: 0.6rem;
  }
  .ms-newsletter input,
  .ms-newsletter-form input { padding: 0.7rem 1rem; }
  .ms-newsletter button,
  .ms-newsletter-form button { width: 100%; }
}

/* === MAILERLITE FALLBACK STATES === */
.ms-mailerlite-empty {
  padding: 1rem;
  color: var(--ink-soft);
  font-style: italic;
  background: var(--parchment-soft);
  border-radius: var(--r-md);
  max-width: 480px;
}
.ms-mailerlite-missing {
  padding: 1rem;
  border: 1.5px dashed var(--tomato);
  background: var(--cream-warm);
  border-radius: var(--r-md);
  color: var(--ink);
  max-width: 480px;
}
.ms-mailerlite-missing a {
  color: var(--tomato-deep);
  font-weight: 600;
  text-decoration: underline;
}

/* === AVATAR (pastille de portrait) === */
.ms-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--parchment);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.ms-avatar--tomato { background: var(--tomato); }
.ms-avatar--moss { background: var(--basil); }
.ms-avatar--honey { background: var(--lemon); color: var(--ink); }
.ms-avatar--lg { width: 72px; height: 72px; font-size: 1.8rem; }
