/* ===== STYLES DU TABLEAU DE BORD PROFESSIONNEL EDZ ===== */

/* Bandeau d'annonce public */
.notice-bar {
  background: var(--notice-bg, var(--yellow, #FFC926));
  color: var(--notice-fg, var(--navy, #06223f));
  font-family: var(--notice-font, var(--font, inherit));
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
body.has-notice {
  padding-top: var(--notice-h, 40px);
}
body.has-notice .pt-head {
  top: var(--notice-h, 40px);
}
body.has-notice .pt-side {
  top: var(--notice-h, 40px);
}
.notice-bar span {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  min-width: 0;
}
.notice-bar.is-scrolling span {
  overflow: hidden;
  white-space: nowrap;
}
.notice-track {
  display: inline-flex;
  gap: 80px;
  padding-left: 40px;
  animation: noticeMarquee var(--notice-dur, 22s) linear infinite;
}
.notice-bar.is-scrolling:hover .notice-track {
  animation-play-state: paused;
}
.notice-track em {
  font-style: normal;
  white-space: nowrap;
}
@keyframes noticeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 40px)); }
}
.notice-bar button {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
  color: inherit;
  font-weight: bold;
}

/* Modale plein écran Dashboard */
body.dash-open {
  overflow: hidden !important;
}

.dash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f0f3fa;
  color: #1a202c;
  display: flex;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  animation: fadeInDash 0.25s ease-out;
}

@keyframes fadeInDash {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.dash[hidden] {
  display: none !important;
}

/* Sidebar navigation */
.d-side {
  width: 260px;
  background: #0b1437;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.d-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}
.d-brand span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}
.d-brand small {
  color: var(--yellow);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-top: 2px;
}

.d-nav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.d-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: #a0aec0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
}

.d-nav button i {
  font-style: normal;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.d-nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.d-nav button.on {
  background: #0a2bd6;
  color: #fff;
}

.d-badge {
  margin-left: auto;
  background: #e0245e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  font-style: normal;
}

/* Zone principale */
.d-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f4f6fb;
}

.d-top {
  padding: 18px 30px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.d-top h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #0b1437;
}

.d-top-act {
  display: flex;
  gap: 8px;
  align-items: center;
}

.d-body {
  flex: 1;
  padding: 28px 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Boutons dashboard */
.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.15s ease;
}
.d-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.d-btn.primary {
  background: #0a2bd6;
  color: #fff;
  border-color: #0a2bd6;
}
.d-btn.primary:hover {
  background: #0822ac;
}
.d-btn.danger {
  background: #fff1f2;
  color: #e0245e;
  border-color: #fecdd3;
}
.d-btn.danger:hover {
  background: #e0245e;
  color: #fff;
}
.d-btn.wa {
  background: #1fa855;
  color: #fff;
  border-color: #1fa855;
}
.d-btn.wa:hover {
  background: #188643;
}
.d-btn.sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* Grilles & Cartes */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.k-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c);
  flex-shrink: 0;
}

.kpi small {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.kpi b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #0b1437;
  line-height: 1.2;
}
.kpi em {
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}

.d-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.d-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0b1437;
  margin: 0 0 16px 0;
}

.d-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.d-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.d-actions.col {
  flex-direction: column;
}

.d-note {
  font-size: 13px;
  color: #64748b;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

.d-banner {
  background: #eff6ff;
  border-left: 4px solid #0a2bd6;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #1e3a8a;
  margin: 0;
}

.d-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
  margin: 0;
}
.d-empty.big {
  padding: 60px 0;
  font-size: 16px;
}

/* Listes d'alertes & d'activité */
.d-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 13.5px;
}
.d-list li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.d-list li small {
  color: #94a3b8;
  font-size: 11.5px;
}

.d-list li.al-warn {
  background: #fffbeb;
  color: #b45309;
}
.d-list li.al-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.d-link {
  background: transparent;
  border: none;
  color: #0a2bd6;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0 0;
  display: inline-block;
  text-align: left;
}

