/* Reset de base indépendant du thème (nécessaire car le CSS du thème est volontairement retiré sur cette page) */
html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body, .produp-preview-banner, .produp-app, .produp-app * {
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== Produp — thème sombre/doré façon NeoWaiter ===== */

.produp-app {
	max-width: 900px;
	margin: 0 auto;
	font-size: 14px;
	background: #0d0d0d;
	color: #e8e0cf;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #2a2416;
}

.produp-fullscreen-body {
	margin: 0;
	padding: 0;
	background: #f6f5ef;
}

.produp-fullscreen-body .produp-front {
	margin: 0 auto;
	padding: 20px 12px;
}

.produp-front {
	margin: 20px auto;
	padding: 0;
	max-width: 900px;
}

.produp-loading, .produp-empty {
	padding: 40px 20px;
	text-align: center;
	color: #8a8264;
}

/* Header */
.produp-header {
	background: linear-gradient(135deg, #1a1608, #0d0d0d);
	padding: 22px 20px;
	border-bottom: 1px solid #3a3218;
	display: flex;
	align-items: center;
	gap: 12px;
}

.produp-logo { font-size: 28px; }

.produp-header h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #e8c66b;
	letter-spacing: 0.3px;
}

.produp-edit-company {
	background: none;
	border: none;
	color: #8a8264;
	font-size: 11px;
	cursor: pointer;
	padding: 0;
	margin-top: 2px;
}

.produp-edit-company:hover { color: #e8c66b; }

/* Nav */
.produp-nav {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #121212;
	border-bottom: 1px solid #2a2416;
	overflow-x: auto;
}

.produp-nav-tab {
	background: #1a1a1a;
	color: #b8ae8c;
	border: 1px solid #2f2a18;
	border-radius: 20px;
	padding: 8px 16px;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
}

.produp-nav-tab.active {
	background: #e8c66b;
	color: #0d0d0d;
	border-color: #e8c66b;
	font-weight: 600;
}

/* Content */
.produp-content {
	background: #f6f5ef;
	color: #1d2327;
	padding: 20px;
	border-radius: 0 0 10px 10px;
}

.produp-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}

.produp-topbar h2 { margin: 0; font-size: 18px; }

.produp-btn {
	background: #c9a13b;
	color: #1a1608;
	border: none;
	padding: 9px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}

.produp-btn:hover { background: #dab652; }

.produp-btn.secondary {
	background: #fff;
	color: #333;
	border: 1px solid #d6d0bd;
}

.produp-btn.danger { background: #c0392b; color: #fff; }
.produp-btn.small { padding: 5px 12px; font-size: 12px; }

/* Stat cards (style NeoWaiter "vue d'ensemble") */
.produp-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}

.produp-stat-card {
	background: #17140a;
	border: 1px solid #3a3218;
	border-left: 3px solid #e8c66b;
	border-radius: 8px;
	padding: 16px;
	color: #e8e0cf;
}

.produp-stat-card .value {
	font-size: 26px;
	font-weight: 700;
	color: #e8c66b;
}

.produp-stat-card .label {
	font-size: 12px;
	color: #a89f80;
	margin-top: 4px;
}

/* Product grid */
.produp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.produp-card {
	background: #fff;
	border: 1px solid #e2ddc9;
	border-radius: 8px;
	padding: 16px;
	cursor: pointer;
	transition: box-shadow 0.15s;
}

.produp-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.produp-card h3 { margin: 8px 0; }

.produp-card .produp-meta { color: #888; font-size: 12px; margin-bottom: 8px; }

.produp-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 12px;
	font-size: 11px;
	background: #f0edd9;
	color: #6b5e2e;
}

.produp-badge.status-draft { background: #fcf0e4; color: #8a5a00; }
.produp-badge.status-ready { background: #e6f5e9; color: #1e7b34; }

/* Modal */
.produp-modal-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,0.6);
	display: flex; align-items: center; justify-content: center; z-index: 9999;
}

.produp-modal {
	background: #fff; border-radius: 8px; padding: 24px;
	width: 480px; max-width: 90vw; max-height: 85vh; overflow-y: auto;
}

.produp-modal h2 { margin-top: 0; color: #1d2327; }

.produp-field { margin-bottom: 12px; }
.produp-field label { display: block; font-weight: 600; margin-bottom: 4px; color: #333; }
.produp-field input, .produp-field textarea, .produp-field select {
	width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 5px;
}

.produp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Product detail */
.produp-detail-header {
	display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 12px;
}

.produp-back {
	background: none; border: none; color: #a3821f; cursor: pointer; padding: 0;
	margin-bottom: 12px; font-size: 13px; font-weight: 600;
}

.produp-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2ddc9; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.produp-tab { padding: 8px 14px; cursor: pointer; border: none; background: none; color: #888; white-space: nowrap; flex-shrink: 0; }
.produp-tab.active { color: #a3821f; font-weight: 700; border-bottom: 2px solid #c9a13b; margin-bottom: -2px; }

.produp-component {
	border: 1px solid #e2ddc9; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; background: #fff;
}

.produp-component-header { display: flex; justify-content: space-between; align-items: center; }

.produp-sourcing-row {
	display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid #f0edd9; font-size: 13px;
}
.produp-sourcing-row.preferred { font-weight: 600; color: #1e7b34; }

.produp-cost-summary {
	background: #fff; border: 1px solid #e2ddc9; border-radius: 8px; padding: 14px 18px;
	margin-bottom: 16px; display: flex; gap: 30px;
}
.produp-cost-summary .value { font-size: 22px; font-weight: 700; color: #a3821f; }

.produp-post {
	border: 1px solid #e2ddc9; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px;
	white-space: pre-wrap; background: #fff;
}
.produp-post .produp-badge { margin-bottom: 8px; }

.produp-error {
	background: #fcecea; border-left: 4px solid #c0392b; padding: 10px 14px; margin-bottom: 16px; color: #8a1f1f;
}

.produp-component-image, .produp-product-image {
	width: 100%; max-width: 100%; border-radius: 6px; margin-bottom: 8px; object-fit: contain; background: #f0edd9;
}
.produp-component-image { max-height: 180px; }
.produp-product-image { max-height: 260px; }

.produp-marketing-media { max-width: 320px; border-radius: 6px; margin-bottom: 16px; }

/* Paywall */
.produp-plans { display: flex; gap: 20px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.produp-plan-card {
	background: #fff; border: 1px solid #e2ddc9; border-radius: 8px; padding: 24px; width: 240px; text-align: center;
}
.produp-plan-card h2, .produp-plan-card h3 { margin-top: 0; }
.produp-plan-price { font-size: 24px; font-weight: 700; margin: 12px 0 20px; color: #a3821f; }
.produp-plan-price span { font-size: 13px; font-weight: 400; color: #888; }
.produp-plan-card .produp-btn { display: inline-block; text-decoration: none; }
.produp-paywall { text-align: center; padding: 30px 20px; }

.produp-image-broken {
	background: #fcf0e4;
	border: 1px solid #e8c66b;
	color: #8a5a00;
	font-size: 12px;
	padding: 8px 10px;
	border-radius: 5px;
	margin-bottom: 8px;
}

.produp-preview-banner {
	background: #2271b1;
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	margin-bottom: 12px;
	font-size: 13px;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.produp-preview-banner a { color: #fff; text-decoration: underline; }

.produp-leads-warning {
	background: #fcf0e4;
	border-left: 3px solid #c9a13b;
	color: #6b4d00;
	font-size: 12px;
	padding: 10px 12px;
	border-radius: 5px;
	margin: 10px 0;
}

.produp-lead-card {
	border: 1px solid #e2ddc9;
	border-radius: 6px;
	padding: 10px 12px;
	margin-bottom: 8px;
	background: #fffdf7;
}

.produp-lead-card .produp-btn {
	margin-top: 6px;
}

.produp-material-badge {
	display: inline-block;
	background: #f0edd9;
	color: #6b5e2e;
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 12px;
	margin: 4px 0 8px;
}

.produp-clickable {
	cursor: zoom-in;
}

.produp-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0;
}

.produp-gallery-item {
	position: relative;
	width: 80px;
	height: 80px;
}

.produp-gallery-thumb {
	width: 80px;
	height: 80px;
	object-fit: contain;
	background: #f0edd9;
	border-radius: 6px;
	cursor: zoom-in;
	border: 1px solid #e2ddc9;
}

.produp-gallery-pdf {
	width: 80px;
	height: 80px;
	border: 1px solid #e2ddc9;
	border-radius: 6px;
	background: #fff8ea;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 10px;
	overflow: hidden;
}

.produp-gallery-pdf a {
	color: #6b5e2e;
	text-decoration: none;
	padding: 4px;
	word-break: break-all;
}

.produp-gallery-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #c0392b;
	color: #fff;
	border: none;
	font-size: 11px;
	cursor: pointer;
	line-height: 1;
}

.produp-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	cursor: zoom-out;
	padding: 20px;
}

.produp-lightbox-overlay img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

.produp-lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
}

.produp-component-toprow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.produp-component-checkbox {
	width: 18px;
	height: 18px;
}

.produp-move-buttons {
	margin-left: auto;
}

.produp-move-btn {
	background: none;
	border: 1px solid #e2ddc9;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 12px;
	cursor: pointer;
	margin-left: 4px;
}

.produp-component-child {
	border-left: 3px solid #c9a13b;
}

.produp-selection-toolbar {
	background: #17140a;
	color: #e8e0cf;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	position: sticky;
	top: 0;
	z-index: 10;
}

.produp-call-btn {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	text-decoration: none;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 10px;
	margin-left: 6px;
}

.produp-whatsapp-btn {
	display: inline-block;
	background: #25d366;
	color: #fff;
	text-decoration: none;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 10px;
	margin-left: 6px;
}

.produp-logo-img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
}

.produp-company-logo-preview {
	max-width: 160px;
	max-height: 160px;
	object-fit: contain;
	background: #f0edd9;
	border-radius: 8px;
	display: block;
	margin-bottom: 10px;
}

.produp-projection-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 500px;
}

.produp-projection-table th, .produp-projection-table td {
	padding: 6px 10px;
	text-align: right;
	border-bottom: 1px solid #e2ddc9;
}

.produp-projection-table th:first-child, .produp-projection-table td:first-child {
	text-align: left;
}

.produp-projection-table thead th {
	background: #f0edd9;
	color: #6b5e2e;
}

.produp-expense-category-title {
	color: #a3821f;
	font-size: 15px;
	margin: 20px 0 8px;
	border-bottom: 1px solid #e2ddc9;
	padding-bottom: 4px;
}

.produp-order-card {
	border: 1px solid #e2ddc9;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 10px;
	background: #fff;
}

.produp-timeline {
	display: flex;
	border-radius: 8px;
	overflow: hidden;
	height: 70px;
	margin-top: 10px;
}

.produp-timeline-segment {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	padding: 4px;
}

.produp-timeline-supply {
	background: #c9a13b;
}

.produp-timeline-assembly {
	background: #6b5e2e;
}

.produp-sourcing-reassign {
	background: none;
	border: none;
	color: #2271b1;
	cursor: pointer;
	font-size: 13px;
	margin-left: 6px;
	padding: 0 2px;
}

.produp-sourcing-remove {
	background: none;
	border: none;
	color: #c0392b;
	cursor: pointer;
	font-size: 13px;
	margin-left: 6px;
	padding: 0 2px;
}

.produp-spinner {
	display: inline-block; width: 14px; height: 14px; border: 2px solid #ccc;
	border-top-color: #a3821f; border-radius: 50%;
	animation: produp-spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px;
}

@keyframes produp-spin { to { transform: rotate(360deg); } }
