.me-page {
  min-height: 100vh;
  background: #f8f9fa;
  padding-top: 1rem;
  padding-bottom: 30px;
}

@media (min-width: 768px) {
  .me-page {
    padding-top: 2rem;
  }
}

.me-root {
  display: grid;
  gap: 20px;
}

/* Bloc titre + fiche + lien + onglets (aligné maquette liste résine) */
.me-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.me-fiche {
  margin: 0;
  width: 100%;
  text-align: center;
}

.me-fiche details {
  display: inline-block;
  max-width: 100%;
}

/* Pilule « Fiche Produit » — fond gris très clair, bordure légère (maquette médailles) */
.me-fiche summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  min-width: min(100%, 280px);
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  color: #5c5c5c;
  font-size: 13px;
  font-weight: 500;
  background: #f3f4f6;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.me-fiche summary::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background: #9ca3af;
  opacity: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E") no-repeat center / contain;
}

.me-fiche__label {
  flex: 1;
  text-align: center;
}

.me-fiche summary::-webkit-details-marker,
.me-fiche summary::marker {
  display: none;
  content: "";
}

.me-fiche summary::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: 2px;
  background: #9ca3af;
  transition: transform 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.me-fiche details[open] summary::after {
  transform: rotate(180deg);
}

.me-fiche summary:hover {
  background: #eceff2;
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.me-fiche details[open] summary {
  background: #eef0f3;
  border-color: #d1d5db;
}

.me-fiche__body {
  margin: 12px auto 0;
  max-width: 36rem;
  text-align: left;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 18px;
}

.me-loading {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  color: #64748b;
}

/* Fil d’Ariane : classes .collier-breadcrumb dans main.js + main.css */

.me-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  gap: 14px;
  padding: 4px 0 0;
}

/* Même typo que .collier-header h1 (page collier) */
.me-title h1 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
}

.me-title__subtitle {
  margin: 0;
  max-width: 42rem;
  color: #5c6c7a;
  font-size: 14px;
  line-height: 1.55;
  font-family: var(--font-serif);
}

.me-title__gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: #6b5c3e;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.me-title__gallery-link::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.88;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2' ry='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2' ry='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E") no-repeat center / contain;
}

.me-title__gallery-link:hover {
  text-decoration: underline;
  color: #5c4d32;
}

.me-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 0;
  width: 100%;
}

.me-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  min-height: 40px;
  box-sizing: border-box;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.me-pill:hover:not(.is-active) {
  border-color: #cbd5e1;
  color: #475569;
}

.me-pill.is-active {
  border-color: var(--primary-500, #0ea5e9);
  background: #ecf7ff;
  color: var(--primary-600, #0369a1);
  cursor: default;
}

.me-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .me-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.me-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .15s;
}

.me-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.me-card:active {
  transform: scale(.99);
}

.me-card--disabled {
  opacity: .75;
  cursor: not-allowed;
  pointer-events: none;
}

.me-img {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.me-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.me-img--detail img {
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 72%;
}

.me-img--detail {
  height: auto;
  min-height: 220px;
}

.me-ref {
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-sub {
  color: #6b7280;
  font-size: 13px;
  margin-top: 2px;
}

.me-price {
  margin-top: 6px;
  color: var(--primary-600);
  font-weight: 800;
  font-size: 18px;
}

.me-detail {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 768px) {
  .me-detail {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.me-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  height: 100%;
}

.me-panel--preview {
  display: flex;
  flex-direction: column;
}

.me-panel--preview > .me-help:first-child {
  margin-top: 0;
}

.me-back-link {
  margin-top: auto;
  align-self: flex-start;
}

.me-panel h2, .me-panel h3 {
  margin: 0 0 10px;
  color: #111827;
}

.me-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.me-row label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.me-input,
.me-select {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.25;
  color: #0f172a;
  background-color: #fff;
}

.me-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.me-input:disabled,
.me-select:disabled {
  background: #f3f4f6;
  color: #94a3b8;
  border-color: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.85;
}

.me-swatch:disabled,
.me-swatch.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.15);
}

.me-help--disabled {
  color: #94a3b8;
}

.me-input::placeholder {
  color: #94a3b8;
}

.me-input:focus::placeholder {
  color: transparent;
}

.me-help {
  font-size: 12px;
  color: #6b7280;
}

/* Indique les modèles "Sur commande" (modèle unique, photo non contractuelle) */
.me-unique-inline {
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary-800, #92400e);
  background: color-mix(in srgb, var(--primary-100, #fffbeb) 55%, #fff);
  border: 1px solid var(--primary-200, #fde68a);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.me-unique-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--primary-900, #4d4032);
  background: color-mix(in srgb, var(--primary-50, #f8fafc) 65%, #fff);
  border: 1px solid var(--primary-200, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.55;
}

/* Comme .shipping-note (page collier) : encart crème / bordure ambre */
.me-shipping-note {
  margin-top: 12px;
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.5;
}

.me-shipping-note strong {
  font-size: 13px;
  font-weight: 700;
}

.me-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.me-swatch {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  position: relative;
}

.me-swatch.is-active {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
}

.me-cta {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  background: var(--primary-600);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.me-cta__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.me-cta__icon {
  flex-shrink: 0;
  display: block;
}

.me-cta__label {
  line-height: 1.2;
}

.me-cta:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.me-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.5);
}

.me-modal__panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.me-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.me-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  border: 2px solid var(--primary-500);
  background: #fff;
  color: var(--primary-700);
  cursor: pointer;
}

.me-btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
}