/* Meter / jauge stockage */
.meter {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.meter div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 6px;
}
.meter .m-t {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.meter .m-t i {
  display: block;
  height: 100%;
  background: #0a2bd6;
  border-radius: 999px;
  transition: width 0.3s;
}

/* Onglet Devis */
.d-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.d-toolbar input[type="search"] {
  flex: 1;
  min-width: 240px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 14px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-f {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}
.chip-f.on {
  background: #0b1437;
  color: #fff;
  border-color: #0b1437;
}

.dv {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dv header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dv h4 {
  font-size: 16px;
  margin: 0;
  color: #0b1437;
}
.dv header small {
  color: #64748b;
  font-size: 12px;
}
.pill-st {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  white-space: nowrap;
}
.dv-meta {
  font-size: 13px;
  color: #475569;
}
.dv p {
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.dv-contact {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dv-note {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.dv-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}
.dv-foot select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

/* Sections Manager */
.sec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sec-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.sec-list li.off {
  opacity: 0.5;
  background: #f1f5f9;
}
.sec-list .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0a2bd6;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.sec-list div:first-of-type {
  flex: 1;
}
.sec-list b {
  display: block;
  font-size: 14px;
  color: #0b1437;
}
.sec-list small {
  color: #64748b;
  font-size: 11.5px;
}
.sec-btn {
  display: flex;
  gap: 6px;
}
.sec-btn button {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.sec-btn button:hover:not(:disabled) {
  background: #e2e8f0;
}
.sec-btn button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Table pages */
.tbl-wrap {
  overflow-x: auto;
}
.d-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.d-tbl th, .d-tbl td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.d-tbl th {
  color: #64748b;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.d-tbl small {
  display: block;
  color: #94a3b8;
  font-size: 11.5px;
}
.t-act {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.muted {
  color: #94a3b8;
  font-size: 12px;
}

/* Graphiques */
.bars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bars li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.b-l {
  width: 160px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: #334155;
}
.b-t {
  flex: 1;
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.b-t i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease-out;
}
.bars b {
  width: 40px;
  text-align: right;
  color: #0b1437;
}

.cols {
  display: flex;
  align-items: flex-end;
  height: 180px;
  gap: 8px;
  padding: 20px 0 30px;
  border-bottom: 1px solid #e2e8f0;
}
.col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  position: relative;
}
.col i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
}
.col span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}
.legend {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: #475569;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  background: #fff;
  border-radius: 50%;
}
.donut b {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 800;
  color: #0b1437;
}
.legend-col {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.legend-col li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-col i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.legend-col b {
  margin-left: auto;
}

/* Médias */
.m-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.m-grid figure {
  margin: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.m-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #e2e8f0;
}
.m-grid figcaption {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.m-grid button {
  margin: 0 10px 10px;
}

/* Paramètres */
.d-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.d-form.row {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}
.d-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.d-form input[type="text"], .d-form input[type="password"] {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 14px;
}
.d-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}
.d-field input[type="color"] {
  width: 44px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
}
.d-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 13.5px;
}
.d-dl dt {
  font-weight: 700;
  color: #64748b;
}
.d-dl dd {
  margin: 0;
  color: #1e293b;
}

/* Responsive Dashboard */
/* Styles Gestionnaire de Médias */
.d-media-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.d-media-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.d-media-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font: 600 13px 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.d-media-pill:hover {
  border-color: var(--blue);
  background: #f0f4ff;
  color: var(--blue);
}
.d-media-pill.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.d-media-pill small {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}
.d-media-pill.active small {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.d-media-pill.pill-trash {
  border-color: #fecaca;
  color: #b91c1c;
}
.d-media-pill.pill-trash:hover {
  background: #fee2e2;
}
.d-media-pill.pill-trash.active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.d-media-search {
  position: relative;
  margin-bottom: 16px;
}
.d-media-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font: 500 14px 'Plus Jakarta Sans', sans-serif;
  background: #fff;
  box-sizing: border-box;
}
.d-media-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 43, 214, 0.12);
}
.d-media-add-box {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  animation: fadeInDash 0.25s ease-out;
}
.d-media-add-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.d-media-add-form .full {
  grid-column: 1 / -1;
}
.d-media-add-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.d-media-add-form input[type="text"],
.d-media-add-form select {
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font: 500 14px 'Plus Jakarta Sans', sans-serif;
  background: #fff;
}
.d-dropzone {
  border: 2px dashed var(--blue);
  background: #eff6ff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.d-dropzone:hover {
  background: #dbeafe;
}
.d-dropzone p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e3a8a;
}
.d-dropzone small {
  color: #64748b;
  font-size: 12px;
}
.d-media-preview-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.d-media-preview-box img {
  width: 90px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
}
.d-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.d-media-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.d-media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
.d-media-card-img-wrap {
  position: relative;
  width: 100%;
  height: 145px;
  background: #f1f5f9;
}
.d-media-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.d-media-card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 20, 55, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.d-media-card-custom {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1fa855;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.d-media-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.d-media-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}
.d-media-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.d-btn-del {
  background: #fee2e2;
  color: #b91c1c;
  border: 0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.d-btn-del:hover {
  background: #fca5a5;
  color: #7f1d1d;
}
.d-btn-restore {
  background: #dcfce7;
  color: #15803d;
  border: 0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.d-btn-restore:hover {
  background: #bbf7d0;
}

@media (max-width: 900px) {
  .dash {
    flex-direction: column;
  }
  .d-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .d-brand {
    padding: 12px 16px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .d-nav {
    flex-direction: row;
    padding: 8px 10px;
    overflow-x: auto;
  }
  .d-nav button {
    padding: 8px 12px;
    white-space: nowrap;
  }
  .d-nav button span {
    font-size: 12.5px;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .d-grid2 {
    grid-template-columns: 1fr;
  }
  .m-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .d-body {
    padding: 16px;
    gap: 16px;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .m-grid {
    grid-template-columns: 1fr;
  }
  .d-top {
    padding: 12px 16px;
  }
  .d-top h2 {
    font-size: 16px;
  }
}

.d-featured-preview{display:flex;gap:14px;align-items:center;margin-bottom:16px;background:#f8fafc;padding:12px;border-radius:12px;border:1px solid #e2e8f0}.d-featured-preview img{width:140px;height:90px;object-fit:cover;border-radius:8px}.d-featured-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.d-featured-form .full{grid-column:1/-1}.d-featured-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.d-featured-form input[type=text],.d-featured-form textarea{padding:10px 12px;border:1.5px solid #cbd5e1;border-radius:10px;font:500 14px 'Plus Jakarta Sans',sans-serif}.d-featured-form textarea{resize:vertical;min-height:90px}.d-featured-form .d-featured-toggle{flex-direction:row;align-items:center}@media(max-width:720px){.d-featured-form{grid-template-columns:1fr}}

/* ===== Tableau de bord : version mobile (barre d'onglets en bas) ===== */
@media (max-width: 700px) {
  .dash { flex-direction: column; }
  .d-main { order: 1; min-height: 0; flex: 1; }
  .d-side {
    order: 2; width: 100%; flex-direction: row; flex: 0 0 auto;
    border: none; border-top: 1px solid rgba(255,255,255,.12);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(0,0,0,.18);
  }
  .d-brand { display: none; }
  .d-nav {
    flex: 1; padding: 4px; gap: 2px; flex-direction: row; overflow: hidden;
    justify-content: space-between;
  }
  .d-nav button {
    flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center;
    gap: 3px; padding: 8px 2px; position: relative; border-radius: 12px;
  }
  .d-nav button i { font-size: 20px; width: auto; }
  .d-nav button span { font-size: 10px !important; line-height: 1.1; white-space: normal; text-align: center; }
  .d-nav .d-badge {
    position: absolute; top: 2px; right: 50%; margin: 0 -22px 0 0;
    min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 10px;
  }

  .d-top { padding: 10px 12px; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; z-index: 5; }
  .d-top h2 { font-size: 17px; flex: 1 1 100%; }
  .d-top-act { display: flex; gap: 6px; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .d-top-act .d-btn { flex: 0 0 auto; white-space: nowrap; }

  .d-body { padding: 12px; gap: 12px; -webkit-overflow-scrolling: touch; }
  .d-card { padding: 14px; overflow-x: auto; border-radius: 14px; }
  .d-btn { min-height: 44px; }
  .d-btn.sm { min-height: 38px; }
  .d-actions { flex-direction: column; align-items: stretch; }
  .d-actions .d-btn { width: 100%; justify-content: center; }
  .d-card input, .d-card select, .d-card textarea { font-size: 16px !important; }
  .d-card table { min-width: 560px; }

  .d-media-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .d-media-top .d-btn { width: 100%; }
  .d-media-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .d-media-pill { flex: 0 0 auto; white-space: nowrap; }
  .d-media-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .d-media-add-form { grid-template-columns: 1fr !important; }
  .d-media-card-actions .d-btn-del, .d-media-card-actions .d-btn-restore { width: 100%; min-height: 40px; }
  .d-featured-preview { flex-direction: column; align-items: flex-start; }
  .d-featured-preview img { width: 100%; height: auto; max-height: 200px; }
  .d-dropzone { padding: 22px 12px; }
}
