/* ═══════════════════════════════════════════════════════════
   Widgets de démonstration — Pharmacie de l'Ardusson
   Ajouts au socle tc-site : aucune dépendance, tout en vanilla.
   Les règles reprennent les tokens du template (filets 1px, radius
   8-10px, zéro ombre au repos, hovers 250ms).
   ═══════════════════════════════════════════════════════════ */

/* ── Bandeau de statut d'ouverture (calculé en direct) ───────── */
.status-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .95rem; border-radius: 999px;
  border: 1px solid var(--line-cool); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.status-pill .led {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  position: relative; flex: none;
}
.status-pill.is-open .led { background: var(--accent); }
.status-pill.is-closed .led { background: #d4795b; }
.status-pill .led::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; color: inherit; opacity: 0;
}
.status-pill.is-open .led::after { animation: ringPulse 2.4s ease-out infinite; color: var(--accent); }
.status-pill .status-sub { font-weight: 400; color: var(--muted); }

/* ── Grille de widgets ───────────────────────────────────────── */
.widget-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  align-items: start;
}
.widget {
  border: 1px solid var(--line-cool); border-radius: 10px;
  background: var(--surface); overflow: hidden;
}
.widget-head {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-cool);
}
.widget-head .icon { width: 22px; height: 22px; flex: none; }
.widget-head h3 { font-size: 17px; font-weight: 600; margin: 0; }
.widget-head .tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-dark);
  background: var(--accent-soft); padding: .25rem .55rem; border-radius: 999px;
}
.widget-body { padding: 1.35rem; }
.widget-body > p.hint { font-size: 14px; color: var(--muted); margin: 0 0 1rem; }

/* champs */
.field { margin-bottom: .9rem; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: .35rem; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%; padding: .65rem .8rem; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line-cool); border-radius: 8px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

/* zone de dépôt d'ordonnance */
.dropzone {
  border: 1.5px dashed var(--line-cool); border-radius: 10px;
  padding: 1.6rem 1rem; text-align: center; cursor: pointer;
  transition: border-color .25s cubic-bezier(.4,0,.2,1), background .25s cubic-bezier(.4,0,.2,1);
}
.dropzone:hover, .dropzone.is-hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { width: 30px; height: 30px; color: var(--accent); margin: 0 auto; display: block; }
.dropzone p { margin: .5rem 0 .15rem; font-size: 14px; font-weight: 600; }
.dropzone span { font-size: 12.5px; color: var(--muted); }
.drop-list { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; gap: .5rem; }
.drop-list li {
  display: flex; align-items: center; gap: .6rem;
  font-size: 13.5px; padding: .5rem .7rem;
  border: 1px solid var(--line-cool); border-radius: 8px; background: var(--cream-soft);
}
.drop-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-list .sz { margin-left: auto; color: var(--muted); font-size: 12px; flex: none; }

/* choix segmentés (services RDV) */
.seg { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: .5rem .85rem; border-radius: 999px;
  border: 1px solid var(--line-cool); background: #fff; color: var(--ink-soft);
  transition: transform .2s cubic-bezier(.4,0,.2,1), border-color .2s, background .2s, color .2s;
}
.seg button:hover { border-color: var(--accent); color: var(--accent-dark); }
.seg button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* créneaux */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.slots button {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: .55rem .3rem; border-radius: 8px;
  border: 1px solid var(--line-cool); background: #fff; color: var(--ink);
  transition: transform .2s cubic-bezier(.4,0,.2,1), border-color .2s, background .2s, color .2s;
}
.slots button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); }
.slots button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slots button:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

/* résultat / confirmation */
.widget-result {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent-soft);
  font-size: 14px; line-height: 1.5; color: var(--ink);
}
.widget-result[hidden] { display: none; }
.widget-result strong { font-weight: 700; }
.widget-result .muted { color: var(--muted); display: block; margin-top: .3rem; font-size: 13px; }

/* garde : résultat en fiche */
.garde-card { display: grid; gap: .35rem; font-size: 14px; }
.garde-card .nm { font-size: 16px; font-weight: 700; }
.garde-card .row { display: flex; gap: .5rem; color: var(--ink-soft); }
.garde-card .row .k { color: var(--muted); min-width: 74px; flex: none; }

/* disponibilité produit */
.stock-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.stock-list li {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem;
  border: 1px solid var(--line-cool); border-radius: 8px; font-size: 14px;
}
.stock-list .dot-s { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stock-list .ok .dot-s { background: var(--accent); }
.stock-list .low .dot-s { background: #d9a441; }
.stock-list .no .dot-s { background: #c9705a; }
.stock-list .st { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* carte : placeholder cliquable (l'iframe ne charge qu'au clic) */
.map-shell {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-cool); background: var(--cream-soft);
  min-height: 260px; display: flex; align-items: center; justify-content: center;
}
.map-shell iframe { width: 100%; height: 340px; border: 0; display: block; }
.map-cta { text-align: center; padding: 2rem 1rem; }
.map-cta .icon { width: 34px; height: 34px; color: var(--accent); }
.map-cta p { margin: .6rem 0 1rem; font-size: 14px; color: var(--muted); }

/* horaires */
.hours-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hours-table th, .hours-table td { text-align: left; padding: .55rem 0; border-bottom: 1px solid var(--line-cool); }
.hours-table th { font-weight: 600; color: var(--ink-soft); }
.hours-table td { color: var(--muted); text-align: right; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table tr.today th, .hours-table tr.today td { color: var(--accent-dark); font-weight: 700; }

/* étapes de widget */
.wsteps { display: flex; gap: .4rem; margin-bottom: 1.1rem; }
.wsteps span {
  flex: 1; height: 3px; border-radius: 999px; background: var(--line-cool);
  transition: background .3s cubic-bezier(.4,0,.2,1);
}
.wsteps span.on { background: var(--accent); }

@media (max-width: 960px) {
  .widget-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .slots { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}

/* Le « + » decoratif des stats n'a pas de sens sur « 6 jours sur 7 » :
   le compte est exact, pas un minimum. */
.hero-stats li:nth-child(2) strong::after { content: none; }
