/* ==========================================================================
   COMPOSANTS réutilisables — boutons, carrousels mobiles, modales, toast
   ========================================================================== */

/* ---------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; border-radius: 999px; padding: 13px 22px; font-size: 15px; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.btn-acc { background: var(--acc); color: #03130A; box-shadow: 0 8px 30px -8px rgba(25,211,162,.55); position: relative; overflow: hidden; isolation: isolate; }
.btn-acc:hover { box-shadow: 0 10px 40px -6px rgba(25,211,162,.75); }
.btn-acc::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: sweep 4.5s ease-in-out infinite;
}

.btn-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.07); }

.btn-outline { background: transparent; color: var(--acc); border: 1px solid var(--acc); border-radius: 14px; padding: 12px 28px; }
.btn-outline:hover { background: rgba(25,211,162,.1); transform: translateY(-2px); box-shadow: 0 6px 20px -6px rgba(25,211,162,.25); }

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

/* ---------- Bloc vide */
.empty { margin-top: 24px; border: 1.5px dashed var(--line); border-radius: var(--r); padding: 26px; text-align: center; color: var(--mut); }
.empty strong { display: block; color: var(--txt); font-family: var(--display); font-size: 17px; margin-bottom: 6px; }

/* ---------- Accordéon (details/summary) */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; flex: none; font-family: var(--display); color: var(--acc); font-size: 22px; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--mut); margin-top: 12px; max-width: 720px; }
details p a { color: var(--blue); }

/* ---------- Carrousels mobiles (classe .mcar ajoutée par ui.js) + points */
.mdots { display: none; }
@media (max-width: 700px) {
  .mcar {
    display: flex !important; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; gap: 14px;
    columns: auto !important; max-width: none !important; margin-left: -4vw !important; margin-right: -4vw !important;
    padding: 18px 4vw 6px !important; scrollbar-width: none; -webkit-overflow-scrolling: touch; align-items: flex-start;
  }
  .mcar::-webkit-scrollbar { display: none; }
  .mcar > * { flex: 0 0 84%; scroll-snap-align: center; margin: 0 !important; }
  .mdots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
  .mdots i { width: 7px; height: 7px; border-radius: 99px; background: #2C3A52; transition: width .3s, background .3s; }
  .mdots i.on { width: 22px; background: var(--acc); }
}

/* ---------- Modales (lightbox, légal, paiement, admin) */
.ov {
  position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3,5,10,.82); backdrop-filter: blur(6px);
}
.ov.open { display: flex; }
.lb { cursor: zoom-out; }
.lb img { max-height: 88vh; max-height: 88dvh; border-radius: 14px; object-fit: contain; }

.panel {
  width: min(760px, 100%); max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
}
.ph { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.ph h3 { font-family: var(--display); font-size: 20px; }

@media (max-width: 640px) {
  .ov { padding: 0; align-items: flex-end; }
  .lb { align-items: center; padding: 12px; }
  .panel { max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .ph { position: sticky; top: -22px; margin: -22px -18px 18px; padding: 16px 18px; background: var(--bg2); border-bottom: 1px solid var(--line); z-index: 2; }
}

/* ---------- Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 99;
  transform: translateX(-50%) translateY(30px); opacity: 0; pointer-events: none;
  background: var(--card2); border: 1px solid var(--line); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: .3s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Fenêtre après paiement */
.paid-panel { width: min(460px, 100%); text-align: center; padding: 40px 32px 28px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(25,211,162,.18), transparent 60%), var(--bg2); border-color: rgba(25,211,162,.3); }
.paid-ico { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  color: #03130A; background: var(--acc); box-shadow: 0 0 0 10px rgba(25,211,162,.12), 0 0 50px rgba(25,211,162,.45);
  animation: paidPop .6s cubic-bezier(.2,.8,.2,1.3) both; }
.paid-panel h3 { font-family: var(--display); font-size: 22px; line-height: 1.2; }
.paid-panel > p { color: var(--mut); font-size: 15px; margin: 12px 0 24px; }
.paid-panel .btn { width: 100%; }
.paid-help { font-size: 13.5px; color: var(--mut); margin-top: 18px; }
.paid-help a { color: var(--blue); font-weight: 700; }
.paid-close { margin-top: 10px; font-size: 13px; font-weight: 600; color: #7F8BA0; padding: 8px 12px; }
.paid-close:hover { color: var(--txt); }
@keyframes paidPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .ov#paid { align-items: center; padding: 16px; }
  .paid-panel { border-radius: 22px; padding: 34px 22px 22px; }
  .paid-panel h3 { font-size: 19px; }
}
