/* Composants utilitaires custom */

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.125rem 0.4rem;
  border: 1px solid rgb(203 213 225);
  background: rgb(248 250 252);
  border-radius: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.7rem;
  color: rgb(51 65 85);
  font-weight: 500;
  box-shadow: 0 1px 0 rgb(203 213 225);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: rgb(15 23 42); color: white; }
.btn-primary:hover { background: rgb(30 41 59); }
.btn-secondary { background: white; color: rgb(51 65 85); border-color: rgb(203 213 225); }
.btn-secondary:hover { background: rgb(248 250 252); }
.btn-success { background: rgb(5 150 105); color: white; }
.btn-success:hover { background: rgb(4 120 87); }
.btn-danger { background: rgb(220 38 38); color: white; }
.btn-danger:hover { background: rgb(185 28 28); }
.btn-warning { background: rgb(245 158 11); color: white; }
.btn-warning:hover { background: rgb(217 119 6); }
.btn-ghost { color: rgb(71 85 105); background: transparent; }
.btn-ghost:hover { background: rgb(241 245 249); color: rgb(15 23 42); }

.card {
  background: white;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem;
}

input[type="range"] {
  appearance: none;
  height: 6px;
  background: rgb(226 232 240);
  border-radius: 9999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(99 102 241);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(99 102 241);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgb(203 213 225);
  border-radius: 9999px;
  transition: 0.2s;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .slider { background: rgb(99 102 241); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
}
.badge-green { background: rgb(220 252 231); color: rgb(22 101 52); }
.badge-amber { background: rgb(254 243 199); color: rgb(146 64 14); }
.badge-red { background: rgb(254 226 226); color: rgb(153 27 27); }
.badge-blue { background: rgb(219 234 254); color: rgb(30 64 175); }
.badge-slate { background: rgb(241 245 249); color: rgb(51 65 85); }

/* Mise en forme des descriptions produit Shopify (body_html) */
.prose-product { line-height: 1.55; }
.prose-product > * + * { margin-top: 0.65em; }
.prose-product p { margin: 0; }
.prose-product strong, .prose-product b { font-weight: 600; color: rgb(15 23 42); }
.prose-product em, .prose-product i { font-style: italic; }
.prose-product u { text-decoration: underline; text-underline-offset: 2px; }
.prose-product h1, .prose-product h2, .prose-product h3, .prose-product h4 {
  font-weight: 600;
  color: rgb(15 23 42);
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  line-height: 1.3;
}
.prose-product h1 { font-size: 1.05em; }
.prose-product h2 { font-size: 1em; }
.prose-product h3 { font-size: 0.95em; }
.prose-product h4 { font-size: 0.9em; }
.prose-product ul, .prose-product ol {
  margin: 0.5em 0;
  padding-left: 1.4em;
}
.prose-product ul { list-style: disc; }
.prose-product ol { list-style: decimal; }
.prose-product li { margin: 0.25em 0; }
.prose-product li::marker { color: rgb(99 102 241); }
.prose-product blockquote {
  border-left: 3px solid rgb(203 213 225);
  padding-left: 0.75em;
  color: rgb(71 85 105);
  font-style: italic;
}
.prose-product a {
  color: rgb(79 70 229);
  text-decoration: underline;
  text-decoration-color: rgb(165 180 252);
  text-underline-offset: 2px;
}
.prose-product a:hover { color: rgb(67 56 202); }
.prose-product table {
  border-collapse: collapse;
  font-size: 0.9em;
  width: 100%;
  margin: 0.6em 0;
}
.prose-product th, .prose-product td {
  border: 1px solid rgb(226 232 240);
  padding: 0.4em 0.6em;
  text-align: left;
}
.prose-product th { background: rgb(248 250 252); font-weight: 600; }
.prose-product br + br { display: none; }

/* Toggle clean pour <details> dans la page historique */
.review-collapse summary::-webkit-details-marker { display: none; }
.review-collapse .when-open { display: none; }
.review-collapse[open] .when-closed { display: none; }
.review-collapse[open] .when-open { display: inline; }
