/* ============================================================
   KBMB UX – Style global (front)
   Palette :
   - Bleu principal : #2c3e50
   - Or : #d4af37
   - Fond doux : #fffaf3
   ============================================================ */

:root {
  --kb-color-primary: #2c3e50;
  --kb-color-accent:  #d4af37;
  --kb-color-text:    #1f2933;
  --kb-color-muted:   #6b7280;
  --kb-bg-soft:       #fffaf3;
  --kb-border-soft:   rgba(0,0,0,0.06);
  --kb-shadow-soft:   0 24px 60px rgba(15,23,42,0.16);
}


/* ====== WRAPPER GÉNÉRIQUE ====== */

.kb-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  box-sizing: border-box;
}

/* ====== CARDS (liquid glass) ====== */

.kb-card {
  position: relative;
  border-radius: 26px;
  padding: 24px 24px 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,247,230,0.96));
  box-shadow: var(--kb-shadow-soft);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ============================================================
   KBMB – EMOTIONAL LIQUID GLASS (wrapper commun)
   Appliqué dès qu’un widget ajoute : .kbmb-widget.kbmb-glass
   (MemoryBoard, HeartWhispers, Candle, etc.)
   ============================================================ */

.kbmb-widget.kbmb-glass {
  position: relative;
  border-radius: 30px;
  padding: 22px 22px 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(212,175,55,0.18), transparent 52%),
    radial-gradient(circle at 88% 18%, rgba(96,165,250,0.16), transparent 55%),
    radial-gradient(circle at 55% 105%, rgba(44,62,80,0.10), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,247,230,0.92));
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow:
    0 28px 70px rgba(15,23,42,0.18),
    0 0 0 1px rgba(148,163,184,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

/* Reflets / halos doux (Apple-like) */
.kbmb-widget.kbmb-glass::before,
.kbmb-widget.kbmb-glass::after {
  content: "";
  position: absolute;
  inset: -120px;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0.9;
  filter: blur(26px);
}

.kbmb-widget.kbmb-glass::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,0.75), transparent 55%),
    radial-gradient(circle at 72% 18%, rgba(191,219,254,0.40), transparent 60%),
    radial-gradient(circle at 40% 68%, rgba(212,175,55,0.22), transparent 62%);
  transform: rotate(-10deg);
}

.kbmb-widget.kbmb-glass::after {
  background:
    radial-gradient(circle at 70% 62%, rgba(255,255,255,0.40), transparent 55%),
    radial-gradient(circle at 28% 72%, rgba(96,165,250,0.22), transparent 65%),
    radial-gradient(circle at 58% 40%, rgba(245,215,120,0.18), transparent 70%);
  transform: rotate(8deg);
  opacity: 0.75;
}

/* Unifie le padding interne des cartes dans le wrapper glass */
.kbmb-widget.kbmb-glass .kb-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ============================================================
   EN-TÊTES PLUS ÉMOTIONNELS (MemoryBoard / HeartWhispers / Candle)
   ============================================================ */

.kbmb-widget.kbmb-glass .kbmb-section-header,
.kbmb-widget.kbmb-glass .kb-heart-header,
.kbmb-widget.kbmb-glass .kb-hw-header {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(245,215,120,0.18), transparent 62%),
    linear-gradient(135deg, rgba(255,255,255,0.52), rgba(248,250,252,0.45));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 16px 40px rgba(15,23,42,0.10);
}

.kbmb-widget.kbmb-glass .kbmb-section-title,
.kbmb-widget.kbmb-glass .kb-heart-title,
.kbmb-widget.kbmb-glass .kb-hw-title {
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}

/* Sous-titre en style "citation" (plus doux, plus émotionnel) */
.kbmb-widget.kbmb-glass .kbmb-section-subtitle,
.kbmb-widget.kbmb-glass .kb-heart-subtitle,
.kbmb-widget.kbmb-glass .kb-hw-subtitle {
  font-size: 13px;
  color: rgba(31,41,55,0.72);
  font-style: italic;
}

/* ============================================================
   CHAMPS – Placeholder plus intime
   ============================================================ */

.kbmb-widget.kbmb-glass .kbmb-textarea::placeholder,
.kbmb-widget.kbmb-glass textarea::placeholder {
  color: rgba(107,114,128,0.72);
}

/* Focus plus "cocon" */
.kbmb-widget.kbmb-glass .kbmb-input:focus,
.kbmb-widget.kbmb-glass .kbmb-textarea:focus,
.kbmb-widget.kbmb-glass .kbmb-select:focus,
.kbmb-widget.kbmb-glass .kb-heart-editor textarea:focus,
.kbmb-widget.kbmb-glass .kb-hw-editor textarea:focus {
  border-color: rgba(212,175,55,0.55);
  box-shadow:
    0 0 0 3px rgba(212,175,55,0.12),
    0 10px 26px rgba(15,23,42,0.10);
}

/* ============================================================
   PHOTOS – Polaroid plus premium dans le wrapper glass
   ============================================================ */

.kbmb-widget.kbmb-glass .kbmb-photo-polaroid {
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.9), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,0.94), rgba(255,247,230,0.92));
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    0 16px 42px rgba(15,23,42,0.18),
    0 0 0 1px rgba(148,163,184,0.06);
}

.kbmb-widget.kbmb-glass .kbmb-photo-polaroid--favorite {
  border: 2px solid rgba(236,72,153,0.85);
  box-shadow:
    0 18px 48px rgba(236,72,153,0.10),
    0 16px 42px rgba(15,23,42,0.18);
}

/* Petites cartes (boutons "Mettre à jour" etc.) */
.kb-chip-card {
  border-radius: 999px;
  padding: 8px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(249,250,251,0.95));
  box-shadow: 0 10px 25px rgba(15,23,42,0.16);
}

/* ====== TEXTE GÉNÉRAL ====== */

.kb-card h2,
.kb-card h3,
.kb-card h4 {
  margin: 0 0 18px;
  font-weight: 600;
  color: var(--kb-color-primary);
}

.kb-muted {
  font-size: 13px;
  color: var(--kb-color-muted);
}

