
        :root {
            --client-primary: #0066ff;
            --client-primary-light: color-mix(in srgb, var(--client-primary) 85%, #ffffff 15%);
            --client-primary-extralight: color-mix(in srgb, var(--client-primary) 30%, #ffffff 70%);
            --client-primary-dark: color-mix(in srgb, var(--client-primary)  60%, #000000 40%);
            --site-primary: var(--client-primary);
            --client-bg: #ffffff;
        }
        .np-social-facebook { background: #1877f2; }
        .np-social-instagram { background: linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
        .np-social-linkedin { background: #0a66c2; }
        .np-social-tiktok { background: #000; }
        .np-social-youtube { background: #ff0000; }
        .np-social-twitter { background: #111827; }
        body {
            margin: 0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: var(--client-bg);
        }
        header {
            background: linear-gradient(135deg, var(--client-primary)0%,var(--client-primary-dark) 100%);
            color: #f9fafb;
        }
        header h1 {
            margin: 0;
            font-size: 1.05rem;
        }
        header a {
            color: #e5e7eb;
            text-decoration: none;
            font-size: 0.85rem;
            margin-left: 12px;
        }

        /* Admin topbar (visible sur certaines pages admin) */
        .admin-topbar {
            background: #111827;
            color: #f9fafb;
            padding: 10px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .admin-topbar__title {
            font-weight: 700;
            font-size: 0.95rem;
        }
        .admin-topbar__user {
            font-size: 0.85rem;
            opacity: 0.95;
            white-space: nowrap;
        }
        .admin-topbar a {
            color: #f9fafb;
            text-decoration: none;
            margin-left: 12px;
            font-size: 0.85rem;
            opacity: 0.9;
        }
        .admin-topbar a:hover { opacity: 1; }
        @media (max-width: 640px) {
            .admin-topbar {
                padding: 10px 14px;
                flex-wrap: wrap;
                white-space: normal;
            }
            .admin-topbar__user { white-space: normal; }
        }
        input[type="text"] {
            min-width: 90px;
            padding: 6px 8px;
            border-radius: 10px;
            border: 1px solid #d1d5db;
            font-size: 0.9rem;
        }
        main {
            max-width: 95%;
            min-width: 95%;
            margin: 24px auto 40px;
            padding: 0 16px;
        }
        .card {
            background: #ffffff;
            border-radius: 14px;
            margin-bottom: 30px;
            padding: 18px 18px 18px;
        }
        .meta {
            font-size: 0.85rem;
            color: #6b7280;
            margin-bottom: 12px;
        }
        .layout {
            display: grid;
            grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
            gap: 18px;
        }
        @media (max-width: 900px) {
            .layout {
                grid-template-columns: 1fr;
            }
        }

        /* Preview */
        .preview-wrapper {
            background: #e5e7eb;
            border-radius: 12px;
            padding: 14px;
        }
        .preview-frame {
            background: #f9fafb;
            border-radius: 10px;
            padding: 22px 20px;
            border: 1px solid #e5e7eb;
        }
        .preview-hero-title {
            font-size: 1.6rem;
            font-weight: 600;
            margin: 0 0 6px;
            color: #111827;
        }
        .preview-hero-sub {
            font-size: 0.95rem;
            color: #4b5563;
            margin: 0 0 14px;
        }
        .preview-btn {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 999px;
            font-size: 0.9rem;
            background: var(--client-primary);
            color: #ffffff;
            text-decoration: none;
        }
        .preview-section-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0 0 8px;
            color: #111827;
        }
        .preview-ai-box {
            background: #fff;
            border: 1px dashed var(--client-primary);
            border-radius: 10px;
            padding: 12px;
            color: #111827;
            line-height: 1.5;
        }
        .preview-ai-box h4 {
            margin: 0 0 6px;
            font-size: 0.95rem;
        }
        .preview-ai-prompt {
            white-space: pre-wrap;
            font-size: 0.95rem;
        }
        .preview-text {
            font-size: 0.95rem;
            color: #374151;
            line-height: 1.5;
        }
        .preview-list {
            margin: 0;
            padding-left: 1.1rem;
        }
        .preview-list li {
            font-size: 0.95rem;
            color: #374151;
            margin-bottom: 4px;
        }
        .preview-frame .mirar-hours {
            list-style: none;
            padding: 0;
            margin: 0;
            display: grid;
            gap: 0;
        }
        .preview-frame .mirar-hours li {
            display: grid;
            gap: 6px;
            padding: 10px 0;
            border-bottom: 1px dashed color-mix(in srgb, var(--primary-medium) 40%, transparent);
            background: transparent;
        }
        .preview-frame .mirar-hour-main {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            width: 100%;
        }
        .preview-frame .mirar-hour-daywrap {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .preview-frame .mirar-hour-day {
            font-weight: 700;
            color: var(--primary-dark);
        }
        .preview-frame .mirar-hour-date {
            font-size: 0.85rem;
            color: var(--secondary-color);
            background: color-mix(in srgb, var(--primary-soft) 70%, #ffffff 30%);
            padding: 2px 8px;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--primary-medium) 30%, transparent);
        }
        .preview-frame .mirar-hour-hours {
            color: var(--secondary-color);
            font-weight: 600;
        }
        .preview-frame .mirar-hour-hours::before {
            content: " - ";
            color: color-mix(in srgb, var(--primary-medium) 50%, transparent);
        }
        .preview-frame .mirar-hour-chip {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
        }
        .preview-frame .mirar-hour-image {
            width: 50px;
            height: 50px;
            border-radius: 999px;
            object-fit: cover;
            border: 1px solid color-mix(in srgb, var(--primary-medium) 30%, transparent);
            background: #ffffff;
        }
        .preview-frame .mirar-hour-extra {
            display: block;
        }
        .preview-frame .mirar-hour-text {
            color: color-mix(in srgb, var(--primary-dark) 80%, #000000 20%);
            font-size: 0.95rem;
            font-style: italic;
        }
        .preview-frame .mirar-hours-note {
            margin-top: 10px;
            font-size: 0.9rem;
            color: var(--secondary-color);
        }
.preview-contact-item {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 6px;
}
.preview-slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.preview-video-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 138px));
    justify-content: flex-start;
}
.preview-slider-thumb {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 3px;
    height: 190px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.preview-slider-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.preview-slider-thumb video {
    width: 100%;
    height: 100px !important;
    max-height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: #000;
}
.preview-video-thumb {
    height: auto;
    padding-bottom: 8px;
}
.preview-video-filename {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preview-video-title-input,
.preview-video-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.85rem;
    color: #111827;
}
.preview-video-title-input:focus,
.preview-video-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.preview-video-active {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0;
}
.preview-slider-caption {
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4b5563;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preview-slider-position {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.preview-slider-position label {
    font-size: 0.75rem;
    color: #6b7280;
}
.preview-slider-position input[type="number"] {
    max-width: 40px;
    padding: 6px 8px;
    color: #047857;
    font-weight: 700;
    border: none;
    font-size: 0.9rem;
    text-align: center;
}

.slider-order {
    margin-top: 16px;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    width: 100%;
    grid-column: 1 / -1;
}

        /* Form */
        h2 {
            margin: 0 0 10px;
            font-size: 1rem;
        }
        .field {
            margin-bottom: 14px;
        }
        label {
            display: block;
            margin-bottom: 4px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        input[type="text"],input[type="password"],input[type="email"],
        select {
            width: 200px;
            box-sizing: border-box;
            padding: 8px 10px;
            border-radius: 8px;
            background: #2e880708;
            color:   #2e8807;
            font-size: 0.9rem;
            font-family: inherit;
            border: none;
        }
        input[type="text"]:hover,
        select:hover {
            outline: none;
            border-color: #43c80a;
            box-shadow: 0 0 10 13px #2e880761;
        }
        input[type="text"]:focus,
        textarea:focus,
        select:focus {
            outline: none;
            border-color: #2e8807;
            box-shadow: 0 0 0 3px #2e880761;
        }
        textarea {
            min-height: 90px;
            resize: vertical;
            width: 90%;
        }
        .hint {
            font-size: 0.8rem;
            color: #9ca3af;
            margin-top: 2px;
        }
        .actions {
            margin-bottom: 8px;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        button {
            padding: 8px 16px;
            border-radius: 999px;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
        }
        
        .btn-ghost{
            background-color: #f3f4f6; /* gris clair neutre */
            background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0px, rgba(0, 0, 0, 0.04) 2px, transparent 2px,transparent 6px
            );
            color: #303132;
            padding: 7px 14px;
            border-radius: 999px;
            border: 1px dashed var(--client-primary);
            font-size: 0.8rem;
            cursor: pointer;
          }
        .btn-ghost:hover {
            background-color: var(--client-primary-extralight); /* gris clair neutre */
            background-image: repeating-linear-gradient(135deg, var(--client-primary-light) 0px, rgba(0, 0, 0, 0.04) 2px, transparent 2px,transparent 6px
            );
            color: var(--client-primary);
            padding: 7px 14px;
            border-radius: 999px;
            font-size: 0.8rem;
            cursor: pointer;
        }
        
        .alert {
            padding: 8px 10px;
            border-radius: 8px;
            font-size: 0.85rem;
            margin-bottom: 10px;
        }
        .alert-ok {
            background: #dcfce7;
            color: #166534;
        }
.alert-err {
    background: #fee2e2;
    color: #991b1b;
}

/* Activity log (admin) */
.np-activity-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.np-activity-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.np-activity-table th,
.np-activity-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    white-space: nowrap;
}
.np-activity-table th a {
    color: #111827;
    text-decoration: none;
    font-weight: 800;
}
.np-activity-table tr:last-child td {
    border-bottom: none;
}

.np-activity-table-wrap.is-loading {
    opacity: 0.65;
}

.np-activity-pager {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.np-pager {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.np-pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
}

.np-pager-link.is-current {
    background: var(--client-primary);
    border-color: var(--client-primary-extralight);
    color: #ffffff;
}

.np-pager-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.np-pager-ellipsis {
    color: #6b7280;
    padding: 0 4px;
}

/* --- Page admin/sites.php (np-sites) --- */
.np-sites {
  --np-bg: #f3f4f6;
  --np-card: #ffffff;
  --np-border: #e5e7eb;
  --np-text: #111827;
  --np-muted: #6b7280;
  --np-shadow: 0 18px 45px rgba(0,0,0,0.08);
}

.np-sites body,
body.np-sites {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--np-bg);
  color: var(--np-text);
}

.np-sites header {
  background: #111827;
  color: #f9fafb;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.np-sites header h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: .01em;
}

.np-sites header .user {
  font-size: 0.9rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.np-sites header a {
  color: #f9fafb;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: .95;
}

.np-sites header a:hover {
  text-decoration: underline;
}

.np-sites main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 18px 40px;
  box-sizing: border-box;
}

.np-sites .sites-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(280px, 1fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.np-sites .sites-card {
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 14px;
  box-shadow: var(--np-shadow);
  padding: 14px 14px;
  min-width: 0;
}

.np-sites .sites-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.np-sites .np-template-list {
  display: grid;
  gap: 10px;
}
.np-sites .np-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--np-border);
  border-radius: 12px;
  background: var(--np-card);
  min-width: 0;
}
.np-sites .np-template-meta {
  min-width: 0;
}
.np-sites .np-template-name {
  font-weight: 700;
  color: var(--np-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-sites .np-template-id {
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--np-muted);
}
.np-sites .np-template-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.np-sites .np-template-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
  background: color-mix(in srgb, #14b8a6 12%, #ffffff 88%);
  border: 1px solid color-mix(in srgb, #14b8a6 28%, transparent);
}
.np-sites .np-template-badge.is-used {
  color: #991b1b;
  background: color-mix(in srgb, #ef4444 12%, #ffffff 88%);
  border-color: color-mix(in srgb, #ef4444 30%, transparent);
}
.np-sites .btn-icon-lock {
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  opacity: 0.9;
}
.np-sites .btn-icon-lock.is-used {
  color: #991b1b;
  border-color: color-mix(in srgb, #ef4444 30%, transparent);
  background: color-mix(in srgb, #ef4444 10%, #ffffff 90%);
  cursor: pointer;
}
.np-sites .btn-icon-lock.is-used:hover {
  background: color-mix(in srgb, #ef4444 16%, #ffffff 84%);
}
.np-sites .btn-icon-lock svg {
  width: 16px;
  height: 16px;
  display: block;
}

.np-sites .np-modal[hidden] { display: none; }
.np-sites .np-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
}
.np-sites .np-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.np-sites .np-modal-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.28);
  padding: 14px 14px;
}
.np-sites .np-modal-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.np-sites .np-modal-text {
  margin: 0 0 12px;
  color: var(--np-text);
  font-size: 0.95rem;
}
.np-sites .np-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.np-sites .sites-card .hint {
  margin: 6px 0 0;
  font-size: .85rem;
  color: var(--np-muted);
}

.np-sites .table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--np-border);
}

.np-sites .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  min-width: 620px;
}

.np-sites .table-wrap th,
.np-sites .table-wrap td {
  padding: 10px 12px;
  font-size: 0.9rem;
  text-align: left;
  white-space: nowrap;
}

.np-sites .table-wrap th {
  background: #f3f4f6;
  font-weight: 700;
}

.np-sites .table-wrap tr + tr td {
  border-top: 1px solid #e5e7eb;
}

/* Activity log table: fit inside middle column */
.np-sites .np-activity-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.np-sites table.np-activity-table {
  min-width: 0;
  table-layout: fixed;
}

.np-sites table.np-activity-table th,
.np-sites table.np-activity-table td {
  padding: 8px 10px;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-sites table.np-activity-table th:nth-child(1),
.np-sites table.np-activity-table td:nth-child(1) {
  width: 38%;
}

.np-sites table.np-activity-table th:nth-child(2),
.np-sites table.np-activity-table td:nth-child(2) {
  width: 42%;
}

.np-sites table.np-activity-table th:nth-child(3),
.np-sites table.np-activity-table td:nth-child(3) {
  width: 120px;
}

.np-sites .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.np-sites .badge-on {
  background: #dcfce7;
  color: #166534;
}

.np-sites .badge-off {
  background: #fee2e2;
  color: #991b1b;
}

.np-sites .actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.np-sites .actions .np-action-form {
  display: inline;
  margin: 0;
}

.np-sites .actions .np-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #2563eb;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
}

.np-sites .actions .np-action-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.np-sites .actions .np-action-icon:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.np-sites .actions .np-action-icon--danger {
  color: #b91c1c;
}

.np-sites .actions .np-action-icon--danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.np-sites .actions button.np-action-icon {
  cursor: pointer;
  padding: 0;
}

/* --- Plugins (admin/sites.php) --- */
.np-sites .np-plugin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* MVP: "Payé" suffit (actif est dérivé) */
.np-sites form.np-plugin-cell .np-switch:first-of-type {
  display: inline-flex;
}

.np-sites td:first-child {
  white-space: nowrap;
}
.np-sites .np-plugin-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
}
.np-sites .np-plugin-status.is-allowed { color: #16a34a; }
.np-sites .np-plugin-status.is-blocked { color: #b91c1c; }

/* --- Presence + messagerie (admin/sites.php) --- */
.np-sites .np-sites-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
}
.np-sites .np-sites-presence-label {
  font-size: 0.82rem;
  opacity: 0.95;
}
.np-toggle--presence input:checked + .np-toggle-ui {
  background: #16a34a;
  border-color: color-mix(in srgb, #16a34a 60%, transparent);
}
.np-unread-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}
.np-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 6px;
}
.np-sites .np-chat-card {
  min-width: 0;
}
.np-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.np-chat-toolbar-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.np-chat-label {
  font-size: 0.9rem;
  font-weight: 700;
}
.np-chat-title-count {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ef4444;
}
.np-chat-select {
  min-width: 320px;
}
.np-chat-presence {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
}
.np-chat-presence.is-on {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}
.np-chat-presence.is-off {
  border-color: #fed7aa;
  background: #ffedd5;
  color: #9a3412;
}
.np-chat-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}
.np-chat-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.np-chat-hint {
  font-size: 0.82rem;
  color: #6b7280;
}
.np-chat-messages {
  height: 340px;
  overflow: auto;
  padding: 12px;
  background: #ffffff;
}
.np-chat-msg {
  display: flex;
  margin: 8px 0;
}
.np-chat-msg.is-admin {
  justify-content: flex-end;
}
.np-chat-bubble {
  max-width: min(640px, 92%);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.np-chat-msg.is-admin .np-chat-bubble {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.np-chat-body {
  white-space: pre-wrap;
  word-break: break-word;
}
.np-chat-meta {
  margin-top: 6px;
  font-size: 0.72rem;
  opacity: 0.75;
}
.np-chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}
.np-chat-input {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}
.np-chat-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.35);
}

/* --- Layout sites.php : liste+activité | messagerie | création --- */
.np-sites .np-sites-col-left {
  grid-column: 1 / 2; /* Sites + Activité */
  grid-row: 1;
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}
.np-sites .np-chat-card {
  grid-column: 2 / 3; /* Messagerie */
  grid-row: 1;
}
.np-sites .np-create-stack {
  grid-column: 3 / 4; /* Templates + Creer un client */
  grid-row: 1;
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

@media (max-width: 1200px) {
  .np-sites .sites-grid {
    grid-template-columns: 1fr;
  }
  .np-sites .np-sites-col-left,
  .np-sites .np-chat-card,
  .np-sites .np-create-stack {
    grid-column: auto;
    grid-row: auto;
  }
}

/* --- Layout sites.php (override) : 3 blocs + liste --- */
.np-sites .np-chat-card {
  grid-column: 1 / 2; /* Messagerie */
  grid-row: 1;
  min-width: 0;
}
.np-sites .np-activity-card {
  grid-column: 2 / 3; /* Activite */
  grid-row: 1;
  min-width: 0;
}
.np-sites .np-create-stack {
  grid-column: 3 / 4; /* Templates + Creer un client */
  grid-row: 1;
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}
.np-sites .np-sites-list-card {
  grid-column: 1 / -1; /* Liste des sites */
  grid-row: 2;
  min-width: 0;
  scroll-margin-top: 16px;
}

@media (max-width: 1200px) {
  .np-sites .sites-grid {
    grid-template-columns: 1fr;
  }
  .np-sites .np-chat-card,
  .np-sites .np-activity-card,
  .np-sites .np-create-stack,
  .np-sites .np-sites-list-card {
    grid-column: auto;
    grid-row: auto;
  }
}
/* --- Zone IA Admin --- */
.ia-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ia-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--client-primary) 0%, var(--client-primary-dark) 100%);
    color: #f9fafb;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    outline: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ia-btn:hover {
    background: linear-gradient(135deg, var(--client-primary-dark) 0%, var(--client-primary) 100%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.ia-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
}

.ia-status {
    font-size: 0.85rem;
    color: #6b7280;
}

.ia-info-box {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #0f172a;
    background: color-mix(in srgb, var(--client-primary) 10%, #ffffff 90%);
    border: 1px solid color-mix(in srgb, var(--client-primary) 35%, #ffffff 65%);
}

/* Petit retour visuel */
.ia-status {
    margin-top: 6px;
    font-size: 13px;
    color: #083853;
}
/* --- HERO PREVIEW AVATAR --- */

.preview-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.preview-hero-avatar {
    width: 90px;
    height: 90px;
    border-radius: 999px;
    overflow: hidden;
    background: #e6e6e6;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

.preview-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.preview-hero-title {
    font-size: 24px;
    font-weight: 700;
}

.preview-hero-sub {
    font-size: 16px;
    opacity: 0.8;
}

.preview-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #083853;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 8px;
}
/* === Mirar – HERO avec avatar === */

.hero-section {
    padding-top: 32px;
    padding-bottom: 32px;
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    overflow: hidden;
    background: #f2f2f2;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.hero-sub {
    font-size: 15px;
    color: #555;
}
/* Bloc avatar Mirar – admin */
.avatar-settings {
    display: grid;
    grid-template-columns: 120px minmax(220px, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    align-items: start;
    border: 1px dashed var(--client-border);
    position: relative;
    margin-bottom: 15px;
    border-radius: 10px;
}
.avatar-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    z-index: 9999;
}
.avatar-preview {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    flex-shrink: 0;
}
.avatar-preview img {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
}

.avatar-actions {
    display: contents;
}

.avatar-settings .banner-title {
    grid-column: 1 / span 2;
    grid-row: 1;
    margin-bottom: 4px;
}

.avatar-dropzone {
    border: 1px dashed #0066ff;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #6b7280;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 80%;
    height: 90px;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
}

.avatar-dropzone.is-dragover {
    border-color: #111827;
    background: #9bc3ff37;
}

.avatar-dropzone-label {
    margin-right: 4px; 
}

@media (max-width: 700px) {
    .avatar-settings {
        grid-template-columns: 1fr;
        align-items: center;
        justify-items: center;
    }
    .avatar-settings .banner-title {
        grid-column: 1;
        grid-row: 1;
    }
    .avatar-dropzone {
        grid-column: 1;
        grid-row: auto;
    }
}

.avatar-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: wrap;
    grid-column: 1 / span 2;
    color:var(--client-primary);
}
.avatar-style-row label {
    margin: 0;
    display: inline-block;
    color: var(--client-primary) !important;
}
.avatar-style-arrow {
    display: inline-block;
    color: var(--client-primary) !important;
    font-weight: 700;
}

.avatar-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    grid-column: 1 / span 2;
}
.avatar-quota-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    grid-column: 1 / span 2;
}
.avatar-quota {
    font-size: 0.8rem;
    color: #6b7280;
}
.avatar-quota--na {
    opacity: 0.7;
}
.avatar-quota-override {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--client-primary);
    user-select: none;
}
.avatar-quota-override input {
    transform: translateY(1px);
}

.avatar-status--error {
    color: #b91c1c;
}

.avatar-status--ok {
    color: #047857;
}
#sections-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        .section-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            border-radius: 10px;
            background: #f9fafb;
            border:1px dashed var(--client-primary-extralight)! important;
            margin-bottom: 8px;
            cursor: grab;
        }
        .section-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .handle {
            font-size: 1.1rem;
            color: #9ca3af;
        }
        .section-type {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: .06em;
            color: #6b7280;
        }
        .section-title {
            font-size: 0.9rem;
            font-weight: 500;
        }
        .section-actions a {
            font-size: 0.8rem;
            text-decoration: none;
            color: #2563eb;
            margin-left: 10px;
        }
        .section-item .section-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .section-note {
            font-size: 0.78rem;
            color: #6b7280;
            margin-top: 4px;
        }
        .section-item.is-disabled {
            opacity: 0.55;
            cursor: default;
        }
        .section-item.is-inactive {
            opacity: 0.75;
        }
        .np-switch {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: #4b5563;
            user-select: none;
            -webkit-user-select: none;
        }
        .np-switch input[type="checkbox"] {
            accent-color: var(--client-primary);
        }
        .np-switch-label {
            white-space: nowrap;
        }

        /* Toggle (style Mirar AI) */
        .np-toggle {
            display: inline-flex;
            align-items: center;
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            -webkit-tap-highlight-color: transparent;
            position: relative;
        }
        .np-toggle input {
            position: absolute;
            opacity: 0;
            width: 1px;
            height: 1px;
            pointer-events: none;
        }
        .np-toggle-ui {
            width: 42px;
            height: 24px;
            border-radius: 999px;
            background: color-mix(in srgb, var(--client-primary) 35%, #ffffff 65%);
            border: 1px solid color-mix(in srgb, var(--client-primary) 55%, transparent);
            position: relative;
            transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
        }
        .np-toggle-ui::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 3px;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            background: #ffffff;
            transform: translateY(-50%);
            box-shadow: 0 6px 16px rgba(0,0,0,0.20);
            transition: left 160ms ease, transform 160ms ease;
        }
        .np-toggle input:checked + .np-toggle-ui {
            background: #dc2743;
            border-color: color-mix(in srgb, #dc2743 60%, transparent);
        }
        .np-toggle input:checked + .np-toggle-ui::after {
            left: calc(100% - 3px);
            transform: translate(-100%, -50%);
        }
        .np-toggle input:focus-visible + .np-toggle-ui {
            outline: 2px solid color-mix(in srgb, var(--client-primary-dark) 45%, #ffffff 55%);
            outline-offset: 2px;
        }
        .controls {
            position: relative;
            margin-top: 14px;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        .btn-small {
 	        background-color: #f3f4f6; /* gris clair neutre */
            background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0px, rgba(0, 0, 0, 0.04) 2px, transparent 2px,transparent 6px
            );
            color: #303132;
            padding: 7px 14px;
            border-radius: 999px;
            border: 1 px dashed var(--client-primary);
            font-size: 0.8rem;
            cursor: pointer;
        }
        .btn-small:hover {
 	        background-color: var(--client-primary-extralight); /* gris clair neutre */
            background-image: repeating-linear-gradient(135deg, var(--client-primary-light) 0px, rgba(0, 0, 0, 0.04) 2px, transparent 2px,transparent 6px
            );
            color: var(--client-primary);
            padding: 7px 14px;
            border-radius: 999px;
            border: none;
            font-size: 0.8rem;
            cursor: pointer;
        }
        .btn-icon-save {
            width: 36px;
            height: 32px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-icon-save svg {
            width: 25px;
            height: 25px;
            display: block;
        }
        .btn-icon-upload {
            width: 36px;
            height: 32px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-icon-upload svg {
            width: 25px;
            height: 25px;
            display: block;
        }
        .status {
            font-size: 0.85rem;
            margin-top: 8px;
            color: #6b7280;
        }
        .status.ok { color: #15803d; }
        .status.err { color: #b91c1c; }

        /* Bloc couleurs */
.color-row {
    display: grid;
    grid-template-columns: 150px 44px minmax(140px, 1fr);
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.color-row label {
    font-size: 0.9rem;
    margin: 0;
    color: var(--client-primary-dark) !important;
}
.mainailogs {
            max-width: 85%;
            margin: 24px auto 40px;
            padding: 0 16px;
        }
.ai-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-log-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    font-size: 0.9rem;
    color: #111827;
}
.ai-log-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6b7280;
    flex-wrap: wrap;
}
.ai-log-status {
    padding: 2px 8px;
    border-radius: 999px;
    color: #5aa30796 !important;
    font-weight: 700;
}
.ai-log-tokens {
    margin-left: auto;
    font-weight: 600;
    color: var(--client-primary-light);
}
.ai-log-q,
.ai-log-a {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--client-primary-light);
    font-weight: 700;
}
.ai-log-q span,
.ai-log-a span{
    margin-top: 4px;
    font-size: 0.9rem;
    color:#222;
    font-weight: 500;
}
.ai-log-table-wrapper {
    overflow-x: auto;
}
.ai-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.ai-log-table th,
.ai-log-table td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}
.ai-log-table th a {
    color: var(--client-primary-light);
    text-decoration: none;
    font-weight: 700;
}
.ai-log-table th a:hover {
    text-decoration: underline;
}
.social-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.social-row label {
    margin: 0;
    font-weight: 600;
    color: #111827;
}
.social-inputs {
    display: grid;
    grid-template-columns: minmax(140px, 170px) minmax(0, 1fr);
    gap: 2px;
    align-items: center;
      
}
.social-inputs > :only-child {
    grid-column: 1 / -1;
}
.social-inputs > * {
    min-width: 0;
}
.social_url{
    width: 80%;
    max-width: 80%;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}
.social-style-select {
    padding: 4px 8px;
    font-size: 0.95rem;
    max-width: 60%;
    min-width: 0;
    border:none;
    font-weight: 600;
    background: #2e880708;
    color:   #2e8807;
    transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease;
}
.np-tts-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.np-tts-row .social-style-select {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
}
.np-tts-play {
    border-radius: 10px;
}
.np-tts-play.is-playing {
    background: rgba(46, 136, 7, 0.18);
}
@media (max-width: 520px) {
    .social-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .social-inputs {
        grid-template-columns: 1fr;
    }
}
.social-style-select.social-facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
}
.social-style-select.social-instagram {
    background: linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-color: #dc2743;
    color: #ffffff;
}
.social-style-select.social-linkedin {
    background: #0a66c2;
    border-color: #0a66c2;
    color: #ffffff;
}
.social-style-select.social-tiktok {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}
.social-style-select.social-youtube {
    background: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
}
.social-style-select.social-twitter {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}
.social-style-select option {
    background: #ffffff;
    color: #111827;
}
.color-alert {
    font-size: 0.8rem;
    margin-top: 8px;
}
        .color-alert.ok {
            color: #15803d;
        }
        .color-alert.err {
            color: #b91c1c;
        }
        .site-meta {
            font-size: 0.9rem;
            color: #4b5563;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
        }
        .site-meta-block {
            flex: 1;
        }
        .site-meta a.btn {
            padding: 7px 12px;
            border-radius: 999px;
            border: none;
            background: #111827;
            color: #f9fafb;
            font-size: 0.8rem;
            text-decoration: none;
            white-space: nowrap;
        }
.avatar-spinner{
    display: none;            /* caché par défaut */
    margin-top: 8px;
    font-size: 0.85rem;
    color: #374151;
    align-items: center;
    gap: 8px;
}

.avatar-spinner.is-loading{
    display: inline-flex;     /* visible seulement quand on génère */
}

.avatar-spinner::before{
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    border-top-color: #374151;
    animation: avatarLoader 1s ease-in-out infinite;
}

@keyframes avatarLoader{
    0%   { transform: rotate(0deg);   opacity: .6; }
    50%  { transform: rotate(180deg); opacity: 1;  }
    100% { transform: rotate(360deg); opacity: .6; }
}


.avatar-style-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.avatar-style-select {
    padding: 4px 8px;
    font-size: 0.80rem;
    background: #2e880708;
    color:   #2e8807;
    border-radius: 6px;
    border: none;
    width: auto;
    min-width: 140px;
}

/* === USER EDITOR (client) === */

.user-editor .np-user-editor-main {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr)) minmax(340px, 420px);
    gap: 18px;
    align-items: start;
}
.user-editor .np-ue-col {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}
@media (max-width: 1200px) {
    .user-editor .np-user-editor-main {
        grid-template-columns: 1fr;
    }
}

.user-editor header {
    padding: 12px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
}
.user-editor .np-ue-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.user-editor .np-presence-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.35);
    box-shadow: 0 10px 22px rgba(0,0,0,0.20);
    cursor: pointer;
    padding: 0;
}
.user-editor .np-presence-dot.is-online {
    background: #22c55e;
    border-color: rgba(255,255,255,0.92);
    box-shadow: 0 0 0 6px rgba(34,197,94,0.25), 0 10px 22px rgba(0,0,0,0.20);
}
.user-editor .np-presence-dot.is-offline {
    background: rgba(255,255,255,0.35);
}
.user-editor .np-presence-dot:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* --- Chat modal (client) --- */
.np-chat-modal[hidden] {
    display: none !important;
}
.np-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 18px;
}
.np-chat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,24,39,0.55);
}
.np-chat-panel {
    position: relative;
    width: min(720px, 96vw);
    max-height: min(760px, 86vh);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.35);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.18);
}
.np-chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #111827;
    color: #f9fafb;
}
.np-chat-panel-title {
    font-weight: 800;
    font-size: 0.95rem;
}
.np-chat-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.10);
    color: #f9fafb;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.np-chat-close:hover {
    background: rgba(255,255,255,0.16);
}
.np-chat-panel-status {
    padding: 10px 14px;
    font-size: 0.88rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #111827;
}
.np-chat-panel-status.is-online {
    background: #dcfce7;
    color: #166534;
    border-bottom-color: #bbf7d0;
}
.np-chat-panel-status.is-offline {
    background: #ffedd5;
    color: #9a3412;
    border-bottom-color: #fed7aa;
}
.np-chat-panel-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}
.np-chat-panel .np-chat-messages {
    height: auto;
    flex: 1;
}
.user-editor header a {
    color: #e0e7ff;
}
.user-editor .btn-primary,
.user-editor .btn {
            background-color: #9ae6964e;
    background-image: repeating-linear-gradient(
        135deg,
        #67a95b18 0px,
        #1d48162a 2px,
        transparent 2px,
        transparent 6px
    );
    color: #1d4816cb;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px dashed #26e009a5;
    font-size: 1rem;
    cursor: pointer;

    /* TRANSITION */
    transition:
        background-color 0.25s ease,
        background-image 0.25s ease,
        color 0.2s ease,
        border-color 0.25s ease;
}
.user-editor:hover .btn-primary:hover,
.user-editor:hover .btn:hover {
    background-color: #9ae696a1;
    background-image: repeating-linear-gradient(
        135deg,
        #67a95b27 0px,
        #1d48163f 2px,
        transparent 2px,
        transparent 6px
    );
    color: #0c2708cb;
}

