/* Passerelle, fiche technique + devis (sites moto Groupe JLG).
   S'appuie sur les jetons du design system du site (--ink, --blue, --paper…),
   communs a GL Motos, Power Zone, Sun Motos et Moto First. */

/* ---------- les deux boutons de la carte modele ----------
   Selecteurs doubles (.pmd-cta .pmd-btn, .pmd-modal .pmd-x) : Kadence
   habille tous les <button> (fond, padding) et passerait devant. */
.pmd-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pmd-cta .pmd-btn {
  flex: 1 1 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 8px 12px;
  border-radius: 10px; border: 1px solid transparent;
  font: 700 12.5px/1.1 var(--font-body, system-ui, sans-serif);
  letter-spacing: 0.2px; white-space: nowrap; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pmd-cta .pmd-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.pmd-cta .pmd-btn--fiche {
  background: #fff; color: var(--on-light, #14151A);
  border-color: var(--line-light, #E3E3E3);
}
.pmd-cta .pmd-btn--fiche:hover { border-color: var(--blue); color: var(--blue-deep); background: #fff; }
.pmd-cta .pmd-btn--devis {
  flex-grow: 0;
  background: var(--orange-solid, var(--blue-deep)); color: #fff;
}
.pmd-cta .pmd-btn--devis:hover { background: var(--orange-solid-lift, var(--blue-deep)); color: #fff; }
.pmd-cta .pmd-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Carte etroite (telephone, 232 px) : l'icone cede sa place pour que les deux
   boutons tiennent cote a cote. */
@media (max-width: 600px) {
  .pmd-cta .pmd-btn { padding: 8px 10px; }
  .pmd-cta .pmd-btn svg { display: none; }
}

/* ---------- fenetres ---------- */
html.pmd-ouverte, html.pmd-ouverte body { overflow: hidden; }
.pmd-modal[hidden] { display: none !important; }
.pmd-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pmd-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 6, 8, 0.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.2s ease;
}
.pmd-dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; color: var(--on-light, #14151A);
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
  padding: 30px 28px 26px;
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overscroll-behavior: contain;
}
.pmd-modal.est-visible .pmd-overlay { opacity: 1; }
.pmd-modal.est-visible .pmd-dialog { opacity: 1; transform: none; }

.pmd-modal .pmd-x {
  position: absolute; padding: 0; margin: 0; box-shadow: none; line-height: 1; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line-light, #E3E3E3);
  color: var(--on-light, #14151A); cursor: pointer;
}
.pmd-modal .pmd-x svg { width: 18px; height: 18px; flex: none; }
.pmd-modal .pmd-x:hover { border-color: var(--blue); color: var(--blue-deep); background: #fff; }
.pmd-modal .pmd-x:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.pmd-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--blue-deep); margin: 0 0 6px;
}
.pmd-dialog h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(22px, 3vw, 28px); line-height: 1.02; letter-spacing: 0.3px;
  color: var(--on-light, #14151A); margin: 0 0 10px;
}
.pmd-sub { font-size: 14.5px; color: var(--on-light-soft); margin: 0 0 18px; }

/* ---------- fiche technique ---------- */
.pmd-dialog--fiche { max-width: 860px; padding: 0; display: grid; grid-template-columns: 1fr 1.05fr; }
.pmd-fiche-media {
  background: linear-gradient(180deg, #fff 0%, var(--paper, #F5F5F5) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px; border-right: 1px solid var(--line-light, #E3E3E3);
}
.pmd-fiche-media[hidden] { display: none; }
.pmd-fiche-media img { width: 100%; height: auto; max-height: 300px; object-fit: contain; }
.pmd-fiche-corps { padding: 30px 28px 24px; }
.pmd-specs { margin: 14px 0 12px; border-top: 1px solid var(--line-light, #E3E3E3); }
.pmd-specs > div {
  display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line-light, #E3E3E3);
  font-size: 14px; line-height: 1.35;
}
.pmd-specs dt { color: var(--on-light-soft); font-weight: 600; margin: 0; }
.pmd-specs dd { margin: 0; font-weight: 600; color: var(--on-light, #14151A); font-variant-numeric: tabular-nums; }
.pmd-note { font-size: 12.5px; color: var(--on-light-soft); margin: 0 0 18px; }
.pmd-note a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; }
.pmd-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.pmd-lien-tel { font-size: 14px; font-weight: 600; color: var(--blue-deep); text-decoration: none; }
.pmd-lien-tel:hover { text-decoration: underline; }

/* ---------- formulaire devis ---------- */
.pmd-form { display: grid; gap: 12px; }
.pmd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pmd-field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--on-light, #14151A); }
.pmd-field input, .pmd-field textarea {
  width: 100%; box-sizing: border-box;
  font: 400 15px/1.35 var(--font-body, system-ui, sans-serif);
  color: var(--on-light, #14151A); background: #fff;
  border: 1px solid #CFC8C8; border-radius: 10px; padding: 11px 12px;
  -webkit-appearance: none; appearance: none;
}
.pmd-field textarea { resize: vertical; min-height: 84px; }
.pmd-field input:focus, .pmd-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--blue); }
.pmd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pmd-submit { width: 100%; justify-content: center; margin-top: 4px; }
.pmd-submit[disabled] { opacity: 0.6; cursor: wait; }
.pmd-status { min-height: 1em; font-size: 14px; font-weight: 600; margin: 0; }
.pmd-status.est-ok { color: #1D7A45; }
.pmd-status.est-erreur { color: #B42318; }
.pmd-rgpd { font-size: 12px; color: var(--on-light-soft); margin: 0; }
.pmd-rgpd a { color: inherit; text-decoration: underline; }

/* ---------- telephone : feuille qui monte du bas ---------- */
@media (max-width: 720px) {
  .pmd-modal { align-items: flex-end; padding: 0; }
  .pmd-dialog { max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 26px 20px 22px; transform: translateY(30px); }
  .pmd-dialog--fiche { display: block; padding: 0; }
  .pmd-fiche-media { border-right: 0; border-bottom: 1px solid var(--line-light, #E3E3E3); padding: 22px 56px 14px; }
  .pmd-fiche-media img { max-height: 190px; }
  .pmd-fiche-corps { padding: 20px 20px 24px; }
  .pmd-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pmd-dialog, .pmd-overlay { transition: none; }
}
