/* ── DMMD Public Styles ─────────────────────────────────────────────────── */
:root {
  --dmmd-purple: #7b5ea7;
  --dmmd-teal:   #a3d9c8;
  --dmmd-gold:   #f0ad4e;
  --dmmd-light:  #f9f4ff;
  --dmmd-radius: 16px;
  --dmmd-shadow: 0 4px 24px rgba(123,94,167,.12);
}

/* ── Conteneur principal ─────────────────────────────────────────────────── */
.dmmd-app {
  max-width: 860px;
  margin: 0 auto;
  font-family: 'Georgia', serif;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.dmmd-header {
  background: linear-gradient(135deg, var(--dmmd-purple) 0%, #a3d9c8 100%);
  color: #fff;
  border-radius: var(--dmmd-radius);
  padding: 32px 40px;
  margin-bottom: 28px;
  text-align: center;
}
.dmmd-header h2 { margin: 0 0 6px; font-size: 26px; }
.dmmd-header p  { margin: 0; opacity: .85; font-size: 14px; }

/* ── Formulaire de consultation ──────────────────────────────────────────── */
.dmmd-form { background: #fff; border-radius: var(--dmmd-radius); padding: 32px; box-shadow: var(--dmmd-shadow); margin-bottom: 28px; }
.dmmd-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--dmmd-purple); font-size: 14px; }
.dmmd-form select,
.dmmd-form textarea,
.dmmd-form input[type=text] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0d6f5;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.dmmd-form select:focus,
.dmmd-form textarea:focus { border-color: var(--dmmd-purple); }
.dmmd-form textarea { resize: vertical; min-height: 90px; }
.dmmd-form .dmmd-row { margin-bottom: 18px; }

/* ── Spécialités (icônes) ───────────────────────────────────────────────── */
.dmmd-specialties { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.dmmd-spec-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 14px;
  border: 2px solid #e0d6f5;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
  font-size: 12px;
  min-width: 80px;
  color: #555;
}
.dmmd-spec-btn span.icon { font-size: 22px; margin-bottom: 4px; }
.dmmd-spec-btn:hover,
.dmmd-spec-btn.active { border-color: var(--dmmd-purple); background: var(--dmmd-light); color: var(--dmmd-purple); font-weight: 600; }

/* ── Bouton ──────────────────────────────────────────────────────────────── */
.dmmd-btn {
  display: inline-block;
  padding: 13px 32px;
  background: var(--dmmd-purple);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.dmmd-btn:hover { background: #6a4f94; transform: translateY(-1px); }
.dmmd-btn--outline { background: transparent; border: 2px solid var(--dmmd-purple); color: var(--dmmd-purple); }
.dmmd-btn--outline:hover { background: var(--dmmd-light); }
.dmmd-btn--sm { padding: 8px 20px; font-size: 13px; }
.dmmd-btn--logout { background: transparent; border: 2px solid #e53e3e; color: #e53e3e; }
.dmmd-btn--logout:hover { background: #fff5f5; transform: translateY(-1px); }

/* ── Loader ──────────────────────────────────────────────────────────────── */
.dmmd-loader { display: none; text-align: center; padding: 40px; }
.dmmd-spinner {
  width: 48px; height: 48px;
  border: 5px solid #e0d6f5;
  border-top-color: var(--dmmd-purple);
  border-radius: 50%;
  animation: dmmd-spin 1s linear infinite;
  margin: 0 auto 12px;
}
@keyframes dmmd-spin { to { transform: rotate(360deg); } }

/* ── Réponse ─────────────────────────────────────────────────────────────── */
.dmmd-response { display: none; }
.dmmd-section {
  background: #fff;
  border-radius: var(--dmmd-radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--dmmd-shadow);
  border-left: 5px solid var(--dmmd-purple);
}
.dmmd-section h3 { margin: 0 0 12px; color: var(--dmmd-purple); font-size: 16px; }
.dmmd-section p  { margin: 0; font-size: 14px; line-height: 1.8; }
.dmmd-section ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.9; }
.dmmd-section--teal  { border-left-color: var(--dmmd-teal); }
.dmmd-section--gold  { border-left-color: var(--dmmd-gold); }

.dmmd-message {
  background: var(--dmmd-light);
  border-radius: var(--dmmd-radius);
  padding: 20px 28px;
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  border: 1px solid #e0d6f5;
}

.dmmd-disclaimer {
  background: #fff8e1;
  border-left: 4px solid var(--dmmd-gold);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 12px;
  color: #666;
  margin-bottom: 20px;
}

.dmmd-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Notices ─────────────────────────────────────────────────────────────── */
.dmmd-notice {
  background: var(--dmmd-light);
  border: 1px solid #e0d6f5;
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 14px;
  margin-bottom: 20px;
}
.dmmd-notice--info { border-color: var(--dmmd-teal); background: #edfaf5; }
.dmmd-notice--error { border-color: #f0716a; background: #fff2f1; color: #c0392b; }

/* ── Historique ──────────────────────────────────────────────────────────── */
.dmmd-history-list { list-style: none; padding: 0; margin: 0; }
.dmmd-history-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--dmmd-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dmmd-history-item .symptom  { font-weight: 600; color: var(--dmmd-purple); }
.dmmd-history-item .meta     { font-size: 12px; color: #999; }

/* ── Plans d'abonnement ──────────────────────────────────────────────────── */
.dmmd-plans { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.dmmd-plan {
  background: #fff;
  border: 2px solid #e0d6f5;
  border-radius: var(--dmmd-radius);
  padding: 28px 24px;
  text-align: center;
  min-width: 180px;
  max-width: 220px;
  box-shadow: var(--dmmd-shadow);
  transition: border-color .2s, transform .2s;
}
.dmmd-plan:hover    { border-color: var(--dmmd-purple); transform: translateY(-3px); }
.dmmd-plan--featured{ border-color: var(--dmmd-purple); }
.dmmd-plan .price   { font-size: 32px; font-weight: bold; color: var(--dmmd-purple); }
.dmmd-plan .period  { font-size: 13px; color: #888; margin-bottom: 16px; }
.dmmd-plan .label   { font-size: 15px; font-weight: 600; margin-bottom: 8px; }

/* ── Journal ─────────────────────────────────────────────────────────────── */
.dmmd-journal-entry {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--dmmd-shadow);
}
.dmmd-journal-entry .date { font-size: 12px; color: #999; margin-bottom: 6px; }
.dmmd-mood { display: flex; gap: 10px; margin-bottom: 10px; }
.dmmd-mood span { font-size: 24px; cursor: pointer; opacity: .4; transition: opacity .2s, transform .15s; }
.dmmd-mood span:hover,
.dmmd-mood span.selected { opacity: 1; transform: scale(1.2); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width:600px) {
  .dmmd-header { padding: 24px 20px; }
  .dmmd-form   { padding: 20px; }
  .dmmd-section{ padding: 18px 16px; }
  .dmmd-specialties { gap: 6px; }
  .dmmd-spec-btn { min-width: 68px; padding: 10px; }
}

/* ── Martel v2 — Nouveaux éléments ──────────────────────────────────────── */

/* Badge références Martel */
.dmmd-martel-refs {
  background: linear-gradient(135deg, #f0f7f0 0%, #e8f4e8 100%);
  border: 1px solid #4a9e6b;
  border-left: 4px solid #4a9e6b;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 0.88rem;
}
.dmmd-martel-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dmmd-martel-ref-tag {
  background: #fff;
  border: 1px solid #4a9e6b;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.82rem;
  color: #2d6b47;
  white-space: nowrap;
}
.dmmd-martel-ref-tag em {
  color: #6a8f78;
  font-style: italic;
}

/* Section conflit d'origine */
.dmmd-section--purple {
  background: linear-gradient(135deg, #f5f0ff 0%, #ede8ff 100%);
  border-left: 4px solid #7c5cbf;
}
.dmmd-section--purple h3 { color: #5a3fa0; }

/* Affirmation d'acceptation (style Martel) */
.dmmd-affirmation {
  background: linear-gradient(135deg, #e8f8f0 0%, #d4f0e4 100%);
  border: 2px solid #4a9e6b;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(74, 158, 107, 0.15);
}
.dmmd-affirmation-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.dmmd-affirmation p {
  font-size: 1.05rem;
  font-style: italic;
  color: #2d6b47;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION MÉDECINE TRADITIONNELLE CHINOISE — v2.2
   ══════════════════════════════════════════════════════════════════ */

/* Conteneur principal MTC */
.dmmd-section--mtc {
  background: linear-gradient(135deg, #f0f9f0 0%, #e8f4f8 100%);
  border-left: 4px solid #2e8b57;
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin-top: 1.4rem;
}

.dmmd-section--mtc > h3 {
  color: #1a5c3a;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* Sous-blocs MTC */
.dmmd-mtc-block {
  background: rgba(255,255,255,0.75);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(46,139,87,0.15);
}

.dmmd-mtc-block:last-child {
  margin-bottom: 0;
}

.dmmd-mtc-block h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #1a5c3a;
  margin: 0 0 .7rem 0;
  padding-bottom: .4rem;
  border-bottom: 1px dashed rgba(46,139,87,0.3);
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* Liste MTC commune */
.dmmd-mtc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dmmd-mtc-item {
  padding: .55rem .6rem;
  margin-bottom: .4rem;
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.55;
  background: rgba(255,255,255,0.6);
  border-left: 3px solid transparent;
  transition: background .2s;
}

.dmmd-mtc-item:last-child {
  margin-bottom: 0;
}

/* ── Méridiens ── */
.dmmd-mtc-list--meridiens .dmmd-mtc-item {
  border-left-color: #5b9bd5;
  background: rgba(91,155,213,0.06);
}

.dmmd-mtc-code {
  display: inline-block;
  background: #5b9bd5;
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  padding: .1rem .45rem;
  border-radius: 4px;
  margin-right: .3rem;
  font-family: monospace;
  letter-spacing: .03em;
}

/* ── Points d'acupuncture ── */
.dmmd-mtc-list--points .dmmd-mtc-item {
  border-left-color: #c0392b;
  background: rgba(192,57,43,0.04);
}

.dmmd-acup-code {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  padding: .1rem .5rem;
  border-radius: 4px;
  margin-right: .3rem;
  font-family: monospace;
  letter-spacing: .05em;
}

.dmmd-acup-loc {
  display: block;
  font-size: .82rem;
  color: #555;
  margin-top: .2rem;
}

.dmmd-acup-ind {
  display: block;
  font-size: .84rem;
  color: #333;
  margin-top: .15rem;
  font-style: italic;
}

/* ── Organes Zang-Fu ── */
.dmmd-mtc-list--organes .dmmd-mtc-item {
  border-left-color: #8e44ad;
  background: rgba(142,68,173,0.04);
}

.dmmd-mtc-list--organes .dmmd-mtc-item strong {
  color: #6c2f8a;
}

/* Responsive */
@media (max-width: 600px) {
  .dmmd-section--mtc {
    padding: 1rem;
  }
  .dmmd-mtc-block {
    padding: .8rem;
  }
  .dmmd-acup-code,
  .dmmd-mtc-code {
    font-size: .75rem;
  }
}

/* ══ MTC — améliorations v2.3 ══════════════════════════════════════════════ */

/* Compteur de points */
.dmmd-mtc-count {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 10px;
  margin-left: .5rem;
  vertical-align: middle;
}

/* Légende des colonnes */
.dmmd-mtc-hint {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .75rem;
  color: #888;
  margin-bottom: .6rem;
  padding: .3rem .5rem;
  background: rgba(0,0,0,.03);
  border-radius: 5px;
}

.dmmd-mtc-hint span::before {
  margin-right: .2rem;
}

/* Points acupuncture — meilleur espacement */
.dmmd-mtc-list--points .dmmd-mtc-item {
  padding: .7rem .8rem;
  margin-bottom: .6rem;
}

.dmmd-acup-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .3rem;
}

.dmmd-acup-name {
  font-weight: 700;
  color: #333;
  font-size: .92rem;
}

/* Organes — badge Zang/Fu */
.dmmd-organe-type {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .1rem .4rem;
  border-radius: 4px;
  margin-left: .3rem;
  vertical-align: middle;
}

.dmmd-organe-type--zang {
  background: #8e44ad22;
  color: #6c2f8a;
  border: 1px solid #8e44ad44;
}

.dmmd-organe-type--fu {
  background: #e67e2222;
  color: #a04000;
  border: 1px solid #e67e2244;
}

.dmmd-organe-emotion {
  display: inline-block;
  font-size: .8rem;
  color: #c0392b;
  font-style: italic;
  margin: .2rem 0;
}

.dmmd-organe-lien {
  display: block;
  font-size: .84rem;
  color: #444;
  margin-top: .15rem;
}

/* Méridiens — code coloré selon type */
.dmmd-mtc-code {
  cursor: default;
}

.dmmd-meridien-role {
  font-size: .85rem;
  color: #444;
}
/* ══ fin MTC v2.3 ══════════════════════════════════════════════════════════ */

/* ══ MTC — spécialité dédiée v2.4 ══════════════════════════════════════════ */

/* Bouton spécialité MTC — mis en avant */
.dmmd-spec-btn[data-specialty="mtc"] {
  border: 2px solid #2e8b57 !important;
  background: linear-gradient(135deg, #f0f9f0, #e8f4f8) !important;
  font-weight: 700;
}
.dmmd-spec-btn[data-specialty="mtc"].active {
  background: linear-gradient(135deg, #2e8b57, #1a6b47) !important;
  color: #fff !important;
  border-color: #1a6b47 !important;
}

/* Badge 5 Éléments dans les organes */
.dmmd-organe-element {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  margin-right: .4rem;
}

/* Techniques MTC — mise en évidence */
.dmmd-section--teal #dmmd-res-techniques li::before {
  content: '🌿 ';
}

/* ══ fin MTC v2.4 ═══════════════════════════════════════════════════════════ */