.user-editor .section-item {
    border:1px dashed var(--client-primary-extralight)! important;
}
.user-editor .handle {
    color: var(--client-primary);
}
.user-editor .section-grid-editor {
    margin-bottom: 12px;
}
.user-editor .section-grid-editor.draggables,
.user-editor #sections-draggable {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: stretch;
}
.user-editor .section-item.fixed {
    opacity: 0.9;
}

.site-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}
.meta-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.164);
    box-sizing: border-box;
    transform: translateY(20px);
    animation: fadeUp 400ms ease-out forwards;
    animation-delay: var(--delay, 0s);
}
.meta-card:nth-child(1) { 
    --delay: 0.05s; 
}
.meta-card:nth-child(2) { 
    --delay: 0.10s; 
}
.meta-card:nth-child(3) { 
    --delay: 0.15s; 
}
.meta-card:nth-child(4) { 
    --delay: 0.20s; 
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.meta-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 18px;
    padding: 6px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--client-primary-dark)0%,var(--client-primary-extralight) 100%);
}
.meta-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    
}
.meta-row {
    font-size: 0.9rem;
    color: #4b5563;
}
.meta-actions {
    margin-top: 10px;
}
.meta-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.quota-pill {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.quota-pill.quota-warn {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.quota-pill.quota-danger {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
.color-inputs {
    display: contents;
}
.color-inputs input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    justify-self: start;
}
.color-inputs input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
.color-inputs input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}
.color-inputs input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}
.color-row input[type="text"] {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    padding: 6px 8px;
    border-radius: 10px;
    background: #2e880708;
    color:   #2e8807;
    border: none;
    font-size: 0.9rem;
}
.avatar-banner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.banner-preview {
    border: 1px dashed var(--client-border);
    border-radius: 10px;
    padding: 8px;
    position: relative;
}
.banner-thumb-wrapper {
    position: relative;
}
.banner-title {
    font-weight: 700;
    margin-bottom: 6px;
}
.banner-thumb {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.banner-video-thumb {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    background: #111827;
    display: block;
}
.banner-kind-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.banner-kind-select {
    border-radius: 10px;
    background: #2e880708;
    color:   #2e8807;
    padding: 8px 10px;
    font-size: 0.9rem;
    border: none;
}
.banner-thumb.placeholder {
    display: grid;
    place-items: center;
    color: #6b7280;
    background: var(--client-primary);
}
.banner-note {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}
.banner-upload {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 12px;
    padding: 10px 12px;
}
.banner-upload-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.banner-upload input[type="file"] {
    font-size: 0.85rem;
    flex: 1;
}
.banner-upload-label {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}
.banner-file-name {
    font-size: 0.85rem;
    color: #374151;
    min-height: 16px;
}
.banner-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Tarifs (formulaire) */
.tarifs-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tarif-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 8px;
}
.tarif-row input[type="text"] {
    width: 100%;
}
@media (max-width: 640px) {
    .tarif-row {
        grid-template-columns: 1fr;
    }
}

