/* /static/css/book.css */

/* ================= Buttons ================= */
.btn-primary {
  background: #22d3ee;
  color: #000;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(34,211,238,.35), 0 0 30px rgba(34,211,238,.1);
}

.btn-mini {
  background: rgba(34,211,238,.12);
  color: #a2ecf5;
  border: 1px solid rgba(34,211,238,.35);
  border-radius: 9999px;
  padding: .35rem .8rem;
  font-size: .85rem;
  font-weight: 600;
  transition: background .15s ease, transform .1s ease, box-shadow .2s ease;
}
.btn-mini:hover { background: rgba(34,211,238,.2); transform: translateY(-1px); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .5rem;
  width: 42px; height: 42px; border-radius: 9999px;
  border: 1px solid rgba(248,113,113,.5);
  color: #fecaca; background: rgba(239,68,68,.12);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn-icon:hover {
  transform: translateY(-1px);
  background: rgba(239,68,68,.2);
  box-shadow: 0 0 14px rgba(239,68,68,.25);
}

.btn-danger {
  background: rgba(239,68,68,.15);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,.4);
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.6rem 1.1rem;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(239,68,68,.3);
  background: rgba(239,68,68,.22);
}

/* ================= Inputs ================= */
.input-dark {
  appearance: none;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(15,23,42,.65);
  color: #e5e7eb;
  padding: 12px 14px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.input-dark::placeholder { color: #9fbac1; }
.input-dark:focus {
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 0 0 3px rgba(34,211,238,.25);
  transform: translateY(-1px);
}
/* error state */
.input-error {
  border-color: rgba(239,68,68,.7) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.25) !important;
}
@keyframes subtle-shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.shake { animation: subtle-shake .28s ease; }

/* ================= Dropzone ================= */
.dropzone {
  box-shadow: 0 0 0 0 rgba(34,211,238,0), 0 0 0 0 rgba(34,211,238,0);
  transition: box-shadow .25s ease, transform .2s ease;
}
.dropzone:hover { transform: translateY(-1px); }
.dropzone.is-dragover {
  box-shadow: 0 0 20px 2px rgba(34,211,238,.35), 0 0 60px 10px rgba(34,211,238,.12);
}

/* ================= Cards ================= */
.data-card {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: 16px;
  padding: 16px;
}
.data-card h3 { font-weight: 700; margin-bottom: 8px; }

/* ========== Key/Value grid (Global Settings & Fleet details) ========== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px 18px;
}
.settings-item {
  display: grid;
  grid-template-columns: minmax(180px, max-content) 1fr;
  align-items: start;
  gap: 14px;
}
.settings-item .label {
  display: flex; align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34,211,238,.35);
  background: rgba(34,211,238,.10);
  color: #67e8f9;
  font-weight: 700; letter-spacing: .15px;
  white-space: normal; min-width: 0;
}
.settings-item .value {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(15,23,42,.65);
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  min-width: 0;
  overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
@media (max-width: 640px) {
  .settings-item { grid-template-columns: 1fr; }
}

/* ================= Collapsible cards ================= */
.collapsible-card {
  border: 1px solid rgba(34,211,238,.25);
  border-radius: .9rem;
  background: rgba(0,0,0,.28);
}
.collapsible-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  cursor: pointer; user-select: none;
  background: rgba(15,23,42,.6);
  border-bottom: 1px solid rgba(34,211,238,.15);
  border-radius: .9rem;
}
.collapsible-card[open] .collapsible-summary {
  border-bottom-color: rgba(34,211,238,.25);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.collapsible-summary .hint { color: #9fbac1; font-size: .85rem; }
.collapsible-body { padding: 1rem; }

/* ================= Host Footer (barre centrée) ================= */
.host-footer {
  display: flex;
  justify-content: center;
  margin: 28px 0 8px;
}
.host-footer-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 9999px;
  padding: .55rem .8rem .55rem 1rem;
  box-shadow: 0 8px 32px rgba(34,211,238,.12);
  backdrop-filter: blur(6px);
}
.host-footer-price {
  color: #a7f3d0;
  font-weight: 800;
  letter-spacing: .2px;
}

/* ================= How-To link — HIGH CONTRAST ================= */
.howto-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.25rem;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #e6faff;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(2, 6, 23, .85), rgba(2, 6, 23, .92)),
    linear-gradient(180deg, rgba(34, 211, 238, .22), rgba(34, 211, 238, .12));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(165, 243, 252, .75);
  box-shadow:
    inset 0 0 0 2px rgba(103, 232, 249, .28),
    0 10px 30px rgba(34, 211, 238, .18),
    0 0 0 1px rgba(2, 6, 23, .6);
  cursor: pointer;
  transition:
    transform .12s ease,
    box-shadow .22s ease,
    background .22s ease,
    border-color .22s ease,
    color .22s ease;
}
.howto-link:hover {
  transform: translateY(-1px);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(2, 6, 23, .90), rgba(2, 6, 23, .96)),
    linear-gradient(180deg, rgba(34, 211, 238, .32), rgba(34, 211, 238, .16));
  border-color: rgba(165, 243, 252, .95);
  box-shadow:
    inset 0 0 0 2px rgba(103, 232, 249, .38),
    0 16px 38px rgba(34, 211, 238, .28),
    0 0 0 1px rgba(2, 6, 23, .7);
}
.howto-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, .5),
    0 0 0 6px rgba(34, 211, 238, .22),
    inset 0 0 0 2px rgba(103, 232, 249, .38);
}
.howto-link--hero { padding: 1rem 1.25rem; }
.howto-icon, .howto-arrow { color: #c9fbff; opacity: 1; }
.howto-stack { display: flex; flex-direction: column; line-height: 1.12; }
.howto-title {
  color: inherit;
  font-size: 1.05rem;
  text-shadow: 0 0 6px rgba(34, 211, 238, .55), 0 1px 0 rgba(255,255,255,.08);
}
.howto-sub {
  font-weight: 700;
  font-size: .82rem;
  color: #bdf5ff;
  opacity: .98;
  letter-spacing: .15px;
  margin-top: .15rem;
}
.pulse-dot {
  position: absolute;
  top: -6px; right: -6px;
  width: 10px; height: 10px;
  border-radius: 9999px;
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, .8);
  animation: howto-ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes howto-ping {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,238,.65); transform: scale(1); }
  70%  { box-shadow: 0 0 0 10px rgba(34,211,238,0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); transform: scale(1); }
}
@media (prefers-contrast: more) {
  .howto-link {
    background: #06121d;
    border-color: #67e8f9;
    box-shadow: inset 0 0 0 2px #67e8f9, 0 0 0 2px rgba(2,6,23,.9);
  }
  .howto-sub { color: #e6faff; }
}
@media (forced-colors: active) {
  .howto-link { border: 2px solid ButtonText; }
}
@media (max-width: 420px) {
  .howto-sub { display: none; }
  .howto-link { padding: .9rem 1.05rem; }
}

/* ================= Modals (overlay + dialog animations) ================= */
.modal-overlay {
  z-index: 1000 !important;   /* au-dessus du header sticky */
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.is-closing {
  opacity: 0;
}
.modal-dialog {
  transform: translateY(8px) scale(.98);
  opacity: .96;
  transition: transform .24s ease, opacity .24s ease;
  will-change: transform, opacity;
}
.modal-overlay.is-open .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ================= Security Disclaimer (added) ================= */
.security-disclaimer {
  border: 1px dashed rgba(251, 191, 36, .55); /* amber-400 */
  background: rgba(251, 191, 36, .07);
  border-radius: 14px;
  padding: 12px 14px;
}
.sd-head {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .25rem;
}
.sd-icon { font-size: 1.05rem; }
.sd-title {
  font-weight: 800;
  letter-spacing: .2px;
  color: #fde68a; /* amber-200 */
  text-transform: uppercase;
}
.sd-text {
  color: #fef3c7; /* amber-100 */
  font-size: .9rem;
  line-height: 1.35;
}
.sd-code {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(148,163,184,.25);
  padding: .1rem .35rem;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}
.sd-urlcheck { margin-left: .35rem; }
.sd-badge {
  display: inline-block;
  margin-left: .45rem;
  padding: .15rem .5rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .3px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(148,163,184,.15);
  color: #e5e7eb;
}
.sd-badge.ok {
  border-color: rgba(16,185,129,.5);
  background: rgba(16,185,129,.15);
  color: #bbf7d0;
}
.sd-badge.bad {
  border-color: rgba(239,68,68,.55);
  background: rgba(239,68,68,.18);
  color: #fecaca;
}