/* ====== GRILLE / COLONNES ====== */

.kb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.kb-col {
  flex: 1 1 0;
  min-width: 260px;
}

/* ====== FORMULAIRES ====== */

.kb-form .kb-field {
  margin-bottom: 14px;
}

.kb-form .kb-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--kb-color-text);
}

.kb-form input[type="text"],
.kb-form input[type="email"],
.kb-form input[type="password"],
.kb-form input[type="date"],
.kb-form input[type="number"],
.kb-form select,
.kb-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.6);
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.3;
  box-sizing: border-box;
  background: rgba(255,255,255,0.96);
  color: var(--kb-color-text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.kb-form input:focus,
.kb-form select:focus,
.kb-form textarea:focus {
  outline: none;
  border-color: rgba(44,62,80,0.85);
  box-shadow: 0 0 0 3px rgba(44,62,80,0.08);
  background: #ffffff;
}

/* Cases à cocher */

.kb-form .kb-accept {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--kb-color-text);
}

.kb-form .kb-accept input[type="checkbox"] {
  margin-top: 2px;
}

/* ====== BOUTONS ====== */

.kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--kb-color-primary);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15,23,42,0.35);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease;
}

.kb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
}

.kb-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(15,23,42,0.35);
}

/* Variante or (CTA principal) */

.kb-btn--accent {
  background: linear-gradient(135deg, #f5d778, var(--kb-color-accent));
  color: #1f2933;
  box-shadow: 0 12px 30px rgba(212,175,55,0.45);
}

.kb-btn--accent:hover {
  background: linear-gradient(135deg, #ffe38f, #e6c458);
}

/* Variante secondaire (contour) */

.kb-btn--secondary {
  background: transparent;
  color: var(--kb-color-primary);
  border: 1px solid rgba(148,163,184,0.8);
  box-shadow: none;
}

.kb-btn--secondary:hover {
  background: rgba(148,163,184,0.06);
}

/* ====== NOTICES (erreur / succès) ====== */

.kb-notice {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.kb-notice--success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.kb-notice--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* ====== GAUGE MOT DE PASSE ====== */

#kbmb-pass-meter {
  width: 120px;
  height: 7px;
  border-radius: 999px;
}

#kbmb-pass-meter::-webkit-meter-bar {
  border-radius: 999px;
  background: #e5e7eb;
}

#kbmb-pass-meter::-webkit-meter-optimum-value {
  background: linear-gradient(90deg,#f97373,#facc15,#22c55e);
  border-radius: 999px;
}

/* ====== LIENS ====== */

.kb-link,
.kb-form a {
  color: #c24157;
  text-decoration: none;
  font-size: 13px;
}

.kb-link:hover,
.kb-form a:hover {
  text-decoration: underline;
}

/* ============================================================
   BLOC AUTH (widget connexion / création de compte)
   ============================================================ */

.kb-auth-widget {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 40px;
  box-sizing: border-box;
}

.kb-auth-widget .kb-card {
  margin-bottom: 24px;
}

/* Titre des blocs login / register */

.kb-auth-widget h4 {
  margin-bottom: 16px;
  font-size: 20px;
}

/* Alignement du lien "mot de passe oublié" */
.kb-auth-widget .kb-forgot {
  margin-top: 8px;
}

/* ============================================================
   PROFIL / HUB UTILISATEUR
   ============================================================ */


.kb-prof-widget {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  box-sizing: border-box;
}

/* Mini widget profil (barre indépendante pour lien profil + logout) */

.kb-prof-mini-widget {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 0 24px;
  box-sizing: border-box;
}

.kb-prof-mini-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 999px;
  background:
    linear-gradient(120deg, rgba(44,62,80,0.95), rgba(44,62,80,0.85));
  color: #f9fafb;
  box-shadow: 0 14px 40px rgba(15,23,42,0.55);
}

.kb-prof-mini-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kb-prof-mini-title {
  font-size: 16px;
  font-weight: 600;
}

.kb-prof-mini-sub {
  font-size: 12px;
  opacity: 0.9;
}

.kb-prof-mini-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kb-prof-mini-right .kb-btn {
  padding-inline: 18px;
}

.kb-prof-mini-right .kb-btn--accent {
  background: linear-gradient(135deg,#f6e08c,#d4af37);
  color: #1f2933;
}

.kb-prof-inner {
  border-radius: 30px;
  padding: 24px 24px 32px;
  background:
    radial-gradient(circle at 0% 0%, rgba(212,175,55,0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(44,62,80,0.09), transparent 60%),
    linear-gradient(135deg, #fffaf3, #f8fafc);
  box-shadow: var(--kb-shadow-soft);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Header "Mon espace personnel" */

.kb-prof-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 26px;
  border-radius: 999px;
  background:
    linear-gradient(120deg, rgba(44,62,80,0.95), rgba(44,62,80,0.85));
  color: #f9fafb;
  box-shadow: 0 14px 40px rgba(15,23,42,0.55);
}

.kb-prof-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kb-prof-title {
  font-size: 18px;
  font-weight: 600;
}

.kb-prof-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* Petits badges dans la barre (Email non vérifié, Free, etc.) */

.kb-badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.7);
}

.kb-badge-pill--free {
  background: rgba(22,163,74,0.15);
  border-color: rgba(34,197,94,0.5);
  color: #bbf7d0;
}

.kb-badge-pill--warning {
  background: rgba(248,250,252,0.06);
  border-color: rgba(248,250,252,0.45);
}

.kb-badge-pill--beta {
  background: linear-gradient(135deg, rgba(245, 215, 120, 0.25), rgba(212, 175, 55, 0.35));
  border-color: rgba(250, 204, 21, 0.85);
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Statut e-mail dans le header (lisible sur fond sombre) */
.kb-badge-pill--email-ok {
  background: rgba(22, 163, 74, 0.24);
  border-color: rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
}

.kb-badge-pill--email-pending {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.9);
  color: #fee2e2;
}

/* Boutons de droite dans le header */

.kb-prof-header-right .kb-btn {
  padding-inline: 18px;
}

.kb-prof-header-right .kb-btn--accent {
  background: linear-gradient(135deg,#f6e08c,#d4af37);
  color: #1f2933;
}

/* Grille du formulaire profil (2 colonnes) */

.kb-prof-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  gap: 28px;
  align-items: flex-start;
}

.kb-prof-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Avatar + bouton "mettre à jour la photo" */

.kb-prof-avatar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.kb-prof-avatar img {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  object-fit: cover;
  background: #e5e7eb;
}

/* Slider niveau d'ouverture spirituelle */

.kb-prof-widget input[type="range"] {
  width: 100%;
}

/* ESPACEMENT BAS */

.kb-prof-widget .kb-footer-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--kb-color-muted);
}