/* Horaires (formulaire) */
.horaires-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.horaire-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}
.horaire-row .horaire-main {
    display: grid;
    grid-template-columns: 90px repeat(4, 76px) 120px 40px;
    column-gap: 14px;
    row-gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}
.horaire-row .horaire-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1 1 320px;
}
.horaire-row .day-select,
.horaire-row .time-select,
.horaire-row .hour-date,
.horaire-row .hour-text,
.horaire-row .hour-image,
.horaire-row .hour-image-file {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.horaire-row .day-select,
.horaire-row .time-select {
    max-width: none;
}
.horaire-row .hour-date {
    min-width: 0;
    width: 120px;
    max-width: 120px;
    padding: 5px 8px;
    font-size: 0.82rem;
    justify-self: start;
}
.horaire-row .hour-text {
    min-width: 220px;
    flex: 1 1 240px;
}
.horaire-row .hour-image {
    min-width: 180px;
    flex: 1 1 200px;
}
.horaire-row .hour-image-file {
    min-width: 180px;
    max-width: 240px;
}
.horaire-row .day-select:focus,
.horaire-row .time-select:focus,
.horaire-row .hour-date:focus,
.horaire-row .hour-text:focus,
.horaire-row .hour-image:focus,
.horaire-row .hour-image-file:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
    outline: none;
    background: #ffffff;
}
.horaire-row .btn-remove-hour {
    padding: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-size: 1rem;
    color: #bf0778;
    margin-left: 6px;
    justify-self: start;
}
@media (max-width: 1000px) {
    .horaire-row {
        align-items: stretch;
    }
    .horaire-row .horaire-main,
    .horaire-row .horaire-extra {
        width: 100%;
    }
    .horaire-row .horaire-main {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .horaire-row .btn-remove-hour {
        width: 100%;
    }
}
@media (max-width: 640px) {
    .horaire-row .horaire-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.meta-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}
.meta-stack,
.meta-pos-account,
.meta-stack-right {
    flex: 1 1 320px;
    min-width: 280px;
    max-width: 420px;
    display: grid;
    gap: 12px;
}
.meta-stack-right {
    gap: 12px;
}
.color-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}
.color-toast {
    position: fixed;              /* ← clé du comportement global */
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 9999;

    background: #16a34a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;

    box-shadow: 0 12px 30px rgba(0,0,0,0.18);

    opacity: 0;
    transform: translate(-50%, -56%);
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.color-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%);
    animation: np-toast-auto-hide 2s ease forwards;
}

