/* ═══════════════════════════════════════════════════════════════
   CAROOM : Generateur d'Embeds Presse V2 - CSS
   Namespace : .gen-embed-*
   Root ID   : #gen-embed-root
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@700;800;900&display=swap');

/* ── CONTENEUR PRINCIPAL ────────────────────────────────────── */
#gen-embed-root {
  font-family: 'DM Sans', Helvetica, Arial, sans-serif !important;
  color: #1a1a1a !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

#gen-embed-root .gen-embed-wrap {
  max-width: 1060px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* ── HEADER ─────────────────────────────────────────────────── */
#gen-embed-root .gen-embed-header {
  text-align: center !important;
  padding: 24px 0 20px !important;
  border-bottom: 2px solid #e2e2e2 !important;
  margin-bottom: 24px !important;
}

#gen-embed-root .gen-embed-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #185FA5 !important;
  letter-spacing: -0.5px !important;
  margin: 0 0 6px 0 !important;
}

#gen-embed-root .gen-embed-subtitle {
  font-size: 13px !important;
  color: #666 !important;
  margin: 0 0 6px 0 !important;
}

#gen-embed-root .gen-embed-contact {
  font-size: 11px !important;
  color: #999 !important;
}

#gen-embed-root .gen-embed-contact a {
  color: #185FA5 !important;
  text-decoration: none !important;
}

#gen-embed-root .gen-embed-contact a:hover {
  text-decoration: underline !important;
}

/* ── LAYOUT GRILLE ──────────────────────────────────────────── */
#gen-embed-root .gen-embed-grid {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  gap: 28px !important;
  align-items: start !important;
}

#gen-embed-root .gen-embed-col-left,
#gen-embed-root .gen-embed-col-right {
  min-width: 0 !important;
}

/* ── CHAMPS ET LABELS ───────────────────────────────────────── */
#gen-embed-root .gen-embed-field {
  margin-bottom: 18px !important;
}

#gen-embed-root .gen-embed-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #999 !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 8px !important;
}

#gen-embed-root .gen-embed-label-count {
  color: #185FA5 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 600 !important;
}

/* ── BOUTONS FORMAT ─────────────────────────────────────────── */
#gen-embed-root .gen-embed-format-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

#gen-embed-root .gen-embed-format-btn {
  width: 100% !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border: 1px solid #e0e0e0 !important;
  background: #fff !important;
  cursor: pointer !important;
  text-align: left !important;
  font-family: inherit !important;
  transition: all 0.15s !important;
  display: block !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
}

#gen-embed-root .gen-embed-format-btn:hover {
  border-color: #185FA5 !important;
  background: #f7fafd !important;
}

#gen-embed-root .gen-embed-format-btn--active {
  border: 2px solid #185FA5 !important;
  background: rgba(24, 95, 165, 0.05) !important;
  padding: 11px 13px !important;
}

#gen-embed-root .gen-embed-format-name {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin-bottom: 2px !important;
}

#gen-embed-root .gen-embed-format-btn--active .gen-embed-format-name {
  color: #185FA5 !important;
}

#gen-embed-root .gen-embed-format-desc {
  font-size: 10px !important;
  color: #888 !important;
}

/* ── SELECTS ────────────────────────────────────────────────── */
#gen-embed-root .gen-embed-select {
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid #ddd !important;
  font-size: 13px !important;
  font-family: inherit !important;
  background: #fff !important;
  box-sizing: border-box !important;
  color: #1a1a1a !important;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  height: auto !important;
  min-height: 40px !important;
}

#gen-embed-root .gen-embed-select:focus {
  outline: 2px solid #185FA5 !important;
  outline-offset: 1px !important;
  border-color: #185FA5 !important;
}

/* ── RANGE SLIDER (override theme Caroom) ───────────────────── */
#gen-embed-root .gen-embed-range {
  width: 100% !important;
  height: 6px !important;
  min-height: 6px !important;
  max-height: 6px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: #e0e0e0 !important;
  border-radius: 3px !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 8px 0 !important;
  cursor: pointer !important;
}

#gen-embed-root .gen-embed-range::-webkit-slider-runnable-track {
  height: 6px !important;
  min-height: 6px !important;
  max-height: 6px !important;
  background-color: #e0e0e0 !important;
  border-radius: 3px !important;
  border: none !important;
  box-shadow: none !important;
}

#gen-embed-root .gen-embed-range::-moz-range-track {
  height: 6px !important;
  background-color: #e0e0e0 !important;
  border-radius: 3px !important;
  border: none !important;
  box-shadow: none !important;
}