/* ====== RESPONSIVE ====== */

@media (max-width: 1024px) {
  .kb-prof-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .kb-prof-header-right {
    width: 100%;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .kb-prof-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .kb-prof-mini-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .kb-prof-mini-right {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .kb-wrap,
  .kb-auth-widget,
  .kb-prof-widget,
  .kb-prof-mini-widget {
    padding-inline: 16px;
  }

  .kb-card {
    padding-inline: 18px;
  }
}


/* ============================================================
   PROFIL – Récap abonnement + bougies (injecté au-dessus du profil)
   ============================================================ */

/* Wrapper robuste ajouté par le widget profil : 2 colonnes sur desktop */
.kb-prof-summary .kb-prof-summary-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

/* IMPORTANT : dans le DOM, les 2 cartes sont dans .kbmb-account-subscription.
   On neutralise ce wrapper pour que les 2 cartes deviennent les items directs de la grille. */
.kb-prof-summary .kb-prof-summary-grid > .kbmb-account-subscription {
  display: contents !important;
}

/* Cartes plus compactes dans le profil */
.kb-prof-summary .kb-prof-summary-grid .kbmb-account-card {
  padding: 16px 18px 18px !important;
  border-radius: 22px !important;
}

/* Titres plus petits dans le profil (les cartes utilisent parfois h2) */
.kb-prof-summary .kb-prof-summary-grid .kbmb-account-card h2 {
  margin: 0 0 12px !important;
  font-size: 28px !important;
  line-height: 1.15 !important;
  font-weight: 600 !important;
  color: var(--kb-color-primary) !important;
}

.kb-prof-summary .kb-prof-summary-grid .kbmb-account-card h3 {
  margin: 0 0 10px !important;
  font-size: 18px !important;
}

/* Actions : si les liens n'ont pas de classe bouton, on les stylise quand même */
.kb-prof-summary .kb-prof-summary-grid .kbmb-plan-actions a,
.kb-prof-summary .kb-prof-summary-grid .kbmb-candles-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--kb-color-primary);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15,23,42,0.35);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease;
}

.kb-prof-summary .kb-prof-summary-grid .kbmb-plan-actions a:hover,
.kb-prof-summary .kb-prof-summary-grid .kbmb-candles-actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
}

/* Variante accent si une classe est présente */
.kb-prof-summary .kb-prof-summary-grid .kbmb-plan-actions a.kbmb-btn-primary,
.kb-prof-summary .kb-prof-summary-grid .kbmb-candles-actions a.kbmb-btn-primary {
  background: linear-gradient(135deg, #f5d778, var(--kb-color-accent));
  color: #1f2933;
  box-shadow: 0 12px 30px rgba(212,175,55,0.45);
  border: 1px solid rgba(212,175,55,0.6);
}

.kb-prof-summary .kb-prof-summary-grid .kbmb-plan-actions a.kbmb-btn-primary:hover,
.kb-prof-summary .kb-prof-summary-grid .kbmb-candles-actions a.kbmb-btn-primary:hover {
  background: linear-gradient(135deg, #ffe38f, #e6c458);
}

/* On masque le CTA "Découvrir le Bougie Club" si présent (2e lien) */
.kb-prof-summary .kb-prof-summary-grid .kbmb-candles-actions a:nth-child(2) {
  display: none !important;
}

/* Responsive : retour en colonne sur mobile */
@media (max-width: 1024px) {
  .kb-prof-summary .kb-prof-summary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* ============================================================
   COMPTE – Abonnement & Bougies (widget compte utilisateur)
   ============================================================ */

.kbmb-account-widget {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 34px;
  box-sizing: border-box;
}

.kbmb-account-grid {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
  gap: 24px;
  align-items: stretch;
}

.kbmb-account-card {
  position: relative;
  border-radius: 26px;
  padding: 20px 22px 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(212,175,55,0.14), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(44,62,80,0.06), transparent 60%),
    linear-gradient(135deg, #fffaf3, #f8fafc);
  box-shadow: var(--kb-shadow-soft);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.kbmb-account-card .kbmb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.kbmb-account-card .kbmb-card-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--kb-color-primary);
}

.kbmb-account-card .kbmb-card-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--kb-color-text);
}

.kbmb-plan-text {
  margin: 4px 0 8px;
}

.kbmb-plan-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--kb-color-muted);
}

.kbmb-plan-features {
  margin: 4px 0 10px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--kb-color-muted);
}

.kbmb-plan-features li {
  margin-bottom: 3px;
}

.kbmb-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(148,163,184,0.65);
}

.kbmb-plan-free {
  background: rgba(148,163,184,0.16);
  color: var(--kb-color-primary);
}

.kbmb-plan-premium {
  background: linear-gradient(135deg,#f5d778,#d4af37);
  color: #111827;
  border-color: rgba(250,204,21,0.8);
}

.kbmb-plan-actions,
.kbmb-candles-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Boutons du widget compte : réutilisent la logique des boutons globaux */
.kbmb-account-card .kbmb-btn {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 999px;
}

.kbmb-btn-primary {
  background: linear-gradient(135deg, #f5d778, var(--kb-color-accent));
  color: #1f2933;
  box-shadow: 0 12px 30px rgba(212,175,55,0.45);
  border: 1px solid rgba(212,175,55,0.6);
}

.kbmb-btn-primary:hover {
  background: linear-gradient(135deg, #ffe38f, #e6c458);
}

.kbmb-btn-secondary {
  background: transparent;
  color: var(--kb-color-primary);
  border: 1px solid rgba(148,163,184,0.8);
  box-shadow: none;
}

.kbmb-btn-secondary:hover {
  background: rgba(148,163,184,0.06);
}

.kbmb-btn-ghost {
  background: rgba(255,255,255,0.9);
  color: var(--kb-color-primary);
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow: none;
}

.kbmb-btn-ghost:hover {
  background: rgba(255,255,255,1);
}

/* Bloc compteur de bougies */
.kbmb-candles-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 215, 120, 0.18), transparent 60%),
    linear-gradient(135deg,#fef9c3,#fefce8);
  border: 1px solid rgba(250,204,21,0.6);
  margin: 4px 0 10px;
}

.kbmb-candles-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--kb-color-muted);
}

