/* ══════════════════════════════════════════════════════
   GALARD — medcard.css v3.1
   ══════════════════════════════════════════════════════ */

:root {
  --bg:    #f2f2f5;
  --white: #ffffff;
  --blue:  #0001ff;
  --text:  #1a1a2e;
  --muted: #888888;
  --border:#e0e0e8;
  --f:     'Figtree', sans-serif;
  --fm:    'DM Mono', monospace;
}

/* ══ WRAPPER GRADIENT ANIMÉ ════════════════════════════ */
.new {
  border-radius: 14px;
  padding: 3px;
  background-image: linear-gradient(110deg, #A9D4FF, #A9BDFF, #801BBB, #1B26BB);
  display: inline-flex;
  box-shadow:
    0 0 20px rgba(169,212,255,0.25),
    0 0 40px rgba(128,27,187,0.15),
    0 0 60px rgba(27,38,187,0.1);
  background-size: 200% 200%;
  animation: gradientMove 2s infinite linear alternate;
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ══ ANIMATION REVEAL ══════════════════════════════════ */
@keyframes galardCloud {
  0%   { opacity: 0.6; transform: translate(-50%,-50%) scale(1);    filter: blur(15px); }
  70%  { opacity: 0.3; transform: translate(-48%,-52%) scale(1.05); filter: blur(10px); }
  100% { opacity: 0;   transform: translate(-50%,-50%) scale(3);    filter: blur(30px); }
}

.medicament-card.reveal,
.pathology-card.reveal {
  position: relative;
  overflow: hidden;
}

.medicament-card.reveal::before,
.pathology-card.reveal::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 150%; height: 150%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.35), rgba(255,255,255,0.05) 70%);
  transform: translate(-50%,-50%) scale(1);
  animation: galardCloud 1.2s ease-out forwards;
  pointer-events: none;
  z-index: 10;
  border-radius: 50%;
  filter: blur(15px);
  mix-blend-mode: screen;
}

/* ══ BASE CARD ══════════════════════════════════════════ */
.medicament-card,
.pathology-card {
  background: var(--white);
  border-radius: 12px;
  width: 360px;
  font-family: var(--f);
  margin: auto;
  line-height: 1.5;
  overflow: hidden;
}

/* ══ CARD TOP ═══════════════════════════════════════════ */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.9rem 0.6rem;
}

.med-img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
  flex-shrink: 0;
}

/* ══ RISQUES ════════════════════════════════════════════ */
.card-risks {
  display: flex;
  flex-direction: row;
  gap: 0.3rem;
  flex-shrink: 0;
}

.card-risks .risk {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.card-risks .risk img {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain;
  border-radius: 0 !important;
}

.risk { background-color: transparent !important; }

/* ══ TITRE ══════════════════════════════════════════════ */
.card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 0 0.9rem 0.1rem;
  margin: 0;
}

.card-alias {
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 0.9rem 0.7rem;
  margin: 0;
  font-family: var(--fm);
}

/* ══ SÉPARATEUR ═════════════════════════════════════════ */
.medicament-card hr,
.pathology-card hr {
  border: none;
  background: var(--border);
  height: 1px;
  margin: 0 0 0;
}

/* ══ SECTIONS ═══════════════════════════════════════════ */
.card-section {
  padding: 0.6rem 0.9rem 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.card-section:last-of-type {
  padding-bottom: 0.6rem;
}

/* Label de section */
.card-section strong,
.section-title {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
  font-family: var(--fm);
}

/* ══ POSOLOGIE ══════════════════════════════════════════ */
.dose {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-right: 3px;
}

.dose-tag {
  background: rgba(0,1,255,0.08);
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 1px 5px;
  margin-right: 6px;
  font-family: var(--fm);
  vertical-align: middle;
}

/* ══ EFFETS INDÉSIRABLES ════════════════════════════════ */
.effect-list {
  list-style: none;
  padding: 0;
  margin: 0.15rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.effect-list li {
  font-size: 12.5px;
  line-height: 1.45;
}

.effect-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  color: white;
  margin-right: 4px;
  display: inline-block;
  font-family: var(--fm);
  vertical-align: middle;
}

.effect-neurologiques  { background: #6c5ce7; }
.effect-cardiologiques { background: #e17055; }
.effect-digestifs,
.effect-hydriques      { background: #00b894; }
.effect-psychiatriques { background: #fd79a8; }
.effect-cutanés        { background: #0984e3; }
.effect-respiratoires  { background: #74b9ff; }
.effect-oculaires      { background: #b2bec3; color: #2d3436; }
.effect-hépatiques,
.effect-rénaux         { background: #f0c14b; color: #2d3436; }
.effect-autres,
.effect-osseux         { background: #636e72; }

/* ══ SOURCE ═════════════════════════════════════════════ */
.card-source {
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
  padding: 0.4rem 0.9rem 0.5rem;
  font-family: var(--fm);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ══ DISCLAIMER ═════════════════════════════════════════ */
.medicament-card > p,
.pathology-card > p {
  font-size: 9.5px;
  text-align: center;
  color: var(--muted);
  padding: 0.5rem 0.9rem 0.7rem;
  margin: 0;
  border-top: 1px solid var(--border);
  line-height: 1.5;
  font-family: var(--fm);
}

/* ══ PATHOLOGIE — SURCHARGES ════════════════════════════ */
.pathology-card .card-title {
  margin-top: 0;
  text-align: left;
}

.pathology-card .card-alias {
  margin-top: 0;
  text-align: left;
}

/* ══ SYMPTÔMES — PILLS ══════════════════════════════════ */
.symptom-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.symptom-pill {
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  line-height: 1.4;
}

.symptom-general                    { background: #6c5ce7; }
.symptom-neurologiques              { background: #e17055; }
.symptom-cardiaques,
.symptom-hématologiques,
.symptom-hematologiques             { background: #d63031; }
.symptom-respiratoires              { background: #00b894; }
.symptom-digestifs                  { background: #f0c14b; color: #2d3436; }
.symptom-cutanés                    { background: #0984e3; }
.symptom-musculo-squelettiques      { background: #a29bfe; }
.symptom-renaux-urinaires,
.symptom-sommeil,
.symptom-urinaires                  { background: #636e72; }
.symptom-endocriniens-metaboliques,
.symptom-sexuels                    { background: #e84393; }
.symptom-psychiatriques             { background: #fd79a8; }
.symptom-oculaires-orl,
.symptom-génitales,
.symptom-genitales                  { background: #b2bec3; color: #2d3436; }
.symptom-gynecologiques-urologiques { background: #6c5ce7; }

/* ══ LIENS MÉDICAMENTS ══════════════════════════════════ */
.med-list {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.med-list li { font-size: 13px; }

.med-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.15s;
}
.med-link:hover { opacity: 0.7; text-decoration: underline; }

/* ══ CONTAINERS ═════════════════════════════════════════ */
.research {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

#drug-card-container,
#pathology-card-container,
#organ-card-container {
  flex: 0 0 360px;
  display: block;
}

/* ══ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 900px) {
  .research { flex-direction: column; }
  #drug-card-container,
  #pathology-card-container,
  #organ-card-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 1.5rem;
    order: -1;
  }
  .medicament-card,
  .pathology-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  .card-risks { display: none !important; }
}

@media (max-width: 480px) {
  .medicament-card,
  .pathology-card { width: 100%; max-width: 100%; }
  .card-title { font-size: 18px; }
}