#gen-embed-root .gen-embed-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background-color: #185FA5 !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  cursor: pointer !important;
  margin-top: -7px !important;
}

#gen-embed-root .gen-embed-range::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background-color: #185FA5 !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  cursor: pointer !important;
}

/* ── CHIPS MULTI-SELECT (tableau) ───────────────────────────── */
#gen-embed-root .gen-embed-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

#gen-embed-root .gen-embed-chip {
  padding: 5px 9px !important;
  border-radius: 6px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  border: 1px solid #ddd !important;
  background: #fff !important;
  color: #666 !important;
  cursor: pointer !important;
  transition: all 0.1s !important;
  line-height: 1.3 !important;
}

#gen-embed-root .gen-embed-chip:hover {
  border-color: #185FA5 !important;
  color: #185FA5 !important;
}

#gen-embed-root .gen-embed-chip--active {
  border-color: #185FA5 !important;
  background: rgba(24, 95, 165, 0.1) !important;
  color: #185FA5 !important;
}

/* ── APERCU ─────────────────────────────────────────────────── */
#gen-embed-root .gen-embed-preview {
  padding: 24px !important;
  background: #f5f5f5 !important;
  border-radius: 12px !important;
  border: 1px solid #e0e0e0 !important;
  overflow-x: auto !important;
}

/* Les tables dans l'apercu (widgets generes) doivent s'afficher en table */
#gen-embed-root .gen-embed-preview table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  margin: 0 !important;
}

#gen-embed-root .gen-embed-preview th,
#gen-embed-root .gen-embed-preview td {
  border: none !important;
}

#gen-embed-root .gen-embed-preview a {
  text-decoration: none !important;
}

/* ── BLOC CODE ──────────────────────────────────────────────── */
#gen-embed-root .gen-embed-code-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}

#gen-embed-root .gen-embed-copy-btn {
  padding: 8px 20px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #185FA5 !important;
  color: #fff !important;
  transition: background 0.2s !important;
  line-height: 1.3 !important;
}

#gen-embed-root .gen-embed-copy-btn:hover {
  background: #0D3F73 !important;
}

#gen-embed-root .gen-embed-copy-btn--ok {
  background: #22963C !important;
}

#gen-embed-root .gen-embed-code {
  padding: 16px !important;
  border-radius: 10px !important;
  background: #1a1a2e !important;
  color: #a8d8ea !important;
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  overflow: auto !important;
  max-height: 320px !important;
  border: 1px solid #333 !important;
  white-space: pre-wrap !important;
  word-break: break-all !important;
  margin: 0 !important;
}

#gen-embed-root .gen-embed-code code {
  font-family: inherit !important;
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border: none !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#gen-embed-root .gen-embed-footer {
  padding: 20px 0 !important;
  font-size: 10px !important;
  color: #999 !important;
  text-align: center !important;
  line-height: 1.6 !important;
  margin-top: 28px !important;
  border-top: 1px solid #e2e2e2 !important;
}

#gen-embed-root .gen-embed-footer a {
  color: #185FA5 !important;
  text-decoration: none !important;
}

/* ── RESPONSIVE MOBILE ──────────────────────────────────────── */
@media (max-width: 768px) {
  #gen-embed-root .gen-embed-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  #gen-embed-root .gen-embed-title {
    font-size: 20px !important;
  }
  #gen-embed-root .gen-embed-code {
    font-size: 10px !important;
    max-height: 240px !important;
  }
  #gen-embed-root .gen-embed-preview {
    padding: 16px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   WORDPRESS THEME OVERRIDES (theme Caroom force display:block sur table)
   ═══════════════════════════════════════════════════════════════ */
#gen-embed-root,
#gen-embed-root div,
#gen-embed-root table,
#gen-embed-root th,
#gen-embed-root td,
#gen-embed-root button,
#gen-embed-root select,
#gen-embed-root input,
#gen-embed-root pre,
#gen-embed-root code {
  max-width: none !important;
  box-sizing: border-box !important;
}

#gen-embed-root table {
  display: table !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border: none !important;
  border-collapse: collapse !important;
}

#gen-embed-root tbody {
  display: table-row-group !important;
}

#gen-embed-root thead {
  display: table-header-group !important;
}

#gen-embed-root tr {
  display: table-row !important;
}

#gen-embed-root th,
#gen-embed-root td {
  display: table-cell !important;
  border: none !important;
}

#gen-embed-root button {
  box-shadow: none !important;
  text-shadow: none !important;
  line-height: 1.3 !important;
}

#gen-embed-root pre {
  background: #1a1a2e !important;
  color: #a8d8ea !important;
}