.kbmb-candles-value {
  font-size: 20px;
  font-weight: 700;
  color: #b45309;
}

.kbmb-candles-status {
  font-size: 13px;
  margin: 0 0 6px;
}

.kbmb-candles-empty {
  color: #b91c1c;
}

.kbmb-candles-has {
  color: #166534;
}

@media (max-width: 1024px) {
  .kbmb-account-grid {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 640px) {
  .kbmb-account-widget {
    padding-inline: 16px;
  }
}

/* ============================================================
   MEMORYBOARD – Switch Deuil / Trace (Widget Elementor)
   Classes utilisées par le widget :
   - .kbmb-switch-card
   - .kbmb-switch-wrap
   - .kbmb-switch-btn
   - .kbmb-switch-btn--inactive
   - .kbmb-switch-btn--active
   ============================================================ */

.kbmb-switch-card {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.kbmb-switch-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.kbmb-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.kbmb-switch-btn:active {
  transform: translateY(1px);
}

/* Inactif = même langage que kb-btn--secondary (outline) */
.kbmb-switch-btn--inactive {
  background: transparent;
  color: var(--kb-color-primary);
  border: 1px solid rgba(148,163,184,0.85);
  box-shadow: none;
}

.kbmb-switch-btn--inactive:hover {
  background: rgba(148,163,184,0.06);
}

/* Actif = même langage que kb-btn (plein) */
.kbmb-switch-btn--active {
  background: var(--kb-color-primary);
  color: #ffffff;
  border: 1px solid rgba(44,62,80,0.45);
  box-shadow: 0 12px 30px rgba(15,23,42,0.35);
}

.kbmb-switch-btn--active:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
}

@media (max-width: 640px) {
  .kbmb-switch-card {
    width: 100%;
  }
  .kbmb-switch-wrap {
    width: 100%;
  }
  .kbmb-switch-btn {
    flex: 1 1 auto;
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   MEMORYBOARD – Lettres, enveloppes, photos
   ============================================================ */

/* Wrapper principal */

.kbmb-memoryboard {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.kbmb-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbmb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.kbmb-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--kb-color-primary);
  margin: 0;
}

.kbmb-section-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--kb-color-muted);
}

.kbmb-section-meta {
  font-size: 12px;
  color: var(--kb-color-muted);
}

/* Alertes globales (succès / erreur) pour le MemoryBoard */

.kb-alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.kb-alert--success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.kb-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Boutons MemoryBoard (alias du style kb-btn) */

.kbmb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--kb-color-primary);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15,23,42,0.35);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease;
}

.kbmb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
}

.kbmb-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(15,23,42,0.35);
}

.kbmb-btn--primary {
  background: linear-gradient(135deg, #f5d778, var(--kb-color-accent));
  color: #1f2933;
  box-shadow: 0 12px 30px rgba(212,175,55,0.45);
}

.kbmb-btn--ghost {
  background: rgba(255,255,255,0.9);
  color: var(--kb-color-primary);
  border: 1px solid rgba(148,163,184,0.8);
  box-shadow: none;
}

.kbmb-btn--danger {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.7);
  color: #b91c1c;
}

.kbmb-btn--xs {
  padding: 5px 10px;
  font-size: 12px;
}

.kbmb-btn--upload {
  margin-top: 10px;
}

/* Inputs / selects / textarea MemoryBoard (alias du style kb-form) */

.kbmb-input,
.kbmb-textarea,
.kbmb-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.6);
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.3;
  box-sizing: border-box;
  background: rgba(255,255,255,0.96);
  color: var(--kb-color-text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.kbmb-input:focus,
.kbmb-textarea:focus,
.kbmb-select:focus {
  outline: none;
  border-color: rgba(44,62,80,0.85);
  box-shadow: 0 0 0 3px rgba(44,62,80,0.08);
  background: #ffffff;
}

.kbmb-textarea {
  min-height: 160px;
  resize: vertical;
}

.kbmb-label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--kb-color-text);
}

.kbmb-label--small {
  font-size: 12px;
  color: var(--kb-color-muted);
}

.kbmb-form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Carte Lettres – layout 2 colonnes */

.kbmb-card--letters {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Layout réel (HTML) : 2 colonnes */
.kbmb-letters-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 26px;
  align-items: start;
}

@media (max-width: 1024px) {
  .kbmb-letters-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kbmb-letters-editor,
.kbmb-letters-envelopes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.kbmb-letters-envelopes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toolbar éditeur simple */

.kbmb-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.kbmb-editor-btn {
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,0.9);
  background: rgba(255,255,255,0.96);
  font-size: 11px;
  padding: 4px 8px;
  cursor: default; /* boutons visuels pour l’instant */
}

/* Grille enveloppes : 2 par ligne sur desktop */

