/* ---- Admin meta box (petit style) ---- */
.dbc-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:14px}
.dbc-grid label{font-weight:600;display:block;margin-bottom:6px}
.dbc-grid input,.dbc-grid textarea{width:100%}
.dbc-sub{color:#666;font-size:12px;margin:.25rem 0 0}
.dbc-full{grid-column:1/-1}
.dbc-mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}

/* ---- Front ---- */
.ndbc-wrap{max-width:520px;margin:22px auto;padding:0 14px;--bg:#eef2f6;--card:#fff;--ink:#0f172a;--line:#e5e7eb;--accent:#0b3c74;--accent-2:#22c55e;--icon-a:var(--accent);--icon-b:var(--accent-2)}
.ndbc-root{background:var(--bg);color:var(--ink);font-family:Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial}
.ndbc-card{background:var(--card);border:1px solid var(--line);border-radius:28px;box-shadow:0 30px 70px rgba(15,23,42,.12);overflow:hidden}

.ndbc-head{position:relative;height:180px;overflow:hidden;
  background:linear-gradient(0deg, rgba(0,0,0,.18), rgba(0,0,0,.18)), linear-gradient(120deg, var(--accent), var(--accent-2));
  border-bottom-left-radius:100% 45%; border-bottom-right-radius:100% 45%;}
.ndbc-head[data-has-bg="1"]{background:
  linear-gradient(0deg, rgba(0,0,0,.18), rgba(0,0,0,.18)),
  var(--ndbc-head-bg),
  linear-gradient(120deg, var(--accent), var(--accent-2));}
.ndbc-brand{position:absolute;left:50%;top:16px;transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;background:transparent;border:none;max-width:88%;padding:0}
.ndbc-brand img{display:block;height:auto!important;width:auto!important;max-height:clamp(40px,9vw,64px);max-width:100%;object-fit:contain;aspect-ratio:auto;flex:0 0 auto!important}

.ndbc-top{padding:0 18px 10px;text-align:center;position:relative}
.ndbc-ava{width:160px;height:160px;border-radius:50%!important;object-fit:cover;border:4px solid #fff;box-shadow:0 12px 28px rgba(2,6,23,.25);display:block;margin:0 auto 12px;position:relative;top:-60px;background:#fff}
.ndbc-name{margin:-48px 0 6px;font-size:28px;font-weight:900;letter-spacing:.2px}
.ndbc-role{margin:0 0 6px;color:#475569}

.ndbc-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:8px 18px 6px}
.ndbc-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid var(--line);text-decoration:none;color:var(--ink);font-weight:800}
.ndbc-btn.save{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border-color:transparent}
.ndbc-btn:hover{border-color:#94a3b8}

.ndbc-list{padding:8px}
.ndbc-item{display:flex;align-items:center;gap:12px;padding:12px 10px;border-top:1px solid var(--line);text-decoration:none;color:inherit;background:var(--card)}
.ndbc-item:first-child{border-top:none}

/* Boîte icône homogène */
.ndbc-ico, .ndbc-link-ico{
  width:48px;height:48px;padding:12px;
  border-radius:12px;display:grid;place-items:center;position:relative;flex:0 0 48px;
}
.ndbc-ico::before, .ndbc-link-ico::before{
  content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(135deg,var(--icon-a),var(--icon-b));
  box-shadow:0 8px 16px rgba(2,6,23,.10) inset, 0 6px 18px rgba(2,6,23,.10)
}
.ndbc-ico svg, .ndbc-link-ico svg{
  position:relative;z-index:1;width:100%;height:100%;display:block;
  overflow:visible; shape-rendering:auto;
}
/* Stroke global (line) = 1.5 */
.ndbc-ico svg[data-ndbc="stroke"] *, .ndbc-link-ico svg[data-ndbc="stroke"] *{
  stroke-width:1.5;
  fill:none; stroke:#fff;
  stroke-linecap:round; stroke-linejoin:round;
  vector-effect: non-scaling-stroke;
}
/* Exception Phone = 1 */
.ndbc-ico[data-ico="phone"] svg[data-ndbc="stroke"] *{ stroke-width:1 !important; }

/* Fill brand */
.ndbc-ico svg[data-ndbc="fill"] *, .ndbc-link-ico svg[data-ndbc="fill"] *{ fill:#fff; stroke:none; }

.ndbc-cell{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.ndbc-title{margin:0;font-weight:800;line-height:1.2}
.ndbc-sub{margin:2px 0 0;color:#475569;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.ndbc-chev{color:#94a3b8}

.ndbc-gap{height:22px}

/* QR desktop only */
.ndbc-qr{display:none;padding:0 18px 18px}
.ndbc-qr-inner{display:flex;align-items:center;gap:14px;border:1px dashed var(--line);border-radius:16px;padding:14px;background:var(--card)}
.ndbc-qr img{display:block;border-radius:10px;width:140px;height:140px}
.ndbc-qr h3{margin:0;font-size:16px;font-weight:800}
.ndbc-qr p{margin:.25rem 0 0;color:#475569;font-size:13px}
@media (min-width: 900px){ .ndbc-qr{display:block} }

.ndbc-links{padding:12px}
.ndbc-link-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--card);text-decoration:none;color:var(--ink)}
.ndbc-link-card + .ndbc-link-card{margin-top:10px}
.ndbc-link-card > div{display:flex;flex-direction:column;justify-content:center;min-width:0}
.ndbc-link-sub{margin-top:2px;font-size:13px;color:#475569;overflow-wrap:anywhere}

.ndbc-footer{margin:14px 0 30px;text-align:center;color:#64748b;font-size:12px}

/* RESET marges imposées par certains thèmes */
.ndbc-root p, .ndbc-card p { margin-bottom:0 !important; }

/* Accessibilité + Dark */
.ndbc-item:focus-visible, .ndbc-btn:focus-visible, .ndbc-link-card:focus-visible{
  outline:3px solid rgba(255,255,255,.65); outline-offset:2px; border-color:transparent
}
@media (prefers-color-scheme: dark){
  .ndbc-root{ color:#e2e8f0 }
  .ndbc-wrap{ --bg:#0b1220; --card:#0f172a; --ink:#e2e8f0; --line:#1f2937; }
  .ndbc-card{ box-shadow: 0 30px 70px rgba(0,0,0,.4); }
}

/* iOS Safari: adoucir/masquer les hairlines */
@supports (-webkit-touch-callout: none) {
  .ndbc-card,
  .ndbc-item,
  .ndbc-link-card {
    border-color: rgba(229, 231, 235, 0.35); /* ex #e5e7eb à 35% */
    /* ou: border-color: transparent; pour les cacher totalement */
    /* ou: border: 0; si tu ne veux aucune bordure */
  }

  /* Évite les “lignes fantômes” sur coins arrondis + shadows */
  .ndbc-card,
  .ndbc-link-card {
    background-clip: padding-box;
  }

  /* Si tu gardes des séparateurs entre items, rends-les plus doux */
  .ndbc-item { border-top-color: rgba(229, 231, 235, 0.25); }
}