/* SonoFrance DNS — v2 : règles limitées à #sf-dns. Charger après les CSS du site. */
#sf-dns, #sf-dns *, #sf-dns *::before, #sf-dns *::after { box-sizing:border-box; }
#sf-dns { display:block; clear:both; width:100%; max-width:100%; min-width:0; margin:22px 0; padding:20px; border:1px solid #d6e0ec; border-radius:10px; background:#fff; color:#243247; font:inherit; line-height:1.5; overflow-wrap:break-word; }
#sf-dns h2 { margin:0 0 10px; padding:0; font-size:1.45rem; line-height:1.3; color:inherit; }
#sf-dns p { margin:8px 0 12px; color:inherit; }
#sf-dns #sf-dns-form { display:block; margin:0; padding:0; width:100%; max-width:100%; background:transparent; border:0; box-shadow:none; }
#sf-dns .sf-dns-controls { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
#sf-dns label { color:inherit; font:inherit; font-weight:600; }
#sf-dns .sf-dns-domain-label { display:flex; flex-direction:column; flex:1 1 260px; min-width:0; gap:6px; }
#sf-dns #sf-dns-domain { display:block; width:100%; min-width:0; max-width:100%; height:auto; min-height:42px; margin:0; padding:10px 12px; border:1px solid #b8c4d6; border-radius:6px; background:#fff; color:#243247; font:inherit; box-shadow:none; }
#sf-dns #sf-dns-domain:focus-visible { outline:2px solid #2769ae; outline-offset:2px; }
#sf-dns button { display:inline-flex; justify-content:center; align-items:center; width:auto; min-height:42px; margin:0; padding:9px 14px; border:1px solid #235a9b; border-radius:6px; background:#235a9b; color:#fff; font:inherit; font-size:.95rem; font-weight:600; line-height:1.3; text-align:center; text-transform:none; letter-spacing:normal; white-space:normal; cursor:pointer; box-shadow:none; }
#sf-dns button:hover:not(:disabled) { background:#174679; border-color:#174679; color:#fff; }
#sf-dns button:focus-visible { outline:2px solid #174679; outline-offset:3px; }
#sf-dns button:disabled { opacity:.6; cursor:wait; }
#sf-dns .sf-dns-select-controls { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:16px 0 10px; }
#sf-dns .sf-dns-small-buttons { display:flex; gap:8px; flex-wrap:wrap; }
#sf-dns .sf-dns-small-buttons button { min-height:34px; padding:7px 10px; background:#f3f7fc; color:#235a9b; font-size:.85rem; }
#sf-dns .sf-dns-small-buttons button:hover { background:#e0ebf9; color:#174679; }
#sf-dns .sf-dns-type-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:8px; width:100%; }
#sf-dns .sf-dns-type { display:flex; min-width:0; align-items:center; justify-content:flex-start; gap:8px; padding:9px 10px; border:1px solid #d6e0ec; border-radius:6px; background:#f9fbff; font-size:.9rem; font-weight:500; line-height:1.2; cursor:pointer; }
#sf-dns .sf-dns-type:has(input:checked) { border-color:#8eb3dc; background:#edf5fe; }
#sf-dns .sf-dns-type input[type=checkbox] { display:inline-block; width:16px; height:16px; min-width:16px; min-height:16px; padding:0; margin:0; accent-color:#235a9b; appearance:auto; -webkit-appearance:checkbox; cursor:pointer; }
#sf-dns .sf-dns-status { min-height:1.5em; margin:14px 0 8px; font-size:.92rem; }
#sf-dns #sf-dns-results { display:block; min-width:0; max-width:100%; }
#sf-dns .sf-dns-result { display:block; min-width:0; margin:16px 0; padding:12px; background:#f8fbff; border:1px solid #d6e0ec; border-radius:8px; overflow:hidden; }
#sf-dns .sf-dns-result h3 { margin:0 0 10px; padding:0; color:inherit; font-size:1.1rem; }
#sf-dns .sf-dns-table-wrap { display:block; width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
#sf-dns .sf-dns-table { display:table; width:100%; min-width:520px; border-collapse:collapse; border-spacing:0; margin:0; font-size:.88rem; background:transparent; table-layout:fixed; }
#sf-dns .sf-dns-table th, #sf-dns .sf-dns-table td { display:table-cell; border:0; border-bottom:1px solid #dbe2ea; padding:9px 8px; text-align:left; vertical-align:top; color:inherit; overflow-wrap:anywhere; word-break:break-word; background:transparent; }
#sf-dns .sf-dns-table th { background:#e8f1fc; color:#183e6c; font-weight:700; }
#sf-dns .sf-dns-table th:nth-child(1) {width:24%;} #sf-dns .sf-dns-table th:nth-child(2) {width:16%;} #sf-dns .sf-dns-table th:nth-child(3) {width:12%;} #sf-dns .sf-dns-table th:nth-child(4) {width:48%;}
#sf-dns .sf-dns-record + .sf-dns-record { margin-top:6px; }
#sf-dns .sf-dns-muted { font-size:.85rem; color:#5b6877; }
#sf-dns .sf-dns-error { color:#a12727; }
#sf-dns .sf-dns-pending { padding:12px; color:#617081; }
@media (max-width:650px) {
  #sf-dns { margin:16px 0; padding:12px; }
  #sf-dns h2 { font-size:1.25rem; }
  #sf-dns .sf-dns-controls { flex-direction:column; align-items:stretch; }
  #sf-dns .sf-dns-domain-label { flex:1 1 auto; width:100%; }
  #sf-dns #sf-dns-submit { width:100%; }
  #sf-dns .sf-dns-type-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  #sf-dns .sf-dns-type { padding:8px 6px; font-size:.8rem; gap:5px; }
  #sf-dns .sf-dns-result { padding:8px; }
}
@media (max-width:350px) { #sf-dns .sf-dns-type-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Types non applicables à l'entrée : visuellement désactivés */
#sf-dns .sf-dns-type:has(input:disabled) { opacity: 0.42; cursor: not-allowed; }
#sf-dns .sf-dns-type input:disabled { cursor: not-allowed; }

/* v6 : une ligne par type DNS et détail des résolveurs en fenêtre flottante. */
#sf-dns .sf-dns-result { position:relative; overflow:visible; }
#sf-dns .sf-dns-result.sf-dns-open { z-index:30; }
#sf-dns .sf-dns-summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; min-height:36px; }
#sf-dns .sf-dns-summary h3 { margin:0; flex:1 1 210px; font-size:1rem; }
#sf-dns .sf-dns-count { color:#526477; font-size:.83rem; white-space:nowrap; }
#sf-dns button.sf-dns-resolver-toggle { min-height:32px; padding:5px 10px; background:#edf4fc; color:#235a9b; border-color:#b8cce4; font-size:.85rem; }
#sf-dns button.sf-dns-resolver-toggle:hover { color:#174679; background:#dae9fa; }
#sf-dns .sf-dns-popup { display:none; position:absolute; top:calc(100% - 2px); right:0; width:min(940px, 100%); max-height:min(68vh, 550px); overflow:auto; background:#fff; border:1px solid #a6bfdc; box-shadow:0 12px 28px rgba(18,44,77,.2); border-radius:8px; padding:12px; z-index:31; }
#sf-dns .sf-dns-open > .sf-dns-popup { display:block; }
#sf-dns .sf-dns-popup .sf-dns-table { min-width:520px; }
#sf-dns .sf-dns-empty h3 { margin:0; font-size:1rem; font-weight:600; }
@media (max-width:650px) {
  #sf-dns .sf-dns-count { white-space:normal; }
  #sf-dns .sf-dns-popup { left:0; right:0; width:100%; padding:8px; max-height:60vh; }
}

/* Regroupement des vérifications automatiques MX (v10). */
.sf-dns-mail-group { margin-top: 1rem; }
.sf-dns-mail-group h4 { margin: .65rem 0; font-size: 1rem; }

/* v11: regrouper les contrôles par serveur MX. */
#sf-dns .sf-dns-mx-host { margin: 0.65rem 0; padding: 0.65rem 0.75rem; border: 1px solid rgba(127,127,127,.22); border-radius: 8px; }
#sf-dns .sf-dns-mx-host h5 { margin: 0 0 .5rem; font-size: 1rem; }

/* v12 — boutons orange SonoFrance, limités au module DNS. */
#sf-dns button,
#sf-dns .sf-dns-small-buttons button,
#sf-dns button.sf-dns-resolver-toggle {
  background-color: #ec9f39;
  border-color: #ec9f39;
  color: #231800;
}
#sf-dns button:hover:not(:disabled),
#sf-dns .sf-dns-small-buttons button:hover:not(:disabled),
#sf-dns button.sf-dns-resolver-toggle:hover:not(:disabled) {
  background-color: #d78a24;
  border-color: #d78a24;
  color: #231800;
}
#sf-dns button:focus-visible { outline: 2px solid #8f5109; outline-offset: 3px; }
#sf-dns .sf-dns-type input[type=checkbox] { accent-color: #ec9f39; }
#sf-dns .sf-dns-type:has(input:checked) { border-color:#ec9f39; background:#fff4e4; }