@keyframes np-toast-auto-hide {
    0%,
    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -56%);
    }
}


/* Blog admin */
.preview-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.preview-blog-thumb {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 3px;
  height: 220px;
  text-align: center;
  position: relative;
}

.preview-blog-thumb img {
  width: 100%;
  height: 100px;           /* ou 140px si tu veux un peu plus haut */
  object-fit: cover;
  border-radius: 6px;
  display: block;
}


.blog-cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap:12px;
  align-items:stretch;
}

.blog-card-actions {
    margin-top: auto;
    bottom: 6px;
    gap: 6px;
  padding: 8px 12px 12px 12px;
  display: flex;
  justify-content: flex-end;
}
.blog-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #4b5563;
}
.pill {
    padding: 3px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
}
.pill.success { background: #d1fae5; color: #065f46; }
.pill.muted   { background: var(--client-primary); color: #6b7280; }
.blog-card-body h3 {
    margin: 2px 0;
    font-size: 1rem;
}
.blog-card-body .excerpt {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}
.blog-card-actions {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.btn-danger {
    color: #f97316;
    border: none;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
}
.btn-icon-delete {
    background: #ffffff;
    color: #991b1b;
    border: none;
    padding: 6px 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.btn-icon-delete svg {
    width: 16px;
    height: 16px;
    display: block;
}
.btn-icon-banner {
    background: #ffffff;
    color: #1d4ed8;
    padding: 6px 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-banner:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.btn-icon-banner svg {
    width: 16px;
    height: 16px;
    display: block;
}
.btn-mod {
    background: #ffffff;
    color: #08af61;
    border: none;
    padding: 6px 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-mod:hover {
    background: #08af614a;
    border-color: #08af61;
}
.blog-form {
    background: #fff;
    border-top: dotted 2px  var(--client-primary);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.blog-form h3 { margin: 0 0 8px 0; }
.blog-form .form-vertical label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
.blog-form .form-vertical input[type="text"],
.blog-form .form-vertical textarea,
.blog-form .form-vertical select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.blog-form .checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.blog-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.blog-manager--posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}
.blog-manager--posts .blog-manager__flash {
    order: 0;
}
.blog-manager--posts .blog-manager__right {
    order: 1;
}
.blog-manager--posts .blog-manager__left {
    order: 2;
}

/* Avis (admin) */
.np-avis-admin {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.np-avis-admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.np-avis-admin-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.np-avis-admin-item summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
}
.np-avis-admin-item summary::-webkit-details-marker {
    display: none;
}
.np-avis-admin-sum {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.np-avis-admin-stars {
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 1px;
}
.np-avis-admin-who {
    font-weight: 800;
    color: #111827;
}
.np-avis-admin-meta {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}
.np-avis-admin-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.np-avis-admin-actions form {
    margin: 0;
}
.np-avis-admin-body {
    padding: 10px 12px 12px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}
.np-avis-admin-comment {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #111827;
    white-space: pre-wrap;
}
.np-avis-admin-item textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.92rem;
    box-sizing: border-box;
    resize: vertical;
}
.blog-pagination {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.page-pill {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #111827;
}
.page-pill.is-active {
    background: var(--site-primary);
    color: #fff;
    border-color: var(--site-primary);
}
.current-thumb {
    font-size: 0.9rem;
    color: #4b5563;
}

@media (max-width: 900px) {
    .user-editor .section-grid-editor.draggables,
    .user-editor #sections-draggable {
        grid-template-columns: 1fr;
    }
    .blog-admin-grid {
        grid-template-columns: 1fr;
    }
    .blog-preview {
        max-height: none;
    }
}

.color-toast.err { background: #b91c1c; }
.color-toast.info { background: #2563eb; }

.np-addr-field {
    position: relative;
}

.np-addr-suggest {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    overflow: hidden;
}

.np-addr-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-size: .9rem;
    border-radius: 0;
}

.np-addr-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 820px) {
    .row-2 {
        grid-template-columns: 1fr;
    }
}

/* Assets manager */
.np-assets-main {
    max-width: 1100px;
    margin: 24px auto 40px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.np-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.np-asset-card {
    border: 1px solid var(--client-primary-extralight);
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    min-height: 220px;
}
.np-asset-thumb {
    display: block;
    background: #f8fafc;
    height: 120px;
    position: relative;
    overflow: hidden;
}
.np-asset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.np-asset-file {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #64748b;
}
.np-asset-meta {
    padding: 10px;
    display: grid;
    gap: 6px;
}
.np-asset-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.np-asset-size {
    font-size: 0.8rem;
    color: #64748b;
}
.np-asset-actions {
    margin-top: auto;
    padding: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

/* Plugin "Payé" checkbox -> toggle UI (admin/sites.php) */
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"] + .np-switch-label {
    position: relative;
    padding-left: 54px;
    line-height: 24px;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"] + .np-switch-label .np-plugin-state {
    display: none;
    font-weight: 700;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:checked + .np-switch-label .np-plugin-state--on {
    display: inline;
    color: #16a34a;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:not(:checked) + .np-switch-label .np-plugin-state--off {
    display: inline;
    color: #b91c1c;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"] + .np-switch-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--client-primary) 35%, #ffffff 65%);
    border: 1px solid color-mix(in srgb, var(--client-primary) 55%, transparent);
    transform: translateY(-50%);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"] + .np-switch-label::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    transform: translateY(-50%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.20);
    transition: left 160ms ease, transform 160ms ease;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:checked + .np-switch-label::before {
    background: #16a34a;
    border-color: color-mix(in srgb, #16a34a 60%, transparent);
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:checked + .np-switch-label::after {
    left: 39px;
    transform: translate(-100%, -50%);
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:focus-visible + .np-switch-label::before {
    outline: 2px solid color-mix(in srgb, var(--client-primary-dark) 45%, #ffffff 55%);
    outline-offset: 2px;
}
.np-sites form.np-plugin-cell label.np-switch input[data-plugin-paid="1"]:disabled + .np-switch-label {
    opacity: 0.65;
    cursor: not-allowed;
}