.kbmb-envelopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.kbmb-envelope {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(145deg, #fefefe, #f4f5fb);
  box-shadow: 0 18px 45px rgba(148,163,184,0.35);
  padding: 22px 22px 64px; /* place pour les boutons en bas */
  overflow: hidden;
}

.kbmb-envelope-inner {
  position: relative;
}

.kbmb-envelope-flap {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 160%;
  height: 120%;
  background: linear-gradient(to bottom right, #fdfdfd, #e5e7eb);
  clip-path: polygon(0 0, 100% 0, 50% 52%);
  opacity: 0.96;
}

.kbmb-envelope-body {
  position: relative;
  padding-top: 40px;
}

.kbmb-envelope-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 6px;
}

.kbmb-envelope-status {
  font-weight: 600;
}

.kbmb-envelope-title {
  margin: 6px 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.kbmb-envelope-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.kbmb-envelope-actions {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

/* Normalisation des formulaires d’actions dans les enveloppes */
.kbmb-envelope-actions form {
  margin: 0;
}

.kbmb-envelope-actions .kbmb-envelope-form {
  display: inline-flex;
}

.kbmb-envelope-actions .kb-btn {
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.kbmb-envelope-actions .kb-btn.kbmb-btn--danger {
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.kbmb-envelope-actions .kbmb-btn--ghost {
  background: #111827;
  color: #f9fafb;
  border: none;
}

.kbmb-envelope-actions .kbmb-btn--disabled {
  opacity: 0.55;
  cursor: default;
}

.kbmb-envelope--status-draft .kbmb-envelope-status {
  color: #f59e0b;
}

.kbmb-envelope--status-ready .kbmb-envelope-status {
  color: #10b981;
}

.kbmb-envelope--status-posted .kbmb-envelope-status {
  color: #6366f1;
}

/* Carte Photos – grille Polaroid */

.kbmb-card--photos {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kbmb-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.kbmb-photo-polaroid {
  position: relative;
  padding: 10px;
  border-radius: 12px;
  background: #fdfdfb;
  box-shadow: 0 10px 25px rgba(15,23,42,0.25);
  transform: rotate(-1.2deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kbmb-photo-polaroid:nth-child(2n) {
  transform: rotate(1.3deg);
}

.kbmb-photo-polaroid:hover {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 0 16px 40px rgba(15,23,42,0.35);
}

.kbmb-photo-polaroid-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kbmb-photo-polaroid-image {
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
}

.kbmb-photo-polaroid-image img {
  width: 100%;
  display: block;
}

.kbmb-photo-polaroid-caption {
  padding-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

.kbmb-photo-tags {
  font-size: 11px;
  color: #6b7280;
}

.kbmb-photo-polaroid-actions {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.kbmb-photo-polaroid--favorite {
  border: 2px solid #ec4899;
}

.kbmb-photo-upload {
  margin-top: 4px;
}

.kbmb-photo-limit {
  font-size: 13px;
  color: var(--kb-color-muted);
}

/* Responsive MemoryBoard */

@media (max-width: 1024px) {
  /* Le layout responsive est géré par .kbmb-letters-layout */
}

@media (max-width: 768px) {
  .kbmb-envelope-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .kbmb-envelope-actions a.kb-btn,
  .kbmb-envelope-actions button.kb-btn {
    width: 100%;
    text-align: center;
  }

  .kbmb-envelope-actions .kbmb-envelope-form {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .kbmb-envelopes-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   MURMURES DU CŒUR – Notes rapides / HeartWhispers
   ============================================================ */
/* Rituel de respiration – halo volumétrique 3D */
.kb-hw-breathing-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  padding: 10px 26px;
  font-size: 15px;
  font-weight: 300;
  color: rgba(31, 41, 55, 0.82);
  text-align: center;
  z-index: 1; /* texte au-dessus du halo */
}

/* Deux couches pour l'effet volumétrique */
.kb-hw-breathing-hint::before,
.kb-hw-breathing-hint::after {
  content: "";
  position: absolute;
  inset: -40px -70px;        /* halo plus large que le texte */
  border-radius: 999px;
  pointer-events: none;
}

/* Noyau lumineux bleu, légèrement ovale */
.kb-hw-breathing-hint::before {
  background:
    radial-gradient(circle at 50% 25%, rgba(191, 219, 254, 0.95), transparent 55%),
    radial-gradient(circle at 18% 80%, rgba(96, 165, 250, 0.78), transparent 60%),
    radial-gradient(circle at 82% 80%, rgba(59, 130, 246, 0.6), transparent 65%);
  filter: blur(26px);
  opacity: 0.9;
  z-index: -2;
  animation: kb-hw-breathing-core 7.5s ease-in-out infinite;
}

/* Couronne externe, mélange bleu + doré, pour la profondeur */
.kb-hw-breathing-hint::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(250, 250, 255, 0.25), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.32), transparent 72%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.22), transparent 90%);
  filter: blur(40px);
  opacity: 0.85;
  z-index: -3;
  animation: kb-hw-breathing-glow 7.5s ease-in-out infinite;
}

/* Animation du noyau (respiration) */
@keyframes kb-hw-breathing-core {
  0%   { transform: scale(0.9);  opacity: 0.65; }
  40%  { transform: scale(1.08); opacity: 0.98; }
  100% { transform: scale(0.9);  opacity: 0.7; }
}

/* Animation de la couronne externe */
@keyframes kb-hw-breathing-glow {
  0%   { transform: scale(0.95); opacity: 0.55; }
  50%  { transform: scale(1.12); opacity: 0.9; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.kb-heart-widget, .kb-hw-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kb-heart-header, .kb-hw-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.kb-heart-title, .kb-hw-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--kb-color-primary);
  margin: 0;
}

.kb-heart-subtitle, .kb-hw-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--kb-color-muted);
}

.kb-heart-meta, .kb-hw-meta {
  font-size: 12px;
  color: var(--kb-color-muted);
}

/* Bandeau de limite (9/10, 10/10, etc.) */

.kb-heart-limit-banner, .kb-hw-limit-banner {
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: radial-gradient(circle at 0% 0%, rgba(248,113,113,0.16), transparent 60%),
              linear-gradient(135deg, #fef2f2, #fef9c3);
  border: 1px solid rgba(248,113,113,0.45);
  color: #7f1d1d;
}

.kb-heart-limit-banner strong, .kb-hw-limit-banner strong {
  font-weight: 600;
}

/* Carte principale HeartWhispers */

.kb-heart-card, .kb-hw-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kb-heart-editor, .kb-hw-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kb-heart-editor textarea, .kb-hw-editor textarea {
  min-height: 90px;
  resize: vertical;
}

.kb-heart-editor-footer, .kb-hw-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.kb-heart-counter, .kb-hw-counter {
  font-size: 12px;
  color: var(--kb-color-muted);
}

/* Grille des murmures (post-it) */

  .kb-heart-grid, .kb-hw-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
  }

  .kb-heart-note, .kb-hw-note {
    position: relative;
    width: 220px;
    max-width: 100%;
    padding: 14px 16px 18px;
    border-radius: 18px;
    background:
      radial-gradient(circle at 0% 0%, rgba(255,255,255,0.9), transparent 60%),
      linear-gradient(145deg, rgba(255,255,255,0.96), rgba(255,248,210,0.96));
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow:
      0 18px 45px rgba(15,23,42,0.20),
      0 0 0 1px rgba(148,163,184,0.06);
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    transform: rotate(-0.8deg);
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      background 0.18s ease,
      border-color 0.18s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

.kb-heart-note:nth-child(2n), .kb-hw-note:nth-child(2n) {
  transform: rotate(0.8deg);
}

.kb-heart-note:nth-child(3n), .kb-hw-note:nth-child(3n) {
  transform: rotate(-1.2deg);
}

.kb-heart-note:hover, .kb-hw-note:hover {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 0 18px 40px rgba(15,23,42,0.35);
}

.kb-heart-note-pin, .kb-hw-note-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 4px 8px rgba(15,23,42,0.4);
}

.kb-heart-note-date, .kb-hw-note-date {
  margin-top: 8px;
  font-size: 11px;
  color: var(--kb-color-muted);
  text-align: right;
}

.kb-heart-note--limit, .kb-hw-note--limit {
  background: #fee2e2;
}

/* État vide */

.kb-heart-empty, .kb-hw-empty {
  font-size: 13px;
  color: var(--kb-color-muted);
}

/* Responsive HeartWhispers */

@media (max-width: 768px) {
  .kb-heart-header, .kb-hw-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   BOUGIES – Widget Candle
   ============================================================ */

/* Groupe de bougies (plusieurs cartes côte à côte) */
.kb-candle-widget-group {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Chaque bougie dans le groupe */
.kb-candle-widget-group .kb-candle-widget {
  flex: 1 1 320px;
  max-width: 420px;
}

.kb-candle-card,
.kb-candle-widget {
  display: flex;
  justify-content: center;
  align-items: stretch;
  max-width: 520px;
  margin: 0 auto;
}

.kb-candle-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Zone visuelle de la bougie */
.kb-candle-visual,
.kb-candle-figure {
  position: relative;
  width: 120px;
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.kb-candle-figure::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  background:
    radial-gradient(circle at 50% 15%, rgba(191, 219, 254, 0.85), transparent 60%),
    radial-gradient(circle at 20% 75%, rgba(96, 165, 250, 0.65), transparent 70%),
    radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.30), transparent 80%);
  filter: blur(26px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* Halo lumineux "liquid glass" autour de la bougie */
.kb-candle-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  background:
    radial-gradient(circle at 50% 15%, rgba(191, 219, 254, 0.85), transparent 60%),
    radial-gradient(circle at 20% 75%, rgba(96, 165, 250, 0.65), transparent 70%),
    radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.30), transparent 80%);
  filter: blur(26px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* Corps de la bougie */
.kb-candle-body {
  position: relative;
  width: 58px;
  height: 150px;
  border-radius: 18px 18px 14px 14px;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  z-index: 1;
}

/* Variante neutre – "Neutral Light" (plus cristalline, halo froid) */
.kb-candle-body--neutral {
  /* bougie légèrement plus fine et très lumineuse */
  width: 50px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.98) 0%, rgba(243,244,246,0.96) 28%, rgba(229,231,235,0.94) 55%, rgba(226,232,240,0.92) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(226,232,240,0.98));
  box-shadow:
    0 18px 44px rgba(148,163,184,0.55),
    0 0 0 1px rgba(148,163,184,0.38),
    0 0 70px rgba(191,219,254,0.85);
}

/* Variante religieuse (légère teinte dorée) */
.kb-candle-body--religious {
  background:
    linear-gradient(145deg, #fff9e6, #f5e6c8);
}

/* Cire intérieure – sa hauteur sera pilotée plus tard par JS */
.kb-candle-wax {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%; /* 100% = bougie pleine, diminuera avec le temps */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,251,0.9));
  border-radius: inherit;
  transition: height 0.6s ease-out;
}

/* Flamme */
.kb-candle-flame {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0; /* flamme invisible par défaut, état bougie éteinte */
  transition: opacity 0.35s ease;
}

.kb-candle-card.kb-candle--burning .kb-candle-flame,
.kb-candle-widget.kb-candle--burning .kb-candle-flame {
  opacity: 1;
}

/* Noyau de la flamme (animé) */
.kb-candle-flame-core,
.kb-candle-flame-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 50% 50%;
  background:
    radial-gradient(ellipse at 50% 20%, #fff7ed 0%, rgba(254, 243, 199, 1) 20%, transparent 70%),
    radial-gradient(ellipse at 50% 80%, rgba(248, 250, 252, 0.6) 0%, transparent 65%);
  box-shadow:
    0 0 12px rgba(251, 191, 36, 0.8),
    0 0 28px rgba(59, 130, 246, 0.45);
  animation: kb-candle-flame 1.7s ease-in-out infinite;
  transform-origin: 50% 90%;
}

/* Flamme spécifique pour la bougie neutre (lumière plus froide / bleutée) */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-flame-core,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-flame-core {
  background:
    radial-gradient(ellipse at 50% 20%, #f9fafb 0%, rgba(239,246,255,1) 24%, transparent 70%),
    radial-gradient(ellipse at 50% 80%, rgba(219,234,254,0.9) 0%, transparent 65%);
  box-shadow:
    0 0 16px rgba(129,140,248,0.9),
    0 0 34px rgba(191,219,254,0.95);
}

/* Animation de la flamme (mouvement doux) */
@keyframes kb-candle-flame {
  0% {
    transform: scale(0.96) skewX(0deg);
    opacity: 0.9;
  }
  35% {
    transform: scale(1.05) skewX(2deg);
    opacity: 1;
  }
  65% {
    transform: scale(0.98) skewX(-1.5deg);
    opacity: 0.92;
  }
  100% {
    transform: scale(0.96) skewX(0deg);
    opacity: 0.9;
  }
}

/* Zone texte : timer + bouton */
.kb-candle-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  text-align: center;
}

.kb-candle-timer {
  font-size: 13px;
  color: var(--kb-color-muted);
}

.kb-candle-timer-value {
  margin-left: 4px;
  font-weight: 600;
  color: var(--kb-color-primary);
}

/* Variante invité (non connecté) */
.kb-candle-card--guest {
  text-align: center;
}

/* Indicateur crédits / consommation (actuellement trop pâle) */
.kb-candle-slots-hint,
.kb-candle-credits-progress {
  color: rgba(44, 62, 80, 0.65) !important;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.kb-candle-credits-progress {
  color: rgba(44, 62, 80, 0.78) !important;
  font-weight: 600;
}

/* Responsive Bougie */
@media (max-width: 640px) {
  .kb-candle-card {
    max-width: 100%;
  }

  .kb-candle-visual {
    width: 90px;
    height: 180px;
  }

  .kb-candle-body {
    width: 46px;
    height: 130px;
  }
}
/* ============================================================
   NEUTRAL LIGHT – Variante non religieuse (lumière pure)
   ============================================================ */

/* Colonne de lumière neutre : corps très lumineux, plus fin
   mais toujours ancré visuellement (pas de grande ellipse seule) */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-body,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-body {
  width: 40px;
  height: 130px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(229,231,235,0.96));
  box-shadow:
    0 16px 40px rgba(148,163,184,0.55),
    0 0 0 1px rgba(148,163,184,0.32),
    0 0 60px rgba(191,219,254,0.80);
  overflow: hidden;
}

/* La cire ne sert plus visuellement en mode neutre (colonne uniforme) */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-wax,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-wax {
  display: none;
}

/* Halo spécifique, plus large mais moins agressif */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-glow,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-glow {
  width: 190px;
  height: 190px;
  bottom: -6px;
  background:
    radial-gradient(circle at 50% 28%, rgba(239,246,255,0.95), transparent 60%),
    radial-gradient(circle at 22% 80%, rgba(191,219,254,0.92), transparent 70%),
    radial-gradient(circle at 80% 85%, rgba(226,232,240,0.9), transparent 78%);
  filter: blur(28px);
  opacity: 0.93;
}

/* Flamme neutre = colonne de lumière froide, plus compacte */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-flame,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-flame {
  top: -6px;
  width: 22px;
  height: 58px;
}

/* Noyau de lumière bleutée */
.kb-candle-card[data-candle-type="neutral"] .kb-candle-flame-core,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-flame-core {
  background:
    radial-gradient(ellipse at 50% 18%, #f9fafb 0%, rgba(239,246,255,1) 26%, transparent 70%),
    radial-gradient(ellipse at 50% 80%, rgba(219,234,254,0.95) 0%, transparent 68%);
  box-shadow:
    0 0 18px rgba(129,140,248,0.90),
    0 0 34px rgba(191,219,254,0.96);
}

/* Animation légèrement plus stable pour la lumière neutre */
@keyframes kb-candle-flame-neutral {
  0% {
    transform: scale(0.94) skewX(0deg);
    opacity: 0.88;
  }
  40% {
    transform: scale(1.03) skewX(1.2deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.94) skewX(0deg);
    opacity: 0.9;
  }
}

.kb-candle-card[data-candle-type="neutral"] .kb-candle-flame-core,
.kb-candle-widget[data-candle-type="neutral"] .kb-candle-flame-core {
  animation: kb-candle-flame-neutral 1.9s ease-in-out infinite;
}

/* ============================================================
   BOUTONS DE VARIANTE & BOUTON D'ALLUMAGE – Ajustements UX
   ============================================================ */

.kb-candle-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  text-align: center;
}

/* Conteneur des boutons "Bougie / Lumière" */
.kb-candle-variants {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

/* Boutons Bougie / Lumière harmonisés avec le CTA principal,
   en version plus compacte */
.kb-candle-variant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: linear-gradient(145deg, #f6e8b8, #d4c27a);
  color: #1f2933;
  box-shadow:
    0 10px 24px rgba(15,23,42,0.28),
    inset 0 1px 1px rgba(255,255,255,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease, color 0.2s ease;
}

.kb-candle-variant-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(15,23,42,0.38),
    inset 0 1px 1px rgba(255,255,255,0.4);
}

/* État actif (type actuellement sélectionné) */
.kb-candle-variant-btn.is-active {
  background: linear-gradient(145deg, #e2d08c, #c4b169);
  box-shadow:
    0 12px 28px rgba(15,23,42,0.36),
    inset 0 1px 2px rgba(255,255,255,0.45);
  color: #111827;
}

/* Bouton d’allumage : même logique visuelle, légèrement plus large */
.kb-candle-ignite,
.kb-candle-btn {
  padding: 9px 26px;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.35);
}

.kb-candle-ignite:hover,
.kb-candle-btn:hover {
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .kb-candle-variant-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .kb-candle-ignite,
  .kb-candle-btn {
    padding: 8px 22px;
    font-size: 13px;
  }
}

/* ============================================================
   DEUIL – Aération + Journal (tendresse)
   Scope: .kbmb-deuil (wrapper du widget Deuil)
   ============================================================ */

.kbmb-deuil {
  --deuil-spacing-section: 38px;
  --deuil-spacing-card-padding: 38px;
  --deuil-card-radius: 30px;
  --deuil-card-gap: 26px;
  --deuil-journal-gap: 26px;
  --deuil-journal-radius: 22px;
  --deuil-journal-padding: 18px;
  --deuil-journal-bg: rgba(255,255,255,.52);
  --deuil-journal-border: 1px solid rgba(255,255,255,.62);
  --deuil-journal-shadow: 0 16px 46px rgba(15,23,42,.10);
  --deuil-journal-blur: blur(12px);
  --deuil-journal-dot: rgba(212,175,55,.92);
  --deuil-journal-dot-shadow: 0 0 0 7px rgba(212,175,55,.12);
  --deuil-journal-gradient: linear-gradient(180deg, rgba(212,175,55,0), rgba(212,175,55,.35), rgba(96,165,250,.14), rgba(212,175,55,0));
  --deuil-section-title-weight: 650;
  --deuil-section-title-spacing: -0.02em;
  --deuil-section-title-line: 1.15;
  --deuil-section-subtitle-color: rgba(15,23,42,.62);
  --deuil-section-subtitle-style: italic;
  --deuil-section-subtitle-line: 1.6;
  --deuil-font-smoothing: antialiased;
  --deuil-text-rendering: optimizeLegibility;
}


.kbmb-deuil {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   DEUIL – Journal conditionnel
   - Caché tant que l'utilisateur n'a pas encore fait traverser de lettre
   - Affiché dès qu'il y a au moins 1 lettre « crossed »
   - Option UX : affichage temporaire pendant l'envoi (classe kbmb-is-sending)
   ============================================================ */

/* Supporte les 2 structures :
   1) même wrapper : <div class="kbmb-deuil kbmb-state--virgin">...
   2) wrapper parent : <div class="kbmb-state--virgin"><div class="kbmb-deuil">...
*/
.kbmb-deuil.kbmb-state--virgin .kbmb-journal,
.kbmb-state--virgin .kbmb-deuil .kbmb-journal {
  display: none !important;
}

.kbmb-deuil.kbmb-state--journal .kbmb-journal,
.kbmb-state--journal .kbmb-deuil .kbmb-journal {
  display: grid;
}

/* Pendant l'envoi : on peut afficher le journal comme "pré-visualisation" */
.kbmb-is-sending .kbmb-deuil .kbmb-journal,
.kbmb-deuil.kbmb-is-sending .kbmb-journal {
  display: grid !important;
  opacity: 0.92;
  filter: blur(0.2px);
}

.kbmb-deuil .kbmb-section {
  margin-top: var(--deuil-spacing-section,38px);
}
.kbmb-deuil .kbmb-section:first-child {
  margin-top: 0;
}
.kbmb-deuil .kbmb-card {
  padding: var(--deuil-spacing-card-padding,38px);
  border-radius: var(--deuil-card-radius,30px);
}
.kbmb-deuil .kbmb-card > * + * {
  margin-top: var(--deuil-card-gap,26px);
}

/* Typo tendre */
.kbmb-deuil .kbmb-section-title {
  font-weight: var(--deuil-section-title-weight,650);
  letter-spacing: var(--deuil-section-title-spacing,-0.02em);
  line-height: var(--deuil-section-title-line,1.15);
}
.kbmb-deuil .kbmb-section-subtitle {
  color: var(--deuil-section-subtitle-color,rgba(15,23,42,.62));
  font-style: var(--deuil-section-subtitle-style,italic);
  line-height: var(--deuil-section-subtitle-line,1.6);
}

/* Journal layout improvements */
.kbmb-deuil .kbmb-journal {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--deuil-journal-gap,26px);
  align-items: start;
}
@media (max-width: 980px){
  .kbmb-deuil .kbmb-journal{
    grid-template-columns: 1fr;
  }
}
.kbmb-deuil .kbmb-journal-list {
  position: relative;
  padding-left: 20px;
}
.kbmb-deuil .kbmb-journal-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: var(--deuil-journal-gradient,linear-gradient(180deg, rgba(212,175,55,0), rgba(212,175,55,.35), rgba(96,165,250,.14), rgba(212,175,55,0)));
  opacity: .95;
}
.kbmb-deuil .kbmb-journal-item {
  position: relative;
  margin: 0 0 26px;
  padding: 18px 20px;
  border-radius: var(--deuil-journal-radius,22px);
  background: var(--deuil-journal-bg,rgba(255,255,255,.52));
  border: var(--deuil-journal-border,1px solid rgba(255,255,255,.62));
  box-shadow: var(--deuil-journal-shadow,0 16px 46px rgba(15,23,42,.10));
  backdrop-filter: var(--deuil-journal-blur,blur(12px));
  -webkit-backdrop-filter: var(--deuil-journal-blur,blur(12px));
}
.kbmb-deuil .kbmb-journal-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--deuil-journal-dot,rgba(212,175,55,.92));
  box-shadow: var(--deuil-journal-dot-shadow,0 0 0 7px rgba(212,175,55,.12));
}
.kbmb-deuil .kbmb-journal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(15,23,42,.62);
  font-size: 13px;
}
.kbmb-deuil .kbmb-journal-title {
  margin: 0 0 8px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.kbmb-deuil .kbmb-journal-excerpt {
  margin: 0;
  color: rgba(15,23,42,.70);
  line-height: 1.7;
}
.kbmb-deuil .kbmb-journal-stats {
  border-radius: var(--deuil-journal-radius,22px);
  padding: var(--deuil-journal-padding,18px);
  background: rgba(255,255,255,.45);
  border: var(--deuil-journal-border,1px solid rgba(255,255,255,.62));
  box-shadow: var(--deuil-journal-shadow,0 16px 46px rgba(15,23,42,.10));
  backdrop-filter: var(--deuil-journal-blur,blur(12px));
  -webkit-backdrop-filter: var(--deuil-journal-blur,blur(12px));
}
.kbmb-deuil .kbmb-journal-stats h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15,23,42,.60);
}
.kbmb-deuil .kbmb-journal-stats .row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148,163,184,.30);
  color: rgba(15,23,42,.78);
}
.kbmb-deuil .kbmb-journal-stats .row:last-child {
  border-bottom: 0;
}
.kbmb-deuil .kbmb-journal-stats .k {
  opacity: .70;
}
.kbmb-deuil .kbmb-journal-stats .v {
  font-weight: 650;
}

/* Fallback Journal box air and spacing */
.kbmb-deuil .kbmb-section-header {
  margin-bottom: 30px;
}
.kbmb-deuil .kbmb-journal-list,
.kbmb-deuil .kbmb-journal {
  margin-top: 18px;
}