/* ============================================================
   ADM Fiche Dashboard — Tableau de bord publication
   5 cartes : Presentation, Catalogue Num, Catalogue Impr, Sponsor, Reserver
   Charte : #8B7500 (or vieilli), #141419 (noir adm), #FAF7ED (blanc chaud)
   ============================================================ */

.adm-modal-services {
  margin: 28px 0 12px;
  padding: 20px 22px;
  background: #FAF7ED;
  border: 1px solid rgba(139, 117, 0, 0.25);
  border-radius: 12px;
  font-family: Georgia, 'Times New Roman', serif;
  /* Grille parente partagee par toutes les lignes (via subgrid).
     col 1 : nom — col 2 : selecteur Noir/Blanc — col 3 : prix — col 4 : bouton */
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(200px, 1.2fr) minmax(90px, 0.6fr) minmax(160px, auto);
  column-gap: 14px;
  row-gap: 0;
}

.adm-modal-services h3 {
  grid-column: 1 / -1;
  margin: 0 0 16px;
  color: #8B7500;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}

.adm-service-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 12px 6px;
  border-top: 1px solid rgba(20, 20, 25, 0.08);
}

.adm-service-row:first-of-type { border-top: none; }

.adm-service-name {
  grid-column: 1 / 2;
  color: #141419;
  font-size: 15px;
  font-weight: 600;
}

.adm-service-price {
  grid-column: 3 / 4;
  color: #8B7500;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  text-align: right;
  white-space: nowrap;
}

.adm-service-actions {
  grid-column: 4 / 5;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* NB : le thème Qi applique #qodef-page-content a{color:#8B7500!important}.
   On prefixe tous les boutons par #adm-modal pour gagner en spécificité (ID>class). */
#adm-modal .adm-service-btn,
.adm-modal-services .adm-service-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #141419 !important;
  color: #FAF7ED !important;
  border: 1px solid #141419 !important;
  border-radius: 6px !important;
  font-family: Georgia, serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.4 !important;
}

#adm-modal .adm-service-btn:hover,
.adm-modal-services .adm-service-btn:hover {
  background: #8B7500 !important;
  color: #FAF7ED !important;
  border-color: #8B7500 !important;
}

#adm-modal .adm-service-btn.is-primary,
.adm-modal-services .adm-service-btn.is-primary {
  background: #8B7500 !important;
  color: #FAF7ED !important;
  border-color: #8B7500 !important;
}

#adm-modal .adm-service-btn.is-primary:hover,
.adm-modal-services .adm-service-btn.is-primary:hover {
  background: #141419 !important;
  color: #FAF7ED !important;
  border-color: #141419 !important;
}

#adm-modal .adm-service-btn.is-disabled,
.adm-modal-services .adm-service-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ---------- Selecteur Noir / Blanc pour les catalogues ---------- */
.adm-cover-selector {
  grid-column: 2 / 3;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.adm-cover-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid rgba(139, 117, 0, 0.35);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: #141419;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.adm-cover-opt input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid rgba(20, 20, 25, 0.4);
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.adm-cover-opt input[type="radio"]:checked {
  border-color: #8B7500;
  background: #8B7500;
  box-shadow: inset 0 0 0 2px #FAF7ED;
}

.adm-cover-opt:has(input[type="radio"]:checked) {
  background: rgba(139, 117, 0, 0.08);
  border-color: #8B7500;
}

.adm-cover-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 25, 0.25);
}

.adm-cover-dot--noir  { background: #141419; border-color: #141419; }
.adm-cover-dot--blanc { background: #FAF7ED; border-color: rgba(20, 20, 25, 0.35); }

.adm-cover-label {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.adm-cover-opt.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.adm-services-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #5a5050;
  font-style: italic;
  font-size: 14px;
  margin: 12px 0 0;
}

/* ---------- Responsive mobile ---------- */
@media (max-width: 640px) {
  .adm-modal-services {
    grid-template-columns: 1fr;
    padding: 16px 14px;
    column-gap: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .adm-modal-services h3 {
    font-size: 11px;
    letter-spacing: 0.14em;
    word-break: break-word;
  }
  .adm-service-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 2px;
    min-width: 0;
  }
  .adm-service-name,
  .adm-service-price,
  .adm-cover-selector,
  .adm-service-actions {
    grid-column: 1 / 2;
    min-width: 0;
  }
  .adm-service-name { font-size: 14px; }
  .adm-service-price { text-align: left; }
  .adm-service-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }
  #adm-modal .adm-service-btn,
  .adm-modal-services .adm-service-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
  }
}
